First off, I think that 4 all-pass stages are required for each notch you want in the spectrum. A single all pass stage could give you 90 degrees phase shift at the highest frequency, but that is a limit, so mixing 2 stages of that with your dry signal would be more like a low pass filter. So, instead, we use 4 stages and the notch occurs when they are shifting 45 degrees each. Thus for each notch you want, use 4 phase shift stages.
Code: Select all
rdax p1,1
wrax temp,1
mulx phase ; actual phase shift parameter in action
rdax mono,0.015625 ;input to phase shift network
wrax p1,-1
mulx phase ; "mixing" parameter, ? is it needed ?
rdax temp,1
wrax temp1,0
The supplied algorithm multiplies the AP stage output also by the phase parameter, which goes between 0.75 and 0.95 (I'm pretty sure). That is not a huge amount of variation and for my experiments I'm considering just leaving that out completely and doing wet/dry mixing at the very end. Is there any other reason for this?
Next up is the control processing.
Code: Select all
cho rdal,sin1 ;read sin1 as +/-1
sof 0.5,0.5 ;make positive only sin ranges 0 to 1
log 0.5,0
exp 1,0 ;square root function
sof 1,-0.5 ;make +/-0.5
sof 1.999,0 ;make +/-1 again
mulx pot2 ;pot2 controls width and mix
sof 0.1,0.85
wrax phase,0 ;phase variable ranges 0.8 to 0.95
Based on my understanding of EXP, the parameters given are basically scale and offset after doing 2^(ACC). So is it safe to say that you could replace:
Code: Select all
exp 1,0 ;square root function
sof 1,-0.5 ;make +/-0.5
Code: Select all
exp 1,-0.5 ;square root function
The end result of taking the square root of the SIN wave is that you distort the symmetry, which ultimately leads to a subjectively more pleasing sweep on the phase parameter. Conceivably you could take a +/- 1.0 amplitude triangle wave and subject it to the same processing, giving a slightly different sound, or experiment with the center and width endpoints of the resulting LFO signal.
Finally, I found a little article over at CCRMA regarding the all-pass stage, which suggests that there is a structure which uses twice as many delay elements, for the benefit of preventing internal over flow.
https://ccrma.stanford.edu/~jos/pasp/Al ... Combs.html
The phaser example is one of the more challenging for me to understand. Comments/corrections certainly welcome.This can be recognized as direct form I [452], which requires 2M delays instead of M ; however, unlike direct-form II, direct-form I cannot suffer from ``internal'' overflow--overflow can happen only at the output.