1. What kind of language it is
▶ Open in Aratu to hear and change the examples
Aratu is a declarative language: the text describes what sounds, not a list of orders carried out one after another. It belongs with HTML, CSS or a spreadsheet. You do not write "play this note, wait, play the next"; you write what the music is, and Aratu works out when each sound happens.
Some consequences:
- The order of lines hardly matters. A motif may be used before it is defined, a pattern played before it is written. Aratu reads the whole text before playing (in programming, this is called hoisting).
- There are no changing variables, loops or
ifs. Repetition is already in time: every line goes back to its start by itself. Choice is{c|g}. Conditions are about time:at bar 9:,every 4 bars:. - The text is the single source of truth. Each edit makes Aratu read the whole text again. What the player keeps from one version to the next is little: the bar where each line written live started sounding.
Try it
tempo: 100
melody = | riff riff+1 riff+2 riff |
motif riff = [e4 d c d]Here the motif is written after the line that uses it, and it works.