VirtualDub help - Audio filter reference

On a crash...

Dialogs:

Video filters
Video frame rate control
Video color depth
Video range
Video compression
Audio filters
Audio interleaving
Audio compression
Audio conversion
Audio volume
Capture settings
Capture preferences
Capture volume meter
Preferences

butterfly | Converts between left/right and mid/side stereo channels.
center cut | Extract a center channel from stereo audio.
center mix | Mix a mono stream with a stereo stream.
discard | Dump unwanted audio.
gain | Modify the volume of audio.
highpass | Cut out sounds below a given frequency.
input | Pull audio from AVI or WAV source.
lowpass | Cut out sounds above a given frequency.
mix | Add together audio streams.
output | Sink from graph into output file.
ratty pitch shift | Modify the pitch of audio without changing speed.
resample | Convert audio to a different sampling frequency.
split | Split an audio stream into two identical copies.
stereo chorus | Add a chorus effect.
stereo merge | Merge two mono streams into a stereo stream.
stereo split | Split a stereo stream into two mono streams.
stretch | Stretch or contract audio, modifying length and pitch.

## butterfly

- Converts between left/right and mid/side stereo channels.

Butterfly computes the sum and differences between the left and right channels. This allows stereo algorithms to be applied in mid/side mode -- for instance, butterfly and gain can be used to increase or decrease stereo separation. Bufferfly is its own inverse and can be used to switch to or from mid/side representation.

## center cut

- Extract a center channel from stereo audio.

Center cut uses FFT phase analysis to guess the sounds of the center channel, then subtracts the channel to produce left/right and center outputs. Because downmixing three arbitrary channels down to two is irreversible, this separation is not perfect and some artifacts may result from the algorithm.

## center mix

- Mix a mono stream with a stereo stream.

The first input must be the stereo stream, the second the mono. Both must have the same sampling rate.

## discard

- Dump unwanted audio.

Since all pins in an audio filter graph must be connected, use the discard filter to sink any outputs you do not want.

## gain

- Modify the volume of audio.

The amplified or attenuated output is hard clipped, so boosting the gain on an audio stream that is already hits full volume at peak will cause clipping distortion.

## highpass

- Cut out sounds below a given frequency.

High pass filters are good for simulating tinny transmission media, such as two-way radio. This particular filter uses a 129-point FIR filter; the transition band, the area where the filter tapers off from zero gain to full gain, is about 1.4KHz at a sampling rate of 44KHz. This places some limits on how effective the high pass filter is in some extreme situations. For instance, an ideal high pass filter passes all audio with a cutoff of zero, but this filter will mute some sound up to about 700Hz at 44KHz sample rate.

## input

- Pull audio from AVI or WAV source.

## lowpass

- Cut out sounds above a given frequency.

Low pass filters are good for eliminating hiss and other high-frequency noises. This particular filter uses a 129-point FIR filter; the transition band, the area where the filter tapers off from full gain to zero gain, is about 1.4KHz at a sampling rate of 44KHz. This places some limits on how effective the low pass filter is in some extreme situations. For instance, an ideal low pass filter kills all audio with a cutoff of zero, but this filter will give you muted sound up to about 700Hz at 44KHz sample rate.

## mix

- Add together audio streams.

The mix is simple addition with hard clipping, so if you combine the mix with an attenuating gain filter to reduce the post-mix volume, the gain filter should be first. If one input has fewer channels than the other, the lowest N channels common between the two are mixed, and the remaining channels are passed through.

You cannot mix two streams that have different sampling rates -- resample one to match the other to do this.

## output

- Sink from graph into output file.

You need one of these in any audio filter graph. It automagically morphs into the file output or audio playback filter as appropriate.

## ratty pitch shift

- Modify the pitch of audio without changing speed.

Ratty pitch shift works by stretching or contracting its input, slicing it into small sections, and then overlapping and mixing them. This alters the pitch of the audio without changing its speed; since the frequency spectrum is scaled, harmonics are preserved. When raising pitch, some portions of audio are duplicated, and when lowering pitch, some audio portions are dropped. Ratty pitch shift tries to shift the segments around to reduce artifacts, but occasionally you may hear some hiccups, or duplicated/missing beats. That's why it's ratty, but it's fun to play with. The filter is most effective within about +/-10%.

If you combine ratty pitch shift with stretch and use the same ratios for both, you get a time stretcher, which alters the speed of audio without changing its pitch.

## resample

- Convert audio to a different sampling frequency.

This filter uses a 32-phase, 129-tap filter bank to resample audio -- it is higher quality than the Audio | Conversion... option and should be preferred for converting between sampling rates. The transition band is ~1.4KHz at 44KHz sampling rate, and as a result, very sharp downsampling, such as 44KHz to 8KHz, may result in some aliasing. This sounds a bit like a halo. You can reduce the aliasing by applying a low pass filter with a cutoff ~700Hz lower than half the source or half the target sampling rate, whichever is lower. However, this will muffle the sound somewhat.

## split

- Split an audio stream into two identical copies.

## stereo chorus

- Add a chorus effect.

Stereo chorus mixes audio back into itself with a varying delay of 24-26 ms, controlled by two LFOs at 3.3Hz that are offset by 90°. This adds a bit of stereo separation to sound.

You use either mono or stereo sound as input to stereo chorus; when mono is used, it is first duplicated to stereo channels before chorus is added.

## stereo merge

- Merge two mono streams into a stereo stream.

Both streams must have the same sampling rate.

## stereo split

- Split a stereo stream into two mono streams.

## stretch

- Stretch or contract audio, modifying length and pitch.

This effect is the same that you would get by running an audio tape too fast or too slow -- the audio speeds up and raises pitch, or slows down and becomes grumpy. Stretch uses polyphase resampling and thus doesn't introduce transient artifacts; if you only need to make small adjustments to the length of the audio track, this is a good way to do it.

Note | Stretch feeds its output at a different rate than it consumes its input, since it changes the speed of audio streams. Audio filter graphs must never combine two branches that run at different speeds -- the result is either unstable seeking or the filter graph freezing up. Be particularly careful of this when creating parallel branches that later merge.