Showing posts with label Comb filter. Show all posts
Showing posts with label Comb filter. Show all posts

Monday, 12 January 2015

Refined Combing...

Things don't always go the way you intend. I had an idea for a phaser effect that was driven from a filtered noise source, and the end result was something rather different. Here's the story...

'Phasers' are just comb filters where the notch frequencies are modulated up and down in frequency by an LFO. (My previous Comber effect was nothing more than a few of these in one place.)
The audible effect for typical 'vibrato/tremolo' LFO rates sounds a bit like detuned oscillators, and so can be used as a simple 'chorus' effect (there are other ways of doing chorus effects as well). At slow LFO rates then the effect is more like several resonant filters sweeping up and down, which is exactly what is going on!

But whilst sine wave shaped LFOs are all very nice, there are many other possible alternative waveforms, and repetition can get a bit boring. So my idea was to got most of the way to the opposite extreme from the pure predictability of a boring sine wave and use noise instead. Filtered noise seemed like the right thing, and so I envisaged an array of resonant high-pass, band-pass and low-pass filters, and perhaps some sort of neat GUI control to create a final 'noisy' modulation for the comb filter.
Unfortunately, the end result was not as interesting as I hoped. High-pass filtered noise just gave a rapid tremolo effect, and not a particularly nice or useful one. Band-pass filtered noise was still too busy. The only really useful noise was heavily low-pass filtered noise, containing exactly the sort of frequencies that you would use for tremolo, vibrato or a phaser! After a bit of experimentation, it turned out that I didn't need any conventional filtering at all, and that just a bit of sample averaging (OK, primitive filtering) produced nice random wobbling that sounded ok - but it wasn't anywhere near as impressive as I'd been hoping.

So I wondered if something combining the LFO and the noise was a better idea, and I added a DJ cross-fade type control to mix between the LFO sine wave and the noise waveform. This seemed to liven up the result and make it a bit more interesting and unpredictable...
But then I realised that I had an alternative source of variation, and so I added a second LFO to drive a Sample/Hold circuit that sampled the original sine wave LFO. Sample/Hold circuits have always fascinated me, right from the days when you put high-input impedance op-amps on Teflon PCBs with polycarbonate capacitors and used reed-relays as input sampling switches, all in the analogue quest for long-term voltage storage (and you still got droop over time!). In the digital domain, things are different (and you add imperfections if you want to model the real world) and so a quick bit of M4L'ing later, I had an LFO with sine waves for high sample rates, and repeated complex patterns for lower sample rates. (The S/H samples when the indicator lights up yellow, btw.)
The DJ slider became a 'Randomness' control, and I added a red indicator to provide visual feedback for when the 'Freq' and 'Depth' controls needed to be adjusted (up and down respectively), and Comber V0.3 was born! I hope you find it a more versatile and inspirational effect for your music. 


Comber V0.3 is available, as always, for download from MaxForLive.com.

Related articles

Sunday, 9 February 2014

A Limiting Solution part 1

Feedback comb filter structure
Feedback comb filter structure (Photo credit: Wikipedia)
Comber 0v01, my first MaxForLive comb filter suffers from a problem common to many systems with variable gain that include feedback. It has a tendency to go into oscillation, and because of the many modulation sources, the exact point at which it becomes unstable isn't easy to predict. Worse, the best sounds tend to occur just before it goes into the red.

One of the traditional techniques that are often used to solve this is to use a compressor or a limiter in the feedback loop, so that the gain variation is controlled. The implementations vary - one old method involved using an incandescent light-bulb and a light-dependent-resistor. Max provides library objects that do limiting and compression, but they have a User Interface (UI) issue: too many inter-dependent controls. Limiters and compressors are powerful tools, but adding lots of controls to Comber just to make it more stable would make an already complex UI even more busy. So how could I add the minimum of controls but keep lots of versatility?
I decided to try using one control to make several changes simultaneously in a limiter. As the input gain increased, the limiter threshold would be reduced, and the output gain would increase. This way, the maximum level stays the same, but the amount of limiting that is applied can be controlled. I also enabled one additional control for time response, and here the library object provided fast and slow modes. So I had one rotary control and one switch, plus a 'Bypass' switch to remove the limiter from the output.

The new controls could just be squeezed into Comber, and the testing showed that it made the effect much easier to use, although the limiting does alter the sound slightly, and on the higher settings, it does alter the dynamics quite a lot. And that's how Comber 0v02 was created!

Using Comber

Comber has a lot of controls, so here's a quick guide to getting the most out of it.

  1. Start with the Feedback controls set to zero, the LFO Depths set to zero, and the Pan Depths set to zero. Dry/Wet should be at 100% (Wet), Make-up Gain should be about 100%, and the Comb Gain controls should be at their default 50 position.
  2. Try the Comb 'Freq' (frequency) control. This moves the notches up and down in pitch, and can make big changes to the timbre of the input.
  3. Experiment with increasing the Comb Feedback controls from zero, and see how they change the sound.
  4. Use the LFO Depth control to move the Comb Freq(uency). Moving combs always sound much better than static ones! 
  5. The Pan Depth controls move the pan position of the two channels.
  6. The Limiter control starts out with no limiting at zero, and increases the amount of limiting (lower threshold) as you increase it towards 100. The maximum is a very non-subtle effect! 
Enhanced by Zemanta

Monday, 3 February 2014

Comb filtering...

I've always been fascinated by the direct physical reference that you get with 'comb' filters. Other filter types tend to have names that are 'frequency response'-oriented, and so have names like: notch, low-pass and high-pass. But a series of notches is called a 'comb', and indeed the description is apt and correct - the response with frequency does look like a comb!


For such a shape of filter to have such an interesting effect on sound is a fascinating bonus. Resonant low-pass filters have that characteristic peak at the resonant frequency, whilst for comb filters it is the spacing between the notches that gives either a comb for linear spacing (as in a phase-shifter), or a coarse to fine spaced comb where the notches can match up to harmonics (as in a flanger). Because of the different ways that phasers and flangers typically implement comb filtering, flangers also introduce some time-modulation and time-delay effects (doppler shift and flutter echoes), but I really like either of the whooshy, resonant sounds produced by any modulated comb filter!

As you might have realised, I have been playing with comb filters recently, and I have posted the results of this to the MaxForLive web-site. Comber is a pair of modulated delay-based comb filters that can operate independently on two stereo channels, and then can be auto-panned into the final mix stage - a stereo flanger is one way of describing it.


The controls are in three sections. The LFO section modulates the delay time of the comb filter, and because this sounds like tuning the filter I have called it the 'Frequency'. The Feedback control is actually controlling the feedforward and feedback, and the Gain control allows extra tweakability (it controls the gain of the delay sections). The Pan section allows the two comb filters to be placed in the stereo image and moved around.

Because the Feedback and Gain controls in the filter can provide a wide variation in gain, there is a compensating 'Make Up' volume controller next to the Dry/Wet mix control.

Related articles
Enhanced by Zemanta