"Keith OHara" <[email protected]> writes:
> duplet =
> #(define-music-function (parser location d music)
> ((ly:duration? #f) ly:music? )
> (if d
> #{\tuplet 2 $d $music #}
> #{\tuplet 2 $music #} ))
Just a note here: this can be done quite more concisely by writing
duplet =
#(define-music-function (parser location d music)
((ly:duration? *unspecified*) ly:music?)
#{ \tuplet 2 $d #music #})
I prefer using #music here since it preserves a 1:1 relation between
identifier and function argument (and saves a copying), while the whole
point of $d is to _not_ preserve a 1:1 relation, making $*unspecified*
disappear without a trace as opposed to what #*unspecified* would do.
--
David Kastrup
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel