Spring reverb

Algorithm development and general DSP issues

Moderator: frank

slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

Like Frank says it looks like it's reading something in the file as code that it shouldn't be. I had similar problems trying to run spinAsm using Wine in Linux, unfortunately I never got to the bottom of it.

Any chance you could post a copy of your spn file so someone can download it and see if it works for them.

Sorry it doesn't help but copying and pasting the code works fine here running the latest version of SpinASM on Windows 7
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Post by ice-nine »

If I remember correctly the code compiled fine when I was on my older win7 machine as did a code I placed on the forum but on my new win10 pc I get errors in compile both with Don's reverb and the code I posted.

It can only be a windows config issue and likely a regional setting.
www.stanleyfx.co.uk
"It's fairly straight forward, if you want to start it press start, you can work out the rest of the controls yourself."
leetut
Posts: 20
Joined: Sat Oct 27, 2018 2:33 pm

Re: Spring reverb

Post by leetut »

not working here either
<0000>[ Pass 1] [ 1015] Line: 261 "wra lap2b+50,0 " - ERROR:Program Length Exceeds Limit -
<0001>[ Pass 1] [ 1031] Line: 261 "wra lap2b+50,0 " - ERROR:FAILED On Pass - ONE


2 Log Messages
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Spring reverb

Post by frank »

Try this

Code: Select all

