Scope
Colour
MIDI
Samples
Debug
Danger Zone
1 — Welcome
Welcome to Sonic Tau — a live-coding audio playground. The language is heavily inspired by Sonic Pi. Write code, hit Run, and hear it instantly. Modify code while it plays and hear changes in real-time.
This tutorial is adapted from the Sonic Pi tutorial by Sam Aaron. It’s divided into sections — feel free to dip in and out.
1.1 Live Coding
One of the most exciting aspects is that you can write and modify code live to make music, just like performing with a guitar. Let’s start with a beat:
4.times do sample :bd_haus, rate: 1 sleep 0.5 end
Press Run and you’ll hear a bass drum. Try changing sleep 0.5 to sleep 1 and hit Run again — the speed changes. That’s live coding!
Try layering sounds together:
4.times do sample :ambi_choir, rate: 0.3 sample :bd_haus, rate: 1 sleep 1 end
Play around — change rates, use negative values, try tiny sleep times. Comment out lines with # to remove them from the mix.
1.2 Learning through Play
There are no mistakes, only opportunities. No matter how experienced you are, unexpected outcomes happen. Take the sound, manipulate it and morph it into something awesome.
Start simple. Think of the simplest thing that would be fun, build it, play with it, and let new ideas emerge.
2 — Synths
Synth is short for synthesiser — something that creates sounds. Typically synths are complicated, but here you get that power in an approachable way.
2.1 Your First Beeps
This is where it all starts:
play 70
Lower numbers make lower pitched beeps, higher numbers make higher ones. The number 60 is middle C. Each +1 is one semitone up, so play 61 is C#, play 62 is D.
Play multiple notes at once for a chord:
play 72 play 75 play 79
Use sleep between notes for a melody:
play 72 sleep 1 play 75 sleep 1 play 79
Try shorter sleep values like 0.5 or 0.25 to speed things up. You can also use note names:
play :C sleep 0.5 play :D sleep 0.5 play :E
Add an octave number (:C3, :E4), sharps with s (:Fs3), and flats with b (:Eb3).
2.2 Synth Options: Amp and Pan
Options (opts) let you control the sound. Pass them after a comma:
play 60, amp: 0.5 sleep 0.5 play 60, amp: 2
amp: controls volume — 0 is silent, 1 is normal. Try to stay in 0–0.5 to avoid compression.
pan: controls stereo position — -1 is left, 0 is centre, 1 is right:
play 60, pan: -1 sleep 0.5 play 60, pan: 1
2.3 Switching Synths
The default beep is just one of many synths. Switch with use_synth:
use_synth :saw play 38 sleep 0.25 play 50 sleep 0.25 play 62
use_synth :prophet play 38 sleep 0.25 play 50 sleep 0.25 play 62
Combine them — play multiple synths at once by not sleeping between them:
use_synth :tb303 play 38 use_synth :dsaw play 50 use_synth :prophet play 57
Some favourites: :prophet, :dsaw, :fm, :tb303, :pulse
2.4 Duration with Envelopes
Sonic Pi uses ADSR amplitude envelopes to control sound duration and shape.
Release — how long the sound fades out (default 1 beat):
play 60, release: 2
Attack — how long to fade in (default 0):
play 60, attack: 2 sleep 3 play 65, attack: 0.5
Combine them:
play 60, attack: 0.7, release: 4
Sustain — hold at full volume between attack and release:
play 60, attack: 0.3, sustain: 1, release: 1
Decay — drop from attack level to sustain level:
play 60, attack: 0.1, attack_level: 1, decay: 0.2, sustain_level: 0.4, sustain: 1, release: 0.5
Total duration = attack + decay + sustain + release.
3 — Samples
Another great way to make music is with pre-recorded sounds — samples.
3.1 Triggering Samples
sample :ambi_lunar_land
Layer samples with notes — they play simultaneously unless separated by sleep:
sample :ambi_lunar_land sleep 1 play 48 sleep 0.5 play 36 sample :ambi_drone sleep 1 play 36
Discover samples by typing a category prefix like :ambi_, :bass_, :elec_, :perc_, :guit_, :drum_, :misc_, or :bd_ and using autocomplete.
3.2 Sample Parameters
Samples accept the same opts as synths. Control amplitude and panning:
sample :ambi_lunar_land, amp: 0.5
sample :loop_amen, pan: -1 sleep 0.877 sample :loop_amen, pan: 1
| Sound | play synth sample use_synth |
| Timing | sleep use_bpm time_warp |
| Pitch | use_transpose use_octave |
| Defaults | use_synth_defaults use_merged_synth_defaults with_synth_defaults use_sample_defaults |
| Flow | N.times if define in_thread live_loop stop |
| Random | rand rrand rrand_i rand_i dice use_random_seed |
| Theory | chord scale note octs range midi_to_hz hz_to_midi |
| Generators | ring knit spread line bools halves doubles |
| FX | with_fx |
| Counters | tick look tick_reset |
| Lists | .choose .shuffle .tick .look .reverse .sort .take .drop .mirror .reflect ... |
| State | @name = @name set get cue sync |
| Output |
Sound
play note, amp: release: cutoff: ...
Play a note with the current synth. Accepts MIDI numbers or note symbols. Code continues executing while the sound plays through its envelope.
use_synth :prophet play :E4, release: 1 sleep 0.3 play :G4, release: 1 sleep 0.3 play :B4, release: 2, amp: 0.7
synth :synth_name, note: amp: release: ...
Trigger a specific synth by name. Unlike use_synth, this doesn’t change the default — it’s a one-shot. The note is passed as a note: kwarg (default: 52 / E3).
synth :prophet, note: 60, release: 2 sleep 0.5 synth :tb303, note: 36, cutoff: 80
sample :name, rate: amp: pan: ...
Trigger a sample. Play back a recorded sound file. Use a built-in sample name like :bd_haus or a full path string. There are many opts for manipulating playback — rate: affects speed and pitch, amp: controls volume. You can also filter samples from a directory by passing string keywords and an optional index.
sample :ambi_piano, amp: 0.9 sleep 1.5 sample :ambi_piano, rate: 0.5, amp: 0.6 -- half speed → octave down sleep 3 sample :loop_amen, rate: 0.85, amp: 0.8 -- classic break, slightly slowed -- filter by directory and keyword (user sample folders) sample :drum "kick" sample :drum "snare" 2, rate: 0.8
use_synth :synth_name
Set the default synth for all subsequent play calls. The same note sounds very different through each synth — see the Synths tab for the full list.
use_synth :beep -- pure sine play :E3, release: 1 sleep 1 use_synth :prophet -- warm analog pad play :E3, release: 1.5 sleep 1.5 use_synth :tb303 -- acid squelch play :E3, release: 1, cutoff: 110, res: 0.8
Timing
sleep beats
Wait for a number of beats before the next command. Beats are scaled to seconds by the current BPM.
play 60 sleep 1 play 67 sleep 0.5 play 72
use_bpm bpm
Set the tempo in beats per minute. Affects all subsequent sleep calls and temporal synth arguments.
use_bpm 200 use_synth :prophet 16.times do play [:E4, :G4, :B4, :D5, :E5, :D5, :B4, :G4].tick, release: 0.3 sleep 0.25 end
Time Warp
time_warp delta do ... end
Temporarily shift time forward or backward. All sounds triggered inside the block are scheduled at the shifted time. After the block, time returns to where it was — no drift. Only sleep, sync, and time_warp affect time.
play 60 time_warp 0.5 do play 72 end play 48
Here play 60 and play 48 sound at beat 0. play 72 sounds at beat 0.5. The time_warp shifts time for its block only.
-- Schedule a chord spread across 50ms time_warp 0 do play 60 end time_warp 0.01 do play 64 end time_warp 0.02 do play 67 end
Pitch
use_transpose semitones
Shift all notes by the given number of semitones. Use negative numbers to shift down.
play 60 sleep 0.5 use_transpose 7 play 60
use_octave octaves
Shift all notes by the given number of octaves (each octave = 12 semitones).
play 60 sleep 0.5 use_octave -1 play 60
use_synth_defaults key: value, …
Set default values for all subsequent play and synth calls. Replaces any previous defaults. Per-call arguments always win over defaults.
use_synth_defaults amp: 0.5, cutoff: 80 play 60 -- plays with amp: 0.5, cutoff: 80 play 60, amp: 1 -- plays with amp: 1, cutoff: 80 (explicit wins)
use_merged_synth_defaults key: value, …
Merge new defaults with existing ones. Adds new keys and updates existing keys without removing unspecified ones.
use_synth_defaults amp: 0.5, cutoff: 80 use_merged_synth_defaults release: 2 play 60 -- plays with amp: 0.5, cutoff: 80, release: 2
with_synth_defaults key: value, … do … end
Set defaults for the duration of the block only. Previous defaults are restored when the block ends.
use_synth_defaults amp: 0.5 with_synth_defaults amp: 0.1, cutoff: 90 do play 60 -- amp: 0.1, cutoff: 90 end play 60 -- amp: 0.5 (restored)
use_sample_defaults key: value, …
Set default values for all subsequent sample calls. Works the same way as use_synth_defaults but only affects samples.
use_sample_defaults amp: 2, rate: 0.5 sample :bd_haus -- plays with amp: 2, rate: 0.5
use_merged_sample_defaults key: value, …
Merge new sample defaults with existing ones.
with_sample_defaults key: value, … do … end
Set sample defaults for the duration of the block only. Previous defaults are restored when the block ends.
current_synth_defaults
Returns the current synth defaults as a list. Useful for debugging — pass it to print and the result appears in the info panel's output pane.
use_synth_defaults amp: 0.5, cutoff: 80 print current_synth_defaults
current_sample_defaults
Returns the current sample defaults as a list.
Control Flow
N.times do … end
Repeat a block of code N times.
4.times do sample :bd_haus sleep 0.5 end
if condition … else … end
Conditional execution. Run code only when a condition is true.
if dice(6) > 3 play 72 else play 60 end
define :name do … end
Give a block of code a name for re-use. Call it like any other function.
define :bass do use_synth :tb303 play 36, release: 0.3, cutoff: 70 end bass sleep 0.5 bass
in_thread do … end
Run a block of code in a new thread. The parent continues immediately while the child runs concurrently. Each thread has its own timing, so sleep in one thread doesn’t block the other.
in_thread do
4.times do
sample :bd_haus, lpf: 90
sleep 0.5
end
end
in_thread do
16.times do
n = [52, 55, 57, 59, 62, 64].choose
synth :chiplead, note: n, release: 0.1
sleep 0.125
end
end
8.times do
sample :hat_bdu
sleep 0.25
end
live_loop :name do … end
A loop for live coding. Runs the body repeatedly, automatically looping back to the start when it reaches end. If you edit the code and re-run, the new version hot-swaps into the running loop — no need to stop and restart. Each iteration automatically emits a cue at /live_loop/name so other threads can sync with it. Every live loop must contain at least one sleep to avoid spinning.
live_loop :beat do sample :bd_haus, lpf: 100 sleep 0.5 end live_loop :melody do use_synth :subpulse play [50, 54, 57, 62, 74].choose, release: 0.2 sleep 0.125 end
stop
Stop the current thread or run. Does not stop any running synths triggered previously in the thread. Useful for conditionally silencing a live loop on some iterations.
play 70 sleep 0.5 play 72 stop play 745
Randomisation
rand (max)
Random float between 0 and max (default 1).
8.times do play 72 + rand(24), release: 0.1 sleep 0.125 end
rrand (min, max)
Random float between min and max.
8.times do play rrand(48, 72) sleep 0.25 end
rrand_i (min, max)
Random integer between min and max (inclusive).
8.times do play rrand_i(48, 72) sleep 0.25 end
rand_i (max)
Random integer between 0 and max−1.
4.times do sample :elec_blip, rate: rand_i(4) sleep 0.25 end
dice (n)
Roll a dice with N sides (default 6). Returns integer from 1 to N.
4.times do play 50 + dice(12) sleep 0.25 end
use_random_seed seed
Set the random seed for reproducible sequences. The same seed always produces the same random numbers.
use_random_seed 42 4.times do play rrand_i(50, 80) sleep 0.25 end use_random_seed 100 4.times do play rrand_i(50, 80) sleep 0.25 end use_random_seed 42 4.times do play rrand_i(50, 80) sleep 0.25 end
Music Theory
chord (:root, :type)
Create a list of MIDI notes forming a chord. The root can be a note symbol or MIDI number. Supports major, minor, 7th, 9th, 11th, 13th, sus, dim, aug, and many more. Passing a chord to play triggers all its notes at once.
use_synth :prophet with_fx :reverb, room: 0.9, mix: 0.6 do play chord(:C4, :major), release: 2, amp: 0.7 sleep 1.5 play chord(:G3, :major), release: 2, amp: 0.7 sleep 1.5 play chord(:A3, :minor), release: 2, amp: 0.7 sleep 1.5 play chord(:F3, :major), release: 2, amp: 0.7 sleep 1.5 end
scale (:root, :type)
Create a list of MIDI notes forming a scale. Supports major, minor, pentatonic, blues, modes, and many exotic scales. Pass num_octaves: to cover a wider range.
use_synth :prophet 16.times do play scale(:C4, :minor_pentatonic, num_octaves: 2).tick, release: 0.3 sleep 0.15 end
note (:symbol)
Convert a note symbol to its MIDI number. Supports sharps (s), flats (b/f), and octave numbers.
use_synth :prophet play note(:C4), release: 0.5 sleep 0.5 play note(:Eb3), release: 0.5 sleep 0.5 play note(:Fs4), release: 0.5
range (start, end, step)
Create a list of numbers from start to end, incrementing by step.
8.times do play range(50, 74, 3).choose, release: 0.1 sleep 0.125 end
octs (note, num_octaves)
Create a list of a note repeated across octaves. Each subsequent note is 12 semitones higher.
-- plays C2, C3, C4 across iterations play octs(:c2, 3).tick
midi_to_hz (note)
Convert a MIDI note number to frequency in Hz. midi_to_hz(69) → 440.
hz_to_midi (freq)
Convert a frequency in Hz to a MIDI note number. hz_to_midi(440) → 69. You can also use the hz suffix: play 440hz.
Ring Generators
ring (...)
Create a ring (cyclic list) from arguments.
notes = ring(60, 64, 67, 72) live_loop :arp do play notes.tick sleep 0.25 end
knit (val, count, val2, count2, ...)
Create a ring by repeating each value a specified number of times.
live_loop :rhythm do sample knit(:bd_haus, 3, :sn_dolf, 1).tick sleep 0.25 end
spread (accents, size)
Euclidean rhythm distribution — evenly space accents across beats. Returns a ring of 1s and 0s. Based on Toussaint's paper on Euclidean rhythms.
live_loop :euclidean do sample :bd_haus, on: spread(3, 8).tick sleep 0.125 end
line (start, end, steps: 4)
Linear interpolation between start and end, divided into equal steps. Returns a ring of values you can step through with .tick.
use_synth :prophet 8.times do play line(48, 72, steps: 8).tick, release: 0.3 sleep 0.2 end
bools (...)
Create a boolean ring from 1s and 0s. Useful for rhythmic patterns.
sample :bd_haus, on: bools(1, 0, 0, 1, 0, 1, 0, 0).tick
halves (start, count)
Successive halvings. halves(120, 3) → [120, 60, 30]. Negative count doubles instead.
doubles (start, count)
Successive doublings. doubles(1.5, 3) → [1.5, 3, 6]. Negative count halves instead.
Ring Chain Methods
Chain methods transform lists and can be combined: [1,2,3,4,5].shuffle.drop(1).take(3)
.reverse | Reverse order |
.sort | Sort numerically |
.shuffle | Random permutation |
.choose | Random single element |
.pick(n) | N random elements |
.take(n) | First N elements (wraps if n > length) |
.drop(n) | Skip first N elements |
.butlast | All but last element |
.drop_last(n) | Drop last N elements |
.take_last(n) | Last N elements |
.stretch(n) | Repeat each element N times |
.repeat(n) | Repeat entire list N times |
.mirror | Forward then backward: [1,2,3] → [1,2,3,3,2,1] |
.reflect | Mirror without duplicating pivot: [1,2,3] → [1,2,3,2,1] |
.scale(n) | Multiply all elements by n |
.rotate(n) | Rotate by N positions |
.min / .max | Minimum / maximum element |
.first / .last | First / last element |
.length | Number of elements |
.tick / .look | Cycle through elements with counter |
FX
with_fx :fx_name, mix: room: ... do ... end
Wrap a block of code in an audio effect. All sounds triggered inside the block are routed through the FX before reaching the output. The FX is automatically cleaned up after all synths inside have finished and the reverb tail has decayed.
with_fx :reverb, room: 0.8, mix: 0.6 do play 60 sleep 0.5 play 64 sleep 0.5 end sample :bd_haus
FX can be nested:
with_fx :reverb do
with_fx :distortion, distort: 0.5 do
play 50, release: 2
sleep 1
end
end
Use in_thread inside with_fx to trigger multiple sounds simultaneously through the same FX chain:
with_fx :echo, phase: 0.25 do
in_thread do
play 60
sleep 0.5
play 64
end
play 48, release: 2
sleep 1
end
See the FX tab for a full list of available effects and their parameters.
Counters
tick
Increment a thread-local counter and return its value. Starts at 0 on the first call. The counter persists across live_loop iterations, making it ideal for stepping through sequences.
4.times do play 60 + tick * 3 sleep 0.25 end -- plays: 60, 63, 66, 69 (each tick advances by one)
There is only one counter per thread. Multiple calls to tick in the same iteration share and advance the same counter, which can cause unexpected results:
live_loop :clash do -- tick 0, 2, 4, ... play [60, 64, 67].tick -- tick 1, 3, 5, ... play [72, 76, 79].tick sleep 0.25 end
Each .tick advances the counter by one, so the two lists step through at double speed and interleave oddly. To avoid this, use .tick on one list and .look on the others:
live_loop :clean do -- advances counter play [60, 64, 67].tick -- reads same position play [72, 76, 79].look sleep 0.25 end
look
Return the current tick counter value without incrementing it. Useful for reading the counter from multiple places in the same iteration.
3.times do play [60, 64, 67].tick -- advances counter play [72, 76, 79].look -- reads same position, no increment sleep 0.4 end
tick_reset
Reset the tick counter so the next call to tick returns 0 again. Useful for restarting a sequence from the beginning.
3.times do play 60 + tick * 3 sleep 0.25 end tick_reset play 60 + tick * 3 -- plays: 60, 63, 66, then 60 again (reset)
Lists
[].choose
Pick a random element from a list.
4.times do play [60, 64, 67, 72].choose sleep 0.25 end
[].shuffle
Return a new list with elements in random order.
@notes = [60, 64, 67, 72].shuffle 4.times do play @notes.tick, release: 0.3 sleep 0.25 end
[].tick
Tick the counter and use it to index into the list (wrapping around). This is the primary way to step through a sequence in a live_loop — each iteration automatically picks the next element.
live_loop :melody do play [60, 62, 64, 67].tick sleep 0.25 end
[].look
Index into the list using the current counter value without incrementing. Use when you need the same element from multiple lists in one iteration.
notes = [60, 64, 67, 72] amps = [1, 0.5, 0.7, 0.3] live_loop :multi do play notes.tick, amp: amps.look sleep 0.25 end
Time State
@name = value
Store information in Time State for the current time. The value is visible to all threads and will remain until overwritten. Shorthand for set :name, value.
@note = 60 play @note sleep 0.5 @note = 72 play @note
@name
Retrieve information from Time State set prior to the current time from any thread. Returns 0 if no value has been stored. Shorthand for get :name.
@root = 50 8.times do play @root + rrand_i(0, 12), release: 0.1 sleep 0.125 end
set :name, value
Store information in Time State. The value will remain until overwritten by another call to set. Also triggers any threads waiting on sync :name.
set :root, 60 4.times do play get(:root), release: 0.2 sleep 0.25 end set :root, 72 4.times do play get(:root), release: 0.2 sleep 0.25 end
get :name
Retrieve information from Time State. Returns the most recent value stored with set prior to the current time. Returns 0 if not set.
set :notes, [50, 54, 57, 62] 8.times do play get(:notes).choose, release: 0.1 sleep 0.125 end
cue :name
Cue other threads. Send a heartbeat synchronisation message containing the virtual timestamp of the current thread. Any thread waiting on sync :name will wake up and inherit this thread’s beat. Unlike set, cues are for signalling — they don’t store a retrievable value.
in_thread do sleep 1 cue :drop end sync :drop sample :bd_haus play 36, release: 2
sync :name
Sync with other threads. Pause the current thread until a matching cue, set, or live_loop event is received. When matched, the current thread’s virtual time is set to match the cueing thread — synchronising them musically.
live_loop :beat do sample :bd_haus, lpf: 100 sleep 0.5 end live_loop :melody do sync :beat use_synth :chiplead play [50, 54, 57, 62].choose, release: 0.1 end
Output
print value
Display a value in the output pane under the info panel. Useful for debugging. Switch from this Help panel to the Info panel (top-right icon) to see the printed output after running.
print 42 print rrand(0, 100) print "hello"
Quick jump:
Classic
:beep
A simple pure sine wave. The default synth.
play 60
:saw
A saw wave with a low pass filter.
use_synth :saw play 50, release: 1
:square
A simple square wave with a low pass filter.
use_synth :square play 50, release: 1
:tri
A simple triangle wave with a low pass filter.
use_synth :tri play 60, release: 1
:pulse
A simple pulse wave with a low pass filter. Adjustable pulse width.
use_synth :pulse play 52, pulse_width: 0.3, release: 1
:subpulse
A pulse wave with a sub sine wave passed through a low pass filter.
use_synth :subpulse play 40, release: 1
:prophet
Dark and swirly, this synth uses Pulse Width Modulation (PWM) to create a timbre which continually moves around. This effect is created using the pulse ugen which produces a variable width square wave.
use_synth :prophet play 60, release: 2
:hollow
A hollow breathy sound constructed from random noise
use_synth :hollow play 60, release: 3
:dark_ambience
A slow rolling bass with a sparkle of light trying to escape the darkness. Great for an ambient sound.
use_synth :dark_ambience play 48, release: 4
:growl
A deep rumbling growl with a bright sine shining through at higher notes.
use_synth :growl play 40, release: 1
:zawa
Saw wave with oscillating timbre. Produces moving saw waves with a unique character controllable with the control oscillator (usage similar to mod synths).
use_synth :zawa play 55, release: 2
Detuned
:dsaw
A pair of detuned saw waves passed through a low pass filter.
use_synth :dsaw play 50, detune: 0.3, release: 1.5
:dpulse
A pair of detuned pulse waves passed through a low pass filter.
use_synth :dpulse play 48, detune: 0.2, release: 1
:dtri
A pair of detuned triangle waves passed through a low pass filter.
use_synth :dtri play 55, detune: 0.3, release: 1.5
:supersaw
Thick swirly saw waves sparkling and moving about to create a rich trancy sound.
use_synth :supersaw play 50, release: 2
Bass
:tb303
Emulation of the classic Roland TB-303 Bass Line synthesiser.
use_synth :tb303 play 40, cutoff: 80, release: 0.5
:bass_foundation
A soft bass synth inspired by the sounds of the 80s.
use_synth :bass_foundation play 36, release: 1
:bass_highend
An addition to the :bass_foundation synth inspired by the sounds of the 80s.
use_synth :bass_highend play 40, release: 1
:gabberkick
An aggressive Gabber synth sound.
use_synth :gabberkick play 36, release: 0.5
Keys & Bells
:rhodey
The sound of an electric piano from the 60's and 70's, producing a characteristic metallic sound.
use_synth :rhodey play 60, release: 1.5
:dull_bell
A simple dull discordant bell sound.
use_synth :dull_bell play 60
:pretty_bell
A pretty bell sound.
use_synth :pretty_bell play 72
:kalimba
A synthesised kalimba (a type of African thumb piano).
use_synth :kalimba play 72
:pluck
A basic plucked string synthesiser that uses Karplus-Strong synthesis.
use_synth :pluck play 60, release: 1
Modulated
:fm
A sine wave with a fundamental frequency which is modulated at audio rate by another sine wave with a specific modulation, division and depth. Useful for generating a wide range of sounds by playing with the divisor and depth params.
use_synth :fm play 60, divisor: 2, depth: 3, release: 1.5
:mod_saw
A saw wave passed through a low pass filter which modulates between two separate notes via a variety of control waves.
use_synth :mod_saw play 50, mod_rate: 4, release: 2
:mod_sine
A sine wave passed through a low pass filter which modulates between two separate notes via a variety of control waves.
use_synth :mod_sine play 60, mod_rate: 2, release: 2
:mod_pulse
A pulse wave with a low pass filter modulating between two notes via a variety of control waves (see mod_wave: arg). The pulse wave defaults to a square wave, but the timbre can be changed dramatically by adjusting the pulse_width arg between 0 and 1.
use_synth :mod_pulse play 52, mod_rate: 3, release: 1.5
:mod_tri
A triangle wave passed through a low pass filter which modulates between two separate notes via a variety of control waves.
use_synth :mod_tri play 60, mod_rate: 5, release: 2
:mod_dsaw
A pair of detuned saw waves (see the dsaw synth) which are modulated between two fixed notes at a given rate.
use_synth :mod_dsaw play 48, mod_rate: 2, release: 2
:mod_fm
The FM synth modulating between two notes - the duration of the modulation can be modified using the mod_phase arg, the range (number of notes jumped between) by the mod_range arg and the width of the jumps by the mod_width param. The FM synth is a sine wave with a fundamental frequency which is modulated at audio rate by another sine wave with a specific modulation, division and depth.
use_synth :mod_fm play 55, mod_rate: 3, release: 1.5
:mod_beep
A sine wave passed through a low pass filter which modulates between two separate notes via a variety of control waves.
use_synth :mod_beep play 60, mod_rate: 2, release: 2
Chip & Retro
:chipbass
A 16 step triangle wave modelled after the 2A03 chip found in voice 3 of the NES games console. This can be used for retro sounding basslines.
use_synth :chipbass play 36, release: 0.5
:chiplead
A slightly clipped square (pulse) wave with phases of 12.5%, 25% or 50% modelled after the 2A03 chip found in voices 1 and 2 of the NES games console. This can be used for retro sounding leads and harmonised lines.
use_synth :chiplead play 72, release: 0.3 sleep 0.25 play 74, release: 0.3 sleep 0.25 play 76, release: 0.5
:chipnoise
Generates noise whose values are either -1 or 1 (like a pulse or square wave) with one of 16 particular frequencies. This is similar to the noise channel on the 2A03 chip used in the NES games console, although it lacks the same Pseudo-Random Number Generator (PRNG) and doesn't implement the 2A03's lesser used noise mode.
use_synth :chipnoise play 60, release: 0.15
Other
:blade
Straight from the 70s, evoking the mists of Blade Runner, this simple electro-style string synth is based on filtered saw waves and a variable vibrato.
use_synth :blade play 55, release: 1.5
:tech_saws
Slightly modified supersaw implementation based on http://sccode.org/1-4YS
use_synth :tech_saws play 52, release: 2
:hoover
Classic early 90's rave synth - 'a sort of slurry chorussy synth line like the classic Dominator by Human Resource'. Based on Dan Stowell's implementation in SuperCollider and Daniel Turczanski's port to Overtone.
use_synth :hoover play 40, release: 1.5
:rodeo
Classic 70's electric piano sound, with built-in compressor and chorus.
use_synth :rodeo play 60, release: 1
:organ_tonewheel
An emulation of a tonewheel organ with an optional rotary speaker. These instruments were the first electro-mechanical synthesisers, developed in the mid 1930s by Laurens Hammond.
use_synth :organ_tonewheel play 60, release: 2
Noise
:noise
White noise — equal energy at every frequency, comparable to radio static.
use_synth :noise play 60, release: 0.5
:pnoise
Pink noise — spectrum falls off in power by 3 dB per octave.
use_synth :pnoise play 60, release: 0.5
:bnoise
Brown noise — spectrum falls off in power by 6 dB per octave.
use_synth :bnoise play 60, release: 0.5
:gnoise
Grey noise — results from flipping random bits in a word.
use_synth :gnoise play 60, release: 0.5
:cnoise
Clip noise — values are either -1 or 1.
use_synth :cnoise play 60, release: 0.5
SC808 Drum Machine
:sc808_bassdrum
SC808 bass drum.
synth :sc808_bassdrum
:sc808_snare
SC808 snare drum.
synth :sc808_snare
:sc808_clap
SC808 clap.
synth :sc808_clap
:sc808_closed_hihat
SC808 closed hi-hat.
synth :sc808_closed_hihat
:sc808_open_hihat
SC808 open hi-hat.
synth :sc808_open_hihat
:sc808_cymbal
SC808 cymbal.
synth :sc808_cymbal
:sc808_cowbell
SC808 cowbell.
synth :sc808_cowbell
:sc808_rimshot
SC808 rimshot.
synth :sc808_rimshot
:sc808_claves
SC808 claves.
synth :sc808_claves
:sc808_maracas
SC808 maracas.
synth :sc808_maracas
:sc808_tomlo
SC808 low tom.
synth :sc808_tomlo
:sc808_tommid
SC808 mid tom.
synth :sc808_tommid
:sc808_tomhi
SC808 high tom.
synth :sc808_tomhi
:sc808_congalo
SC808 low conga.
synth :sc808_congalo
:sc808_congamid
SC808 mid conga.
synth :sc808_congamid
:sc808_congahi
SC808 high conga.
synth :sc808_congahi
Quick jump:
Reverb & Space
:reverb
Make the incoming signal sound more spacious or distant as if it were played in a large room or cave. Signal may also be dampened by reducing the amplitude of the higher frequencies.
with_fx :reverb, room: 0.6, damp: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:gverb
Make the incoming signal sound more spacious or distant as if it were played in a large room or cave. Similar to reverb but with a more spacious feel.
with_fx :gverb, spread: 0.5, damp: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:echo
Standard echo with variable phase duration (time between echoes) and decay (length of echo fade out). If you wish to have a phase duration longer than 2s, you need to specify the longest phase duration you'd like with the arg max_phase. Be warned, echo FX with very long phases can consume a lot of me...
with_fx :echo, phase: 0.25, decay: 2 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:ping_pong
Echo FX with each delayed echo swapping between left and right channels. Has variable phase duration (time between echoes) and feedback (proportion of sound fed into each echo). If you wish to have a phase duration longer than 1s, you need to specify the longest phase duration you'd like with the arg...
with_fx :ping_pong, phase: 0.25, feedback: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Filters
:lpf
Dampens the parts of the signal that are higher than the cutoff point (typically the crunchy fizzy harmonic overtones) and keeps the lower parts (typically the bass/mid of the sound). Choose a higher cutoff to keep more of the high frequencies/treble of the sound and a lower cutoff to make the sound ...
with_fx :lpf, cutoff: 100 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:hpf
Dampens the parts of the signal that are lower than the cutoff point (typically the bass of the sound) and keeps the higher parts (typically the crunchy fizzy harmonic overtones). Choose a lower cutoff to keep more of the bass/mid and a higher cutoff to make the sound more light and crispy.
with_fx :hpf, cutoff: 100 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:bpf
Combines low pass and high pass filters to only allow a 'band' of frequencies through. If the band is very narrow (a low res value like 0.0001) then the BPF will reduce the original sound, almost down to a single frequency (controlled by the centre opt). With higher values for res we can simulate ...
with_fx :bpf, centre: 100, res: 0.6 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:rlpf
Dampens the parts of the signal that are higher than the cutoff point (typically the crunchy fizzy harmonic overtones) and keeps the lower parts (typically the bass/mid of the sound). The resonant part of the resonant low pass filter emphasises/resonates the frequencies around the cutoff point. The a...
with_fx :rlpf, cutoff: 100, res: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:rhpf
Dampens the parts of the signal that are lower than the cutoff point (typically the bass of the sound) and keeps the higher parts (typically the crunchy fizzy harmonic overtones). The resonant part of the resonant high pass filter emphasises/resonates the frequencies around the cutoff point. The amou...
with_fx :rhpf, cutoff: 100, res: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:rbpf
Like the Band Pass Filter but with a resonance (slight volume boost) around the target frequency. This can produce an interesting whistling effect, especially when used with larger values for the res opt.
with_fx :rbpf, centre: 100, res: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:nlpf
A low pass filter chained to a normaliser. Ensures that the signal is both filtered by a standard low pass filter and then normalised to ensure the amplitude of the final output is constant. A low pass filter will reduce the amplitude of the resulting signal (as some of the sound has been filtered ou...
with_fx :nlpf, cutoff: 100 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:nhpf
A high pass filter chained to a normaliser. Ensures that the signal is both filtered by a standard high pass filter and then normalised to ensure the amplitude of the final output is constant. A high pass filter will reduce the amplitude of the resulting signal (as some of the sound has been filtered...
with_fx :nhpf, cutoff: 100 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:nbpf
Like the Band Pass Filter but normalised. The normaliser is useful here as some volume is lost when filtering the original signal.
with_fx :nbpf, centre: 100, res: 0.6 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:nrlpf
Dampens the parts of the signal that are higher than the cutoff point (typically the crunchy fizzy harmonic overtones) and keeps the lower parts (typically the bass/mid of the sound). The resonant part of the resonant low pass filter emphasises/resonates the frequencies around the cutoff point. The a...
with_fx :nrlpf, cutoff: 100, res: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:nrhpf
Dampens the parts of the signal that are lower than the cutoff point (typically the bass of the sound) and keeps the higher parts (typically the crunchy fizzy harmonic overtones). The resonant part of the resonant high pass filter emphasises/resonates the frequencies around the cutoff point. The amou...
with_fx :nrhpf, cutoff: 100, res: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:nrbpf
Like the Band Pass Filter but normalised, with a resonance (slight volume boost) around the target frequency. This can produce an interesting whistling effect, especially when used with larger values for the res opt. The normaliser is useful here as some volume is lost when filtering the original ...
with_fx :nrbpf, centre: 100, res: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Distortion
:distortion
Distorts the signal reducing clarity in favour of raw crunchy noise.
with_fx :distortion, distort: 0.5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:bitcrusher
Creates lo-fi output by decimating and deconstructing the incoming audio by lowering both the sample rate and bit depth. The default sample rate for CD audio is 44100, so use values less than that for that crunchy chip-tune sound full of artefacts and bitty distortion. Similarly, the default bit dept...
with_fx :bitcrusher, sample_rate: 10000, bits: 8 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:krush
Krush that sound!
with_fx :krush, gain: 5, gain_slide__curve: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:tanh
Forces all audio through a hyperbolic tangent function which has the effect of acting like distorted limiter. It works by folding loud signals back in on itself. The louder the input signal, the more folding occurs - resulting in increased strange harmonics and distortion. This folding also has the e...
with_fx :tanh, krunch: 5 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Modulation
:flanger
Mix the incoming signal with a copy of itself which has a rate modulating faster and slower than the original. Creates a swirling/whooshing effect.
with_fx :flanger, phase: 4, phase_offset: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:tremolo
Modulate the volume of the sound.
with_fx :tremolo, phase: 4, phase_offset: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:wobble
Versatile wobble FX. Will repeatedly modulate a range of filters (rlpf, rhpf) between two cutoff values using a range of control wave forms (saw, pulse, tri, sine). You may alter the phase duration of the wobble, and the resonance of the filter. Combines well with the dsaw synth for fun dub wobbles. ...
with_fx :wobble, phase: 0.5, cutoff_min: 60 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:ring_mod
Attack of the Daleks! Ring mod is a classic effect often used on soundtracks to evoke robots or aliens as it sounds hollow or metallic. We take a 'carrier' signal (a sine wave controlled by the freq opt) and modulate its amplitude using the signal given inside the fx block. This produces a wide varie...
with_fx :ring_mod, freq: 30, mod_amp: 1 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:whammy
A cheap sounding transposition effect, with a slightly robotic edge. Good for adding alien sounds and harmonies to everything from beeps to guitar samples. It's similar to pitch shift although not as smooth sounding.
with_fx :whammy, transpose: 12, max_delay_time: 1 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:slicer
Modulates the amplitude of the input signal with a specific control wave and phase duration. With the default pulse wave, slices the signal in and out, with the triangle wave, fades the signal in and out and with the saw wave, phases the signal in and then dramatically out. Control wave may be invert...
with_fx :slicer, phase: 0.25, amp_min: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:panslicer
Slice the pan automatically from left to right. Behaves similarly to slicer and wobble FX but modifies stereo panning of sound in left and right speakers. Default slice wave form is square (hard slicing between left and right) however other wave forms can be set with the `wave:` opt.
with_fx :panslicer, phase: 0.25, amp_min: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:ixi_techno
Moving resonant low pass filter between min and max cutoffs. Great for sweeping effects across long synths or samples.
with_fx :ixi_techno, phase: 4, phase_offset: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Dynamics
:compressor
Compresses the dynamic range of the incoming signal. Equivalent to automatically turning the amp down when the signal gets too loud and then back up again when it's quiet. Useful for ensuring the containing signal doesn't overwhelm other aspects of the sound. Also a general purpose hard-knee dynamic ...
with_fx :compressor, threshold: 0.2, clamp_time: 0.01 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:normaliser
Raise or lower amplitude of sound to a specified level. Evens out the amplitude of incoming sound across the frequency spectrum by flattening all dynamics.
with_fx :normaliser, level: 1 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:level
Amplitude modifier. All FX have their own amp built in, so it may be the case that you don't specifically need an isolated amp FX. However, it is useful to be able to control the overall amplitude of a number of running synths. All sounds created in the FX block will have their amplitudes multipled b...
with_fx :level do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Pitch
:pitch_shift
Changes the pitch of a signal without affecting tempo. Does this mainly through the pitch parameter which takes a midi number to transpose by. You can also play with the other params to produce some interesting textures and sounds.
with_fx :pitch_shift, window_size: 0.2, pitch: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:octaver
This effect adds three pitches based on the input sound. The first is the original sound transposed up an octave (super_amp), the second is the original sound transposed down an octave (sub_amp) and the third is the original sound transposed down two octaves (subsub_amp). The way the transposition...
with_fx :octaver, super_amp: 1, sub_amp: 1 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:autotuner
Autotune/phase vocoder effect. Used without any arguments, it tries to detect the pitch and shift it to the nearest exact note. This can help with out of tune singing, but it's also an interesting effect in its own right. When used with the note: arg, it tries to shift the input to match that note in...
with_fx :autotuner, note: 0, formant_ratio: 1.0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:vowel
This effect filters the input to match a human voice singing a certain vowel sound. Human singing voice sounds are easily achieved with a source of a saw wave with a little vibrato.
with_fx :vowel, vowel_sound: 1, voice: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Stereo
:pan
Specify where in the stereo field the sound should be heard. A value of -1 for pan will put the sound in the left speaker, a value of 1 will put the sound in the right speaker and values in between will shift the sound accordingly.
with_fx :pan, pan: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:mono
Sum left and right channels. Useful with stereo samples that you need as a mono sound, or for use with panslicer.
with_fx :mono, pan: 0 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
EQ
:eq
Basic parametric EQ
with_fx :eq, low_shelf: 0, low_shelf_note: 43.349957 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
:band_eq
Attenuate or Boost a frequency band
with_fx :band_eq, freq: 100, res: 0.6 do use_synth :prophet play 50, release: 2, cutoff: 80 sleep 0.5 end
Quick jump by category: