Chapter 14

Cheat sheet

Everything, one line each. Autocomplete has the full detail.

Session

name: … · _name: · Sname: · $:a track · muted · soloed · unnamed
setbpm(120) · setscale("F minor")tempo (4 beats a cycle) · the song's key
{mod+enter} · {mod+.}evaluate · stop
{app+a} · {app+l}arrangement ↔ code · let go of the loop region (on the desk: the deck's regions switch)
{app+g} · {app+b} · {mod+g}mixer · bounce the track · group the selected tracks
right-click · {app+j}save the selection as a snippet · insert one
F1the projector: the playing decks' code, white on black, as large as it fits
{app+d}DJ mode
.log()print a track's events to the console

Sources

note("c4 e4") · n("0 2").scale("F minor") · .sc(3)notes (c3 = 60) · degrees in a scale · in the setscale key
pianoroll("name") · clips()drawn notes · notes drawn in the arrangement's clips
s("bd") · s("files:a.wav") · sr("take") · sp("kit") · samples("user/repo")a pack · a file you dropped · a bounce · your own kit · packs from GitHub
s("bd") · s("files:a.wav") · se('a/b.wav') · sr("take") · sp("kit")a pack · a file you dropped · one file in the library · a bounce · your own kit
synth("…")an instrument on its own (plays C3)
midikeys("…")(ch) · midi("…") · audio("…") · input(1)a MIDI keyboard · MIDI from a device or track · a track or bus · a hardware input
group({ … }) · copy("t") · pcopy("t")a mixdown of tracks · a whole track again · its notes only

Chain

.synth("…") · .fx("…") · .param("name", v) · .wet(v) · .preset("name")instrument · effect · control · effect blend · saved state
.midi("t") · .audio("t") after an fxreplay notes into it · feed its sidechain
.gain · .postgain · .pan · .width · .bassmono · .othe channel strip
.bus("name", amt) · .dry(v) · .bsend()sends
.vel · .clip · .nudge · .swingvelocity, length, timing, groove

Sampler

.i · .begin · .end · .speed · .notewhich file · region · rate · repitch
.fit · .loop · .flip · .stretchlength in cycles · loop · reverse into the beat · timestretch
.slice · .splice · .slices("name")chops · chops fitted to hits · a drawn chop map
.adsr · .envscale · .grain + .grainsize/rate/pan/shapeenvelope (seconds) · scale it · granular playback

Modulators

sine saw isaw tri square rand perlinLFOs, 0..1; rate in cycles or '0.5hz'
lfo("shape", { rate, mode }) · env({ attack, decay, sustain, release })drawn shape · envelope per note (seconds)
macro1…8 · midicc("…")(cc) · auto("lane") · osc("/addr")knobs · automation
.range(lo, hi) · .snap([1, 2, 4]) · dur()rescale · to the nearest of a set · the note's length in seconds
"3x" "800hz" "-6db" "250ms" "7st"a value in the control's own units; a bare number is a 0..1 position

Controls and displays

slider knob toggle button xycontrols drawn in the code, heard as you move them
steps("x . x .") · sliders("0.2 0.8") · matrix({ bd: "x..." })cells · a bar per step · a grid of rows; a count, steps(8), is that many empty
shiftreg("x . x x", 0.05) · { mutate: 0.05 } · { deviation: 1 }cells read as a shift register · cells that change each cycle · bars thrown near where they were
acid(16)bars from 0 to 1 with accents, long gates, slides and octaves
.scope .spectrum .waveform .imager .meterthe track's sound
.punchcard .chroma .plotthe pattern's events · its notes · a signal over time
punchcard() · spectrum() … on their own linedrawn behind the code: every track, or the song's output
{ width, height } · { size } · .color("pink")a widget's size (square ones: size) · a track's color in the displays

Transforms

.add .sub .mul .div .mod .set + .in .out .squeezearithmetic, and whose events it plays on
.fast .slow .rib .hold .segtime
.struct .mask .ply .echo .arp .bite .degradestructure
.bits(n)steps read as a shift register, 0..1 on every step
.when .sometimes · choose irand cat seqconditions · chance and sequence
.fmap(fn) · .events(fn)edit values · edit whole events

Mini-notation

a b · ~ · [a b] · a, b · <a b>steps · rest · group · stack · one per cycle
a*2 · a/2 · a!2 · a@2 · a _faster · slower · repeat · weight · tie
a.e(3,8) · a? · a|b · r i(0,7) pEuclidean · maybe · either · random
"…" · '…' · // mini-offa pattern · plain text · plain text until // mini-on