A song is not a pile of loops — it's which loops play together, and when that changes. A scene is one such combination; a song is scenes with names.
set = song { groove = [kick, bassline], drop = [kick, bassline, hook] } — each scene lists its tracks. The timeline above the editor grows scene buttons; switches land on the next bar.
Scenes compose by algebra instead of repetition: drop = groove + [hook] is "everything in groove, plus the hook". - removes: breakdown = drop - [kick].
This reads like the music: the drop IS the groove plus the lead; the breakdown IS the drop minus the drums. Change the groove and every derived scene follows.
Any track not in a song still compiles — it just doesn't play under song control. Park sketches outside the song and pull them in when ready.
The starting point#
The lesson opens with this song in the editor. Every edit recompiles and plays.
-- Scenes: three tracks, all playing, always. Give the jam a shape.
bass = patch {
source = saw (freq pitch),
ampEnv = adsr 2ms 150ms 0 90ms,
cutoff = 900Hz,
gain = vel * 0.5
}
lead = patch {
source = saw (freq pitch) |> supersaw 5 18,
ampEnv = adsr 5ms 180ms 0.4 150ms,
cutoff = 2400Hz,
gain = vel * 0.35
}
kick = sound !"bd ~ bd ~"
bassline = play bass !"c2 ~ [c2 eb2] g1"
hook = play lead !"c4 ~ bb3 g3 ~ eb3 g3 ~"
What to watch#
Switch scenes while it plays: the waveform's density changes on the bar line, not the instant you click. Volta waits for musical time.
Goals#
The workbench checks these as you work; the solution is there when you want it.
- Write a song with at least two scenes
- Derive a scene with + or -
- Stretch: a third scene — intro, groove, drop
Make it yours#
Structure this jam as intro → groove → drop → breakdown where every scene after the first is derived (+/-) from an earlier one. Click through them live.
Further reading#
Arrange a song in the reference.