Music as values: notes and rests joined one after another or at once, repeated, moved and placed, and played by parts.
Every function returns a value and records nothing on the side, and raises ArgumentError as soon as what it is given cannot play: note refuses an unknown name, part a note its synth cannot play, together two parts of one name, and song a note outside any part.
The song file's loader finds the line in the stacktrace of that error.
A song's music is split into sections, the items of its outermost seq, looking through repeat.
Each part becomes a loop whose pass n plays that part's notes in section n, so every part's pass ends where a section ends, and a saved version takes over there.
Summary
Functions
Music lasting some beats whose items start at their beats from its start, given as {beat, music}.
The length of the music in beats, or :infinity for music that plays until mx stops.
A change to every sound of a part still playing, or with {part, effect} to one of its effects, taking no time.
Raises ArgumentError naming the value unless it is an integer from low to high.
The music after some beats of silence.
A hit of a drum at its own pitch, taking no time, with options for the part's synth.
Records a song into the song being loaded: its settings, and a loop for each of its parts.
Music that runs the function with the pass number and the inputs every beats beats, and plays the music it returns; times: plays a number of passes, and on:, given instead of beats, plays a pass on each input it waits for.
A MIDI note on, and its note off after some beats, taking velocity: and channel:.
A MIDI controller change, taking channel: and no time.
A note of a pitch, given as a name, a number or a list of them, lasting some beats, with options for the part's synth.
An OSC message to the song's osc_to, taking no time.
Music played by one player, refusing a synth mx does not have and a note the synth cannot play.
The number of a note name, or the number itself.
Music played again and again until mx stops.
Music played a number of times in a row.
Records pass n of a part's music: its notes in section n, and the passes its loops play there, going round again after the last section of music that repeats until mx stops.
Silence lasting some beats.
A sample of the pack by name, a WAV, AIFF or FLAC file by path, or a file of a GitHub repository as {:github, repo, ref, path}, lasting some beats, refusing a sample mx cannot find and an option samples do not take.
Music played one item after another; an item given as {name, beats} is a note, and as {:r, beats} a rest.
A value shared with every loop from its next pass, taking no time.
The song, refusing a note outside any part, a part of one name played with other options, and repeat with no count anywhere but around the whole music.
The sounds of a pattern, each character of a string or each word of ~MX lasting a step of beats; a list of strings is one bar after another.
The music with each note started at the beat the function returns for the beat it was written on, its length unchanged.
A change of every part's tempo to some beats per minute, at once, or with over: evenly over that many beats, taking no time.
Music whose items all start at once, as long as the longest, refusing two parts of one name among them.
The music moved by a number of semitones, every note moved and nothing else changed.
Functions
Music lasting some beats whose items start at their beats from its start, given as {beat, music}.
The length of the music in beats, or :infinity for music that plays until mx stops.
A change to every sound of a part still playing, or with {part, effect} to one of its effects, taking no time.
Raises ArgumentError naming the value unless it is an integer from low to high.
The music after some beats of silence.
A hit of a drum at its own pitch, taking no time, with options for the part's synth.
Records a song into the song being loaded: its settings, and a loop for each of its parts.
Music that runs the function with the pass number and the inputs every beats beats, and plays the music it returns; times: plays a number of passes, and on:, given instead of beats, plays a pass on each input it waits for.
A MIDI note on, and its note off after some beats, taking velocity: and channel:.
A MIDI controller change, taking channel: and no time.
A note of a pitch, given as a name, a number or a list of them, lasting some beats, with options for the part's synth.
An OSC message to the song's osc_to, taking no time.
Music played by one player, refusing a synth mx does not have and a note the synth cannot play.
The number of a note name, or the number itself.
Music played again and again until mx stops.
Music played a number of times in a row.
Records pass n of a part's music: its notes in section n, and the passes its loops play there, going round again after the last section of music that repeats until mx stops.
Silence lasting some beats.
A sample of the pack by name, a WAV, AIFF or FLAC file by path, or a file of a GitHub repository as {:github, repo, ref, path}, lasting some beats, refusing a sample mx cannot find and an option samples do not take.
Music played one item after another; an item given as {name, beats} is a note, and as {:r, beats} a rest.
A value shared with every loop from its next pass, taking no time.
The song, refusing a note outside any part, a part of one name played with other options, and repeat with no count anywhere but around the whole music.
The sounds of a pattern, each character of a string or each word of ~MX lasting a step of beats; a list of strings is one bar after another.
The music with each note started at the beat the function returns for the beat it was written on, its length unchanged.
A change of every part's tempo to some beats per minute, at once, or with over: evenly over that many beats, taking no time.
Music whose items all start at once, as long as the longest, refusing two parts of one name among them.
The music moved by a number of semitones, every note moved and nothing else changed.