lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use make-music?


From: David Kastrup
Subject: Re: How to use make-music?
Date: Fri, 20 Dec 2019 13:41:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Peter Toye <address@hidden> writes:

> Thee are many examples of the use of the make-music function in NR and
> Snippets, but I cannot find any reference to its definition in LR, NR
> or IR. I can use the examples to do what I want, but I'd like to know
> a bit more about how it works. Is there a definition of it and its
> parameters anywhere (apart from delving into the code)?

Sometimes delving in the code just to discover comment strings/comments
is not the worst idea with LilyPond.

scm/define-music-types.scm:

(define-safe-public (make-music name . music-properties)
  "Create a music object of given name, and set its properties
according to @code{music-properties}, a list of alternating property symbols
and values. E.g:
@example
  (make-music 'OverrideProperty
              'symbol 'Stem
              'grob-property 'thickness
              'grob-value (* 2 1.5))
@end example
Instead of a successive symbol and value, an entry in the list may
also be an alist or a music object in which case its elements,
respectively its @emph{mutable} property list (properties not inherent
to the type of the music object) will get taken.

The argument list will be interpreted left-to-right, so later entries
override earlier ones."

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]