skip to content

Theramin-imum viable product

The simplest of synthesizer setups just produces a sine wave. Traditionally, this is the waveform used by a theramin, hence this example.

In HYPERBLAM synthesis, a <synth-blam> houses any number of operators. These are either <carrier-blam>s or <modulator-blam>s. A single one of the first category is all we need here. It produces a wave of type sine by default.

<synth-blam id="theramin" notes="C4" detune="0" out="bus">
  <carrier-blam curve="0 0, 1 2" release="2"></carrier-blam>
</synth-blam>

Since we want our theramin tone to be continuous, the envelope curve starts at 0, moves to 1 after two beats, and stays there. The release value sets how many beats it’ll take for the signal to diminish when STOP is pressed.

Like with <note-blam>, we can supply a comma-separated list of notes to choose from. It’s just that these notes determine the frequency of an oscillator rather than the playback speed of a sample.

In this case, we are just going to play the note C4. The change in pitch you hear (when pressing the MOVE button) is entirely down to automating the synth’s detune property.

<tap-blam id="move" to="#theramin" prop="detune" ramp="1" value="-500|1200|2400|300|1500|2700|3600">
  <button>move</button>
  <blam-blam to="#move" prop="ramp" value="2|1|0.5|0.5"></blam-blam>
  <blam-blam to=".vibrato" prop="gain" ramp="1" value="0|0|0|0|100|200" chance="0.333"></blam-blam>
</tap-blam>

Since a theramin’s pitch changes gradually, as you move your hand closer and further away from its sensor, each detuning occurs with a ramp. The speed/duration of ramp is fluctuated using a <blam-blam>.

The second <blam-blam> affects two <lfo-blam>s simultaneously. When a gain value above 0 is applied, you hear a vibrato effect. The vibrato effect can be simple and steady or complex and turbulent, depending on how much gain is applied to how many LFOs. Attaching multiple parallel LFOs to the same detune parameter is the easiest way to create complex oscillation patterns.

<lfo-blam class="vibrato" prop="detune" gain="0" beats="0.21"></lfo-blam>
<lfo-blam class="vibrato" prop="detune" gain="0" beats="0.47"></lfo-blam>

All of the above is to emulate the sound of someone dicking about with a theramin. Because expert theraminists are rare but anyone can have a go.

The synth is routed through a bus with a <reverb-blam> a nice plate reverb. This gives the sound a space to breathe in.

<chain-blam id="bus">
  <reverb-blam mix="0.25">
    <sample-blam src="{{site.basedir}}/static/sounds/IRs/plate.mp3"></sample-blam>
  </reverb-blam>
</chain-blam>