bug-lilypond
[Top][All Lists]
Advanced

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

Re: Implementation of \tuplet allow both incorrect and correct musical e


From: Simon Albrecht
Subject: Re: Implementation of \tuplet allow both incorrect and correct musical expressions
Date: Tue, 24 Mar 2015 11:41:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hello Ralph,

you’ll be interested in reading <http://lilypondblog.org/2014/09/how-to-write-readable-tuplets/>. Indeed, the behaviour you describe is intentional in that Lily holds the user responsible to write sensible tuplet code, since there are different conventions, not only the one you describe below. So, no bug here.

HTH,
Simon

Am 24.03.2015 um 07:18 schrieb Ralph D. Jeffords:
I'm not top posting.
%{  MAJOR ERROR in implementation of Tuple:

   The tuple construct allows not only correct expressions but a multitude of
incorrect expressions for the same musical construction. "1st Test" shows  5
different expressions that give the same MIDI output, but only one of which
is correct.

Worse yet with the incorrect expressions, there may be multiple tuple
expressions resulting in identical music expressions, but result in
different MIDI interpretation (see "2nd test")

The solution for ruling out bogus tuples of the form  " \tuple  n/d  { _m
... }"  (where d/m is the duration for the tuple and _m indicates the
inverse duration expression for the first note of the body for the special
case when d and m are both powers of 2 is that you must have 2^floor(lg n) =
d. This correctness criterion follows from the following observation (for
the special case where duration = 1 quarter note) which is easily
generalized to durations of whole note, half note, quarter note, eight note
etc.:
(n,d,m)
-------

(1,1,4)   (single quarter note)

(2,2,8)   (two 8th notes)

(3,2,8)   ( three nominal 8th notes in notation grouped as 3 )

(4,4,16)  ( four 16th notes)

(5,4,16)  ( 5 nominal 16th notes in notation grouped as 5)

(6,4,16)  ( 6 nominal 16th notes in notation grouped as 6)

            == (3,2,16) (3,2,16) twice three nominal 16ths grouped as 3

(7,4,16)  ( 7 nominal 16th notes in notation grouped as 7)

(8,8,32)  ( 8 32nd notes ) etc.

The important property to note is that all notes from some standard form
(i.e. n is a power of two) up to (but not including) the next standard form
use the same nominal form for each note as that of the first in the group,
e.g.  tuplets  5/4 to 7/4 all use notes that look like 16th notes, the same
as 4/4.

The more general case is not addressed (see "3rd test") and requires further
investivation.

%}

\version "2.18.2"

\score {

\relative c'' {
    \clef "treble"
    \key c \major
    \time 2/4
    \tempo 4 = 60

\tuplet 5/16 { c,64_"Ugly"^"1st Test"   d e f g }

\tuplet 5/8 { c,32_"Bad"   d e f g } |

\tuplet 5/4 { c,16_"Good" d e f g }  %Like 4 16ths, but one extra note

\tuplet 5/2 { c,8_"Bad"   d e f g } |

\tuplet 5/1 { c,4_"Bad"   d e f g } r4 |

r2  |  \bar "|"

\tuplet 5/4 { c,8_"Good"^"2nd Test"  d e f g } |

\tuplet 5/2 { c,8_"Bad" d e f g }

\tuplet 5/2 { c,8_"Bad" d e f g } |

r2 | \bar "|"

\time 3/4

\tuplet 5/12 { c,16_"Bad"^"3rd Test" d e f g } |

\tuplet 5/6  { c,8_"Bad" d e f g } |

\tuplet 5/3  { c,4_"Good" d e f g } | %Like 3 quarters, but two extra notes


} %relative

\layout { }
\midi { }

} %score



_______________________________________________
bug-lilypond mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-lilypond




reply via email to

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