Making up for lost frequencies

I just finished adding a second filtering stage to my duophonic Daisy Seed synth. In additional to individual (Moog ladder) filters on each voice, I want to add slowly evolving effects such as LFO- or envelop-modulated filtering to the summed voices. It’s working well, except for the loss of volume - I can now barely hear the output. This makes perfect sense to me: more filtering → less energy → less volume. I’m not sure how to boost the signal, however. I tried adding a compressor, with little result (may be due to my inexperience with compressors in general or the daisysp compressor specifically). Can someone suggest an approach? Thanks!

Hi,

A compressor is typically used for reducing the dynamic range in a signal. More complex implementations of compressors sometimes include a gain stage.

In the final stage before the output, you can multiply the sample by a number to increase the level.

Sample *= gainAmount

Or

Sample = Sample * gainAmount

1 Like

Right. That’s what I do in my projects (eg OscPocketD/Base 1+2/MIDI - fx unit, synth, sampler, modulator - #6 by StaffanMelin). I have gain settings in the UI for both input and output.

I have user-adjustable gain setting as well, for each individual voice as well as the summed output. I’m looking for something more sophisticated. I’d like to compute and apply a gain offset based on the energy that’s lost to filtering. I have some ideas on how I might do it, but wanted to find out if there were standard techniques that I may not have thought of. Thanks!

1 Like

You have several possible solutions:

– Assumes that the filtered signal power spectrum has a certain slope, for example decreasing in 1/f, like pink noise. Then, given the cutoff frequency and the shape of your filter, you can calculate the gain required to compensate the volume. This is simple and cheap, but requires a bit of math to setup the formulas, and the final result is not guaranteed, especially if the input energy is concentrated in a narrow band left intact by the filter.

– Put an envelope follower before the filter and another after to detect the volume of both input and output. Then you can compute the required output gain to match the input volume. This works generally quite well. The envelope detectors should be of the RMS type rather than peak because we want to measure the perceived energy, or even use more sophisticated psycho-acoustic algorithms (like something based on LUFS). You’ll have to perform some tests to find the right time constants.

Whatever the chosen solution, you’ll probably have to put an upper bound to the amplification gain in order to reduce the risk of blowing up everything on bad signals.

3 Likes