Channel effect
The channel effect is built around a delay buffer with a feedback loop. Feedback loops are used in a variety of effects. The free online book Physical Audio Signal Processing has in depth explanations of many different DSP effects using a single delay buffer. All of these recipes can be represented using the Jamdac channel effect:
- slapback echo
- feedforward comb filter
- feedback comb filter
- comb allpass filter
- flanger effect
- single tap chorus effect
APPLY_EFFECT
Each of the three waves has its own IO_WAVE::APPLY_EFFECT switch that determines whether the effect will be applied to it. The effect is specified by the instrument, and its delay buffer gets reset whenever the instrument is triggered. (A future enhancement may allow its state to persist across multiple triggers or instruments; this is why it is called the "channel effect" instead of the "instrument effect.")
DISTORTION_GAIN
The DISTORTION_GAIN amplifier is positioned right before a clip operator, following the design of an electric guitar amp. If you crank up DISTORTION_GAIN to 2.0, and play a note on the digitar, and add a little reverb and flanger, you can get a pretty decent electric guitar sound. To prevent distortion, set DISTORTION_GAIN to 1.0.
DELAY_SAMPLES
The DELAY_SAMPLES parameter determines how much the signal is delayed, measured in samples (always an integer). The delay buffer's array remembers 2,205 recent samples. If DELAY_SAMPLES has a value of 1, the result is the immediately preceding sample. If the value is 2205, the result is a sample from 100 ms ago. The dynamic parameter can be changed interactively to select arbitrary samples from the buffer, producing interesting effects.
DELAY_FEEDBACK
If the DELAY_FEEDBACK parameter is nonzero, a feedback loop results, where the output signal keeps getting added back to the input. This creates the danger of howling, where the signal energy keeps increasing endlessly, causing the familiar terrible noise when a performer moves their microphone too close to the speaker. If you encounter this phenomenon, reduce the size of DELAY_FEEDBACK. 0.8 and 0.5 are typical values.
DRY_LEVEL, PREDELAY_LEVEL, and POSTDELAY_LEVEL
These parameters determine how much of their three "taps" will get mixed together to produce the output signal. They are followed by a clip operator, so if you are experiencing unwanted distortion, reduce the value of these parameters.
I/O definitions
CLASS IO_WAVE # SIZE 30
. . .
# 0=DRY, 1=CHANNEL EFFECT
VAR APPLY_EFFECT: BYTE
END CLASS
CLASS IO_CHANNEL_EFFECT # SIZE 30
# UNITS: S6.10 FIXED POINT
INSET DISTORTION_GAIN: IO_DYNAMIC
# AMOUNT OF DELAY, MEASURED IN SAMPLES. VALUE MUST BE BETWEEN 1 AND 2205,
# OTHERWISE THE OUTPUT IS ZERO.
INSET DELAY_SAMPLES: IO_DYNAMIC
# UNITS: S6.10 FIXED POINT
INSET DELAY_FEEDBACK: IO_DYNAMIC
# UNITS: S6.10 FIXED POINT
INSET DRY_LEVEL: IO_DYNAMIC
# UNITS: S6.10 FIXED POINT
INSET PREDELAY_LEVEL: IO_DYNAMIC
# UNITS: S6.10 FIXED POINT
INSET POSTDELAY_LEVEL: IO_DYNAMIC
END CLASS