Stereo Balance Control
GPL-2.0 License
balance.lv2 is an audio-plugin for stereo balance control with optional per channel delay.
balance.lv2 facilitates adjusting stereo-microphone recordings (X-Y, A-B, ORTF). But it also generally useful as "Input Channel Conditioner". It allows for attenuating the signal on one of the channels as well as delaying the signals (move away from the microphone). To round off the feature-set channels can be swapped or the signal can be downmixed to mono after the delay.
It features a Phase-Correlation meter as well as peak programme meters according to IEC 60268-18 (5ms integration, 20dB/1.5 sec fall-off) for input and output signals.
Compiling this plugin requires LV2 SDK (lv2 lv2core), gnu-make and a c-compiler. The optional UI depends on libftgl-dev, libglu-dev, libx11-dev and the fonts-freefont-ttf (or any other .ttf font).
git clone https://github.com/x42/balance.lv2.git
cd balance.lv2
make
sudo make install PREFIX=/usr
# test run
jalv.gtk http://gareus.org/oss/lv2/balance
Note to packagers: The Makefile honors PREFIX
and DESTDIR
variables as well
as CFLAGS
, LDFLAGS
and OPTIMIZATIONS
(additions to CFLAGS
).
The plugin has six control inputs, all of which are interpolated and can be automated or changed dynamically without introducing clicks.
Simple gain stage to amplify or attenuate the signal by at most 20dB. This knob equally affects both channels.
This stage also allows to individually invert the phase of each channel.
Left/Right signal level balance control. Gain Mode defines the behaviour of the Balance knob.
Regardless of the Gain Mode, at center position the signal remains unmodified.
Allow to delay the signal of either channel to correct the stereo field (signal runtime) or correct phase alignment.
The "Downmix to Mono" option will attenuate the output by -6dB. Other options will simply copy the result to selected channel(s).
The plugin comes with a built-in optional user interface.
Many thanks to all who contributed ideas and feedback. In particular Chris 'oofus' Goddard, who inspired the current signal flow, provided the diagram and beta-tested the plugin. As well as tom^_ for feedback on the GUI in general.