FUNKKONTAKT: a simple (and slightly unconventional) funky envelope filter

Started by Fancy Lime, November 01, 2017, 08:17:28 AM

Previous topic - Next topic

Fancy Lime

Hi everyone,

I've been working on envelope filters for some time now, mainly for use with bass. As those who have also fallen down that particular rabbit whole will probably agree, this is a deep one full of mad hatters and hookah-smoking caterpillars. Here I want to share some things I found along the way, in form of a design with many common features in a (to my knowledge) uncommon combination:



Controls:
Envelope controlled filters are, despite the name, not usually directly controlled by the envelope of the signal but by a more or less heavily modified version of the original envelope. Modifying the amplification controls the sensitivity, delaying the rise increases attack time, delaying the fall increases decay time, limiting the peak of the envelope controls the range (or more precisely the "ceiling" of the range), shifting the envelope up or down between the supply rails controls where the filter sweep starts (the "floor" of the range). The ceiling and floor of the range can also be controlled in the filter section, instead of the envelope section. That makes 5 controls for the envelope alone, not counting a possible inverse sweep option. The filter section might have gain, volume and Q controls and various modes such as lowpass, bandpass, highpass, notch, or any combination of several of those types. So one could easily design an envelope filter with 20 or so knobs without any of them being redundant. However, outside a studio situation with unlimited time (aka "never") that would not be terribly practical.
It seems to me that the art of designing any envelope controlled effect is in reducing the controls to the minimum necessary amount while keeping it flexible. For the filter section I find limited control over Q sufficient and I like me a Volume pot to compensate for the increased gain at high Q values. The envelope section is more tricky. A Sensitivity control seems almost unavoidable to compensate for different instruments, pickups, playing styles etc. The second most useful control to me is the floor (or base or bias) control. Setting it just below the audio range provides the classic funk-filter sounds. Setting the floor just above the fundamental frequencies gives a slightly more subtle effect, great for spicing up a background bass line without loosing the foundation. Setting the floor well below the audio range increases attack, in extreme settings this sounds like playing backwards. Because these two controls both influence attack and decay differently, they can be balanced to set a wide range of useful attack and decay times in a good design. This sounds complicated because the pots are interactive but I actually find it very easy and quick by first setting the Floor and then adjusting the Sensitivity to taste. The third important control is the ceiling or range, which simply limits how high the filter goes. This is interactive with the sensitivity and can be set last.
I implemented the Floor control as a bias control of the envelope section, which works quite nicely. The Ceiling is controlled by limiting the current through the diodes of the optocouplers.

