Stereo delay

Software questions and issues with the FV-1

Moderator: frank

Audio1982
Posts: 5
Joined: Sat Apr 28, 2018 12:06 am

Stereo delay

Post by Audio1982 »

Hi.
I need stereo delay code like dynacord no 50 with two pots, One for delay (both channels) and another one for repeat (both channel).
Can someone help me?
Unfortunately, I'm not good in programming.
Thank you.
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Stereo delay

Post by potul »

Audio1982 wrote:Hi.
I need stereo delay code like dynacord no 50 with two pots, One for delay (both channels) and another one for repeat (both channel).
Can someone help me?
Unfortunately, I'm not good in programming.
Thank you.
So both delays share all parameters? (delay time, feedback and mix)?
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Stereo delay

Post by potul »

give this one a try

Code: Select all

; Stereo Delay
; Patch saved from SpinCAD Designer version 998
; Pot 0: Delay time
; Pot 1: Feedback
; Pot 2: Mix
; 
; 
; ----------------------------
;------ Input
;------ Pot 0
;------ Smoother
RDAX POT0,1.0000000000
RDFX REG0,0.0004493992
WRAX REG0,0.0000000000
;------ Feedback Output
;------ Pot 1
;------ Mixer 2:1
RDAX ADCL,1.0000000000
WRAX REG2,0.0000000000
RDAX REG1,1.0000000000
MULX POT1
RDAX REG2,1.0000000000
WRAX REG2,0.0000000000
;------ Coarse Delay
RDAX REG2,1.0000000000
WRA 0,0.0
CLR
OR $007FFF00
MULX REG0
SOF 0.4949951172,0.0000305176
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG3,0.0000000000
;------ Pot 2
;------ FB In 1
RDAX REG3,0.9500000000
WRAX REG1,0.0000000000
;------ Mixer 2:1
RDAX ADCL,1.0000000000
WRAX REG4,0.0000000000
RDAX REG3,1.0000000000
MULX POT2
RDAX REG4,1.0000000000
WRAX REG4,0.0000000000
;------ Feedback Output
;------ Mixer 2:1
RDAX ADCR,1.0000000000
WRAX REG6,0.0000000000
RDAX REG5,1.0000000000
MULX POT1
RDAX REG6,1.0000000000
WRAX REG6,0.0000000000
;------ Coarse Delay
RDAX REG6,1.0000000000
WRA 16221,0.0
CLR
OR $007FFF00
MULX REG0
SOF 0.4949951172,0.4950256348
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG7,0.0000000000
;------ Mixer 2:1
RDAX ADCR,1.0000000000
WRAX REG8,0.0000000000
RDAX REG7,1.0000000000
MULX POT2
RDAX REG8,1.0000000000
WRAX REG8,0.0000000000
;------ FB In 2
RDAX REG7,0.9300000000
WRAX REG5,0.0000000000
;------ Output
RDAX REG4,1.0000000000
WRAX DACL,0.0000000000
RDAX REG8,1.0000000000
WRAX DACR,0.0000000000
Audio1982
Posts: 5
Joined: Sat Apr 28, 2018 12:06 am

Re: Stereo delay

Post by Audio1982 »

potul wrote:
Audio1982 wrote:Hi.
I need stereo delay code like dynacord no 50 with two pots, One for delay (both channels) and another one for repeat (both channel).
Can someone help me?
Unfortunately, I'm not good in programming.
Thank you.
So both delays share all parameters? (delay time, feedback and mix)?
thank you for reply. i have only pot0 and pot1.
in this code can i omit pot2?
pot0 : delay
pot1: repeat
i want same delay time in both channel but, only the first delay in one channel shorter than other one(about half). that the left channel and the right channel do not coincide.
thanks
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Stereo delay

Post by potul »

Audio1982 wrote:
thank you for reply. i have only pot0 and pot1.
in this code can i omit pot2?
pot0 : delay
pot1: repeat
i want same delay time in both channel but, only the first delay in one channel shorter than other one(about half). that the left channel and the right channel do not coincide.
thanks
I can set the mix fixed. What mix do you want?
On the delay time, you need to be more specific, I don't get it. Do you want the same delay time or not?
Audio1982
Posts: 5
Joined: Sat Apr 28, 2018 12:06 am

Re: Stereo delay

Post by Audio1982 »

potul wrote:
Audio1982 wrote:
thank you for reply. i have only pot0 and pot1.
in this code can i omit pot2?
pot0 : delay
pot1: repeat
i want same delay time in both channel but, only the first delay in one channel shorter than other one(about half). that the left channel and the right channel do not coincide.
thanks
I can set the mix fixed. What mix do you want?
On the delay time, you need to be more specific, I don't get it. Do you want the same delay time or not?
same delay time but not act at the same time. one channel start sooner that the other one. please see this video that better describe what i mean.
Thanks
https://youtu.be/YWphRo132YE
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Post by potul »

So you are looking for a ping pong delay?

