Effects are one aspect of AudiobookRecorder which is not managed from within the GUI. Effects are based around XML files that are stored in
specific locations and contain definitions for combining different filters together to form you desired effects.
There are some example effect (.eff) files in the repository.
There are a number of different filters which can be combined within AudobookRecorder:
- AGC - Automatic Gain Control
- Amplifier - Amplification and attenuation
- Biquad - Biquad filters of different types (High Pass, Low Pass, Band Pass, Notch, Peak, High Shelf, Low Shelf)
- Chain - Virtual filter for linking other filter files together
- Clipping - Distortion through limiting the maximum amplitude
- Delay Line - Reverb and echo
- Group - Wrapper for combining filters
- LFO - Low Frequency Oscillator ring modulator
- Pan - Left/right panning
The format of an effect file is pretty simple. Here's an example:
<effect name="Cut Computer Hum">
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
</effect>
This one simply has 4 biquad filters in it. Three of them are notch filters at 28Hz, 91Hz and 120Hz, each cutting the amplitude around those
frequencies by -50dB. Then there is a lowpass filter at 10kHz. The gain of the low-pass filter is the opposite that you would think, and actually
refers to the portion of the spectrum not above the filter frequency, not below it. That means that all frequencies above 10kHz are attenuated by
-10dB, and frequencies below 10kHz pass unaffected. The Q factor of a biquad filter defines how sharp or narrow the filter is.
Filters within an effect are applied in the order that they are specified.
Effect files can be placed in two places. Either in a folder called System within your main recordings folder, or
directly in the folder for one of your recordings. Files in the recording itself will override ones named the same in the "system" folder.
Here is a breakdown of each filter type and the different attributes each can have.
AGC
The AGC filter attempts to amplify or attenuate the sample to boost quiet sections and soften louder sections.
<agc ceiling="num" limit="num" attack="num" decay="num" />
- Ceiling - The target amplutude. Default is 0.708, which is eqivalent to -3dB.
- Limit - The absolute maximum amplitude allowed. Default is 1, which is full scale.
- Attack - Amount the gain factor changes by when attenuating loud noises
- Decay - Amount the gain factor changes by when boosting quiet noises
Amplifier
The amplifier simply applies a gain to the sample.
<amplifier gain="num" />
- Gain - Gain to apply to the samples. 1 is unity gain (no change), 2 is double the gain, 0.5 is half the gain, etc.
Biquad
A biquad filter is a way of boosting or attenuating different frequency components within a sound. The closest analogy is the graphic
equaliser on a stereo system.
<biquad type="type" q="factor" fc="frequency" gain="num" />
- Type - This is the filtering type performed by the biquad filter:
- lowpass - Frequencies above the center frequency are smoothly attenuated
- highpass - Frequencies below the center frequency are smoothly attenuated
- bandpass - Frequencies both above and below the center frequency are smoothly attenuated
- notch - Frequencies at and near the center frequency are attenuated
- peak - Frequencies at and near the center frequency are amplified
- lowshelf - Frequencies below the center frequency are sharply amplified or attenuated
- highshelf - Frequencies above the center frequency are sharply amplified or attenuated
- Q - The "quality" factor of the filter. This defines how wide the filter is, or how sharp the curvature is, etc. The exact effect depends
on the filter type chosen.
- FC - The "center" frequency. This is the nominal frequency the filter operates at.
- Gain - How much to attenuate or amplify the signal in the filter-affected frequency ranges.
Chain
Chain allows you to include the contents of another filter within a new filter. The chained filter is processed as though it were a single effect.
<chain src="name" />
The single attribute src is the filename with .eff removed. If you have an effect called echo.eff
the src to chain it would be echo.
Clipping
Clipping is a very simple distortion effect. Any samples that exceed the clipping value are sliced off at that level. It gives an effect similar to overdrive on a
guitar amplifier.
<clipping clip="num" />
- Clip - The sample value to clip at (between 0 and 1).
Delay Line
Delay lines are the building blocks of echo and reverberation. They are also one of the few filters that can also contain other filters.
<delayline wetonly>
<delay samples="num" gain="num" pan="num" />
[<delay samples="num" gain="num" pan="num" />] ...
</delayline>
<delayline wetonly>
<delay samples="num" gain="num" pan="num">
[<... other effects ...>]
</delay>
[...]
</delayline>
- WetOnly - If present will prevent the mixing of the original "dry" audio.
- Samples - The number of samples to delay this delay line by
- Gain - How much to amplify or attenuate this delay line by
- Pan - Move the audio to the left (-1) or the right (+1) or anywhere in bewteen
Any effects added inside a delay are applied to that delay's samples only before mixing with the incoming audio (yes, those effects can also include other delayline and delay
filters).
Group
The group filter allows you to combine multiple filters into a single effect. The main use is as the wrapper around the whole effect and are seldom used inside an effect.
<group name="text">
[... other effects ...]
<group>
LFO
A Low Frequency Oscillator generates a waveform and mixes it with the incoming audio using amplitude modulation. This allows rapid modification of the amplitude of the audio
to create all sorts of wonderful effects. The Darlek voice in Doctor Who is a ring modulator (amplitude modulation) using a low frequency oscillation to create the effect.
<lfo frequency="f" depth="num" phase="num" waveform="tyope" mode="mode" duty="num" />
- Frequency - The frequency of the LFO signal generator
- Depth - The amount of modulation to perform
- Phase - The phase of the generated waveform (0 to 2*PI)
- Waveform - The shape of the waveform to generate:
- sine
- cosine
- square
- triangle
- sawtooth
- Mode - How to combine the modulated signal with the existing signal:
- add - add the modulated signal to the original signal
- replace - replace the original signal with the modulated signal
- Duty - The duty cycle of the generated waveform. Only applicable to square waves. 0-100.
Pan
Changes the left/right location of the audio signal.
<pan pan="pos" />
- Pan - The location to send the audio. -1 is fully left, +1 is fully right. Any value between these two extremes may be specified.
Example
Here's a more complex example. It provides a good large room echo effect.
<effect name="Large Room (loud)">
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
<delayline>
<delay samples="5500" gain="0.2" pan="-0.3">
<biquad type="highpass" fc="300" q="1" gain="0" />
</delay>
<delay samples="11000" gain="0.05" pan="0.3">
<biquad type="highpass" fc="600" q="1" gain="0" />
</delay>
<delay samples="16500" gain="0.01" pan="0.0">
<biquad type="highpass" fc="600" q="1" gain="0" />
</delay>
</delayline>
<amplifier gain="0.9" />
</effect>
This gives three echoes, each with a different location in the audio space and filtered to give different qualities of sound. The overall result is then amplified.