About
Punk SVF is my first successful design of a fully solid state filter (no vactrols involved). It got its name for not requiring any special parts whatsoever, being relatively easy to build, and sounding raspy, abrasive, and at times even unruly. It's a cool filter with loads of character and sweet spots! Topologically, this is an unorthodox implementation of an otherwise classic state-variable filter.
VCFs were, and still are to a degree, the bane of my synth-DIY existence. Somehow, i never ended up with a fully featured, nicely functional filter that doesn't use vactrols or some other hack. I also am no big friends with OTAs, so OTA-based designs were not even considered. A couple years ago i tried out Experimentalist Anonymous' 4007 Based VCF (at the top of their pdf pile), which worked, but didn't sound right to me. I learned, however, that hacky filters may as well work. At some point in cold Estonian october of 2024, i downloaded a pdf of a book chapter called "Analog Filters", apparently from "Linear Circuit Design Handbook" by Hank Zumbahlen - and tried to Comprehend. While i am still a bit lost, i learned about integrators, and realised that i've actally built a voltage-controlled inverting integrator at least three separate times before; this meant i could set up a state-variable system, which needs just two. Of course, the said integrator design is the heart of Serge Tcherepnin's VCS!
The unit's controls are pretty straightforward for a filter. At the very top is an attenuated signal input 1 with maximum amplification of 2 and a fixed unity-gain input 2. The first input's amplification is handy to overdrive the filter or 'guide' its unruly resonance. The input section is DC-coupled, meaning the both audio and CV can be processed into something useful. The four outputs right below are lowpass, bandpass and highpass that we all know and love, plus an all-pass output. Allpass doesn't change the harmonics' amplitudes much, but it changes their phase a lot, creating a phaser-like effect. For an actual phaser, you need 4 of these, though - but as it is, it's useful to mess with sounds' phases in feedback patching, etc.
Below the input 1 volume is the initial cutoff setting and its two attenuated CV inputs. The cutoff frequency range goes from a couple Hz to 10KHz. While processing sounds, the filter's cutoff can go low enough to effectively silence it, which is very handy. The byproduct of that plus the input section's DC coupling is that this filter is also a woggly slew limiter! Essentially, the low-pass output becomes a "glide" output. Add some resonance to the mix - and you get a woggly glided version of your CV! CV in 1 also has the input signals' submix normalled into it, so if nothing is patched, opening the CV1 attenuator will result into a very peculiar shift in sound, as the filter's cutoff is now modulated by/along with the signal it is processing. Can't do that with vactrols! CV in 2 is capable of x4 amplification, in case you have a weakish envelope and want to drive the filter all the way across the spectrum with it.
Lastly, there's the resonance knob way at the bottom. It works like you'd expect a filter reso knob to work; the way it sounds is peculiar, though. At low reso you get more or less what you expect from a filter. It's not too mellow, but expectedly rubbery and damp. As the resonance goes up, though, this thing starts actively fighting the input signal with its resonance! Depending on the input volume setting, this fight can result in many different shades of sound. As resonance approaches self-oscillation, the filter may take on some wavefolderish tones. It sounds raspy and gnarly like that. The self-oscillating peak is squealy and overdrivey, and stays without any input, so this filter can be a "sinewave" oscillator.
All in all, this is a design with a fairly steady and dependable behaviour, but lots of character and quirks. It uses almost exclusively the basic parts list articles, meaning one can probably find everything needed for it in their SDIY trashery. It also is a fairly easy build; don't let the board size intimidate you, as it is sparsely populated, and there's no requirement for any big-brain operations like transistor matching. I recommend this design for intermediate SDIYers who just stopped being beginners and did their 40106 VCO and a vactrol VCF or whatnot!
Schematic
Input submix
This circuit isn't too big for a filter, but nevertheless, i broke it apart into divided chunks, and the walkthrough is going to be chunk-by-chunk. First off, there is an input submix section top left. We will need a separate mix of incoming signals later on, hence we're spending an op-amp on it. It's your usual stock inverting summator over IC1A. R1 being two times smaller than R2 means whatever comes from behind R1 will get come out two times louder. This way, input 1 is capable of producing 2x gain when its attenuator is fully clockwise, while being unity-gain at noon. In 2 is always unity-gain, as R9=R2.
State-Variable Filter Core
The audio submix is then passed to the filter core in the center of the schematic. It is a classic implementation of a state-variable system, as per the instruction in Figure 1. There's an inverting summator and two integrating inverters - three op-amps total. Integrators are made by taking a usual op-amp inverting amplifier, and replacing the feedback resistor with a capacitor, like R4/C1 in Figure 1. If the input to such integrator is a positive voltage, it will charge the capacitor's left side through the resistor. The op-amp's output will have to gradually bring the other side of the capacitor more and more negative to oppose the charge buildup and attempt to keep its inverting input at virtual ground. Vice versa for negative voltage at the input. Hence, this is an inverting integrator. To make a classic state-variable filter, the summator's output is fed to one integrator, and its output to the next integrator. The last integrator is fed back negatively (comes back to the first integrator inverted), while the first integrator is fed back positively in some set proportion. This proportion determines the filter's resonance: the more feedback from the first integrator, the less resonant the filter gets, which is counterintuitive, but we will get there.
My understanding of state-variable systems is limited, although honest to god, i tried. I am typing out my understnding here, but keep in mind that it may be flawed and/or missing some maths. So, an integrator block is quite literally taking an integral of whatever signal comes into it over time times minus one - like in maths. It means that if we integrate a squarewave (that happens to be of a frequency perfectly matched to the integrator's time constant defined by its capacitor/resistor), we get a triangle. Because an integral is the area that a signal covers on a graph, and when we integrate a positive constant over time, the area covered by it will linearly rise over time. Likewise, if that constant happened to suddenly turn negative, then we start linearly adding 'negative' area to our integration result, so, it starts climbing down. And since a squarewave is just a positive constant signal, then a negative, for equal periods of time over and over again - if you integrate it, you get something that goes up and then down linearly over and over again: a triangle! Inverted, in our case, as our integrators are inverting. And if you were to take that and shove it through another integrator, you get a sinewave, which also makes sense to me, but i cannot explain it on fingers. The resulting system is presented in Figure 2. note that i matched the squarewave frequency to the integrators so that the triangle is full-scale, yet doesn't turn into a trapezoid.
So, if you slam a squarewave that happens to be of correct frequency through two integrators, you get a triangle from the first and a sine from the last. Big deal, what now? Well, we can make this thing an oscillator by adding some feedback, like on Figure 2. Instead of driving the whole thing with a squarewave (that we also have to frequency-match), we make it drive itself by inverting the second integrator's output and putting it back into the system. I cannot provide you a neat equation or whatever, but in my understanding, the core idea is very simple: the system of the two integrators is 1. non-inverting, since both are inverters, and minus by minus is plus, and 2. is inertial, so, whatever comes into it pops out of it in some way or form, delayed over time. If the system's output is positive, we flip it so now it's negative, and stick it back to the system. It then takes some time for this negative voltage to appear at the system's output. But when it does, it gets flipped again, and starts driving the system positive. And so, it keeps going like that in a cycle endlessly!
Neat sine/cosine oscillator, but it's not a filter yet. We can turn it into a filter by passing the signal to the inverting stage on Figure 3 (which will now become an input/feedback summator) and disturbing the system with it. Now, the system will process the incoming system and itself at the same time. (Admittedly, at this point my understanding of theory breaks apart) Since the figure 3 setup is still an oscillator, it will do its best to oscillate even while being disturbed by the incoming signal; this is the insane resonant squelch you hear while cranking up the resonance on some filters, literally another oscillation on top of the stuff you're processing. But we don't always want it, so we need a way to dampen it. Positive feedback from the first integrator does the job of toning down the self-oscillation by 'damping' the system. Think of it as pressing a foam block against a string. We will later reveal that the first integrator's output is bandpass, so naturally feeding it back in a dampening manner means we get less energy at the resonant peak, ergo less resonant peak itself. This way, we end up with what we started off with in Figure 1: a classic SVF. Such system does not necessarily oscillate on its own, however, the incoming signal puts some energy into the system, which makes the system do damped decaying oscillations and deenergize, like a pendulum. The more 'damped out' the system is, the harder it is for it to ride off the incoming signal and oscillate, ergo, you hear less and less resonant peak. This is why in such setup, bringing more feedback from the first integrator yields less resonance.
It is now apparent that the system we have is a filter, but one question kept being on my mind: why do we get highpass from the summator, bandpass from the first integrator, and lowpass from the second? I was puzzled and asked around so that i can get a barely-any-maths understanding. Modwiggler user guest jumped over to help with a bit of an explanation - thanks a lot!
the 2 integration stages are sort of like lowpass filters, but also very different. a lowpass filter causes higher frequencies to be attenuated, but it also passes the low frequencies (at some fixed gain). the transition region between these two regimes is the cutoff frequency. with an integrator, it just attenatues, there is no passing section. so above the "cutoff frequency", the amplitude gets smaller and smaller, but below it, it gets bigger and bigger.
So, in contrast to ye olde passive RC lowpasses, we can simplify the op-amp inverting integrator's amplitude-frequency response as a "low-boost" filter: linearly attenuates above its cutoff, linearly boosts below. Phase-wise, any integrator delays the signal by 90 degrees - that's how we get a sine/cosine/inverted sine in Figure 3. If we imagine just passing a signal through two of those, like in Figure 2, the lows become even more boosted, while the highs become even more muted than with a single integrator - like a -12db/oct filter cutting frequencies more steeply than a -6db/oct one. However, in our case, we get no insane boost to the lows! That is because the feedback paths take care of that for us.
if we assume that the output of our filter is a second order lowpass (which it is), then it has a passband up to the cutoff frequency (gain of 1), and above that attenautes all higher frequencies at twice the rate that a first order lowpass would (-40dB/decade [-12db/oct] as compared to -20dB/decade [-6db/oct]). so if this is the output of the second integrator stage, what signal must exist at the input of that integrator in order to produce a signal like that? there are two ways to think about this: the first is that the inverse of an integrator is a differentiator, and that just has the inverse frequency reltionship (attenuating more for lower frequencies), the second is what transform would give a flat output of an integrator? again, this is an ever-increasing response with frequency, to perfectly compensate for the ever-decreasing response of the integrator. so if we apply this transform to our output, the input must increase at a rate of a single highpass until it reaches the cutoff frequency, and then past that point it decreases with the rate of a single lowpass. you can think of the integrator as rotating your frequency vs amplitude graph by 45 degrees. the passband now becomes highpass, and the second order rolloff in the stopband becomes a first order response.
It all makes sense now! Without feedback. this would've been a -12db/oct 'low boost' filter, but our feedback makes it into the state-variable system. Since we get a -12db/oct lowpass at the output after an integrator, then whatever comes into that integrator should already have -6db/oct of lowpass past cutoff, so that we get to -12 after another integrator, and also a -6db/oct of highpass before cutoff, because then a +6db boost from the second integrator cancels out to a flat unity-gain response below cutoff. What filter type is a lowpass plus highpass around the same cutoff point? Correct, that's bandpass! And highpass is highpass because it's the input signal plus the inverted version of, or simply minus, the lowpass output; sound minus bass equals treble. Since we subtracted a -12db/oct lowpass, the highpass is also -12db/oct. And if you put it through an integrator, you get +6db/oct to lows and -6db/oct to highs: back to bandpass with 6db/oct on both sides. Feedback magic! And there you have it, a filter with a bunch of responses. The integrators' time constant defines the system's cutoff frequency, and the positive feedback defines resonance. One caveat, though: so far our integrators use fixed passive components, which are not exactly voltage controllable...
VC integration
Everything discussed up to now uses simple fixed integrators: one resistor, one capacitor, one op-amp. Less resistance - faster charging - faster integration - higher cutoff frequency. Slapping a dual-gang 500K pot out there would make this a fair manually tuned SVF. That's not enough fun, though, so the goal is to make the integrators voltage-controlled.
Enter the Voltage Controlled Slope (VCS) by Serge Tcherepnin. I'm looking at Ken Stone's CGS Euro version, but that doesn't matter - the winding that makes the VCS a VCS (or a USG a USG) doesn't interest us here, only the core transistor setup does. Analysing the circuit a little bit, we can find a block which the processed signal kinda goes through, and the CVs kinda control, illustrated at Figure 4. it smells integratory! The single fixed resistor is replaced with whatever this transistor mess is, but that's what makes it voltage controlled. We can scrape this bit off and use it in our own way.
In my schematic, IC1B takes on the role of the summator, while IC1C and IC1D are set up as VC integrators. TQ/Q1/T2/Q2 bases are all shorted and are driven by a positive cutoff control signal, since their acitve control region is zero (fastest) to some positive voltage (slowest). Q3/T3/Q4/T4 are also shorted and get a negative cutoff control signal, as they are fastest at zero, and make the system slower by negative voltages. I also used tiny integration constant capacitors C2/C3, as opposed to the values used in the original, to better fit audio range, and also used 4.7K instead of 22K for the input-to-the-transistor-hell resistance to slightly raise the maximum cutoff frequency.
In a VCS, there are separate rise and fall controls, as well as a 'both' control input. The control voltages are applied to the transistors' bases: top left for rise, top right for fall, and bottom two for both. The integration speed is fastest when all the bases are tied to ground. As the upper pairs' bases are brought more positive, or the lower ones more negative, the integration speed becomes slower. In a VCS, this is used to control a slope's attack, decay/release, and its overall speed. In our case, we adapt this to be the integrator block for a state-variable filter, so we don't need separate controls. Instead, this all has to be controlled from a single cutoff knob.
The setup itself is two long-tailed pairs, essentially double the same idea that is used in a no-OTA VCA, one half mirrored. Tim Stinchcombe alredy wrote on it much better than i would ever; i highly recommend to check the article out.
Cutoff voltages generator
As mentioned before, we have two groups of transistors that are diven by two signals, which both are directly related to the cutoff setting. The upper transistor pairs' active control region is ground to a few hundred mV positive, lower pairs' are the same but negatie. Assume we drive the top ones with a signal called CUT+ and the bottom ones with CUT-, for positive and negative versions respective. The goal is as follows: at the highest cutoff setting, integrators must integrate the fastest, so CUT+ and CUT- should be at about zero, while at lowest cutoff, CUT+ is at a positive voltage, CUT- mirrored negative. While in theory it would be nice to just bring everything to zero for max cutoff, this design starts squealing uncontrollably even at no resonance when that happens, so CUT+ has to always be at least a bit positive, while CUT- at least a bit negative, for that to never happen.
With that in mind, we use IC2A to sum our manual cutoff setting and two exernal voltage control signals. The manual knob is set to go from -12 to +12, covering the entire rail-to-rail range. To compensate for such a huge expected headroom, R28 is set to 22K to allow fourfold amplification for CV2, so even a +-3V LFO could cover the full sweep range of the filter. CV1 is kept unity-gain for finer CVs, but can be customized by replacing R21 with 47K or 22K for 2x or 4x amp respective. CV1 input jack has the input signal submix' out ran to its normalling pin, meaning if nothing is patched to CV1, it becomes a sort of an audio to cutoff feedthrough hack, usually leading to more abrasive and vowely stuff.
At the output of IC2A is an inverted sum of all the signals responsible for setting the cutoff. An LED indicator is installed in a hacky way: since when the cutoff is lowest, IC2A will produce nearly 12V, the difference between it and the +12V power line is negligible. As the cutoff rises, IC2A's output falls, expanding that difference. We exploit this by running an LED off that votlage difference. R19 is set to 22K for smooth no-eyesore response from a yellow LED; do your testing for other colours. IC2B simply re-inverts IC2A's output, producing a CV that goes up as the cutoff knob goes up.
We now need to condition the resulting signals into the needed range. As we crank the cutoff knob up, CUT+ must fall, while CUT- must rise, so that they converge on near-zero at highest cutoff. This means that IC2A produces CUT+ and IC2B - CUT-. But they both are still full-span, near rail-to-rail signals, since the manual setting is -12 to +12! R20/23/25 are used to passively coax IC2A's output into the needed region. R20/23 form a passive summator. If they both were 200K, IC2A's out and 12V would both come out halved, so that would've transformed IC2A's output from -12..+12v to 0..12v by halving it and offsetting it up by 6 volts. We want to introduce a slight positive bias, though, so R20 is set to 130K instead of a matching 200K, meaning the positive offset will be a fair bit stronger. R25 then makes the construction a voltage divider, bringing the resulting signal's range from a dozen volts to a few hundred millivolts, as expected. The same idea applies to CUT- and R24/27/29, except the bias is negative. The small-yet-notable positive and negative offset for CUT+/- respectively that occurs thanks to the 130K resistors ensures that the two signals always stay far enough voltage wise to not cause an uncontrolled squeal at highest cutoff.
Resonance feedback loop amp
The resonant loop of this filter is the most touchy subject, as if done inconsiderably, it hinders the sound a lot. The filter's squealiness is musical until it isn't, which was already fought off by adding slight biases to CUT+/- signals that control the cutoff, but there's more to cover. As per the general idea of Fig.1, the first integrator should be positively added back to the summing stage, and the last - negatively. The latter part is done through R11, but a keen eye will notice IC1B's non-inverting input is grounded, hence no positive feedback is happening. This is because due to some design considerations, the first integrator's output goes though the resonance feedback loop amplifier, which is inverting, and then goes back to IC1B's inverting input. Since the signal itself is inverted, this counts as adding.
The need for this setup that deviates from the Figure 1 topology came from the need to make the filter more open-ended. I don't want to make this design cluttered with a dedicated VCA to make the thing's resonance voltage-controlled. However, i want to keep an option to use an external VCA to do the work, if needed. Hence, a send-return path is created with two jacks. The first integrator's output goes to send, and comes back from return. The two jacks' normalling pins are connected, so if nothing is patched into both jacks, they act as a short circuit. So, a VCA (or something crazier!) can be inserted into the loop, if needed. However, as discussed earlier, this feedback is positive and 'damping': more feedback = less resonance. So, a VCA would have to be open to full volume for no resonance, and closed off for full resonance. Which then makes the patching counterintuitive and iffy. Luckily, this can be solved with an op-amp and some resistors.Op-amps in negative feedback mode generally can be thought of trying to adjust the output so that the inverting (-) input is at the same voltage as the non-inverting (+) one. This is why with + grounded and the amp being used as a summator, like IC2A, - sits at zero without being physically tied to ground; this is called a virtual ground. Our goal is to transform a "more feedback - less resonance" situation into a "more feedback - more resonance" one. We ise IC2D to solve that. Note that the post send-return bandpass (first integrator) out comes through a trimmer, then the resonance setting, and to the op-amp's +. The same signal comes through fixed R5 to its -. Negative feedback happens over R4, and since R4=R5, the amp is unity-gain. If the resonance knob is full counterclockwise, so, IC2D + tied to ground, then IC2D is just a unity-gain inverting amplifier, or simply an inverter. In such case, it passes the signal in full, which then damps out the resonance entirely. However, as resonance is cranked up, IC2D's + starts oscillating along with whatever comes through R5. This means that IC2D's output has to push less voltage thorugh R4 to compensate for that, since the voltages at the inputs are a bit closer to each other than if + was grounded. At maximum resonance setting, + receives about as much signal as - does, which means they are already almost at the same voltage; IC2D's output barely responds to that, because there's no need to compensate, ergo, outputs near silence, which means no damping, and full-on oscillation. Yay!
There are two trimmpots on the module, and both are related to resonance. RMAX limits the resonance knob's range, so that it never shorts IC2D's + and - (given the feedback loop is unused). This is to prevent IC2D from completely silencing out, because in such case, the module becomes unmusically uncontrollable. The bigger RMAX' resistance is set, the more limited the RES knob is; think of it as a continuation of RES that its wiper cannot reach, and you select how long it is. I made it a trimmer so that everyone picks their own point at which it is enough; i tuned mine to max out at a considerably gargly distorted oscillation that is still sort of consistent. The other trimmer, RMIN, sets the minimal resonance limit. If it were a fixed 100K, then the lowest resonance setting would still be audibly resonant, so that's a no. 47K is still somewhat resonant, but 22K is too much: at no resonance and highest cutoff, the filter bursts into a chaotic oscillation eardrill. This trimmer should be set to allow low-resonance mellowness, but prevent the eardrill. Another eardrill prevention mean is C1; it negates the design's quirk of self-oscillation kicking in earlier at the very highest cutoffs than anywhere else, and makes the resonant responce more or less even.
Allpass response mixer
All the aforementioned crap uses 7 op-amps, which means going with two quad chips, we have a spare one. Hence, there's the allpass mixer that creates the fourth responce. Lowpass, bandpass and highpass are the ones everyone's used to. Notch is another one that people like, but i don't find it extreme enough. Allpass, though, is essentialy a (weak) phase shifter! Stack 4 of these to make a proper phaser, or more realistically, use it in feedback patching to creatively mess with the signal's phase. This method is also taken from "CHAPTER 8 ANALOG FILTERS", and is implemented over IC2C as yet another inverting summator. The inputs' submix is coming in through R3, while the bandpass out is wired in through R6. IC2C unity-gain mixes the two to produce the allpass output.
Calibration
- Pass a sawtooth or a squarewave of ~10Vpp amplitude to signal input 2
- Set the resonance knob fully counterclockwise, cutoff knob fully clockwise, lowpass to headphones/speakers
- Do a down-up pass with the cutoff knob, assess the resonance
- Tune RMIN for the least resonant sound. Return to 3 every few turns
- It most likely will start screeching after you make RMIN too small; that's when you take a couple turns back and call it a day
- Set the resonance knob full clockwise (beware the high pitched self-oscillation!), cutoff full counterclockwise
- Do an up-down sweep with the cutoff knob
- Tune RMAX to your liking, considering that this sound will be the maximum resonance setting of the filter. Return to 7 every few turns
Media
Cutoff sweeps under different resonance settings (lower to higher), processing an 80hz sawtooth from a 393 vco, lowpass output.
Same stuff, bandpass output.
Same stuff, highpass output.
Same stuff, allpass output.
Some krell with a VCA in the filter's feedback loop for randomised voltage-controlled resonance.
Obligatory "will it ping" test: it kinda will. Signal volume kinda messes with the filter's cutoff a little bit, so i ended up with something more tomlike.
If you pass some CV through this filter, you get its slew-limited version at the lowpass output! Here, some stepped random is passed through Punk SVF to control a VCO. Notice that the filter can add decaying "woggles" of speed related to filter's cutoff frequency - kind of a "resonant slew limiter" action!
The filter was put into Audio Delay's feedback loop, allpass output used. It colourises the echoes nicely.
Three oscillators mixed down and passed through Punk SVF, lowpass output used. This drone demo shows off the "sound to cutoff feedthrough" hack when nothing is patched to CV 1: the filter becomes much gnarlier, unpredictable, even a bit vowely.
An acid sesh - come on, you think i would make a filter and not make acid with it? The filter has a lot of different sweeet spots and colours, sometimes even wavefolder-like.