Skip to main content
play evaluates what follows it and renders one output. It is the only statement that makes sound, and it goes at the top level of a cell.
This cell renders three outputs.

What repeats

A play is a timeline, and its statements start together.

Duration

Write play groove for 2 bars to set the whole output’s duration. The duration follows the music; play 2 bars groove is rejected. Without a duration, a play lasts as long as its longest statement, and what repeats must fit that a whole number of times. With a length, it lasts exactly that long: whatever is repeating stops at the end, and silence fills any time left over. A play can’t run past 10 minutes.

Output

  • A header with the time, tempo, key, number of bars and the instruments that play.
  • Audio, with a waveform to follow and seek.
  • A grid of every hit and note, bar by bar. The playground can draw it as sheet music instead: the kit on a percussion staff with hands up and feet down, each instrument on a staff of its own (a guitar with its tab) in the signature of the key, and the sheet prints.
  • The chords played. The playground draws a diagram for each.