|
wavelength 1.0.0
|

Go to the source code of this file.
Functions | |
| short | Saturate (short sample) |
| Apply the cubic saturation curve to a sample, clamping beyond full scale. | |
| short | SoftClip (short sample, short threshold) |
| Pass a sample below threshold unchanged and saturate the part above it. | |
| void | InitEffects () |
| Clear the delay line and the state of every effect. | |
| void | SetEffectParams (const EffectParams *params) |
| Make the target parameters current and store new targets. | |
| void | InitDelayLine () |
| Clear the delay line and the tracking echo's state. | |
| void | EffectEcho (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Echo the mono mix through two taps of the delay line. | |
| void | EffectTrackingEcho (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Echo the mono mix through two taps whose delays follow the time between runs of zero crossings. | |
| void | EffectTriangleWave (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Write a triangle test tone to both outputs. | |
| void | EffectSquareWave (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Write a square test tone to both outputs. | |
| void | EffectBypass (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Copy the inputs to the outputs. | |
| void | EffectReverseSwap (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Write each input reversed to the other channel's output. | |
| void | EffectNone (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Do nothing. | |
| void | EffectSilence (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Write silence to both outputs. | |
| void | EffectConstant (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight, short value) |
| Write one value to every sample of both outputs. | |
| void | SetStreamStatusAddress (void *address) |
| Record the EE address that receives the stream's free space. | |
| int | StreamData (void *data, int size) |
| Append data to the stream, or end the stream and discard its contents when size is zero. | |
| void | EffectStream (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Play one block pair from the stream, or silence while the stream holds less than one pair. | |
| void | InitLadderFilter () |
| Clear the ladder filter's state. | |
| void | EffectLadderFilter (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Run the mono mix through a four-stage ladder filter and a saturator, and step the current left parameters toward their targets. | |
| void | EffectMonoSweep (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Write the mono mix to both outputs, and step the current left parameters toward their targets. | |
| void | EffectStutter (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Pass the input only on the samples where a phase accumulator advanced by the left level wraps, and silence the rest. | |
| void | EffectResonantFilter (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Run each channel through a resonant state variable low-pass filter. | |
| void | EffectDistortedFilter (SampleBlock *inLeft, SampleBlock *inRight, SampleBlock *outLeft, SampleBlock *outRight) |
| Run each channel through the resonant filter and clip loud output samples to full scale. | |
Variables | |
| bool | g_bMonoStream |
| The effects. | |
| short Saturate | ( | short | sample | ) |
Apply the cubic saturation curve to a sample, clamping beyond full scale.
| sample | The sample. |
| short SoftClip | ( | short | sample, |
| short | threshold ) |
Pass a sample below threshold unchanged and saturate the part above it.
The routine has no caller.
| sample | The sample. |
| threshold | Magnitude where the curve starts. |
| void InitEffects | ( | ) |
Clear the delay line and the state of every effect.
| void SetEffectParams | ( | const EffectParams * | params | ) |
Make the target parameters current and store new targets.
For the swept filter, also compute the steps that move the current parameters a third of the way to the targets.
| params | The left and then the right channel's parameters. |
| void InitDelayLine | ( | ) |
Clear the delay line and the tracking echo's state.
| void EffectEcho | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Echo the mono mix through two taps of the delay line.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output, a copy of the left output. |
| void EffectTrackingEcho | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Echo the mono mix through two taps whose delays follow the time between runs of zero crossings.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output, a copy of the left output. |
| void EffectTriangleWave | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Write a triangle test tone to both outputs.
The routine has no caller.
| inLeft | Left input, unused. |
| inRight | Right input, unused. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectSquareWave | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Write a square test tone to both outputs.
The routine has no caller.
| inLeft | Left input, unused. |
| inRight | Right input, unused. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectBypass | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Copy the inputs to the outputs.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectReverseSwap | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Write each input reversed to the other channel's output.
The routine has no caller.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectNone | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Do nothing.
The routine has no caller.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectSilence | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Write silence to both outputs.
| inLeft | Left input, unused. |
| inRight | Right input, unused. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectConstant | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight, | ||
| short | value ) |
Write one value to every sample of both outputs.
The routine has no caller.
| inLeft | Left input, unused. |
| inRight | Right input, unused. |
| outLeft | Left output. |
| outRight | Right output. |
| value | The sample value. |
| void SetStreamStatusAddress | ( | void * | address | ) |
Record the EE address that receives the stream's free space.
| address | EE address. |
| int StreamData | ( | void * | data, |
| int | size ) |
Append data to the stream, or end the stream and discard its contents when size is zero.
| data | The data. |
| size | Byte count. |
| void EffectStream | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Play one block pair from the stream, or silence while the stream holds less than one pair.
| inLeft | Left input, unused. |
| inRight | Right input, unused. |
| outLeft | Left output. |
| outRight | Right output. |
| void InitLadderFilter | ( | ) |
Clear the ladder filter's state.
| void EffectLadderFilter | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Run the mono mix through a four-stage ladder filter and a saturator, and step the current left parameters toward their targets.
The routine has no caller.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectMonoSweep | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Write the mono mix to both outputs, and step the current left parameters toward their targets.
The routine has no caller.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectStutter | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Pass the input only on the samples where a phase accumulator advanced by the left level wraps, and silence the rest.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectResonantFilter | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Run each channel through a resonant state variable low-pass filter.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
| void EffectDistortedFilter | ( | SampleBlock * | inLeft, |
| SampleBlock * | inRight, | ||
| SampleBlock * | outLeft, | ||
| SampleBlock * | outRight ) |
Run each channel through the resonant filter and clip loud output samples to full scale.
| inLeft | Left input. |
| inRight | Right input. |
| outLeft | Left output. |
| outRight | Right output. |
|
extern |
The effects.
Each one reads a block of each input channel and writes a block of each output channel. The module runs them in place, with each output block the same as its input block. Whether the stream effect mixes the stream to mono.