Page 1 of 2
guitar delay
Posted: Sun Mar 10, 2013 1:30 pm
by direct
Hello, everybody!
Has the program who can provide the use of a guitar delay
Posted: Sun Mar 10, 2013 1:51 pm
by frank
Posted: Tue Mar 12, 2013 5:38 am
by direct
Thank frank! I test this code, there is a problem, feedback twist to the maximum and delay time twist to the minimum, the voice of self-oscillation.
I also want to learn in this code to write, now do not quite understand what the feedback is how computing processing
Posted: Tue Mar 12, 2013 7:20 am
by direct
;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
wra del,0
rmpa 1 Here from the location specified by the address pointer read out the value of the delay, or delay time value?
mulx kfbk Multiplied by the feedback coefficient is actually how to achieve feedback?
Posted: Tue Mar 12, 2013 7:27 am
by direct
There is also a concept is not too clear, not all code execution time deal only with the first sampling point
Posted: Tue Mar 12, 2013 10:01 am
by frank
Basically, the program calculates a pointer into memory based on POT 1, this value is placed in addr_ptr then rmpa reads from the memory address pointed to by addr_ptr and places the value in acc. It is then written to dout.
dout is then read back into acc, multiplied by kfbk (which is just the pot 0 value) and the inputs from left and right are added. it is then written to the head of the delay. It is then mixed with the dry signal and written to the outputs.
The best way to understand this is to read each line of the code, remember that in almost all instructions the result goes into the acc and see what each instruction does.
Posted: Thu May 30, 2013 8:15 am
by direct
Thank
Posted: Mon Oct 13, 2014 1:56 am
by luk
Hi, I tried this code but ther's a problem. It work but when I change widely the delay time with the pot i hear noise/pitch.
Is there any way to avoid hearing that?
Thank you
Posted: Mon Oct 13, 2014 1:21 pm
by frank
Not really, you are changing the delay length real time so there will be some noise/pitching happening.
Posted: Mon Oct 13, 2014 10:47 pm
by luk
Many thanks frank
Posted: Thu Oct 16, 2014 5:05 am
by luk
I Frank, I tried to solve the pitch problem.
I implemented a counter to verify that the delay time remains unchanged for some time before setting the delay time. But it don't work
The guitar signal does not pass.
Maybe you can help me.
Code: Select all
;DELAY
;pot0 = delay time
;pot1 = feedback
;
mem delay 32767 ;delay a 32768 campioni (max memoria)
;
equ dt reg0 ;delay time
equ fb reg1 ;feedback
equ filt_pot0 reg2
equ delay_out reg3
equ temp_reg reg4
equ lpf reg5
equ cont reg6 ; counter
equ temp_time reg7 ; current delay time
;
equ smooth 0.05
equ freq 0.1
equ iniz_cont 0.999
equ kdecr 1/40000
;
skp RUN, start
rdax cont,1 ; inizialize counter to 1
sof 0, iniz_cont
wrax cont, 0
wrax delay_out, 0 ; inizialize to 0
start:
rdax adcl, 1 ; read and save input
wra delay, 0
;
; FEEDBACK
wrax fb, 0
rdax pot1, 1 ;save pot feedback into fb
wrax fb, 0
;
rdax delay_out,1 ;save last time value in to a temporary register
wrax temp_time,0
; DELAY
loop:
rdax pot0, 1
and %01111110_00000000_00000000 ;resolution, discretize
sof 0.9, 0.1 ; delay 50-1000ms
rdfx filt_pot0, smooth ; smoothing pot filter
wrax filt_pot0, 1
wrax addr_ptr, 0 ; save into pointer
;
; DELAY OUT
rmpa 1 ; read pointer
wrax delay_out, 1 ; save delay time, keep into ACC
; COUNTER
rdax temp_time, 1 ; load last delay time
skp zrc, end ; PACC != ACC ? YES-> goto end NO-> continue
rdax cont, 1 ; decrements the counter
sof 1, -kdecr ; (wait 40000 cycles)
wrax cont, 1 ; save new counter value
skp gez, end ; if cont >= 0 goto end
rdax cont,1 ; re-inizialize counter to 1 for the next wait
sof 0, iniz_cont
;
; MIX DELAY - FEEDBACK
rdax delay_out,1
mulx fb
;
; FILTRO OUT this is a tape echo simulation
wrax dacl,1
wrax temp_reg, 1
rdfx lpf, freq
wrlx lpf, -1
rdax temp_reg, -1
mulx pot2
rdax temp_reg, 1
wrax fb, -0.9
end:
Thanks
Posted: Thu Oct 16, 2014 5:30 am
by luk
dencrease costant was too small, i replace it with 1/400 but it doesn't work.
I hear a strange "bump" echo
Posted: Thu Oct 16, 2014 9:10 am
by frank
If you are suddenly jumping from one point to another then you will get a discontinuity in the signal and it will have a "pop" in the sound and since there is feedback this pop will continue for some time. There is really no simple solution to not having some audio artifact when changing a delay real time.
Posted: Fri Oct 17, 2014 12:49 am
by luk
ok Frank, thank you
Posted: Thu Jul 07, 2016 11:26 pm
by MacroMachines
there may not be a simple solution to click removal but I just tested one that should be possible in the FV-1. I used the previous time != current time (checking if it changed) to trigger a very short sub 1ms attack/decay envelope controlling the amplitude of the feedback.
Im going to try this in FV-1 now and see if I can get it, if anyone has a triggered envelope code bit it would be hugely helpful, but I might get it.