[Top][All Lists]
[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
- Re: [proposal] easy triplets and tuplets - Draft 3, (continued)
- Re: [proposal] easy triplets and tuplets - Draft 3, David Kastrup, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, Werner LEMBERG, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, David Kastrup, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, Werner LEMBERG, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, David Kastrup, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, David Kastrup, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, Werner LEMBERG, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, Francisco Vila, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, Joseph Rushton Wakeling, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3, David Kastrup, 2012/10/10
- Re: [proposal] easy triplets and tuplets - Draft 3,
David Kastrup <=
- Re: [proposal] easy triplets and tuplets - Draft 3, Martin Tarenskeen, 2012/10/09
Re: [proposal] easy triplets and tuplets - Draft 2, Jonathan Wilkes, 2012/10/07