home/ atoms/ sonicpi-play-sleep-primitives

All of Western music can be expressed with two Sonic Pi commands: play (pitch) and sleep (timing)

In Sonic Pi, play specifies which note to sound (by MIDI number or note name) and sleep specifies how long to pause before the next command. Sam Aaron demonstrates that these two primitives — controlling pitch and time — are sufficient to write any melody in Western music. This mirrors how Western notation reduces music to these same two dimensions: pitch (how high) and time (when). The implication for learners is that the barrier to entry is extremely low: two commands and you have a complete compositional system, even if the timbres start as simple beeps.

Examples

play 70
sleep 1
play 75
sleep 0.5
play 72

Plays three notes in sequence with the pitch (play) and timing (sleep) fully specified.

Assessment

Write a three-note ascending melody in Sonic Pi using only play and sleep. Which musical dimension does each of the two commands control?

“I've got two commands and already I can do pretty much all of western music think about that for a moment any tune you can possibly imagine I can write with these two commands”
corpus · sam-aaron-programming-as-performance-live-coding-with-sonic · chunk 1