(apply-attribute {:keys [beats-tally] :as score} inst attr val)
Given an instrument map, a keyword representing an attribute, and a value, returns the updated instrument with that attribute update applied.
Given an instrument map, a keyword representing an attribute, and a value, returns the updated instrument with that attribute update applied.
(get-attr kw)
Given a keyword representing an attribute (which could be an alias, e.g. :quant for :quantization), returns the attribute map, which includes the attribute's keyword name (e.g. :quantization) and its transform function.
The transform function is a higher-order function which takes a new, user-friendly value (e.g. 100 instead of 1.0) and returns the function to apply to an instrument's existing value to update it to the new value. (See alda.lisp.attributes for examples of transform functions.)
Throws an exception if the argument supplied is not a valid keyword name or alias for an existing attribute.
Given a keyword representing an attribute (which could be an alias, e.g. :quant for :quantization), returns the attribute map, which includes the attribute's keyword name (e.g. :quantization) and its transform function. The transform function is a higher-order function which takes a new, user-friendly value (e.g. 100 instead of 1.0) and returns the function to apply to an instrument's existing value to update it to the new value. (See alda.lisp.attributes for examples of transform functions.) Throws an exception if the argument supplied is not a valid keyword name or alias for an existing attribute.
(get-val-fn attr val)
Given an attr (e.g. :tempo) and a user-friendly val (e.g. 100), returns the function to apply to an instrument's existing value to update it to the new value.
Throws an exception if the argument supplied is not a valid keyword name or alias for an existing attribute.
Given an attr (e.g. :tempo) and a user-friendly val (e.g. 100), returns the function to apply to an instrument's existing value to update it to the new value. Throws an exception if the argument supplied is not a valid keyword name or alias for an existing attribute.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close