News:

SMF for DIYStompboxes.com!

Main Menu

Swell/Gated Reverb

Started by pbrommer, July 11, 2022, 10:33:57 AM

Previous topic - Next topic

pbrommer

I'm getting there in my understanding of SpinCAD, and understand the few threads I've read. But for the life of me, I can't seem to figure out a swell type reverb. There was a discussion here that mentioned pushing the volume to increase rather than decrease, but I think that was just in the SpinASM coding.

What should I be aiming to put together for building blocks to start on this rather dumb idea? Thanks for all of the ideas and thoughts.
  • SUPPORTER

Digital Larry

#1
You could start with one of the Envelope blocks.  Use that to drive the volume DOWN from 1 towards zero (Invert block).  Then use that volume control to either control the input or output of the reverb.  I sense the input is the way to go.

Let me make a couple comments about the Envelope blocks in SpinCAD designer.

One of them is essentially a full wave rectifier into a low pass filter.  This will have the same slope on attack as release.
In another mode, it uses the MAXX instruction to give you fastest rise time and then the low pass filter affects the smoothness.
There's no hysteresis anywhere so the envelope detect may in fact be too sensitive.
Also, simulating patches that use the envelope followers gets tricky because you don't really know the signal levels in your real pedal and how these compared to using a simulator wave file normalized to such and such a level.  I guess you could figure it out iteratively.

The other Envelope (Envelope II) is code ripped out of the Spin supplied "auto-wah".  I have attempted to analyze it in the past.  What I can tell you from memory is that it really accentuates the attack.  The other thing about all these is proper scaling and curve matching of the envelop signal itself to the parameter you wish to control.  Should it be linear, log, 1/X, what?  There's probably no way to predict it... just have to try it.

So in the case of the swell, for example, on your attack you want the gain to go to zero but you also want it to come up quickly after that which it won't do if the envelope detector is way overloaded and doesn't actually begin to rise until several seconds later.

I'd say the Envelope Blocks in SpinCAD are somewhat weak links at the moment, and the answer to that is not SpinCAD per se (it just helps to link blocks together) and more in fundamental design of the blocks themselves.  If someone has a better envelope block they'd like to see incorporated into SpinCAD, just let me know.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

pbrommer

That's a great response. I've tinkered with the envelope, only to hit some failure. So, with the 1-->0 should give me a start. I'll tinker and see what happens
  • SUPPORTER

pbrommer

So, I took a shot at interpreting what you were mentioning. I still have problems getting the envelope to just do its thing. So, this is a delay with the controls visible. I don't know why I used Pot 1 -- just the first one I grabbed. I think I hear a bit in the reverb, but it's subtle. The attack/decay is just a stab in the dark, delay time is as long as I slid just to listen to. Let me know your thoughts.


  • SUPPORTER

Digital Larry

Quote from: pbrommer on July 11, 2022, 09:25:04 PM
So, I took a shot at interpreting what you were mentioning. I still have problems getting the envelope to just do its thing. So, this is a delay with the controls visible. I don't know why I used Pot 1 -- just the first one I grabbed. I think I hear a bit in the reverb, but it's subtle. The attack/decay is just a stab in the dark, delay time is as long as I slid just to listen to. Let me know your thoughts.


#1 I hate the "Single Delay" and never use it.  It's going away in the next version along with the "Coarse Delay".  The "Three Tap delay" is where it's at.  If you don't connect an output tap, code is not generated so there's no downside.

#2 You have to send your audio signal into the top of the envelope control.  Otherwise there's nothing for it to detect.

DL
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Digital Larry

#5
Further thoughts about gated reverb.

A few years ago I approached a few pedal manufacturers trying to get some consulting work, and one well known east coast amp manufacturer challenged me to create a distinctive sound that had been used by one particular studio guitarist back in the 1960s and is NOT what you'd call a mainstream effect.  I'm not going to say what it is because I'm still trying to create it.

However, this led me to try to come up with an instantaneous attack + release envelope generator to try to reproduce the sound.  In other words, attack FASTER than the guitar note.  The only way to do this (at least in my mind) is to set a threshold level over which you suddenly slam all the way up and then decay.  Practically speaking, this was very problematic because I had to develop a retrigger timeout, or else the decay of the guitar signal would retrigger it.  Set the threshold too low and you're getting triggers all the time when you're not even playing.

