8 voice chorus
Posted: Fri Feb 07, 2014 10:44 am
took the example in the notes and made an 8 voice chorus from a modified ZDSP chorus. It makes sound but Im not sure if i wrote everything down correctly. I would also like to be able to add delay time so I can get vibrato, flange and chorus with the turn of the knob. Im a little unsure how to do that though. Here is what I have so far:
Code: Select all
mem DELAY 4096
POT0fil equ reg0
POT1fil equ reg1
POT2fil equ reg2
cdel equ reg3
skp run,start ;set up two sin lfos on first iteration of code then jump to start
wlds 0,5,0
wlds 1,5,0
skp run, start
start:
ldax POT0 ;read value of pot 2 and cube it to approximate logarithmic taper
sof .015,0
rdfx POT0fil,0.01 ;filter pot 2 values to give smoother control
wrax POT0fil,1
wrax SIN0_RANGE,1 ;write filtered pot 2 value to both sin lfo amplitudes
wrax sin1_range,1
ldax POT1
mulx pot1 ;read, square and filter pot 0 value
sof .5,0
rdfx POT1fil,0.01
wrax POT1fil,1
wrax SIN0_RATE,0 ;write value to sin 0 rate
wrax SIN1_RATE,0
rdax ADCL,1 ;read value from left input channel
wra cdel,1 ;write value to delay memory
cho rda,SIN0,sin|REG|COMPC,cdel+800 ;these two lines perform the chorus operation see Spin application
cho rda,SIN0,sin,cdel+801 ;note A-0001 for details
cho rda,SIN0,sin|REG|COMPC,cdel+400 ;these two lines perform the chorus operation see Spin application
cho rda,SIN0,sin,cdel+401 ;note A-0001 for details
cho rda,SIN0,sin|REG|COMPC,cdel+1100 ;these two lines perform the chorus operation see Spin application
cho rda,SIN0,sin,cdel+1101 ;note A-0001 for details
cho rda,SIN0,sin|REG|COMPC,cdel+1400 ;these two lines perform the chorus operation see Spin application
cho rda,SIN0,sin,cdel+1401 ;note A-0001 for details
cho rda,sin1,sin|REG|COMPC,cdel+800 ;these two lines perform the chorus operation see Spin application
cho rda,sin1,sin,cdel+801 ;note A-0001 for details
cho rda,sin1,sin|REG|COMPC,cdel+400 ;these two lines perform the chorus operation see Spin application
cho rda,sin1,sin,cdel+401 ;note A-0001 for details
cho rda,sin1,sin|REG|COMPC,cdel+1100 ;these two lines perform the chorus operation see Spin application
cho rda,sin1,sin,cdel+1101 ;note A-0001 for details
cho rda,sin1,sin|REG|COMPC,cdel+1400 ;these two lines perform the chorus operation see Spin application
cho rda,sin1,sin,cdel+1401 ;note A-0001 for details
wrax DACL,0 ;write to left channel output