28 March 2007

stereotraditionaldelay~


stereotraditionaldelay~

This block delays an incoming signal and outputs the wet signal on two channels. The original signal is not throughput. It works like the traditional delays, this means with a feedback loop, actually one per channel. Users can change all parameters with the visible controls, or they can vary them by using the two other inputs, except for the phase reverse and switch-off. The difference with the mono delay, except for the stereo part, is the variable delay time per channel and the choice for in-phase or reversed-phase delayed signals.

version

v1.0: built 28/03/2007 with Pd v0.40-2 [pd] [pdf]

interface

Input 1: the mono signal you want to delay
Input 2: the delay time parameter
Input 3: the feedback parameter
Inputs 4 and 5: the left and right channel delay time offset

Output 1 and 2: the delayed, wet stereosignal

Controls:
top number box and horizontal slider: adjust the delay time (DLY) parameter. It specifies how long it takes in milliseconds before you hear the following repetition. It ranges from 0msec to 1500msec (1,5 seconds). This is not only the maximum value of the slider and number box, but also the length of the delay line used in the implementation.
bottom number box and horizontal slider: adjust the feedback (FBK) level parameter. The signal is attenuated with this value divided by 1000. In other words, you can vary the level from 0 (no delay audible) to 0.999 (maximum amplitude of the delayed signals, keeps on repeating as if it never ends) with steps of thousands.
switch-off button: is used to reset all the parameters to 0 and thus turning of the delayed signal.
TO DO: It might be better to call the switch-off button a reset button, implying that after pressing it, the values will not be remembered.
phase-reverse buttons: toggle on and off to create slight difference due to cancelling out of parts of delayed signals.
TO CHECK: It might be possible that this function doesn't work properly because the difference with both switches off is really negligent.
L-offset and R-offset: adjust the delay time of each channel relative to the delay time DLY. It ranges from -200msec to 200msec.

implementation

The basic delay is implemented the same way as the mono traditional delay, but with two copies then. Both loops have the same FBK parameter in common, that is calculated once.
For smoothing the signal when parameters are changed, line blocks are implemented for the dlyLeft, dlyRight and fbk values. Also a one pole high pass filter is added at the outputs, with a very low cutoff frequency.
The dlyLeft and dlyRight values are calculated by adding the delay time parameter DLY to respectively the L-offset and R-offset parameter. Both values are being input in the left slot of the +, because that's the hot one: everytime a value at the left is changed, the block will execute an addition.
Also here a throw~ and catch~ block are left behind. If you want to add the dry signal to the wet one inside the block, it's done by connecting the unconnected blocks to the nearby slots.
The phase reverse logic works like this: when the button is toggled it transmits a 1 or a 0. The moses block sends a 0 to the left output and a 1 to the right, because x<1 is sent to the left, etc. The following messages contain the factor by which the signal must be multiplied. -1 for a phase reverse (as easily seen when you draw a signal on an x-axis with a phase circle next to it). The multiplication that follows (and begins with a 1) is banged by the message and the factor thus changes inside the *~ block.
TO DO: It's possible to also implement an HF DAMP function which simulates a retro analog delay effect. It's nothing more than adding a lowpass filter with fairly high cutoff frequency (or even adjustable) in the delayline.


No comments: