Page 1 of 1

Nested / Lattice allpasses on FV-1?

Posted: Sun Jun 15, 2008 5:02 pm
by seancostello
Hi all:

I am wondering what the best method is for programming nested allpass filters / lattice allpass filters on the FV-1. I have been working on this, but my current technique is very inefficient (and is on a different computer, so no snippets to post at this time).

I am interested in both register-based 2nd order allpasses (lattice filter), and delay RAM allpasses.

Thanks,

Sean Costello

Posted: Wed Jun 25, 2008 5:00 pm
by seancostello
Here is my current nested allpass code. Note that it takes 10 instructions for a single allpass nested inside of an outer allpass. Any slight improvement would be helpful.

Code: Select all

; outer allpass
rda	delay+lap3start, kap	; read from the delay buffer at the start of the allpass delay, and scale by kap 
rda	delay+lap3end, 1.0	; read from the end of the allpass delay space, and add to acc
wra	delay+lap3end, -kap	; write the value into the end of the delay line, and scale the acc by -kap
rda	delay+lap3start, 1.0	; read from the delay buffer at the start of the allpass delay again, and add to acc
wra	delay+lap3start, 0.0	; write the accumulator into the delay buffer at the start of the allpass delay, and clear acc	

; inner allpass
rda	delay+lap4start, kap2
rda	delay+lap4end, 1.0
wra	delay+lap4end, -kap2
rda	delay+lap4start, 1.0
wra	delay+lap4start, 0.0


My current topology is Transposed Direct Form II, to deal with internal scaling issues, but I could use the standard Direct Form II allpass if it results in a considerable savings in cycles.

Thanks for any assistance,

Sean Costello

Posted: Wed Jun 25, 2008 6:29 pm
by frank
Just a first shot. I have not tried the code so it may not work, but:

Code: Select all

rda   delay+lap3end, 1.0 ; End + ACC
rda   delay+lap3start, kap ; Scale start by kap and add to ACC
wrap  delay+lap3end, -kap ; Write to end, scale ACC by -kap and add start from LR register
wra   delay+lap3start, 0.0 ; Write to start and clear ACC
Down from 5 to 4 instructions if it works.