(play! & body)
Evaluates some alda.lisp code and plays only the new events.
By default, each call to play!
uses a new score.
To append to an existing score (represented as an atom reference to a score
map), wrap multiple calls to play!
in (with-score <atom>)
.
To start a new score and append to it, use with-new-score
.
Both with-score
and with-new-score
return the score that is being
appended.
Evaluates some alda.lisp code and plays only the new events. By default, each call to `play!` uses a new score. To append to an existing score (represented as an atom reference to a score map), wrap multiple calls to `play!` in `(with-score <atom>)`. To start a new score and append to it, use `with-new-score`. Both `with-score` and `with-new-score` return the score that is being appended.
(play-score! score & [play-opts])
Plays an entire Alda score.
The score may be represented as a map of the form that results from evaluating alda.lisp code, e.g. (score (part 'piano' (note (pitch :c)))), or an atom referencing such a map.
Plays an entire Alda score. The score may be represented as a map of the form that results from evaluating alda.lisp code, e.g. (score (part 'piano' (note (pitch :c)))), or an atom referencing such a map.
(set-up! score & [audio-type])
Prepares the audio context of a score (creating the audio context if one does not already exist) to play one or more audio types.
score
is an atom referencing an Alda score map.
audio-type
(optional) is either a keyword representing an audio type, such
as :midi, or a collection of such keywords. If this option is omitted, the
audio types to set up will be determined based on the instruments in the
score.
Prepares the audio context of a score (creating the audio context if one does not already exist) to play one or more audio types. `score` is an atom referencing an Alda score map. `audio-type` (optional) is either a keyword representing an audio type, such as :midi, or a collection of such keywords. If this option is omitted, the audio types to set up will be determined based on the instruments in the score.
(tear-down! score)
Cleans up after a score after you're done using it.
Closes the MIDI synth, etc.
Cleans up after a score after you're done using it. Closes the MIDI synth, etc.
(with-new-score & body)
Starts a new score and appends to it each time play!
is used within this
scope.
Returns the score.
Starts a new score and appends to it each time `play!` is used within this scope. Returns the score.
(with-score score & body)
When play!
is used within this scope, appends to score
and plays any new
notes.
Returns the score.
When `play!` is used within this scope, appends to `score` and plays any new notes. Returns the score.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close