Filter type:
Lots of filter types have been and still are used for this kind of effect. The State Variable Filter, used in its Kerwin-Huelsman-Newcomb Biquad incarnation in the Mu-Tron III is probably the most flexible because it allows to get lowpass, bandpass and highpass simultaneously while also providing flexible Q-contol. The MXR Envelope Filter uses an interesting MOSFET inverter implementation of this type of filter. Simpler filters like Multiple Feedback Bandpass are also used extensively (EHX Bassballs, Doctor Q...), as are twin-T or bridged-T feedback peak filters. Sallen-Key resonant lowpass filters seem to be more common in synthesizers than in stompboxes, the Korg35 module in the MS-10 is the most prominent example (the filter in the MS-20 is sometimes called a Sallen-Key for some reason, but should in my opinion be considered a State Variable Filter since it consists of two integrators). And than there are the Moog Ladder Filter and its many diode-based derivations. And dozens more types of variable usefulness for a bass and guitar stompbox.
For use with bass, a resonant second order lowpass is the one thing that makes musical sense to me. For guitar a bandpass can also sound good. Bridged-T feedback peak filters are not terrible either on bass but to my ears they don't quite cut the mustard. So I set out to find a simple resonant lowpass with a controllable resonant peak. This can be had from a SVF but that seemed like overkill if I only want that one mode. So I looked at Sallen-Key filters. It is possible to control the Q by controlling the gain of the op-amp. However, this is an extremely sensitive control at higher Q's, so much so that it is hardly useful considering the usual component value tolerances. So I went with switchable capacitors and unity gain, which turned out to be flexible and good sounding.
There are various ways of controlling the filter sweep. The Envelope Controlled Filter Article on GEOFEX has all the info (http://www.geofex.com/article_folders/ecftech/ecftech.htm), So I'm not going to repeat it here. None of them is perfect. I went with optocouplers on this, mostly out of curiosity and was pleasantly surprised. The NSL-32 is a bit expensive but sounds really nice in this application. I would say the filter on this thing here sounds better than any of my previous OTA based experiments. It is definitely less noisy and has way more headroom (more than it realistically needs, which is good).

Design and Sound:
This is designed similar to the Unix Philosopy: To do one thing, and do it well, while being easy to modularize and be adapt at being incorporated into bigger chains of modules. So it quacks in many dialects but thats about it. One filter characteristic, up-sweep only, because realistically, this would be the only settings I as a player would ever use even if I had other options. In this case I the player had to keep me the designer from going berserk on the options, I'm guessing you guys can relate. I really wanted to design something that I would want to play, not something I would just want to build. And to be completely honest, for bootsylicious finger funk, I'd take this here over anything I've ever heard, including a vintage Mu-Tron. But then again, I made it to suit my taste, so it would kind of suck if that were not the case. D5 can be mounted on the case for a fun disco effect. D1 and D2 are only there to keep the input of following devices from clipping in case of extreme peaks.

The power section:
Input voltage is limited to 9V using a 7809 voltage controller. This is not strictly necessary if your power supply delivers a reliable 9V. If voltage is a bit shaky or you use different supplies, the range of the Floor pot will be affected. Not terribly but it will make it more difficult to find your favorite setting.

Mods:
You could take the filter section of the FUNKKONTAKT and marry it with the envelope section of the Mu-Tron III or (probably more interesting) vice versa. If you only want one fixed Q-factor, then Volume can be a trim pot. Making R4 and R5 different values will decrease the Q when the filter is low. Making R13 and R14 different values will decrease the Q when the filter is high.

Enjoy and let me know if you have questions,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

EBK

That voltage regulator has a 2V dropout.  Add your diode drop of around 0.45, and it means that unless your power supply input is over 11.45V, that regulator isn't doing anything.
  • SUPPORTER
Technical difficulties.  Please stand by.

Fancy Lime

Hi Eric,

well, it isn't not doing anything either. But you are right of course, it does not do what I want it to. Being fed 9V, the 7809 drops to 7V. Thanks for the catch! I had somehow wrongly remembered that to be around 200mV dropout and did not bother to look in the datasheet. Drinks on me for being stupid! With a 2V dropout before the filter section gets its V+, we loose a bit of headroom. Not that I noticed when testing it but still, bad design, mea culpa. I will try a diode referenced upper bound of the Base control instead. Best done with a 5.6V Zener, which I do not have kicking about at the moment. 3 red LEDs should do the trick just as well, though. I'll see how it goes and report back.

Cheers,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

rankot

  • SUPPORTER
60 pedals and counting!

Fancy Lime

I'm awfully busy at the moment. Maybe I'll find some time over the weekend. First priority after the power supply changes.

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Kipper4

Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

ElectricDruid

Thanks for the extremely complete overview of the envelope-controlled filter. I agree completely about the problem being getting a useful degree of control out of the fewest knobs - and the various interactions between them don't help any.

Slightly off-topic, but if you're interested in the MS-20 filter, Tim Stinchcombe has done the best analysis:

http://www.timstinchcombe.co.uk/synth/MS20_study.pdf

Exec Summary: Whether it's a Sallen-Key or not depends on which version you're talking about.

Tom

Fancy Lime

@ Rich
I tried to get the thing to clip by playing extremely hard and found out that I couldn't. The filter itself has enough headroom even at the highest Q setting. However, the input of the amp that I had plugged it into would clip in some settings. When the Q is at max, the attack fast, the range high and the floor low, then loud percussive notes produce quite a peak because it can happen that the resonant peak is exactly at the "right" frequencies when the "pluck" has the highest amplitude. D1 and D2 simply keep the output from pushing that into the next stage, which may or may not deal with it nicely. Not strictly necessary and only relevant in a few settings, more of a precaution.

@ Tom
I would not call it "extremely complete". I planned to actually write an in-depth analysis of what an envelope follower really is and all the ways to manipulate it but had to quickly back down when it became clear that this would be a whole Doctoral Thesis, which I really don't have time for right now. Some other day, though. Quite interesting.

MS-20: Yes, Stinchcombes analysis papers are great, that's where I got most of my info about the MS-10 and MS-20 filters from. What I meant was: Even the late MS-20 that uses two consecutive OTA integrators with feedback is sometimes referred to as Sallen-Key. And that one quite definitely is not a Sallen-Key. However, since the earlier MS-20 was indeed a Sallen-Key and Korg seems to have been fairly secretive about their filters, it seems understandable where the confusion comes from.

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Mark Hammer

I have to smile.  I'd been thinking for a while that a simple 2-pole lowpass could be easily made with a pair of LDRs and a DR. Quack-type front end.  I guess it just goesto show that if you wait around here long enough, someone else will do the work for you.  :icon_lol: ::)

ElectricDruid


Quote from: Mark Hammer on November 01, 2017, 06:29:53 PM
I have to smile.  I'd been thinking for a while that a simple 2-pole lowpass could be easily made with a pair of LDRs and a DR. Quack-type front end.  I guess it just goesto show that if you wait around here long enough, someone else will do the work for you.  :icon_lol: ::)

If you wait around long enough, pretty much anything comes to pass sooner or later!

Quote from: Fancy Lime on November 01, 2017, 06:10:41 PM
I would not call it "extremely complete". I planned to actually write an in-depth analysis of what an envelope follower really is and all the ways to manipulate it but had to quickly back down when it became clear that this would be a whole Doctoral Thesis, which I really don't have time for right now. Some other day, though. Quite interesting.

Ok, can we say "quite comprehensive"?! Most posts here don't run to 1200+ words and cover "Controls", "Filter type", "Design and Sound", "The power section" and "Mods" ;)

But I totally agree - there's easily a PhD in Envelope Filters. In fact, someone somewhere probably has one already. They might even be a lurker here, who knows?

Tom



Fancy Lime

@ Mark,
yeah, right? You'd think there would be some more designs around such an obvious idea but apparently there are not. The DOD 440 is close although I have to admit I don't fully understand the filter topology on that one. Looks like a MFB bandpass collided with some kind of allpass filter. You have recommended the DOD 440 before, can you explain what is going on there?

EDIT: Found your Mod Info on GGG, which has the important information. It's a Wien Bridge Bandpass Filter. Any reason why they would do that? Other bandpasses would only need a single control element. Most curious. Maybe they just had a cartload of the dual LDR's oxidizing away in the basement? Anyway, simply swapping the DOD 440's filter section for a Sallen-Key lowpass might be worth a try, especially for bass use. Essentially the Funkkontakt minus all them buffers.

@ Tom
Alright, "quite comprehensive" is fine with me :icon_wink: I'd like to put together a little series of posts examining and comparing envelope filters in more detail. I gathered a lot of information from scattered sources that I think deserve to be put in a condensed, beginner friendly form. Many people seem to build these things without fully grasping what part does what. I have little time at the moment but this project will get done over time. Suggestions are very welcome.

Cheers,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Mark Hammer

What I find pleasant about the 440 is that the filter sounds "rounder", and not as peaky is most other bandpass types.  Well, at least the clone I made does.  The commercially-produced ones seem to have much greater sweep.  But when the width of the sweep is kept relatively modest, it has a nice vocal quality.

As much as I'd love to put together your design,  I have to commit to completing all the other things sitting on the stack, first.  (And those of you who have been here a while know what of I speak.  :icon_rolleyes: )

Fancy Lime

Quote from: Mark Hammer on November 02, 2017, 09:23:11 AM
What I find pleasant about the 440 is that the filter sounds "rounder", and not as peaky is most other bandpass types.  Well, at least the clone I made does.  The commercially-produced ones seem to have much greater sweep.  But when the width of the sweep is kept relatively modest, it has a nice vocal quality.
Hmm, I always wondered what exactly makes a filter "sound vocal". I know how it when I hear it but I cannot seem to replicate it on breadboard. Does it have to do with Q changing along the sweep?

Quote
As much as I'd love to put together your design,  I have to commit to completing all the other things sitting on the stack, first.  (And those of you who have been here a while know what of I speak.  :icon_rolleyes: )
Yepp, I know exactly what you mean. If I had a year of doing nothing else I would hardly get all the stompboxes made that I want to make.

Cheers,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Mark Hammer

Oh, these are not things I want to make.  These are long-term contractual commitments: things I started 25 and 30 years ago, that are sitting in fully-populated boards, in a bin, or gathering dust on a shelf.

Fancy Lime

Alright,

so I changed the voltage referencing for the start point of envelope follower from a voltage divider between the rails (with the positive voltage limited to 9V by a voltage regulator, which as Eric pointed out would not work the way I had done it with a supply input of under ~11.5V, thanks!). Now the +rail is unregulated (voltage wise) and the envelope starting point is set by a voltage divider between ground and a point two red LED drops above ground, making it independent of the positive supply voltage (assuming the voltage drop of the diodes is independent of the current through them which should be close enough to true for a 22k limiting resistor between 5V and 30V supply voltage, thus covering the entire operating range of the NE5532AP's). As a plus, we got rid of one more "unconventional" part, so the NSL-32's are the only exotic birds left.



I also modified and simplified other parts of the envelope section. Sensitivity is now independent of the Floor setting, which has pros and cons but I guess independent controls are more intuitive. I restricted the range of the Floor control more than on the first version. Less sensitive to minute changes now, more useful range, which helps when setting slow attack sounds in the left half of the pots range. This also makes some interaction between the Floor and Range controls more apparent. So now Floor and Range set from where to where the sweep goes in a fixed amount of time, whereas the Sensitivity is used to adapt to different instruments or pickup settings and also shortens attack and lengthens decay. Setting the Floor below the audible range shortens attack as well as decay. If that is too many controls for anyone, I would suggest replacing the Range knob with a trim pot, as this seems to me to be the knob most likely to be set and forgotten. The Floor knob provides too much range of different sounds for me to replace it with a trim pot.

As always: please let me know if you find more mistakes. Enjoy,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Fancy Lime

This has been brought to my attention (thanks Rich!):

http://www.diystompboxes.com/smfforum/index.php?topic=107177.msg972458#msg972458

Remarkably similar concept and sound. I would accuse me of stealing rring's idea if I didn't know I didn't. So there seems to be some interest in that sort of thing. Good to know.

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Mark Hammer

The range switch is going to pop. A less noisy arrangement would be to have 2 series 1uf NP caps in place of C3 and two 2N2 caps in series in place of C5 (remove C2 and C4).  Your range switch now simply shunts one of each pair to change ranges.

Fancy Lime

Hi Mark,

correct, especially switching in C2 produces a loud BOING! sound. Come to think about it, it sounds reasonable that the "shuntable series" arrangement be less pop-prone because both ends of the caps that are switchable are always at (almost) the same DC level. Thanks! I had never thought about that, just accepted the popping as a sort of unchangeable fact of life.

I'm going to adjust the filter accordingly. But I'll use a 1n + 2n2 combination in the C5 position together with the 1µ + 1µ in C3 in order to keep the available Q settings the way they are. I'm rather fond of those.

Cheers,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Mark Hammer

Use of equal values within each pair allows for a DPST switch to do the work and alternate between double/half value.  Bear in mind that 1n and 2n2 in series yields 688pf, which is not what I think you want.  I suggested a pair of 2n2 in series because that will give1100pf as is, and 2n2 when you shunt one of the pair.

Fancy Lime

Hi Mark,

the 688p was exactly what I wanted because the "high Q" position only has 1000n instead of 1470n in the "big cap" position. Using two 2n2 caps for a series total of 1n1 would have cost me too much Q. Comparison of the settings:

Funkkontakt 1.1, parallel cap switching:
1000n, 3n2: Q=8.8
1000n, 1n: Q=15.8
1470, 1n: Q=19.2

With series cap switching 2x 1000n + 2x 2n2:
500n, 2n2: Q=7.5
500n, 1n1: Q=10.7
1000, 1n1: Q=15.1

With series cap switching 2x 1000n + 2n2 + 1n:
500n, 2n2: Q=7.5
500n, 688p: Q=13.5
1000, 688p: Q=19.1

So with the latter arrangement I get to keep the maximum Q setting almost exactly as before and the low and mid Q aren't too far off either. Quite a usable selection of Q values for my ears. So I incorporated this into version 1.2:



I also added suggestions for making Q non-constant. Adding Rx reduces Q the higher the filter goes, while making R5 smaller reduces Q the lower the filter goes. Not something that I want but maybe others do, so they can add the option (maybe with another switch). It may be useful for adapting the filter to specific setups with overly pronounced lows or highs. It comes at the cost of total filter range, though. Here are the approximate effects on the middle Q position:
500n, 688p, Rx=10k: Q falls from 13.5 to 7.5 @ 2587 Hz
500n, 688p, R5=22k: Q rises from 7.7 @ 123 Hz to 13.5
Instead of adding Rx one could also change the ratio between R12 and R13 but the results are less predictable.

And the "series switching" configuration indeed killed almost all switching noise, thanks for the hint! The sort of detail of good design that comes with experience, I guess, and is hardly ever mentioned in the usual beginners sources.

Cheers,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!