Code: Select all
rdax lp1ar,1
mulx kfl
rdax lp1br,1
wrax lp1br,-1
rdax lp1ar,kql
rdax adcr,1
mulx kfl
rdax lp1ar,1
wrax lp1ar,0
rdax lp2ar,1
mulx kfl
rdax lp2br,1
wrax lp2br,-1
rdax lp2ar,kql
rdax lp1br,1
mulx kfl
rdax lp2ar,1
wrax lp2ar,0
Moderator: frank
Code: Select all
rdax lp1ar,1
mulx kfl
rdax lp1br,1
wrax lp1br,-1
rdax lp1ar,kql
rdax adcr,1
mulx kfl
rdax lp1ar,1
wrax lp1ar,0
rdax lp2ar,1
mulx kfl
rdax lp2br,1
wrax lp2br,-1
rdax lp2ar,kql
rdax lp1br,1
mulx kfl
rdax lp2ar,1
wrax lp2ar,0
Code: Select all
;prep pot1 for resonance
rdax pot1,-1
wrax res,0
rdax adcr,1
rdax lpout,1
wrax fin,0
rdax fin,1.0 ; Read
rdax lp_filt,-1.0 ; ADCL - lp_filt
mulx cutoff ; * C (POT0 in this case)
rdax lp_filt,1.0 ; +lp_filt
wrax lp_filt,1.0 ; write result to lp_filt
rdax lp_filt2,-1.0 ; ADCL - lp_filt
mulx cutoff ; * C (POT0 in this case)
rdax lp_filt2,1.0 ; +lp_filt
wrax lp_filt2,1.0 ; write result to lp_filt
rdax lp_filt3,-1.0 ; ADCL - lp_filt
mulx cutoff ; * C (POT0 in this case)
rdax lp_filt3,1.0 ; +lp_filt
wrax lp_filt3,1.0 ; write result to lp_filt
rdax lp_filt4,-1.0 ; ADCL - lp_filt
mulx cutoff ; * C (POT0 in this case)
rdax lp_filt4,1.0 ; +lp_filt
wrax lp_filt4,1.0 ; write result to lp_filt
mulx res
wrax lpout,1
In the analog Moog filter the feedback creates a delay-free loop, whereas the straightforward digital implementation introduces a unit delay. These two papers talk about digital implementations of the ladder filter:livingston wrote:The filter works by itself but when I add the feedback code it just acts like a volume control. I thought I would just need to multiply the output of the last pole by a negative, then add it to ADCR and put into the first pole input.
If you are talking about generating the filters on the FV-1, it will actually generate a much larger delay. You will still have the single sample delay, as the algorithm can't process a new input until it generates a new output. The feedback outside the chip will also create a delay of a few milliseconds, due to the design of the A/D and D/A converters. Pretty much any A/D and D/A converters will have some amount of delay present.livingston wrote:Having more time to think about this, I'm wondering if I could do the feedback in hardware, i.e., use 4 single pole filters in series, then output the audio and send some of it back into the input pin. This would seemingly get rid of the feedback delay, right?
Code: Select all
rdax lp1ar,1
mulx kfl
rdax lp1br,1
wrax lp1br,-1
rdax lp1ar,kql
mulx pot0
rdax adcr,1
mulx kfl
rdax lp1ar,1
wrax lp1ar,0
rdax lp2ar,1
mulx kfl
rdax lp2br,1
wrax lp2br,-1
rdax lp2ar,kql
mulx pot0
rdax lp1br,1
mulx kfl
rdax lp2ar,1
wrax lp2ar,0