Whammy
Posted: Sun Jul 03, 2011 5:30 pm
Hello Everybody,
I'm new on this forum and I would share with you this simple program based on An-0001-4.spn code i'm working on.
My intention is reproduce a clone of whammy, using Pot0 in a pedal and Pot1 with a rotary switch to select some discrete pitch options like whammy do (second, third, fifth, octave up, octave down, dive bomb).
Using the Fv-1 with an analog mix between dry and Fx signals would be possible obtain the harmony mode. I don't want use digital mix cause I wanna use the right channel to perform shimmer using the fantastic program written by ronaldb.
Now the code is not complete, Pot0 works fine but Pot1 now is not discrete. I need to implement the Pot skip routine ( http://www.spinsemi.com/knowledge_base/ ... p_routines ).
But now for me is time to sleep, it's 2 A.M. in Italy.
And this is the code:
; Based on Application note AN-0001 program AN0001-4.spn
;POT0: Whammy Pedal
;Pot1: set the pitch range
; Memory declarations
delayl mem 4096 ; Left delay
temp mem 1 ; Temp location for partial calculations
pitch equ REG0
skp run,START
wldr RMP0,0,4096 ;could be 2048 for faster tracking?
START:
ldax ADCL ; Write it to left delay and clear ACC
wra delayl,0 ; Read in the current sample, ADCR -> ACC
; (1-k)*sample[addr]
cho rda,RMP0,REG|COMPC,delayl
; k*sample[addr+1] + ACC
cho rda,RMP0,,delayl+1
; ACC -> memory, ACC*0 -> ACC
wra temp,0
; (1-k)*sample[addr+ half ramp]
cho rda,RMP0,RPTR2|COMPC,delayl
; k*sample[addr+ half ramp + 1] + ACC
cho rda,RMP0,RPTR2,delayl+1
; ACC*(1-XFADE) + 0
cho sof,RMP0,NA|COMPC,0
; memory[addr] * XFADE + ACC
cho rda,RMP0,NA,temp
; Final result is in ACC, write it to DACL and clear ACC
wrax DACL,0
; Rate adjustment
ldax POT1
wrax pitch,0
ldax POT0 ; Read POT0 into ACC
mulx pitch ; Move from no pitch shift (0) to value set by "pitch" value
wrax RMP0_RATE,0 ; Load ACC into ramp rate register and clear ACC
I'm new on this forum and I would share with you this simple program based on An-0001-4.spn code i'm working on.
My intention is reproduce a clone of whammy, using Pot0 in a pedal and Pot1 with a rotary switch to select some discrete pitch options like whammy do (second, third, fifth, octave up, octave down, dive bomb).
Using the Fv-1 with an analog mix between dry and Fx signals would be possible obtain the harmony mode. I don't want use digital mix cause I wanna use the right channel to perform shimmer using the fantastic program written by ronaldb.
Now the code is not complete, Pot0 works fine but Pot1 now is not discrete. I need to implement the Pot skip routine ( http://www.spinsemi.com/knowledge_base/ ... p_routines ).
But now for me is time to sleep, it's 2 A.M. in Italy.
And this is the code:
; Based on Application note AN-0001 program AN0001-4.spn
;POT0: Whammy Pedal
;Pot1: set the pitch range
; Memory declarations
delayl mem 4096 ; Left delay
temp mem 1 ; Temp location for partial calculations
pitch equ REG0
skp run,START
wldr RMP0,0,4096 ;could be 2048 for faster tracking?
START:
ldax ADCL ; Write it to left delay and clear ACC
wra delayl,0 ; Read in the current sample, ADCR -> ACC
; (1-k)*sample[addr]
cho rda,RMP0,REG|COMPC,delayl
; k*sample[addr+1] + ACC
cho rda,RMP0,,delayl+1
; ACC -> memory, ACC*0 -> ACC
wra temp,0
; (1-k)*sample[addr+ half ramp]
cho rda,RMP0,RPTR2|COMPC,delayl
; k*sample[addr+ half ramp + 1] + ACC
cho rda,RMP0,RPTR2,delayl+1
; ACC*(1-XFADE) + 0
cho sof,RMP0,NA|COMPC,0
; memory[addr] * XFADE + ACC
cho rda,RMP0,NA,temp
; Final result is in ACC, write it to DACL and clear ACC
wrax DACL,0
; Rate adjustment
ldax POT1
wrax pitch,0
ldax POT0 ; Read POT0 into ACC
mulx pitch ; Move from no pitch shift (0) to value set by "pitch" value
wrax RMP0_RATE,0 ; Load ACC into ramp rate register and clear ACC