The pot for HF roll off could work better if it was scaled as it is a little too clean at short delays and a little to much roll off at longer delays.
Would using an SOF command be the way to work this out ?
Code: Select all
;OEM1_5 Echo modified to use delay time pot to also adjust feedback filter,
; a shorter delay time will give less HF roll off while longer delay time
; will roll of the HF quicker. Hopefully to help simulate the freq response
; that tape speed (delay time) has on the feedback path.
;pot0 = Repeat feedback
;pot1 = Delay time/repeat damping
;pot2 = Echo Level
;The echo program allows a mono input to produce a mono output,
;delayed and repeated.
;The rather long delay can be used for dramatic performance effects,
;but at shorter delay settings, karaoke-style reverb is obtained.
;The delay is variable from 50 to 700mS (Fs=46KHz)
;and depends on crystal frequency
mem delay 32767
equ potfil1 reg0
equ potfil2 reg1
equ interp reg2
equ lpf reg3
equ temp reg4
equ dout1 reg5
equ dout2 reg6
equ fbk reg7
equ dry_in reg8
equ fildel1 reg9
equ fildel2 reg10
;read inputs, add to feedback and write to delay:
rdax fbk,1 ;read feedback value
mulx pot0 ;scale by pot0 value for feedback control
rdax adcl,0.5 ;read and add inputs
rdax adcr,0.5
wrax dry_in,1
wra delay,0 ;write result to delay
;prepare read pointer based on pot1 setting:
rdax pot1,1 ;read pot value
sof 0.95,0.04 ;limit delay range
rdfx potfil1,0.001 ;filter pot value
wrax potfil1,1 ;write filter register, keep in ACC
rdfx potfil2,0.001
wrax potfil2,1
wrax addr_ptr,0 ;load address pointer with first read position
rmpa 1 ;read memory from pointer position
wrax dout1,0 ;store first value, clear ACC
;now get second value:
or %00000000_00000001_00000000
rdax potfil2,1 ;get pointer back and add
wrax addr_ptr,0 ;load pointer again
rmpa 1
wrax dout2,0 ;store second value, clear accumulator
;now get an interpolation value:
rdax potfil2,1
and %00000000_00000000_11111111
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof -2,0
sof 1.999,0 ;shift 15 paces
wrax interp,0 ;save in register
;now crossfade between delay read values using interp value:
rdax dout2,1
rdax dout1,-1
mulx interp ;crossfade with interp
rdax dout1,1
;now take this as the output, filter and arrange feedback:
wrax fildel1,1 ;write result to filter delay (fildel), full scale
wrax fildel2,1 ;keep in ACC
wrax temp,1 ;store in temp
rdfx lpf,0.1 ;filter signal
wrlx lpf,-1 ;acc is filtered
rdax temp,-1 ;negative filter input value
mulx pot1 ;crossfade around filter with pot1
rdax temp,1 ;filter in again, in phase
wrax fbk,0 ;write to feedback register
;now mix dry and delay to output
;rdax dry_in,1
rdax fildel1,1
rdax fildel2,0
mulx pot2
rdax dry_in,1
wrax dacl,1 ;write result to both outputs
wrax dacr,0