Function summary | |
---|---|
articulate-bars | sequence &key (accent 'ten) (default '-) (parameter :articulation) (section nil) |
articulation-at-beginning | articulation sequence &key (default 'default) |
articulation-at-end | articulation sequence &key (default 'default) |
articulation-up-to-end | articulation sequence &key (default 'default) |
attribute-replace | new-old-list list-of-attributes |
attribute-substitution | new old list-of-attributes |
disassemble-articulations | art |
get-full-articulations | sequence |
merge-articulations | arts &key (empty-articulations '(- default)) |
omn-replace-articulation | new sequence |
text-attribute | &rest args |
zip-articulations | &rest arts |
Merges list of OMN articulations to a combined attribute.
arts: a list of OMN articulations
empty-attributes: articulations to ignore in a combination.
(merge-articulations '(ten ponte ubow)) => ten+ponte+ubow
(merge-articulations '(- stacc)) => stacc
(merge-articulations '(default default)) => default
(merge-articulations '(- -)) => -
NOTE: Meanwhile there is a buildin function join-attributes, which replaces this function.
Splits a combined OMN articulations into a list of its individual attributes.
(disassemble-articulations 'leg+ponte) => (leg ponte)
NOTE: Meanwhile there is a buildin function disjoin-attributes, which replaces this function.
Substitute all instances of `old' with `new' in `list-of-attributes'
(attribute-substitution 'pizz 'arco '(ten+arco pizz arco))
=> (ten+pizz pizz pizz)
Expects lists of articulations and combines them to a single list of merged articulations. Shorter lists are circled to the length of the longest.
If arts are list of lists, the result follows the nesting organisation of the first list.
(zip-articulations '(default leg leg default) '(breathy)) (zip-articulations '(- leg leg -) '(breathy)) (zip-articulations '(- leg leg -) '(-)) => (breathy leg+breathy leg+breathy breathy)
[Aux function] Similar to (omn :articulation sequence), but the result includes `leg' and `gliss' symbols for legato 'articulation', which are handled seperately by the function `omn'.
NOTE: as the implementation of omn is not necessarily stable, this function is breakable.
(get-full-articulations '((q g4 leg+gliss q a4 leg q b4 stacc) (q c4 ten q c5 trem) )) => ((leg+gliss leg stacc) (ten trem))
Returns a list of articulations spanning the given `sequence' (can be nested) with `articulation' at the beginning and `default' for the rest.
(articulation-at-beginning 'pizz '((q q e e) (h.))) => ((pizz default default default) (default))
BUG: May not work for OMN sequence.
Returns a list of articulations spanning the given `sequence' (can be nested) with `articulation' at the beginning and `default' for the rest.
(articulation-at-end 'pizz '((q q e e) (h.))) => ((pizz default default default) (default))
Does not work if last element in sequence is a rest.
May not work for OMN sequence.
Returns a list of articulations spanning the given `sequence' (can be nested) with `articulation' from the beginning to the but-last tone, which carries the default. This is useful for legato slurs over a sublist.
(articulation-up-to-end 'leg '((q q e e) (q q))) => ((leg leg leg leg) (leg default))
Convenient addition of arbitrary text directly the the score. Function transforms an arbitrary symbol, number or string or a list of symbols, numbers and strings into a an articulation symbol that is implicitly registered and can directly be added to an OMN note.
Definition currently only works with multiple integers or floats.
(text-attribute -7 2 13) => -7+2+13
(text-attribute 3.14 42) => 3.14+42
All these examples are not working.
(text-attribute "this is a test") (text-attribute 42) (text-attribute 'parameters -7 2 13) (text-attribute -7 3.14 16 1/3)
articulate-bars | sequence &key (accent 'ten) (default '-) (parameter :articulation) (section nil) | [Function] |
Add articulations at the first notes of bars (sublists), e.g, a tenuto on every first beat, and staccato otherwise.
sequence (sequence of length values or full OMN expression, must be nested): an accent is positioned on every first note in a bar (sublist).
parameter (:articulation or :velocity): which parameter to use for the articulations
accent (symbol): articulation to use on first notes of bars.
default (symbol): articulation to use for all other notes.
section (list of ints): position of sublists to process.
NOTE: with some rhythms and OMN input there seems to be some problem (too many accents), but workaround seems to be to use only rhythmic sequence (fractions).
(articulate-bars '((h h) (q q q q) (q q q q) (-q q) (q q q q)) :accent 'marc)
An example with a tie: existing articulations are preserved. However, in that case `sequence' must be a full OMN expression (i.e. include length and pitch values).
(articulate-bars '((h c4 h) (q q q q tie) (q q q q) (-q q) (q q q q)) :accent 'marc)
(articulate-bars (gen-repeat 3 '((s s s))) :accent 'f :default 'p :parameter :velocity)
Tmp fix for `omn-replace' for articulations, which takes ties into account. As a quick fix, this function does not support the params `section' and `exclude', but it works also for nested sequences.
NOTE: Function always returns a full OMN sequence, i.e., the default pitch c4 is added if no pitch is present in `sequence'.