Spin Semiconductor Forum Index Spin Semiconductor
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

guitar delay
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development
View previous topic :: View next topic  
Author Message
direct



Joined: 10 Mar 2013
Posts: 8

PostPosted: Sun Mar 10, 2013 12:30 pm    Post subject: guitar delay Reply with quote

Hello, everybody!
Has the program who can provide the use of a guitar delay
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 972

PostPosted: Sun Mar 10, 2013 12:51 pm    Post subject: Reply with quote

See this thread: http://www.spinsemi.com/forum/viewtopic.php?t=124
_________________
Frank Thomson
Experimental Noize
Back to top
View user's profile Send private message Visit poster's website
direct



Joined: 10 Mar 2013
Posts: 8

PostPosted: Tue Mar 12, 2013 4:38 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
direct



Joined: 10 Mar 2013
Posts: 8

PostPosted: Tue Mar 12, 2013 6:20 am    Post subject: Reply with quote

;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?
Back to top
View user's profile Send private message
direct



Joined: 10 Mar 2013
Posts: 8

PostPosted: Tue Mar 12, 2013 6:27 am    Post subject: Reply with quote

There is also a concept is not too clear, not all code execution time deal only with the first sampling point
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 972

PostPosted: Tue Mar 12, 2013 9:01 am    Post subject: Reply with quote

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.
_________________
Frank Thomson
Experimental Noize
Back to top
View user's profile Send private message Visit poster's website
direct



Joined: 10 Mar 2013
Posts: 8

PostPosted: Thu May 30, 2013 7:15 am    Post subject: Reply with quote

Thank
Back to top
View user's profile Send private message
luk



Joined: 13 Oct 2014
Posts: 5

PostPosted: Mon Oct 13, 2014 12:56 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 972

PostPosted: Mon Oct 13, 2014 12:21 pm    Post subject: Reply with quote

Not really, you are changing the delay length real time so there will be some noise/pitching happening.
_________________
Frank Thomson
Experimental Noize
Back to top
View user's profile Send private message Visit poster's website
luk



Joined: 13 Oct 2014
Posts: 5

PostPosted: Mon Oct 13, 2014 9:47 pm    Post subject: Reply with quote

Many thanks frank
Back to top
View user's profile Send private message
luk



Joined: 13 Oct 2014
Posts: 5

PostPosted: Thu Oct 16, 2014 4:05 am    Post subject: Reply with quote

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 Sad
The guitar signal does not pass.
Maybe you can help me.

Code:

;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
Back to top
View user's profile Send private message
luk



Joined: 13 Oct 2014
Posts: 5

PostPosted: Thu Oct 16, 2014 4:30 am    Post subject: Reply with quote

dencrease costant was too small, i replace it with 1/400 but it doesn't work.
I hear a strange "bump" echo Confused
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 972

PostPosted: Thu Oct 16, 2014 8:10 am    Post subject: Reply with quote

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.
_________________
Frank Thomson
Experimental Noize
Back to top
View user's profile Send private message Visit poster's website
luk



Joined: 13 Oct 2014
Posts: 5

PostPosted: Thu Oct 16, 2014 11:49 pm    Post subject: Reply with quote

ok Frank, thank you
Back to top
View user's profile Send private message
MacroMachines



Joined: 12 Dec 2014
Posts: 70
Location: Detroit,MI

PostPosted: Thu Jul 07, 2016 10:26 pm    Post subject: Reply with quote

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.
_________________
http://MacroMachines.net
Digital Control for your Analog Soul.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group