Ultimately I got something which worked, but it was not a general purpose effect at all.  If you played very cleanly and staccato,  you could get something usable.  Otherwise it was a bit of a mess.  It also did not really recreate the original effect, which I suspect was done using more standard available equipment in a very clever way, possibly with tape speed manipulations as well.

So, "gating" or "swell" can sometimes fall into that same category.  I'd probably get something out of trying to find a Boss "Slow Gear" schematic as analog ideas can suggest a digital implementation.  I have an easier time with linear concepts in Spin ASM as compared to logical.  e.g. filters, delays, vs. tap tempo.

Ok, here it is.  The center part is a full wave rectifier, the bottom section is a standard discrete flip flip for on/off switching (although in this case it just kills the control signal rather than doing a FET bypass), and the top section is basically a VCA (the FET is used to attenuate the signal coming through) to mute the signal when the filtered rectified signal goes up and then let it back when the level decays. 

Look at the signal coming off the emitters of the two NPNs in the rectifier.  This is filtered by a 10 uF and then goes up to the source of the FET.  So there's a balance there (modulation of the FET's source pin voltage) by the slower signals.  My seat of the pants analysis is that this lets us detect peaks even when a signal is sustaining.  Anyone want to give a deeper analysis? 

[edit] - now that I think about it, this is starting to remind me of the Spin "auto-wah" envelope detector.  I'll need to bust out the code for that one but I seem to recall that something similar is going on.  The attack detection is not an absolute level threshold, it's a fast rise above a more slowly moving average.  "light bulbs going off"...



DL
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

niektb

Quote
[Edit] The attack detection is not an absolute level threshold, it's a fast rise above a more slowly moving average.  "light bulbs going off"...

[...]
What you're describing reminds me of my master's thesis haha, one of the topics was a On-Off-Keying Demodulator (for RF) :P


pbrommer

So, I was about to type a frustration post, as I wasn't really getting anywhere. Then I tried a little something, and it works (ish). I'm sure there can be some improvements, but it does the attack swell off of a reverb (using a single chord sample track). Enjoy?!



Patrick

PS Thank you all for your feedback and help. I'll be hopefully getting a small project up and running (when I get time.. HA!).
  • SUPPORTER

Digital Larry

OK, a few notes,
1) You're over allocated on instructions (red bar at the bottom), so I recommend you cut delay stages to 2 or use a different reverb block with fewer instructions.
2) Also consider taking the envelope input directly from the input block rather than the reverb, which will have a soft attack and reduced level.
3) I'd also try the envelope II block, which is taken from the Spin auto-wah and AFAIR is much like the Boss Slow Gear (which I am currently analyzing)

DL
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Ice-9

Looking at the Boss Slow Gear schematic, the section for envelope detection is very much the same as the Ross compressor pedal so it shouldn't be too difficult to convert the Spin wah envelope detector to operate  in a similar fashion to fade in a reverb signal.
I would first try to build the envelope detector around just a volume attack and once that is working as wanted then add the reverb code.
www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.

Digital Larry

If there are questions about how a specific block works, please paste the SpinASM code in here. The real answer is down in the Spin ASM.   Maybe some of those things need to change or can be made more flexible.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Digital Larry

#11
Here's code generated to take both the single slope and dual slope outputs from the envelope block.


; Untitled
; null
; Pot 0:
; Pot 1:
; Pot 2:
;
;
; ----------------------------
;------ Input
;------ Pot 0
;------ Envelope
RDAX ADCL,1.0000000000
MULX POT0
ABSA
SOF -2.0000000000,0.0000000000
SOF -2.0000000000,0.0000000000
RDFX REG0,0.0001500000
WRAX REG0,0.0000000000 ; -> this is the single slope output
RDAX REG1,1.0000000000
SOF -0.0001000000,0.0000000000
RDAX REG1,1.0000000000
WRAX REG2,0.0000000000
RDAX REG0,1.0000000000
MAXX REG2,1.0000000000
WRAX REG1,0.0000000000
;------ Output
RDAX REG1,1.0000000000
WRAX DACL,0.0000000000
RDAX REG0,1.0000000000
WRAX DACR,0.0000000000



This much, let me comment.
# read the left input
RDAX ADCL,1.0000000000
# scale by the pot (this is the sens control)
MULX POT0
# full wave rectifier
ABSA
# boost by 4 more (12 dB)
SOF -2.0000000000,0.0000000000
SOF -2.0000000000,0.0000000000
# low pass filter1
RDFX REG0,0.0001500000
# reg0 is the single slope output
WRAX REG0,0.0000000000

First off, you don't expect the input signal to be anywhere near 0 dB.  So to get a good control signal you boost it.  How far to boost it is obviously a concern so it probably takes some iteration.  It's not a problem to overdrive it because the clipping behavior holds it at 1.

Important to note a couple things about this block.

  • The number on the settings sliders is NOT the rise time.  It is the corner frequency of the low pass filter.  Only I know this, but now you do too.  So slower rise times are on the left.

  • The single slope block does not have a peak detector, so it has rise time on both the front and trailing edges.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

pbrommer

Okay, so I moved the envelope block to the input, added in the EnvelopeII block (using the MaxOut circle bubble connection), maxed out the attack, minimized the decay, and left the PostFreq at minimum. Using a single chord sample track, it sounds pretty neat -- a slow attack into a reverb, much like a small volume swell. Sounds pretty neat!

I really need to get my own FV-1 board built so I can try these out in an actual setting. This program is fun to make wacky ideas. I appreciate everyone commenting and adding ideas, especially you Mr. Digital Larry. It's helping me think about how all the block work, and I hope that someone else can learn from the diagram ideas I've put out there.

Patrick
  • SUPPORTER

niektb

just out of curiosity, how does this work from a more algorithmic perspective? what I kind of expected is a AR envelope that is triggered when the input exceeds a certain value but this seems different? I don't get why you need to invert the signal

Digital Larry

#14
Quote from: niektb on July 14, 2022, 02:50:01 AM
just out of curiosity, how does this work from a more algorithmic perspective? what I kind of expected is a AR envelope that is triggered when the input exceeds a certain value but this seems different? I don't get why you need to invert the signal

The "Envelope" block, which is my own creation, is either:
- a full wave rectifier followed by an adjustable low pass filter (single slope output)
- the above, followed by another low pass filter, with a software "diode" (the MAXX instruction) that picks off the maximum value and puts it out (two slope output).  The faster rise time filter is therefore preferred when things are getting louder, while the slower one kicks in on the decay.

There is no explicit level sensing or threshold triggering or anything like that.

I just reviewed the section in Will Pirkle's book on "developing DSP plugins in C++" about envelope followers.  The above is just one very simplified approach.  I am going to consider adding more options for an improved block.

In my own use of the Envelope block, it worked better for things like "level dependent LFO speed" than auto-wah or slow gear types of sounds.  My impression is that the "Envelope II" which as I mentioned came out of the Spin auto-wah, is better at isolating pick transients for things like auto-wah and slow gear.  I will probably wind up calling this a "pluck detector".

I was starting to simulate the Slow Gear circuit in SPICE as I wanted to see how it handled slowly changing levels.  Haven't got there yet.

As far as inverting the signal, this is done because we want to reduce the volume to zero on the note attack and then open back up to full volume (but before the note decays).

Different circuits/algos work better for different things.  I'm still learning, personally.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

lars-musik

Hi folks,

first of all: Thanks Digital Larry for the great work you've done and shared here.

I just found an old PCB from 2016 that I  made for a first FV-1 test but shelfed it since then. Now I'd like to give it a try. I am not a programming guy, so the GUI is a big help.

There are two things, I'd really love to coax out of the FV-1:

(1) a Slow Gear-ish effect (I built the analog variant and have the new EHX Attack/Decay, but both need a seperate gain/ EQ-ing afterwards)
and
(2) a reel-ADT-alike sound.

For the Slow Gear-ish one I found this spn file:

"; Simple slow attach
; by Alex MAK
; http://www.spinsemi.com/forum/viewtopic.php?f=4&t=174
;equ   mono   reg0
equ   peak   reg1
equ   lev   reg2
equ   strike   reg3

rdax   adcl,1
absa
wrax   peak,0.8
rdax   lev,-1
skp   neg,nostrike
clr
wrax   strike,0
nostrike:
clr
rdax   peak,1
maxx   lev,0.999
wrax   lev,0

or   %00000000_00000001_00000000
rdax   strike,1      ;ramp strike if not a peak signal
wrax   strike,0


rdax adcl,1.0 ; Read ADC left
mulx   strike
wrax dacl,0 ; write to DAC left "



but I can't translate it into SpinCAD blocks (yet).

How would I go about it? The SpinASM documentation is something for brighter bulbs than I am....

Cheers, Lars