Chapter 8. Building Synthesizer Groups

Table of Contents

Making a voice Group
Polyphonic Adapter
Advanced Polyphonic synth topics
Creating CPU-friendly polyphonic and monophonic synths is now a reality in Bidule. Once you know how to do a group, it's just a matter of following these steps:

Making a voice Group

Let's start by creating the most simplistic synthesizer voice group as a example.

  • Create a new group with 1 MIDI input and 2 audio outputs.
  • Get inside the group
  • Add the 4 modules shown below (you can either create them as shown, or use the already created Monotone group)

Table 8.1. How it works

1) The MIDI Note Extractor does the job of separating the note information encoded into the MIDI stream in a sample accurate manner. More precisely, it decodes the MIDI Note On and MIDI Note Off messages. This is what it outputs:

  • (a) Frequency value for the incoming MIDI note with pitch bend applied (in Hz)
  • (b) Amplitude (velocity) value remapped between 0 and 1 (NOTE ON only!)
  • (c) Gate signal. Set to 1 on MIDI note ON until a MIDI note OFF is received, in which case it's 0
  • (d) Trigger. Set to 1 on the sample on which the MIDI note is received, and 0 at any other time

(Please see the bidules section for more details on this bidule.) Once a MIDI note OFF is received, the frequency (a) and amplitude (b) it outputs stay at the same values they had when the note was still ON. This allows for the rest of the group to continue computing the release of the note. (If we don't do this, the note will stop abruptly, creating an unwanted glitch!) Because the Gate output falls from 1 to 0 as soon as the Note is OFF, that's where the ADSR comes in handy...

2)Following down, it's up to the ADSR to generate a normalized (between [0;1]) envelope signal (e) which is independent of the note amplitude (b) given by the extractor. It also generates the VERY important "activity gate" (f) signal that the Polyphonic Adapter will use to detect that the note has completely finished playing (release included) so that it can manage this instance of the voice to another note. In more detail, the activity gate output of the ADSR will be "1" or "on" from the start of the note, until its completion (the release), after which it will output "0" or OFF.

3)Next the "*" (Binary operator), multiplies the original "Note On" amplitude (b) with the current envelope value generated by the ADSR (e). If you recall, the ADSR generated a normalized gate, so in order to get the final amplitude we need to multiply both together.

4)Finally the Oscillator (sine wave by default), will output a nice waveform (h) that will have its frequency given by the MIDI Note Extractor, (a) and a smooth amplitude envelope generated by the results of the original amplitude multiplied by the envelope value at a certain point in time (g). If you look closely, you'll notice that the third input of the oscillator - phase reset - is also filled in by the Note Extractor's trigger output (d) so that each time a new Note is sent to the group, the oscillator's phase is set back to 0.