lilypond-devel
[Top][All Lists]
Advanced

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

Re: [proposal] easy triplets and tuplets - Draft 3


From: David Kastrup
Subject: Re: [proposal] easy triplets and tuplets - Draft 3
Date: Tue, 09 Oct 2012 09:45:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

"Keith OHara" <address@hidden> 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




reply via email to

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