;GA_DEMO Chorus;Pot0 = Reverb level;Pot1 = Rate;pot2 = Effect level;memory declarations:mem ap1 334mem ap2 556mem ap3 871mem lap1a 808mem lap1b 1934mem d1 2489mem lap2a 1016mem lap2b 1787mem d2 2287mem chodel 5000;register equates:equ mono reg0equ apout reg1equ lp1 reg2equ lp2 reg3equ revout reg4equ choout reg5;declare constants:equ kap 0.6 ;all pass coefficientequ krt 0.55 ;reverb timeequ krf 0.5 ;reverb lpf freqequ krs -0.6 ;reverb lpf shelf;clear registers and initialize LFOs:skp run,endclrwrax lp1,0wrax lp2,0wlds sin0,12,100wlds sin1,0,800endclr:;sum inputs to mono:rdax adcl,0.5rdax adcr,0.5wra chodel,1 ;write to chorus delaywrax mono,0.5 ;attenuate into reverb;do reverb and put result in revout (after pot0 control):rda ap1#,kapwrap ap1,-kaprda ap2#,kapwrap ap2,-kaprda ap3#,kapwrap ap3,-kapwrax apout,0rda d2#,krtrdax apout,1rda lap1a#,kapwrap lap1a,-kaprda lap1b#,kapwrap lap1b,-kaprdfx lp1,krfwrlx lp1,krswra d1,0rda d1#,krtrdax apout,1rda lap2a#,kapwrap lap2a,-kaprda lap2b#,kapwrap lap2b,-kaprdfx lp2,krfwrlx lp2,krswra d2,1.99rda d1,1.99mulx pot0mulx pot0wrax revout,0;smooth reverb:cho rda,sin0,sin|reg|compc,lap1b+100cho rda,sin0,sin,lap1b+101wra lap1b+200,0cho rda,sin0,sin|reg|compc,lap2b+100cho rda,sin0,sin,lap2b+101wra lap2b+200,0;;now do chorus, prepare pot1 for rate, driving SIN1:rdax pot1,1mulx pot1sof 0.02,0.01 ;approx. 1Hz to 3 Hzwrax sin1_rate,0 ;load sin1 rate register;do chorus from chorus delay:cho rda,sin1,sin|reg|compc,chodel+1400cho rda,sin1,sin,chodel+1401cho rda,sin1,cos|reg|compc,chodel+1200cho rda,sin1,cos,chodel+1201cho rda,sin1,sin|reg|compa,chodel+1600cho rda,sin1,sin|compc|compa,chodel+1601cho rda,sin1,cos|reg|compa,chodel+900cho rda,sin1,cos|compc|compa,chodel+901mulx pot2wrax choout,0;combine signals:rdax mono,1rdax revout,1rdax choout,0.5sof 1,0.02wrax dacl,1sof 1,-0.04wrax dacr,0