But the example you showed is just one channel input, 2 channels output (ping pong), I though you were talking about 2 channels input for the delay

Ping pong is a different story, It's basically alternating left-right repeats.
Audio1982
Posts: 5
Joined: Sat Apr 28, 2018 12:06 am

Post by Audio1982 »

potul wrote:So you are looking for a ping pong delay?

But the example you showed is just one channel input, 2 channels output (ping pong), I though you were talking about 2 channels input for the delay

Ping pong is a different story, It's basically alternating left-right repeats.
Exactly. one channel input and two channel output.
one pot for delay and one pot for repeat.
I saw the ping pong code in forum with three pots. I merged pot0 and pot1 into one pot, but two channels acted at the same time.


;Ping-pong delay
;Frank Thomson
;OCT Distribution (310)348-9626
;
;pot0 adjusts ping delay time
;pot1 adjusts pong delay time
;pot2 adjusts feedback coefficient

equ ping_len 16383 ;Max ping delay length (left)
equ pong_len 16383 ;Max pong delay length (right)
equ smooth 0.001 ;Smoothing coefficient, adjust to change speed/zippernoise
equ feedforward 0.8 ;The dry (input) coefficient, increase to make louder
equ del_out 0.8 ;The output from the delay coefficient, increase to make louder

mem ping ping_len
mem pong pong_len

equ ping_addr reg0
equ pong_addr reg1
equ feedback reg2
equ ping_data reg3
equ pong_data reg4

; Clear register on start
skp RUN, loop
clr
wrax ping_addr,0
wrax pong_addr,0
wrax feedback,0
loop:

; Select tap from delay based on pot0, should range 0 to length
; Since pot only has 512 states, want to filter pot to avoid jumping

; Smooth POT0
clr ; Clear the ACC
or ping_len*256 ; Put delay length into ACC alligned to ACC[22:8]
mulx pot0 ; Multiply by POT0, new target value
rdfx ping_addr, smooth ; Smooth it : (target - current) * C + current
wrax ping_addr, 0 ; Save it
or ping*256 ; Load ping base address
rdax ping_addr,1.0 ; add pointer offset
wrax addr_ptr, 0 ; Write it to the address pointer register
rmpa 1 ; Read from memory
wrax ping_data,0 ; Write data from delay output to register

; Smooth POT1
or pong_len*256 ; Put delay length into ACC alligned to ACC[22:8]
mulx pot1 ; Multiply by POT1, new target value
rdfx pong_addr, smooth ; Smooth it : (target - current) * C + current
wrax pong_addr, 0 ; Save it
or pong*256 ; Load pong base address
rdax pong_addr,1.0 ; add pointer offset
wrax addr_ptr, 0 ; Write it to the address pointer register
rmpa 1 ; Read from memory
wrax pong_data,0 ; Write data from delay output to register

; Smooth POT2
rdax pot2,1.0 ; Get target
rdfx feedback, smooth ; Smooth it : (target - current) * C + current
wrax feedback, 0 ; Save it

; At this point, we have the delay data and feedback coefficient

; Left output
rdax adcl, feedforward ; Left in * coefficient
rdax ping_data,del_out ; add in ping delay
wrax dacl,0 ; write to DAC

; Right output
rdax adcr, feedforward ; Right in * coefficient
rdax pong_data,del_out ; add in pong delay
wrax dacr,0 ; write to DAC

; Ping delay input
rdax pong_data,1.0 ; get pong delay
mulx feedback
rdax adcl, feedforward ; add Left in * coefficient
wra ping,0 ; write to ping delay

; Pong delay input
rdax ping_data,1.0 ; get ping delay
mulx feedback
rdax adcr, feedforward ; add Right in * coefficient
wra pong,0 ; write to pong
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Post by potul »

Ok, now I understand what you need. Can you try this one?

Code: Select all

; ping_pong.spcd
; Patch saved from SpinCAD Designer version 998
; Pot 0: Delay time
; Pot 1: Feedback
; Pot 2: N/A
; 
; 
; ----------------------------
;------ Input
;------ Pot 0
;------ Smoother
RDAX POT0,1.0000000000
RDFX REG0,0.0004493992
WRAX REG0,0.0000000000
;------ Feedback Output
;------ Pot 1
;------ Feedback Output
;------ Mixer 2:1
RDAX ADCL,0.5
RDAX ADCR,0.5
WRAX REG3,0.0000000000
;------ Mixer 2:1
RDAX REG3,1.0000000000
WRAX REG4,0.0000000000
RDAX REG2,1.0000000000
MULX POT1
RDAX REG4,1.0000000000
WRAX REG4,0.0000000000
;------ Coarse Delay
RDAX REG4,1.0000000000
WRA 0,0.0
CLR
OR $007FFF00
MULX REG0
SOF 0.4949951172,0.0000305176
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG5,0.0000000000
;------ FB In 1
RDAX REG5,0.9500000000
WRAX REG1,0.0000000000
;------ Mixer 2:1
RDAX REG1,1.0000000000
MULX POT1
WRAX REG6,0.0000000000
;------ Coarse Delay
RDAX REG6,1.0000000000
WRA 16221,0.0
CLR
OR $007FFF00
MULX REG0
SOF 0.4949951172,0.4950256348
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG7,0.0000000000
;------ Mixer 2:1
RDAX REG3,0.5
RDAX REG7,0.5
WRAX REG8,0.0000000000
;------ FB In 2
RDAX REG7,0.9300000000
WRAX REG2,0.0000000000
;------ Mixer 2:1
RDAX REG3,0.5
RDAX REG5,0.5
WRAX REG9,0.0000000000
;------ Output
RDAX REG9,1.0000000000
WRAX DACL,0.0000000000
RDAX REG8,1.0000000000
WRAX DACR,0.0000000000
Audio1982
Posts: 5
Joined: Sat Apr 28, 2018 12:06 am

