On 23/09/12 22:45, Graham Percival wrote: > This is an informal chat idea, following David's latest suggestion > that such emails could go on -devel instead of requiring a separate > mailing list. I fully expect this not to work. > But let's give it a go anyway.
I have a few concerns, but these are mostly semantic i.e. "what is this in terms of what we are trying to express in the language. > > Currently, durations are limited to powers of 2 (plus dots). Making > a triplet involves the wordy \times x/y { ... } or a *x/y scaling > factor. We could avoid this (in common cases) by allowing > arbitrary integer durations. > > c4 e \times 2/3 { c4 e g } into: c4 e c6 e g > > The general rule is that the duration x is (whole note)/x. So in > addition to the current 1 2 4 8 we have 3 => \times 2/3 { c2 } > (whole note divided by 3) 6 => \times 2/3 { c4 } (whole note > divided by 6) ... etc. You need at least three in your new series to make it unambiguous 12 => \times 2/3 { c8 } (whole note divided by 12) > > These notes can be grouped together like we do for beaming, and > produce tuplet brackets according to tuplet-beaming rules. > Advantages: 1. Quicker note entry for triplet quaver and crotchet groups. 2. It is considerably less opaque and cryptic-looking than the other alternative to \times 2/3 { ... } c8*2/3 c c . Drawbacks: 1. The current wordy syntax is explicit. You specify the ratio of notes contained in the tuplet as a / b where the fraction determines how many written notes (fraction denominator) are written in the time of how many 'real' notes in the current time signature. This change only accommodates triplets. 2. The current syntax is delimited. You specify exactly how many notes are to form the tuplet by enclosing them in sequential music delimiters '{' and '}'. The proposed syntax does not explicitly indicate where the 'tupleted' notes begin and end. 3. The proposition may not explicitly address the commonest triplet group \times 2/3 {c8 c c}, would it cater for this as c12 c c ? 4. Other common tuplets are not handled by this proposition (e.g. \times 4/5 { ... } - obvious, but needs stating). 5. How do these 'implicit triplet' durations interact with \times, e.g. when they are nested as in the N.R. 1.2.1 example 2: \autobeamOff c4 \times 4/5 { f8 e f e6[ f g] } f4 6. How do we make it clear to new users that 'c6' is different from 'c4.'? After all, the duration of the note is the same as our durations are an implicit 1/n (i.e. c4 = c with 1/4 note duration), and the . means 150% of 1/n. 7. Are the new triplet duration-lengths consistent, extensible and easily explicable to new LilyPond users in the LR? I suspect the answer to this is yes as we only support powers of two (2, 4, 8 ...) to represent durations now, and I presume we would also have a parallel 'triplet' series (2*1.5, 4*1.5, 8*1.5 ... ) to represent the 'tripleted' durations. Opportunities: 1. Implement as a \triplet music function to give triplet = (define-music-function (parser location tuplet-music) (ly:music) #{ \times 2/3 $tuplet-music }# \triplet {c2 c c} ; (for c3 c c in the proposition) or \triplet {c4 c c} ; (for c6 c c in the proposition) and \triplet {c8 c c} ; (not mentioned explicitly in the proposition) Threats: 1. Is LilyPond's conception of note duration extensible enough to cope with the new note lengths? 2. Interaction with beaming and auto-beaming, are we going to generate a whole slew of properties needing to bet \overridden or \set in order to control how the implicit tuplet notes are beamed? > > I know that this idea has been floated at least twice in the past > ten years, but since this is only a [talk] idea, I'm not going to > bother looking up those discussions in the archives. Remember that > you're not allowed to call me a lazy idiot for not looking up those > discussions because this isn't a formal proposal. This email > thread should have "the casual atmosphere of a friendly discussion > at a pub or coffee house", and that nobody "will complain about > technically infeasible ideas, wasting developer’s time, having to > defend the parser, or anything like that". > > - Graham I think we have potentially two propositions which could emerge from this. Both of these can co-exist together. 1. Provide a triplet shorthand - discussion point, do we add a whole slew of new duration values for users to learn which are relevant to triplets, but which can save them some typing, or do we add a \triplet command? 2. Make the \times command more musician-friendly and less of a potential confusion with \time. Potentially replace with a \tuplet command e.g. \times 2/3 {c8 c8 c8] becomes \tuplet 3/2 {c8 c8 c8} % because musicians think of the tuplet as % three-eighth-notes-in-the-time-of-two. or \tuplet 2/3 {c8 c8 c8} % if we want to preserve 'this is a better % way of writing c8*2/3 c c' Hope this hasn't torpedoed your trial, Graham. Cheers, Ian _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel