Up to higher level

Inserting the Filter

You still hear that buzzy unpleasant sawtooth sound as you play the keys. Let's shape it a bit. We are going to do that by introducing a lowpass filter into the signal path. We can insert it either between the oscillator and VC or between the VC and WaveOut. Currently this won't make any difference, because we are going to filter all voices in the same way. However later we are going to control the filter by the envelope. This means that different voices have to be filtered in different ways (the envelope-controlled cutoff filter frequency is having different values for different voices, since the envelopes are at different stages). So we suggest that you insert the filter before VC, so that it becomes polyphonic. This way we are going to consume more CPU time (up to 16 filters instead of one), but the filter without an envelope is not sounding that good, you'll hear for yourself.

Anyway right-click the background and select Standard->Filters->2-pole from the menu, creating a 2-pole filter module. Route the sawtooth output to the In of the filter. Route the LP (lowpass) filter output to the V input of the VC module. Press button. You should not hear any sound.

There's another important input of the filter, denoted as F. It is filter's cutoff frequency. While disconnected it defaults to zero (as with most module's inputs in the SynC Modular, unless stated the different), so the lowpass filter is completely closed.

While we could attach a constant to the filter's cutoff input, creating a knob is much more convenient. Right-click the background and select Basic->Controller.

Right-click the controller module. You should see many parameters in the menu. Since we are going to modify many of them, it is convenient to select Parameters... item from the menu, bringing up a parameter editing dialog.

First, modify the controller's caption name. So far it was set to 'Knob'. Use either cursor keys to select the Caption parameter and then press Enter or double-click the parameter name with mouse. A caption name editing dialog appears.

Enter the new name, e.g. Cutoff and press Enter.

Now we need to define the range of the output values of the controller. Set the Min parameter to 20 (you hardly need to close the filter below 20 Hz). Set the Max parameter to 4000.

By the way the filter may get instable with cutoffs below 10 Hz or above the sampling rate divided by 8. Thanks for the safety structure curcuit inside the filter, which clips the input cutoff frequency, unless you disable the curcuit from the filter's panel, but that's another story.

Also this time we think it is convenient to have the controller value shown close to the knob on the panel. Set Show Value parameter to Yes.

Let's view the results. Press the Done button to close the parameters dialog. Right-click the background and select Show Panel. A panel window appears with the Cutoff knob inside.

Make sure the SynC Modular is not in Move Controls mode ( button on the toolbar should be popped out) and drag the knob with the mouse. Dragging up or right increases the value, dragging down or left decreases the value.

You should have noticed one inconvenience. The knob in it's middle state shows the value about 2000. But (did you know?) the frequency scale is logarithmic. E.g. A4 note frequency is 440Hz. A5 note frequency is 880 Hz. A6 note frequency is not 880+440=1320 Hz but rather 880*2=1760 Hz. That is going up one octave doubles the frequency, not increases the frequency by a constant value. So we have one octave in the knob's right halfway and all other octaves (20 Hz-2000Hz is approx 7 octaves) in the knob's left halfway.

Switch back to the structure window. You can do this by either using the Window menu or by right-clicking the panel and selecting Show Structure. Set the knob's scale to logarithmic (by choosing the Scale parameter from the module's menu). By the way the logarithmic scale works only if you have Min and Max parameters both either positive or negative (and not equal to zero).

Try the knob this time. Watch the value changing in a logarithmic way. Leave the knob somewhere above 1000 Hz, so that you are going to hear the notes played in the middle octaves range. Remember, you are not going to hear the notes with frequencies far above the cutoff!

OK, back to the structure window. Connect the V output of the knob to the F input of the filter (you rarely need the S output of the knob, so we don't discuss it here). Now press button. Play some keys and rotate the knob with mouse. Hear the sound change.

There is another important filter input, Q. It controls resonance. By the way if you want no resonance it is recommended to route a 0.3 constant value into this input (so far this input was defaulting to zero). Q=0.3 gives the steepest filter response curve, while producing no resonance yet. But we want better. We want to connect a knob to to the Q input to control the resonance.

Create a new knob. Set its caption to 'Resonance', show value to Yes, scale to linear and range to [0.3..0.97]. Route it to the Q input.

Switch to the panel window. Your first desire is probably to find a better place for the knob. Push button if it is not in depressed state. This enables the Move Controls mode. Alternatively you flip this mode by pressing F or F3 on your keyboard (note that F shortcut is disabled when Play PC Keyboard mode is on). Now drag the knob to a desired location with the mouse. Disable the Move Controls mode by clicking button again.

Play some keys and try different resonance values. High resonance may cause signal clipping, so avoid them this time.

next page>>