Post by Audio1982 »

potul wrote:Ok, now I understand what you need. Can you try this one?

Code: Select all

; ping_pong.spcd
; Patch saved from SpinCAD Designer version 998
; Pot 0: Delay time
; Pot 1: Feedback
; Pot 2: N/A
; 
; 
; ----------------------------
;------ Input
;------ Pot 0
;------ Smoother
RDAX POT0,1.0000000000
RDFX REG0,0.0004493992
WRAX REG0,0.0000000000
;------ Feedback Output
;------ Pot 1
;------ Feedback Output
;------ Mixer 2:1
RDAX ADCL,0.5
RDAX ADCR,0.5
WRAX REG3,0.0000000000
;------ Mixer 2:1
RDAX REG3,1.0000000000
WRAX REG4,0.0000000000
RDAX REG2,1.0000000000
MULX POT1
RDAX REG4,1.0000000000
WRAX REG4,0.0000000000
;------ Coarse Delay
RDAX REG4,1.0000000000
WRA 0,0.0
CLR
OR $007FFF00
MULX REG0
SOF 0.4949951172,0.0000305176
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG5,0.0000000000
;------ FB In 1
RDAX REG5,0.9500000000
WRAX REG1,0.0000000000
;------ Mixer 2:1
RDAX REG1,1.0000000000
MULX POT1
WRAX REG6,0.0000000000
;------ Coarse Delay
RDAX REG6,1.0000000000
WRA 16221,0.0
CLR
OR $007FFF00
MULX REG0
SOF 0.4949951172,0.4950256348
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG7,0.0000000000
;------ Mixer 2:1
RDAX REG3,0.5
RDAX REG7,0.5
WRAX REG8,0.0000000000
;------ FB In 2
RDAX REG7,0.9300000000
WRAX REG2,0.0000000000
;------ Mixer 2:1
RDAX REG3,0.5
RDAX REG5,0.5
WRAX REG9,0.0000000000
;------ Output
RDAX REG9,1.0000000000
WRAX DACL,0.0000000000
RDAX REG8,1.0000000000
WRAX DACR,0.0000000000
Thank you so much potul.
That's exactly what i want. :D
I wish all the best to you.
arash1414
Posts: 7
Joined: Thu Nov 05, 2020 1:31 pm

Re: Stereo delay

Post by arash1414 »

Hi ..... In this program, how can I delete the original sound so that only the late sound is output ... only stereo delays are needed .... to be mixed separately with the original sound again..who can .... Thank you for your help
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Stereo delay

Post by potul »

You just need to change these lines:

Code: Select all

;------ Mixer 2:1
RDAX REG3,0  ;<-----------change this to 0
RDAX REG7,0.5
WRAX REG8,0.0000000000
;------ FB In 2
RDAX REG7,0.9300000000
WRAX REG2,0.0000000000
;------ Mixer 2:1
RDAX REG3,0  ;<-----------change this to 0
RDAX REG5,0.5
WRAX REG9,0.0000000000
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Stereo delay

Post by potul »

you might want to increase the volume of the repeats as well:

Code: Select all

;------ Mixer 2:1
RDAX REG3,0  ;<-----------change this to 0
RDAX REG7,1  ;<-----------change this to 1
WRAX REG8,0.0000000000
;------ FB In 2
RDAX REG7,0.9300000000
WRAX REG2,0.0000000000
;------ Mixer 2:1
RDAX REG3,0  ;<-----------change this to 0
RDAX REG5,1 ;<-----------change this to 1
WRAX REG9,0.0000000000
arash1414
Posts: 7
Joined: Thu Nov 05, 2020 1:31 pm

Re: Stereo delay

Post by arash1414 »

Thank you very much ...... the only problem is that the balance is upset when the feedback is closed
potul
Posts: 76
Joined: Tue Sep 26, 2017 12:33 am

Re: Stereo delay

Post by potul »

arash1414 wrote: Wed Nov 11, 2020 3:37 am Thank you very much ...... the only problem is that the balance is upset when the feedback is closed
Sorry but I don't get the issue. What is happening when?
Post Reply