(add-event {:keys [instruments events markers] :as score}
{:keys [instrument offset] :as event})
(update-master-tempo-values score)
In an Alda score, each part has its own tempo and it can differ from the other parts' tempos.
Nonetheless, we need to maintain a notion of a single "master" tempo in order to support features like MIDI export.
A score has exactly one part whose role is the tempo "master".
The master tempo is derived from local tempo attribute changes for this part, as well as global tempo attribute changes.
In an Alda score, each part has its own tempo and it can differ from the other parts' tempos. Nonetheless, we need to maintain a notion of a single "master" tempo in order to support features like MIDI export. A score has exactly one part whose role is the tempo "master". The master tempo is derived from local tempo attribute changes for this part, as well as global tempo attribute changes.
(update-score score event)
Events in Alda are represented as maps containing, at the minimum, a value for :event-type to serve as a unique identifier (by convention, a keyword) to be used as a dispatch value.
An Alda score S-expression simply reduces update-score
over all of the
score's events, with the initial score state as the initial value to be
reduced.
Lists/vectors are a special case -- they are reduced internally and treated as a single 'event sequence'.
Events in Alda are represented as maps containing, at the minimum, a value for :event-type to serve as a unique identifier (by convention, a keyword) to be used as a dispatch value. An Alda score S-expression simply reduces `update-score` over all of the score's events, with the initial score state as the initial value to be reduced. Lists/vectors are a special case -- they are reduced internally and treated as a single 'event sequence'.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close