; Guitar Echo
; HK July 2009
; version 2.0
;
; mono in mono out
; pot0 = feedback amount (from no feedback = slap back to infinite feedback)
; pot1 = delay time (50 ms to 1 second with 32 kHz x-tal)
; pot2 = dry - wet mix
;
; only 20 thicks
;declare memory spaces:
mem del 32767
;declare register equates:
equ dout reg0
equ kfbk reg1
equ dry_in reg2
;get feedback value from pot0:
wrax kfbk,0
rdax pot0,1
wrax kfbk,0
;get address pointer from pot1:
rdax pot1,1
and %01111110_00000000_00000000 ;don't make jumps too small
sof 61/64,3/64 ;50 ms to 1 second
wrax addr_ptr,0
;get output from delay:
rmpa 1
wrax dout,0
;put input signals into delay, allowing for feedback:
rdax dout,1
mulx kfbk
rdax adcl,0.5
rdax adcr,0.5
wrax dry_in, 1
wra del,0
; mix dry and wet using pot2
rdax dout,1
rdax dry_in,-1
mulx pot2
rdax dry_in,1
;form mono output:
wrax dacl,1
wrax dacr,0
Hi, regarding this echo code I'm getting a bit of noise (HF noise, hiss) when feedback is set to max. Even with nothing connected to the ADC inputs, noise becomes more noticeable as time passes. Is there any way to filter or avoid this noise?
Thanks.
hkwijhe wrote:Hi all,
Just wrote a simple guitar echo that does a pretty nice job.
Have fun,
; Guitar Echo
; HK July 2009
; version 2.0
;
; mono in mono out
; pot0 = feedback amount (from no feedback = slap back to infinite feedback)
; pot1 = delay time (50 ms to 1 second with 32 kHz x-tal)
; pot2 = dry - wet mix
;
; only 20 thicks
;declare memory spaces:
mem del 32767
;declare register equates:
equ dout reg0
equ kfbk reg1
equ dry_in reg2
;get feedback value from pot0:
wrax kfbk,0
rdax pot0,1
wrax kfbk,0
;get address pointer from pot1:
rdax pot1,1
and %01111110_00000000_00000000 ;don't make jumps too small
sof 61/64,3/64 ;50 ms to 1 second
wrax addr_ptr,0
;get output from delay:
rmpa 1
wrax dout,0
;put input signals into delay, allowing for feedback:
rdax dout,1
mulx kfbk
rdax adcl,0.5
rdax adcr,0.5
wrax dry_in, 1
wra del,0
; mix dry and wet using pot2
rdax dout,1
rdax dry_in,-1
mulx pot2
rdax dry_in,1
;form mono output:
wrax dacl,1
wrax dacr,0
The way the code is written you have basically infinite feedback when the feedback pot is set at max. So everything will add up, including noise. If you look at the lines: