Liking cljdoc? Tell your friends :D

alda.lisp.model.attribute


*attribute-table*clj

source

apply-attributeclj

(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.
sourceraw docstring

get-attrclj

(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.
sourceraw docstring

get-val-fnclj

(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.
sourceraw docstring

log-attribute-changeclj

(log-attribute-change {:keys [id] :as inst} attr old-val new-val)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close