; SPRING REVERB			(c) 2016 Don Stavely
;				Please, not for commercial use!
; Description:
; Spring reverbs sound "boingy" because of dispersion in the spring - 
; higher frequencies travel slower than low frequencies.
; A "spectral delay filter", consisting of many (100's) of unit allpasses 
; will produce the desired "chirp" impulse response.   
; The number of APs can be reduced by "stretching" the allpass filters,  
; using delays larger than one.
; Using different chirp AP lengths spreads the eigentones (?)
; Reverb loop looks like std X-coupled AP-AP-DELAY loops, but inputs 
; and outputs moved so first echos straight out of delays, not APs.
;
;           +-------------------------------------+
;           |                                     |
; in---[+]- | --[  D1  ]--[lp]--+--[AP1a]--[AP1b]-+
;       |   |                   |
;       |   |                  [+]---------------->[CHIRP APs]--->
;       |   |                   |
; in----| -[+]--[  D2  ]--[lp]--+--[AP2a]--[AP2b]-+ 	
;       |                                         |
;       +-----------------------------------------+
;
; Delay, AP lengths scaled from GA reverb, modded close to Accutronics
; 2-spring delay lengths of 33ms and 41ms.
; Filtering inside the loop and sin/cos LFO smearing of the reverb APs
; also reduces ringing.
; Oh, and it has tremolo so my son can use it for surf rock.  You could 
; add tone and reverb time controls instead.
;
; Pot0 = Reverb Level
; Pot1 = Tremolo Rate
; pot2 = Tremolo Depth

; Declare constants

equ	LEN1	5	; length of chirp filters
equ	LEN2	6
equ	LEN3	6
equ	LEN4	7
equ	LEN5	7
equ	LEN6	8
equ	KAP	-0.6	; chirp allpass coefficient
equ	KLAP	0.6	; allpass coefficient
equ	KRT	0.85	; reverb time
equ	KRF	0.55	; reverb lpf freq
equ	KRS	-1	; reverb lpf shelf

; Memory declarations

mem	lap1a	404	;      	  GA/2 =	404
mem	lap1b	967	;		967
mem	d1	1445	; 41ms=1344	1244.5

mem	lap2a	608	;	  GA/2 =	508
mem	lap2b	893	;		893.5		
mem	d2	1013	; 33ms=1081	1143.5

mem	ap1	LEN1	; chirp allpasses
mem	ap2	LEN1
mem	ap3	LEN1
mem	ap4	LEN1
mem	ap5	LEN1
mem	ap6	LEN1
mem	ap7	LEN1
mem	ap8	LEN2
mem	ap9	LEN2
mem	ap10	LEN2
mem	ap11	LEN2
mem	ap12	LEN2
mem	ap13	LEN2
mem	ap14	LEN2
mem	ap15	LEN3
mem	ap16	LEN3
mem	ap17	LEN3
mem	ap18	LEN3
mem	ap19	LEN3
mem	ap20	LEN3
mem	ap21	LEN3
mem	ap22	LEN4
mem	ap23	LEN4
mem	ap24	LEN4
mem	ap25	LEN4
mem	ap26	LEN4
mem	ap27	LEN4
mem	ap28	LEN4
mem	ap29	LEN5
mem	ap30	LEN5
mem	ap31	LEN5
mem	ap32	LEN5
mem	ap33	LEN5
mem	ap34	LEN5
mem	ap35	LEN5
mem	ap36	LEN6
mem	ap37	LEN6
mem	ap38	LEN6
mem	ap39	LEN6
mem	ap40	LEN6
mem	ap41	LEN6
mem	ap42	LEN6

; Register equates

equ	mono	reg0
equ	lp1	reg1
equ	lp2	reg2
equ 	trem	reg3
equ	revout	reg4

; Initialize LFOs

skp	run, endinit
wlds	sin0,15,40	; to smear reverb
wlds	sin1,12,32767	; for tremolo
endinit:

; Control and get tremelo sinwave

rdax	pot1, 1		; rate
mulx	pot1		
sof	0.6, 0.1		; 7:1 range
wrax	sin1_rate, 0		
cho	RDAL, sin1
mulx	pot2		; depth
sof	0.5, 0.5		; 0 to 1
wrax	trem, 0		; save LFO value	

; Sum inputs to mono, apply tremolo

rdax	adcl, 0.5
rdax	adcr, 0.5
mulx	trem		; apply tremolo
wrax	mono, 0	

; Do reverb loops

rda	d1#, KRT	; get 1st delay output, scaled by RT
rdfx	lp1, KRF		; shelving lowpass inside loop
wrlx	lp1, KRS
rda	lap1a#, KLAP	; reverb allpasses
wrap	lap1a, -KLAP
rda	lap1b#, KLAP
wrap	lap1b, -KLAP
rdax	mono, 1		; add input
wra	d2, 0		; put in 2nd spring delay, clear

rda	d2#, KRT	; get 2nd delay output, saled by RT
rdfx	lp2, KRF		; shelving lowpass inside loop
wrlx	lp2, KRS
rda	lap2a#, KLAP	; reverb allpasses
wrap	lap2a, -KLAP
rda	lap2b#, KLAP
wrap	lap2b, -KLAP
rdax	mono, 1		; add input
wra	d1, 0		; put in 1st spring delay, clear

; Get reverb output, do chirp filter

rdax	lp1,1
rdax	lp2,1
wrax	revout, 1
rda	ap1#, KAP
wrap	ap1, -KAP
rda	ap2#, KAP
wrap	ap2, -KAP
rda	ap3#, KAP
wrap	ap3, -KAP
rda	ap4#, KAP
wrap	ap4, -KAP
rda	ap5#, KAP
wrap	ap5, -KAP
rda	ap6#, KAP
wrap	ap6, -KAP
rda	ap7#, KAP
wrap	ap7,-KAP
rda	ap8#, KAP
wrap	ap8, -KAP
rda	ap9#, KAP
wrap	ap9, -KAP
rda	ap10#, KAP
wrap	ap10, -KAP
rda	ap11#, KAP
wrap	ap11, -KAP
rda	ap12#, KAP
wrap	ap12, -KAP
rda	ap13#, KAP
wrap	ap13, -KAP
rda	ap14#, KAP
wrap	ap14, -KAP
rda	ap15#, KAP
wrap	ap15, -KAP
rda	ap16#, KAP
wrap	ap16, -KAP
rda	ap17#, KAP
wrap	ap17, -KAP
rda	ap18#, KAP
wrap	ap18, -KAP
rda	ap19#, KAP
wrap	ap19, -KAP
rda	ap20#, KAP
wrap	ap20, -KAP
rda	ap21#, KAP
wrap	ap21, -KAP
rda	ap22#, KAP
wrap	ap22, -KAP
rda	ap23#, KAP
wrap	ap23, -KAP
rda	ap24#, KAP
wrap	ap24, -KAP
rda	ap25#, KAP
wrap	ap25, -KAP
rda	ap26#, KAP
wrap	ap26, -KAP
rda	ap27#, KAP
wrap	ap27, -KAP
rda	ap28#, KAP
wrap	ap28, -KAP
rda	ap29#, KAP
wrap	ap29, -KAP
rda	ap30#, KAP
wrap	ap30, -KAP
rda	ap31#, KAP
wrap	ap31, -KAP
rda	ap32#, KAP
wrap	ap32, -KAP
rda	ap33#, KAP
wrap	ap33, -KAP
rda	ap34#, KAP
wrap	ap34, -KAP
rda	ap35#, KAP
wrap	ap35, -KAP
rda	ap36#, KAP
wrap	ap36, -KAP
rda	ap37#, KAP
wrap	ap37, -KAP
rda	ap38#, KAP
wrap	ap38, -KAP
rda	ap39#, KAP
wrap	ap39, -KAP
rda	ap40#, KAP
wrap	ap40, -KAP
rda	ap41#, KAP
wrap	ap41, -KAP
;rda	ap42#, KAP	; as many as can fit
;wrap	ap42, -KAP

; Chirp out in ACC - add dry, and output it
	
mulx	pot0		; reverb level
rdax	mono, 1		; add dry signal
wrax	dacl, 1	
wrax	dacr, 0		; output 

; Smooth reverb with LFO modulating APs

cho	rda,sin0,sin|reg|compc,lap1b+25
cho	rda,sin0,sin,lap1b+26
wra	lap1b+50,0
cho	rda,sin0,cos|reg|compc,lap2b+25
cho	rda,sin0,cos,lap2b+26
wra	lap2b+50,0

; End
Frank Thomson
Experimental Noize
leetut
Posts: 20
Joined: Sat Oct 27, 2018 2:33 pm

Re: Spring reverb

Post by leetut »

works great now thank you
arivabox
Posts: 2
Joined: Sun Jan 12, 2020 12:18 pm

Re: Spring reverb

Post by arivabox »

Great reverb, good job! It’s a pity on one of the regulators that is responsible for the tremolo (vibration) you can hear how it works incorrectly, then an effect appears, then it disappears, I tried different values, but so far it didn’t work out, but it's temporary) It's worth it.
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Re: Spring reverb

Post by ice-nine »

arivabox wrote: Sun Jan 12, 2020 12:21 pm Great reverb, good job! It’s a pity on one of the regulators that is responsible for the tremolo (vibration) you can hear how it works incorrectly, then an effect appears, then it disappears, I tried different values, but so far it didn’t work out, but it's temporary) It's worth it.
Could you explain in more detail what you are meaning ??
www.stanleyfx.co.uk
"It's fairly straight forward, if you want to start it press start, you can work out the rest of the controls yourself."
arivabox
Posts: 2
Joined: Sun Jan 12, 2020 12:18 pm

Re: Spring reverb

Post by arivabox »

I have a layout of 5 knobs (mix, level, 3 controls), one knob that is responsible for vibrato works strangely, especially when setting 25 minutes (max) it periodically disappears, especially when playing on one note, this is noticeably audible. If you turn down the regulator, then everything is fine. Maybe so conceived? I really like this effect, other spring reverbs that I heard for FV1 worse.
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Re: Spring reverb

Post by ice-nine »

Code: Select all

rdax	pot1, 1		; rate
mulx	pot1		
sof	0.6, 0.1		; 7:1 range
wrax	sin1_rate, 0		
cho	RDAL, sin1
mulx	pot2		; depth
sof	0.5, 0.5		; 0 to 1
wrax	trem, 0		; save LFO value
try changing this line
sof 0.6, 0.1 ; 7:1 range
to this
sof 0.4, 0.1 ; 5:1 range

it should change the rate to a slower maximum speed , see if that helps.
www.stanleyfx.co.uk
"It's fairly straight forward, if you want to start it press start, you can work out the rest of the controls yourself."
bennettcustomaudio
Posts: 5
Joined: Thu Sep 26, 2019 12:44 pm

Re: Spring reverb

Post by bennettcustomaudio »

Hey Don,

This code is awesome, thank you for sharing! I'm an electrical engineer myself, currently completing a Master of Music Technology, so I'm very curious to check out the papers that you went through to help you create this code!

If you wouldn't mind sharing the title/author of some of the papers i'd be super thankful!

Cheers!
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Spring reverb

Post by Digital Larry »

Don't know what Don referenced, but this one seems within grasp to my shriveling cerebrum.

https://asp-eurasipjournals.springerope ... 011/646134

The FV-1 won't do multirate AFAIK but the overall concepts are probably valid.
donstavely
Posts: 53
Joined: Thu Jan 07, 2010 2:29 pm
Location: Windsor, Colorado

Re: Spring reverb

Post by donstavely »

Hello all. I haven't checked in on the forum in a while. I am glad that there is still interest in this effect. As for the interaction between the tremolo and the reverb, I believe that it is just that. The longer the reverb, the more it is going to interact with the tremolo; and the faster and deeper the tremolo, the more it is going to interact with the reverb. The first-order effect is for the reverb to partially cancel or reduce the tremolo depth. At the extremes, I am not surprised that there are strange and unuseful side effects. I am quite sure that this would be the case with any tremolo followed by any reverb, but maybe especially spring reverb. Anyway, reducing the range of the controls is a simple and reasonable solution.
Don Stavely
daeg
Posts: 11
Joined: Mon Apr 06, 2020 5:55 pm

Re: Spring reverb

Post by daeg »

I tried this out today. Sounds good! It has a touch of 'boing' that some DSP units go overboard to produce.
ferdinandstrat
Posts: 6
Joined: Thu Jan 16, 2020 10:41 am

Re: Spring reverb

Post by ferdinandstrat »

Here's a quesntion: How can I make the boing/drip more pronounced?
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Spring reverb

Post by Digital Larry »

May be tough... the "boing" is a result of the "Chirp APs" and as many of those have been shoved in as possible in the available code space. You might try adjusting the KAP value, just to see what audible effect it has. In my experience, if this gets too close to 1.0 a sort of awful clipping sound comes out, but it might be managed by lowering the input level or something.

Code: Select all

rda	ap41#, KAP
wrap	ap41, -KAP
;rda	ap42#, KAP	; as many as can fit
;wrap	ap42, -KAP
Post Reply