Shimmer
Moderator: frank
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
Hello Livingston,
Thans for helping.
How about this reverb code (standard code form the free dsp section):
I will only need a fixed oct up in the feedback loop.
Thans for helping.
How about this reverb code (standard code form the free dsp section):
I will only need a fixed oct up in the feedback loop.
Code: Select all
;reverb program
;large reverb, stereo in and out
;for mixers, uneven (for vocals)
;pot0=reverb time
;pot1=low freq response
;pot2=high freq response
;
mem lap1 156
mem lap2 223
mem lap3 332
mem lap4 548
mem rap1 186
mem rap2 253
mem rap3 302
mem rap4 498
;
mem ap1 1251
mem ap1b 1751
mem ap2 1443
mem ap2b 1343
mem ap3 1582
mem ap3b 1981
mem ap4 1274
mem ap4b 1382
;
mem del1 5859
mem del2 4145
mem del3 3476
mem del4 4568
equ temp reg0
equ lpf1 reg1
equ lpf2 reg2
equ lpf3 reg3
equ lpf4 reg4
equ hpf1 reg5
equ hpf2 reg6
equ hpf3 reg7
equ hpf4 reg8
equ rt reg9
equ hf reg10
equ lf reg11
equ lapout reg12
equ rapout reg13
;set up lfo, 0.5Hz, +/-20 samples:
skp run, loop
wlds sin0, 12, 160
loop:
;smear 2 allpass filters in reverb ring:
cho rda, sin0, 0x06, ap1+50
cho rda, sin0, 0, ap1+51
wra ap1+100, 0
cho rda, sin0, 0x07, ap3+50
cho rda, sin0, 1, ap3+51
wra ap3+100, 0
;prepare pots for control:
rdax POT0, 1.0
sof 0.8, 0.1
wrax rt, 0 ;rt ranges 0.1 to 0.9
;
;shelving controls are negative:
rdax POT1, 1.0
sof 0.8, -0.8
wrax hf,0 ;hf ranges -0.8 to 0
;
rdax POT2, 1.0
sof 0.8, -0.8
wrax lf,0 ;lf ranges -0.8 to 0
;
;get inputs and process with three APs each
;
rdax adcl, 0.5
rda lap1#, -0.5
wrap lap1, 0.5
rda lap2#, -0.5
wrap lap2, 0.5
rda lap3#, -0.5
wrap lap3, 0.5
rda lap4#, -0.5
wrap lap4, 0.5
wrax lapout, 0
;
rdax adcr, 0.5
rda rap1#, -0.5
wrap rap1, 0.5
rda rap2#, -0.5
wrap rap2, 0.5
rda rap3#, -0.5
wrap rap3, 0.5
rda rap4#, -0.5
wrap rap4, 0.5
wrax rapout, 0
;
;now do reverb ring, use temp as temp reg for filtering:
;
;delay ap into 1:
rda del4#, 1.0 ;read previous delay
mulx rt ;multiply by reverb time coefficient
rdax lapout, 1.0 ;read left input from input allpass filter bank
rda ap1#, -0.6 ;do an allpass filter
wrap ap1, 0.6
rda ap1b#, -0.6 ;do second all pass filter
wrap ap1b, 0.6
wrax temp, 1.0 ;write to temp, keep in acc
rdfx lpf1, 0.5
wrhx lpf1, -1.0 ;filter done
mulx lf ;scale by lf
rdax temp, 1.0 ;add to temp
wrax temp, 1.0 ;write to temp again
rdfx hpf1, 0.05
wrlx hpf1, -1.0 ;filter done
mulx hf ;scale by hf
rdax temp, 1.0 ;add temp
wra del1, 0.0 ;write to next delay
;
;delay ap into 2:
rda del1#, 1.0
mulx rt
rda ap2#, -0.6
wrap ap2, 0.6
rda ap2b#, -0.6
wrap ap2b, 0.6
wrax temp, 1.0
rdfx lpf2, 0.5
wrhx lpf2, -1.0
mulx hf
rdax temp, 1.0
wrax temp, 1.0
rdfx hpf2, 0.05
wrlx hpf2, -1.0
mulx lf
rdax temp, 1.0
wra del2, 0.0
;
;delay ap into 3:
rda del2#, 1.0
mulx rt
rdax rapout, 1.0
rda ap3#, -0.6
wrap ap3, 0.6
rda ap3b#, -0.6
wrap ap3b, 0.6
wrax temp, 1.0
rdfx lpf3, 0.5
wrhx lpf3, -1.0
mulx hf
rdax temp, 1.0
wrax temp, 1.0
rdfx hpf3, 0.05
wrlx hpf3, -1.0
mulx lf
rdax temp, 1.0
wra del3, 0.0
;
;delay ap into 4:
rda del3#, 1.0
mulx rt
rda ap4#, -0.6
wrap ap4, 0.6
rda ap4b#, -0.6
wrap ap4b, 0.6
wrax temp, 1.0
rdfx lpf4, 0.5
wrhx lpf4, -1.0
mulx hf
rdax temp, 1.0
wrax temp, 1.0
rdfx hpf4, 0.05
wrlx hpf4, -1.0
mulx lf
rdax temp, 1.0
wra del4, 0.0
;
rda del1+2630, 1.5 ;sum outputs as taps from reverb ring
rda del2+1943, 1.2
rda del3+3200, 1.0
rda del4+4016, 0.8
wrax dacl, 0.0
;
rda del3+1163, 1.5
rda del4+3330, 1.2
rda del1+2420, 1.0
rda del2+2631, 0.8
wrax dacr, 0.0
;
Hi,
So i managed to get a Shimmer Reverb Working on the FV1 now.
I works good but can be beter. Here's the code:
1. I don't now if the feddback path is working like i should? If i put the effect in my analog delay feedback loop i works and sounds better.
2. I would like to have volume control over the Octave up and not the hole effect, how can i add only the octave up to the reverb signal?
3. is there a way to have 1 pot controlling the feedback, 1 pot controlling the level of octave up and one pot controlling the decay of the reverb?
And if someone sees some things that can be done differant please feel free to coment.
Also i put in the limiter in there to smoothe the sound.
best regards
Ronald
So i managed to get a Shimmer Reverb Working on the FV1 now.
I works good but can be beter. Here's the code:
Code: Select all
;Shimmer reverb
;Ronald vd Boon 2011
;Pot1 = level Shimmer
mem delayd 4096 ; Down delay
mem temp 1 ; Temp location for partial calculations
mem api1 122
mem api2 303
mem api3 553
mem api4 922
mem ap1 3823
mem del1 8500 ;input = left output
mem ap2 4732
mem del2 7234 ;input = right output
equ krt 0.8 ;adjust reverb time
equ kap 0.625 ;adjust AP coefficients
equ apout reg3 ;holding reg input AP signal
equ pitchup reg4 ;octave up output
equ fbk 0.2 ;feedback path
;simple limiter, -12dB threshold, peak detecting
equ insig reg0
equ pkfil reg1
equ gain reg2
;
skp run,START
wlds sin0,50,50 ;load chorus generators for reverb
wlds sin1,40,60
wldr RMP0,16384,4096 ;load octave up
START:
ldax ADCL ; Write it to left delay and clear ACC
wra delayd,0
;Octave up
cho rda,RMP0,REG|COMPC,delayd
cho rda,RMP0,,delayd+1
wra temp,0
cho rda,RMP0,RPTR2|COMPC,delayd
cho rda,RMP0,RPTR2,delayd+1
cho sof,RMP0,NA|COMPC,0
cho rda,RMP0,NA,temp
mulx POT1
wrax pitchup,0
rdax pitchup,fbk
rdax pitchup,1.0
;Limiter
wrax insig,1 ;input sum register
maxx pkfil,0.99998 ;compare with pkfil*.999 (abs)
wrax pkfil,1 ;write peak value back
log -1,-0.125
exp 1,0 ;1/x
wrax gain,1
mulx adcl
sof -2,0
sof -1.5,0 ;restore gain, to avoid output clipping
wrax dacl,0
ldax gain
mulx adcr
sof -2,0
sof -1.5,0
wrax dacr,0 ;write outputs, zero ACC
;All-pass filters for ReverB
rdax pitchup,0.6 ;read inputs,
rda api1#,kap ;do 4 APs
wrap api1,-kap
rda api2#,kap
wrap api2,-kap
rda api3#,kap
wrap api3,-kap
rda api4#,kap
wrap api4,-kap
wrax apout,1 ;write to min, keep in ACC
;first loop apd:
;AP'd input in ACC
rda del2#,krt ;read del2, scale by Krt
rda ap1#,-kap ;do loop ap
wrap ap1,kap
wra del1,1.99 ;write delay, x2 for dac out
wrax dacl,0
;second loop apd:
rdax apout,1 ;get input signal again
rda del1#,krt ;as above, to other side of loop
rda ap2#,kap
wrap ap2,-kap
wra del2,1.99
wrax dacr,0
cho rda,sin0,reg|compc,del1+32
cho rda,sin0,0,del1+33
wra del1+64,0
cho rda,sin1,reg|compc,del2+32
cho rda,sin1,0,del2+33
wra del2+64,0
2. I would like to have volume control over the Octave up and not the hole effect, how can i add only the octave up to the reverb signal?
3. is there a way to have 1 pot controlling the feedback, 1 pot controlling the level of octave up and one pot controlling the decay of the reverb?
And if someone sees some things that can be done differant please feel free to coment.
Also i put in the limiter in there to smoothe the sound.
best regards
Ronald
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
It's a little difficult for me to follow this code, but here are some things I see which don't seem right:
You are writing to the DACR and DACL twice within the program, once in the limiter and again after the reverb. This is not what you want to do. I'm kind of surprised this works at all, actually.
You aren't really processing things in series. For example, your limiter does not limit the signal coming out of the reverb or the pitch shifter - all you're doing there is reading the clean input in, and then limiting it, and writing the clean limited signal to the output.
You have pitch shifted the input, then sent it to the reverb. Instead, you should send your clean to the reverb, then pitch shift, then mulx with a pot for a feedback control, then to the reverb input again.
You are writing to the DACR and DACL twice within the program, once in the limiter and again after the reverb. This is not what you want to do. I'm kind of surprised this works at all, actually.
You aren't really processing things in series. For example, your limiter does not limit the signal coming out of the reverb or the pitch shifter - all you're doing there is reading the clean input in, and then limiting it, and writing the clean limited signal to the output.
You have pitch shifted the input, then sent it to the reverb. Instead, you should send your clean to the reverb, then pitch shift, then mulx with a pot for a feedback control, then to the reverb input again.
Oke I changed a few things and now it's working like i would.
I still have the octave up before the reverb because when i do it backwards i heard some tremolo sounds coming through.
So If someone has some tips for making the code better feel free to respond.
Here's the code
I still have the octave up before the reverb because when i do it backwards i heard some tremolo sounds coming through.
So If someone has some tips for making the code better feel free to respond.
Here's the code
Code: Select all
;Shimmer reverb
;Ronald vd Boon 2011
;Pot0 = Dry Wet mix
;Pot1 = level Shimmer
;Pot2 = Feedback
mem delayd 4096 ; Down delay
mem temp 1 ; Temp location for partial calculations
mem api1 122
mem api2 303
mem api3 553
mem api4 922
mem ap1 3823
mem del1 8500 ;input = left output
mem ap2 4732
mem del2 7234 ;input = right output
equ krt 0.8 ;adjust reverb time
equ kap 0.625 ;adjust AP coefficients
equ apout reg3 ;holding reg input AP signal
equ pitchout reg4 ;octave up output
equ kfbk reg5 ;feedback path
equ revout reg6
equ revout1 reg7
equ dryin reg8
;
skp run,START
wlds sin0,50,50 ;load chorus generators for reverb
wlds sin1,40,60
wldr RMP0,16384,4096 ;load octave up
START:
;get feedback value from pot0:
wrax kfbk,0
rdax pot0,1
wrax kfbk,0
;Octave up
cho rda,RMP0,REG|COMPC,delayd
cho rda,RMP0,,delayd+1
wra temp,0
cho rda,RMP0,RPTR2|COMPC,delayd
cho rda,RMP0,RPTR2,delayd+1
cho sof,RMP0,NA|COMPC,0
cho rda,RMP0,NA,temp
mulx POT1
wrax pitchout,0
;rdax pitchout,fbk
;Reed input
rdax pitchout,1
mulx kfbk
rdax adcl,0.5 ; Write it to left delay and clear ACC
wrax dryin,1
wra delayd,0
;All-pass filters for ReverB
rdax pitchout,1 ;read inputs,
rda api1#,kap ;do 4 APs
wrap api1,-kap
rda api2#,kap
wrap api2,-kap
rda api3#,kap
wrap api3,-kap
rda api4#,kap
wrap api4,-kap
wrax apout,1 ;write to min, keep in ACC
;first loop apd:
;AP'd input in ACC
rda del2#,krt ;read del2, scale by Krt
rda ap1#,-kap ;do loop ap
wrap ap1,kap
wra del1,1.99 ;write delay, x2 for dac out
wrax revout,0
;second loop apd:
rdax apout,1 ;get input signal again
rda del1#,krt ;as above, to other side of loop
rda ap2#,kap
wrap ap2,-kap
wra del2,1.99
wrax revout1,0
cho rda,sin0,reg|compc,del1+32
cho rda,sin0,0,del1+33
wra del1+64,0
cho rda,sin1,reg|compc,del2+32
cho rda,sin1,0,del2+33
wra del2+64,0
; mix dry and wet using pot2
rdax revout,1
rdax revout1,1
rdax dryin,-1
mulx pot2
rdax dryin,1
;form mono output:
wrax dacl,1
wrax dacr,0
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
It looks to me like your feedback loop is around the pitch shift. You want the feedback coming from the output of whatever the last effect is, to the input of the first effect. So if you have pitch->reverb then the feedback should come from the reverb out and go to the pitch input.
But, if you like the way it sounds then it's ok.
I think you should make the "RDAX ADCL,.5" into "RDAX ADCL,1". This will give you a louder input signal so more resolution and less noise.
But, if you like the way it sounds then it's ok.
I think you should make the "RDAX ADCL,.5" into "RDAX ADCL,1". This will give you a louder input signal so more resolution and less noise.
Sounds close, but do as livingston suggests and use the "RDAX ADCL,1" to get a hotter signal into the chip.
Frank Thomson
Experimental Noize
Experimental Noize
I tried this program and it's very nice, a little bit harsh and abrupt but it's a very nice approach.
I'm wondering if can be implemented in this Hall Reverb program, it's a long decay reverb, very natural and smooth, maybe helps a little:
If you fix the predelay and the damping to 0 free 2 pots to play with the feedback and shimmer level and also the decay from the reverb.
I'm wondering if can be implemented in this Hall Reverb program, it's a long decay reverb, very natural and smooth, maybe helps a little:
Code: Select all
Last edited by Sweetalk on Fri Nov 16, 2012 6:13 am, edited 1 time in total.
Well, I been working a little bit on the shimmer algorithm with a different approach than the one posted earlier.
I tooked the Hall reverb, eliminated the predelay section. The signal flow intents to be like this:
INPUT ---> + ---> REVERB -------> OUTPUT
| |
|<--- PITCH <----|
The adder on the front it's controled by POT2, allowing to adjust the amount of pitch shifted signal going back to the reverb.
I haven't tried yet but I'll be nice if you can take a look at this and see if it's OK. I'll be trying it tomorrow I hope (not at the office right now)
I tooked the Hall reverb, eliminated the predelay section. The signal flow intents to be like this:
INPUT ---> + ---> REVERB -------> OUTPUT
| |
|<--- PITCH <----|
The adder on the front it's controled by POT2, allowing to adjust the amount of pitch shifted signal going back to the reverb.
I haven't tried yet but I'll be nice if you can take a look at this and see if it's OK. I'll be trying it tomorrow I hope (not at the office right now)
Code: Select all
; Hall reverb w/shimmer
; Jan 2012
; 1.0
;
; Mono input, Stereo output
; POT0: Damping
; POT1: Feedback
: POT2: Decay
;
; by Sweetalk
;MEMORY
mem delayl 4096 ; Pitch Shift mem
mem temp1 1
mem iap1 156 ; Reverb mem declarations
mem iap2 223
mem iap3 332
mem iap4 448
mem ap1 1251
mem ap1b 1751
mem ap2 1443
mem ap2b 1343
mem ap3 1582
mem ap3b 1981
mem ap4 1274
mem ap4b 1382
mem del1 3559
mem del2 2945
mem del3 3976
mem del4 4445
;REGISTERS
equ revin reg0 ;Reverb In
equ rervout reg1 ;Reverb Out
equ pitchout reg2 ;Pitch Shift Out. (really it's Reverb->Pitch out)
equ LPF reg3 ;LPF reg
equ temp reg4 ;Temp register
equ hpf1 reg5 ;High pass filters for reverb registers
equ hpf2 reg6
equ hpf3 reg7
equ hpf4 reg8
equ lpf1 reg9 ;Low pass filters for reverb registers
equ lpf2 reg10
equ lpf3 reg11
equ lpf4 reg12
equ rt reg13 ;Reverb Time register
equ iapout reg14
;CONSTANTS
equ LPFF 0,3 ;LPF coefficent for LPF after pitch shifting
equ LPFSH -0,5 ;Shelving coefficent for LPF -6dB.
equ kfh 0.01
equ kfl 0.4
equ kiap 0.5
equ klap 0.6
;PITCH SHIFTER RAMP0 INIT
skip run, START
wldr 0, 16384, 4096 ;Init RAMP0 for +1 octave pitch shifting
;Prepare POT2 for Decay
rdax pot2,1
sof 0.65,0.3 ;Scale by 0.65 and add 0.3
wrax rt,0 ;rt ranges 0.3 to 0.95
START:
;REVERB
rdax revin, 1 ;Read reverb in
sof 0.25, 0 ;
rda iap1#, kiap
wrap iap1, -kiap
rda iap2#, kiap
wrap iap2, -kiap
rda iap3#, kiap
wrap iap3, -kiap
rda iap4#, kiap
wrap iap4, -kiap
wrax iapout, 0 ;write to register for ring injection
;now do reverb ring, use temp as reg for filtering:
;aps into delay1:
rda del4#, 1 ;read previous delay
mulx rt ;multiply by reverb time coefficient
rdax iapout, 1 ;read left input from input allpass filter bank
rda ap1#, klap ;do an allpass filter
wrap ap1, -klap
rda ap1b#, klap ;do second all pass filter
wrap ap1b, -klap
wrax temp, 1 ;write to temp, keep in acc
rdfx lpf1, kfl ;low pass filter
wrlx lpf1, -1
rdfx hpf1, kfh ;high pass filter
wrhx hpf1, -1
rdax temp, -1
mulx pot0 ;crossfade between filter and no filter
rdax temp, 1
wra del1, 0 ;write to next delay, clear accumulator
;aps into delay2:
rda del1#, 1
mulx rt
rda ap2#, klap
wrap ap2, -klap
rda ap2b#, klap
wrap ap2b, -klap
wrax temp, 1
rdfx lpf2, kfl
wrlx lpf2, -1
rdfx hpf2, kfh
wrhx hpf2, -1
rdax temp, -1
mulx pot0
rdax temp, 1
wra del2, 0
;aps into delay3:
rda del2#, 1
mulx rt
rdax iapout, 1
rda ap3#, klap
wrap ap3, -klap
rda ap3b#, klap
wrap ap3b, -klap
wrax temp, 1
rdfx lpf3, kfl
wrlx lpf3, -1
rdfx hpf3, kfh
wrhx hpf3, -1
rdax temp, -1
mulx pot0
rdax temp, 1
wra del3, 0
;aps into delay4:
rda del3#, 1.0
mulx rt
rda ap4#, klap
wrap ap4, -klap
rda ap4b#, klap
wrap ap4b, -klap
wrax temp, 1
rdfx lpf4, kfl
wrlx lpf4, -1
rdfx hpf4, kfh
wrhx hpf4, -1
rdax temp, -1
mulx pot0
rdax temp, 1
wra del4, 0
;take outputs as taps from reverb ring:
rda del1, 0.8
rda del2, 0.8
rda del3+2876, 1.5
rda del1+2093, 1.1
rda del4+1234, 1.1
wrax revout, 1 ;Write to revout register, keep in ACC for pitch shifting
;PITCH SHIFT +1 OCTAVE
cho rda, RMP0, REG|COMPC, delayl
cho rda, RMP0, , delayl+1
wra temp1, 0
cho rda, RMP0, RPTR2|COMPC, delayl
cho rda, RMP0, RPTR2, delayl+1
cho sof, RMP0, NA|COMPC, 0
cho rda, RMP0, NA, temp1
;LPF to smooth out a little of the high end
rdfx LPF, LPFF ;Freq coef
wrhx LPF, LPFSH ;Shelving coef.
wrax pitchout, 1 ;Write the pitch + reverb out on pitchout and keep it in acc. ACC = Pitch + Reverb
mulx pot2 ;Multily by Feedback pot (POT2). ACC = (Pitch + Reverb) * POT2
rdax adcl, 1 ;Read ADCL and add to ACC. ACC = ((Pitch + Reverb) * POT2) + Clean
wrax revin, 0 ;Write the mix from the ACC (feedback and clean signal) on the revin and clear the ACC.
;Making mono output
rdax revout, 1 ;Read output from Reverb (revout) and write it to ACC.
wrax dacl,1 ;Write the ACC on DACL and keep it.
wrax dacr,0 ;Write the Acc on DACR and clear it.
;set up lfo, 1Hz to 2Hz, +/-100 samples, for smearing loop all passes:
skp run, 2
wlds sin0, 30, 50
wlds sin1, 41, 50
;smear 4 allpass filters in reverb ring:
cho rda, sin0, reg|compc, ap1+50 ;sin0
cho rda, sin0, 0, ap1+51
wra ap1+100, 0
cho rda, sin0, cos|compc, ap2+50 ;cos0
cho rda, sin0, cos, ap2+51
wra ap2+100, 0
cho rda, sin1, reg|compc, ap3+50 ;sin1
cho rda, sin1, 0, ap3+51
wra ap3+100, 0
cho rda, sin1, cos|compc, ap4+50 ;cos1
cho rda, sin1, cos, ap4+51
wra ap4+100, 0