Skip to content

Make articulation-type a symbol? instead of a string?

This was an ancient TODO (see note from 2003 in scm/define-music-properties.scm). It does not seem to make much sense to rely on string comparison for distinguishing a well-defined set of articulation types. Also, the articulation-type is used as an alist index, for which symbols are much more natural than strings.

This also makes it easier to (for instance) let users enter lists of articulation types to use in custom code, since nowadays the parser turns

types = tenuto, fermata, espressivo

into a symbol-list?.

This commit also starts an obsoletion cycle for the outdated articulation definition style: As a legacy feature, it used to be possible to do

dashDash = "tenuto"

instead of the modern variants

dashDash = \tenuto
dashDash = #(make-articulation 'tenuto)

which are more in line with current LilyPond syntax principles. The legacy input still works but emits an obsoletion warning that may be removed later (e.g. for 2.26).

Lastly, the code handling scripts is made more robust: Choosing non-existing scripts now tends to emit warnings/programming errors instead of terminating.

Edited by Lukas-Fabian Moser

Merge request reports