Twitch Plays The Synth

Created by boomNinjaVanish and Memorecks


Twitch Plays The Synth is a synthesizer that responds to chat commands on Twitch. Users are able to control the notes it plays, as well as various parameters to shape the sound. The synth runs continuously 24/7!

Commands are entered in the chat like this:

!cutoff 30

You can change the value over a period of time by adding a length in brackets:

!shape1 90(50)

Synthesizer


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d71120c3-2288-40b7-b6b4-fd5d631f5422/Screen_Shot_2021-03-31_at_10.59.04_PM.png

Oscillators


https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Waveforms.svg/1200px-Waveforms.svg.png

The sound source starts with our two oscillators. An oscillator generates a tone using a repeating pattern. The shape of each oscillator cycles through Sine, Triangle, Saw and Pulse waveforms using the !shape1 and !shape2 controls. The !subosc knob adds low frequencies to the signal. The oscillator frequency can be modulated by a hidden oscillator, using !fm1 and !fm2. This hidden oscillator is key-tracked and provides a musical FM tonality. You can detune the oscillators against each other with the !detune control, and balance the levels using !oscmix.

<aside> 💡 Oscillators are like our vocal cords. Sine waves sound pure and clean, while Pulse waves sound sharper and more abrasive.

</aside>

Envelopes


https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/ADSR_Envelope_Graph.svg/1280px-ADSR_Envelope_Graph.svg.png

Two 4-stage 'ADSR' envelopes are available. Envelope 1 affects the amplitude or volume, while Envelope 2 affects the filter cutoff frequency.

<aside> 💡 Envelopes can be thought of as a 'crossfade' from silence, to full volume. They can be used to make the sound shorter or longer.

</aside>

Filter


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7867f3a0-394c-44e6-b26c-d800ae8a83e3/Untitled.png

The synth employs a Lowpass filter to cut out high frequencies. 5 types types of filters are available, and selected with the !model command. Typical !cutoff and !res controls are available to adjust the frequency and resonance. The !env knob controls how much of Envelope 2 is added to the cutoff frequency. Key-tracking is provided with the !keytrack knob, which increases the cutoff frequency with higher MIDI notes.

<aside> 💡 Filters remove unwanted frequencies from sound. You can filter your own voice by opening and closing your mouth!

</aside>

Filter models from left to right:

2P SVF (NL), 2P TSK LP (NLB), 2P TSK LP (NLA), 4P Ladder LP (NLA), 4P Ladder LP (NLB)

LFO


One variable-shape Low Frequency Oscillator is provided. The speed is adjusted with !lfo-rate and the shape of the LFO can be adjusted with !lfo-type. This will cycle through 1 of 5 available waveforms: Sine, Triangle, Pulse, Random and Noise.

<aside> 💡 A Low Frequency Oscillator is a repeating pattern that changes controls over time. It's like a regular Oscillator that you don't hear!

</aside>

There are 3 available destinations for the LFO:

  1. !pwm - pulse width of both oscillators (only audible with pulse waveform)
  2. !shpx - shape of both oscillators
  3. !wobble - filter cutoff frequency