Overtone Cheat Sheet
Overtone drives the SuperCollider engine from a Clojure REPL. The essentials: making sound with instruments, and scheduling with a metronome.
Setup & sound
(use 'overtone.live)Load Overtone and boot the server(demo (sin-osc 440))Play a UGen for a few seconds(definst beep [freq 440] (* 0.3 (sin-osc freq)))Define a playable instrument
(beep 300)Play it; (stop) stops everythingSynths & UGens
(defsynth …)Define a synth on the server(sin-osc freq)Sine (also saw, square, pulse)(env-gen (perc) :action FREE)Percussive envelope; free when done(lpf sig 800)Low-pass filter a signalTiming
(def m (metronome 120))Create a metronome at 120 BPM(m)The current beat number(m 4)The time (ms) of beat 4(at (m (inc (m))) (beep))Schedule a note on the next beat(apply-at t #'my-fn args)Schedule a function callNotes, chords & scales
(note :c4)Note name → MIDI number(chord :c4 :major)The notes of a chord(scale :c4 :major)The notes of a scale(midi->hz 60)MIDI number → frequencyOvertone — Clojure toolkit over SuperCollider. · Overtone in the tool directory →