Bidule Tutorial 3 : Filter Modifications

Improving the filter section.

In this last part of this series we will look into replacing the current filter section with something a bit more interesting.

We’ll start where we left off, with the 106StyleSynth layout. Fire up bidule and get that open. Make sure that the group is unpolyphonized so we can get inside and work with it.

If you open up the panel for the Basic Filter you will see that there is one common feature we are missing, a resonance control (or Q as its often called.) The filter (or VCF : Voltage Controlled Filter) on the 106 has 2 main sliders : Frequency and Resonance. The frequency slider controls the cutoff frequency, providing a base level for the filter which is then added to the other modulation sources.
We dont currently have a control to set the basic cutoff but adding one is as simple as connecting a variable to the cutoff input of the filter. Do that now (remember its Building Blocks -> Math -> Variable). And set the variable range to 0 -> 5000. We can use 0 here because our filter mod control is already designed to output 30 as its lowest setting, but if we didnt have that module we would most likely put a boundary in front of the cutoff input, or just make sure that the range of the variable wasnt set too low.
Rename the variable to ‘Cutoff Frequency’. Now open the filter mod control panel and set the Env Amount and Mod amount to their lowest levels, then open the Cutoff Frequency panel and try changing the setting while playing some notes. Nothing too exciting, but it works.

Now we will replace this basic filter with a filter that provides us with a Q control. Open up the palette and expand Building Blocks -> Filters. Theres a good selection of filters for various uses, but the one we want to work with is called the ‘Biquad Filter’. For the mathematically inclined :

The term “biquad” is short for “bi-quadratic”, and is a common name for a two-pole, two-zero digital filter.
(From Julius Orion Smith’s guide to DSP)

If that doesnt mean anything to you then dont worry, all you need to know is what the filter does to your sound. 🙂

To replace the current filter right click on the module and select ‘Replace -> Building Blocks -> Filters -> Biquad Filter’
You’ll see that the new module has 4 inputs.

  1. Audio
  2. Frequency
  3. Q
  4. Gain Input (dB)

We will be working with the first 3, the 4th is for controlling extra the peaking band, low and hi shelf settings of the filter. You can see the different filtering modes available if you open the control panel. The 3 most common settings you may well be used to are :

  • Low Pass : Lets through frequencies below the cutoff
  • High Pass : Lets through frequencies above the cutoff
  • Band Pass : Lets through frequencies around the cutoff

Keep it set to low pass for now.

Now we need to add a control for the Q value. The Q setting of the filter can range from 0 -> 10, where a lower value creates a sharper emphasis on frequencies near to the cutoff value. The resonance control on the 106 operates the opposite way around, higher settings produce greater emphasis, so later on we will flip our Q setting to operate like this.

First create a new variable, open its panel, set its name to ‘Q’ and then set the range from 0.1 -> 10. We want to keep the Q above zero otherwise you might damage your ears (and speakers). Set the value to 0.5 and connect the module to the Q input of the filter. Open the cutoff control panel and set the value to 2000.

Play some notes and try changing the cutoff frequency, you should hear more emphasis being added to the sound as the cutoff changes, much like the common low pass filter found on most synths. Feel free to experiment with the Filter Mod Control settings to get a feel for the sound of the filter as it changes. Also if you set the Q to 0.1 you’ll notice that you start to get a ‘whistling’ sound, this is because when the Q setting is very low, the frequencies close to the cutoff point are being heavily emphasised and you can start to hear the cutoff frequency as a tone by itself.

One other thing you will notice is that the volume of the synthesizer has reduced, this is because we are now removing more of the frequency content and so it sounds quieter. To boost the volume back up a bit we will use a ‘Gain’ module. You can find this in ‘Mixing -> Gain’. Add it to the layout. The Gain control can manipulate stereo signals, but we only need mono. Lets add it right to the end of the chain, between the last * and the output connector at the bottom. Connect the * to its left input and the left output to the left connector at the bottom. Open the panel for the gain and set it to 6. This should bring the level back up without it clipping.

Play some notes on your keyboard and listen to the sound at different pitches. If you have settings which result in a low cutoff frequency you’ll notice that as you go up the keyboard the sound gets progressively quieter and quieter. The reason for this is that the higher notes which contain mainly high frequencies are gradually being filtered until there is hardly any signal left. On the 106 there is a slider in the filter section labelled ‘KYBD’, this is used to control how the cutoff varies as you play higher notes up the keyboard. When its set to 0 the cutoff remains the same and you lose volume as you play higher but as you set it higher it will add more to the cutoff for higher notes.

To implement this we will need to combine the frequency output of the note extractor with some kind of scaling mechanism and a variable which controls the amount of scaling. We’ll keep our implementation simple by just multiplying the frequency output of the note extractor by our KYBD amount. Create a * and a variable. Connect the frequency output of the extractor to the left of the * and the variable to the right. Set the range of the variable to 0 -> 2 (from no change to double the frequency). Rename the variable to ‘Key -> Cutoff’ and connect it to the right input of the *. Now add the output of the * to the filters frequency input (The frequency input now has 3 connections, Cutoff, Modulation and Key -> Cutoff). Set the Key -> Cutoff variable to 1 and try different notes up and down the keyboard, you should notice that the high notices have regained some of their brightness. Try different settings and see how it affects the filter depending on where you play.

The layout should now look a bit like this :

Now we can update the UI for the synth with the new parameters we have available.
Right click on the canvas and select ‘Group -> Parameters’. You might notice that we have lost the filter type parameter we had before because we have changed the filter module. So we need to add the filter type, the cutoff control and the keyboard filter control.

Param Name
BiQuad Filter : Filter Type Filter Type
Cutoff Frequency :Value Cutoff
Q : Value Q
Key -> Cutoff : Value Key -> Filter scaling

I moved all of these controls just above the Filter Mod parameters.

Step back up to the main canvas and check your UI. Also you can repolyphonise the group and see what kinds of new sounds you can now get.

You can download this layout here :

106StyleSynthNewFilter.zip

One thing we havent yet done is to invert the control of the Q parameter. On most synthesizers the control for the filter is usually labelled ‘Resonance’ and works in the opposite direction, if the slider is to the right you get the most amount of resonance.

To fix this just requires a simple bit of maths, but one thing we need to consider is the range of values we want to use. If you have played with the Q control you have probably noticed that above a setting of about 4 or 5 it doesnt make a lot of difference to the sound you hear. Also we need to make sure that the value doesnt go below 0.1 if we want to protect our ears.

First, to reduce the range from 10 to 5 we can just restrict the high limit in the Q variable panel. Do that now.
To reverse the operation of the slider we can subtract its output from another number. For example, if the slider is set high at 5 and we subtract that from 5 we get 0. If its set low (0.1) and we subtract that from 5 we get 4.9. Thats almost what we want. What we need to do is set the value of the constant to Maximum Value + Minimum Value. In this case that is 5.1. You should see that we will then get an output of 5 -> 0.1.

Copy one of the * modules and change the operation to -. Then create a constant (Building Blocks -> Math -> Constant). Open the panel and set its value to 5.1. Connect the constant to the left input of the minus module and change the Q connection from the filter to the right input of the minus module. Now just wire the output of the minus to the Q input of the filter. If you now play with the Q while playing some notes you’ll see that it works in the opposite direction. Finish up by renaming the Q variable to ‘Resonance’, then update the UI for the module with the new name (right click the canvas, group -> parameters and rename Q -> Resonance).

Your layout should now look something like this :

Tidy Up Time

Again, its time to clean up and combine some of these modules into their own groups.
First up we’ll make a single group to handle the frequency input to the oscillator. If you look carefully you will see that there are two inputs we combine to create the final frequency. The main one is the normal frequency output of the note extractor, the second one is the amount of pitch modulation coming from the LFO. If we were to add more modulation options to the pitch (an envelope for example) it would also be useful to modify in the same way as the LFO so that they remain consistent across the keyboard.

So the new group will have two inputs, one for frequency and one for the frequency modulation.
Select the modules and cables as seen below :

Right click on one of the selected modules and choose Group -> Group Selected objects.
Make sure there are 2 sample inputs and 1 sample output and give it a useful name. I’ll call mine ‘Oscillator Frequency Controller’ (ok, its a bit long but at least i know what it does..)

Go inside the group and connect the first input to the second multiplier and the second input to the first multiplier. Then connect up the output from the second multiplier. Remember to rename your inputs (just double click them). I’ll call mine ‘frequency’ and ‘modulation’. Also rename the ‘Pitch LFO Amount’ control to just ‘Modulation Amount’.

If you are feeling like being really tidy then you can take advantage of the fact that the order of inputs to a multiplier doesnt matter (i.e. you can swap them around). You could end up with something like this :

Now go back to the parent layout and connect up the new group. Take the frequency of the note extractor to the first input and add an output from the LFO to the second. Then finish up with the output to the Oscillator frequency input.

The last thing is to add the modulation amount to the UI for the group. Just right-click it and select ‘Group -> Parameters’. Then add ‘Modulation Amount : Value’ to the list and rename it to ‘Modulation Amount’
You can also choose to save this group so you can reuse it later. (Right Click, Group -> Save Selected Group).

To tidy up the filter modulation section we will just work on the cutoff controls and leave the Q / Resonance as is because its quite simple by itself.

So, select the Filter Mod Control, the Key -> Cutoff with the cable and the * then finally the Cutoff Frequency variable. Create a new group from these with 4 sample inputs and 1 output. I’ll call mine ‘Cutoff Frequency Controller’.

Following the usual procedure, go into the new group and label the inputs. From left to right : ‘Note Frequency’, ‘Gate’, ‘Trigger’ and ‘Modulation’. Connect the first input to the empty multiplier input, then wire the 3 remaining inputs to the Filter Mod Control (remembering to hold down the control key for the first cable so all 3 are done in one go). Then connect the 3 blank outputs to the bottom output. Rename the bottom output to ‘Frequency’.

The group should look something like this :

Now back to the parent layout and wire up the new group. The first 3 inputs come from the corresponding inputs of the note extractor (but you cant use control to auto wire all 3..) and the last input comes from the LFO. Then the output goes to the filter cutoff frequency input.

Now open the parameters dialog for the Cutoff Frequency Controller and add these controls

Add the Cutoff Frequency : Value, rename it to Cutoff Frequency. Then add the Key -> Cutoff : Value and call that ‘Key -> Cutoff’. And finally for the Filter Mod Control : Env Amount, Attack, Decay, Sustain, Release and Mod Amount. (their names are fine).

Also save this group to your groups directory.

You might want to check that you can play your keyboard and still hear the synth.

Now your synth voice layout should look something like this :

The last thing to do for now is to rebuild the UI for the synth voice. You will need to add the Oscillator Frequency Controller : Modulation Amount and call it ‘Pitch LFO Amount’, then for the Cutoff Frequency Controller add Cutoff Frequency, Key -> Cutoff, Env Amount (as Filter Env Amount), Attack, Decay, Sustain, Release and finally Mod Amount (as Filter LFO Amount).

Now you can step up to the top layout, re-polyphonise the synth and start making some new sounds.

You can download this layout from here (i’ve re-polyphonised the saved version..)

SubtractiveSynth.zip

Creating Your Own Filters

Now that you have a synth layout with some reasonable abstractions for the modules inside you can try experimenting with adding new modules or rewiring the ones you have. One thing which defines a lot of the character of the sound of a synthesizer is its filter. The plain biquad filter built into bidule is useful for a lot of tasks but sometimes its nice to create your own variations.

I’ve made a group called the ‘Stacked Filter’ which is an attempt to create a slightly fatter sounding low pass filter. You can download the group here :

StackedFilter.bgrp

Save it into your groups directory in the Bidule installation directory and choose ‘Edit -> Rescan Groups’. You should now see the new group appear in your Palette. Unpolyphonise the synth of go inside the group. Now add this new group to your layout and go inside.

It might look a bit complicated at first but we’ll work through it piece by piece.

There are 2 main sections to the filter : The four basic filters on the left and the Band Pass section on the right.
The four basic filters are connected in series, i.e. the first feeds into the second which feeds into the third etc..
Combining filters like this makes the cutoff slope steeper, so by the end there should be much less frequency content left above the cutoff value.
These basic filters dont provide resonance controls, so to simulate resonance im using a band pass filter. As its name suggests it just allows through a band of frequencies, defined by the cutoff point. The resonance of the band pass controls how wide this section of frequencies is.

The extra math modules are used to adjust the volume of the filter according to the Q input. If the Q is very low, say 0.1 then we will get : 0.5 / 0.1 = 5, so the volume of the band pass will be multiplied by 5. If the Q is very high, say 1.0 then we will get 0.5 / 1 = 0.5, and the volume of the band pass will be halved.
This is done because when we have a low Q there is only a narrow band of frequencies coming through so the volume is boosted and when the Q is high there is a much wider spread of frequencies so the volume is reduced. This is done to try and maintain the overall volume level at different Q settings.

Try rewiring the layout to use this filter instead of the biquad. The inputs match the first 3 inputs of the biquad so its just a matter of moving the input and output cables over to the right places. To hear it in action go back to the parent layout and try adjusting some values. (One thing to note is that this filter only has a low pass setting, so the ‘Filter Type’ control has gone)

You should notice that there is quite a different character to the sound. You may prefer, it you might not, but hopefully this will give you some ideas for things you can try as you build more of your own synthesizers.

Useful things to remember

When working with Bidule there are a few things that are worth remembering, the kinds of techniques that occur again and again. For a lot of the work you will do just some simple maths can solve the problem

1. Anything multiplied by zero is zero and anything multiplied by one is the same value.

x * 0 = 0
x * 1 = x

This is really useful when you want to build a switching mechanism. You can use it in combination with the gate or with the output of some other module.

If you need to switch between 2 things, A and B, then you can invert one of the 0 or 1 signals using the NOT operator (Building Blocks -> Math -> Unary Operator).

2. The output of an envelope module varies between zero and one so often you will just need to multiply the envelope output with the signal you want to modify.

3. Reversing an input. Just like you saw above when we changed the Q to a resonance control, you sometimes want a control to work in the opposite direction. To do this just subtract the control signal from a constant set to the maximum value of the signal.

I hope these 3 tutorials have been useful, as always let me know if there are any mistakes, or you have any suggestions for other topics that would be of interest.

Martin.

9 thoughts on “Bidule Tutorial 3 : Filter Modifications”

  1. Your tutorials have served as an excellent introduction to using Bidule as a modular Synth. Thanks for putting the time in to making such detailed and easy-to-understand instructions; I would not have figured out the math operations by myself. I’m used to working with the Nord Modular where lots of that is done for you… Bidule has a very good sound quality. I’m impressed.
    Thanks for your help.

  2. Hi!

    I would like extend my SQL capabilities.
    I red really many SQL resources and would like to
    read more about SQL for my position as oracle database manager.

    What can you recommend?

    Thanks,
    Werutz

  3. ????? ?????? ???????? ?? ????????? ?? ???? ????? ?. ?????

    ????? ?????? “????????” ???, ??? ?????? ??????????? ? ???????? ???????? ?? ?? ??????? ??????????? ?????? ???????? ?????????????????? ?????? ?.?. ?????.
    ?????????????? ?? ?????? ??????, ? ????-?? “?????” ?????????? ??????? ?????? “?????????” ??? ?????, ??????? ???????? ???????? ? ????????????? ???? ????????? ??????????.
    ???????? “????????” ? ?????????? ??????? – ??? ????????, ??????? ??????? ???????? ?? ?????. ????? ???? ??????????? “?????? ???????” ? ???????? ???????????? ??? ????????????? ????????????, ????????????? ????????? ?????, ? ????, ???? ??????????? ???.
    ????? ??????? ?????????? ?????? ????????? 1 ????? ??????????-????????? ????? ? 9 ?????????? ?? ????????? ????????????? ???? ?????????? ??????? ?? ???????? ?????????? ????????????? ??????? ?.?. ???????.
    ? ??? ??? ? ?? ?????, ????? ????????? ??? ?????? ???????? ?????????????????? ??????? ? ??????????? ???? ?????????? ???????? ?????? ? ???????? ???????. ? ??? ????? ??????? ????????? ? ??????????? ????? “? ???????” – ?? ?????? 11 ????? ?????? ????????? ?????? 25 ? 35, ?? ????????? ??????? ????? ?????????????????? ?????? ????? ????? ????????? ?????????-????????????? ???????????? ???????????.
    ?????, ?? ?????????? ???????????? ???????????????? ??????? ?????????????????? ?????? ?? ??????????. ? ?? ??????? ???????????? ? ????????????? ??????????.
    ????? ????, ??? ?????????? ????????? ?? ? ?????????? ???????? ??????????, ? ????? ? ???????? ? ?????????? ???????????? ????????????????

  4. 6 years later and I’m following these tutorials attentively. Thanks! Thank you mr.internet. Bidule is like a mix between Reaktor and Pure data but better. I can’t wait until the 1.0 version of the software comes out.

Leave a Reply

Your email address will not be published. Required fields are marked *