Beam direction of uneven triplets wrong

• Apr 28, 2015 - 15:25
Type
Functional
Severity
S4 - Minor
Status
closed
Project

See
triplet_beam.png
and attached score. The 16th beam should point left, just like in the non-triplet case.
The triplet looks wrong in 4/4 too, but the default beaming of the non-triplet case is different then.

Came up in https://musescore.org/de/node/42656

Attachment Size
Beam_Test.mscz 3.66 KB

Comments

I did make some changes to fix a number of issues with the direction of this beam betwene Beta 2 and the release, so yes, I can believe that.

But I'm not convinced the current behavior is incorrect. Or at least, I'm quite sure the second example is not a good argument in favor of this claim, as the notes are on completely different places relative to the beat. In the tuplet, the sixteenth note actually falls directly on the second eighth of the measure - the tuplet and dot cancel each other out, in effect. And a sixteenth on the second eighth of the measure *should* normally point right. Similar story in 4/4 - in that case, the sixteenth would literally be on the "&" of 1 and thus should point right.

So my read of the rules put forth by Elaine Gould in "Behind Bars" and the examples she gives on p. 157 suggests what we do here is actually correct. Does the OP in that thread have an authoritative source to say otherwise?

Again, though, I gave a very specific reference I have to *why* we do this. I am looking to see an equally / more authoritative reason to do something different - an actual clearly-stated rule quoted from an actual book to suggest that weither Gould is wrong or that my interpretation of her is wrong. I won't say Gould's giuidelines are 100% clearn and unamiguous, but they *do* seem to suggest to should point right here for the reasons I explained, and our algorithm implements her suggestion as well as I was able to. If I am to change the behavior, I need both a reason to believe Gould or my interpretation of her is incorrect, and just as importantly, I need a clearly stated alternative rule to follow instead.

Status (old) active needs info

Which is why I am classifying this as "needs info" - currently, there is not enough information available to be sure this is a bug, or to understand the exact rule being proposed we follow instead of Gould's.

I found a German translation of Gould's book in a local library. Page numbers seem to differ, so I assume you're referring to chapter 6, section 4.
I found two images in this section, which seemed important to me:
(1)
NOT FOUND: 01
This is the beaming she proposes for 3/8 and if the base beat is a dotted quarter. I.e. if there is a subdivision in 3.

The other example she gives:
(2)
NOT FOUND: 02 = dotted 8th + dotted 8th
This is a subdivision in 2.

Since a triplet's meaning is to force a subdivision in 3 where there would otherwise be one in 2 and thereby explicitly removing the stress on the second half beat, I see no reason to say using (1) in a triplet doesn't follow Gould.

Attachment Size
three.png 1.19 KB
two.png 1.23 KB

I am not quite sure what you mean in saying "a triplet's meaning is to force a subdivision in 3 where there would otherwise be one in 2 and thereby explicitly removing the stress on the second half beat". I don't think it's at all clear what the "meaning" of this triplet is, nor do I know of a way to code an algorithm to ascertain the "meaning" of any given tuplet.

To me, the first 6/16 example illustrates the overall principle she is espousing nicely: the partial beam should point in the direction of the beat it belongs to. The rule is *not* "partial beam always points to dotted note"; if it were, she would have stated it that way, and then figured out some way to explain the 6/16 case. It's all about what beat you belong to.

But it's true she doesn't go into any specifics about how tuplets might change things, and some other more comprehensive (!) source might. I'd want to see their specific recommendation, though. We clearly can't make a rule that says, partial sixteenth beam always point to dotted note. It's quite simply *wrong* in some cases as shown above, and in any case, such a rule wouldn't help if the dotted note and the sixteenth aren't adjacent, or indeed, if there no dotted note at all. What about sixteenth, eighth, sixtenth, eighth on that same tuplet? Should be some sort of special case to justify pointing the second sixteenth left even though it is smack dab on the "and" of 1 and should by all rights point right? If so, how would one word the rule, so that it could be turned into an algorithm? And could one give some objective basis for this?

Dont get me wrong, I can see why sometimes, subjectively, someone might think that for whatever reason, it might make their musical intent clear if the partial beam pointed the other way. Which to me says, we need a "mirror partial beam" function. Realistically, right now we couldn't really do this because we don't know *how* to draw beams the wrong direction in some cases (with muliple partial sub-beams, etc) - we would get "holes" in the partial beams if we tried. But it would be implementable for simple cases like this.

"The partial beam should point in the direction of the beat it belongs to." is indeed what I was trying to use here. But since Gould is not talking about tuplets and only giving two examples (one for three beats and one for two beats), the key question here seems to be:

How many beats has a triplet?

To me, a triplet consists of three "beats". So for the first measure in (1) the 16th belongs to the second beat and the beam needs to point backwards. You wrote that the triplet and the dotted 8th would cancel each other out; but that looks like a question of stress to me. So yes, it would theoretically be possible to write a 2 beat rhythm using a triplet, but if I was to read the rhythm we're talking about, I'd stress the last 8th and not the 16th and think of it as having three beats rather than two like this:
NOT FOUND: 01

Attachment Size
stress3.png 988 bytes

Hmm, my argument would be: an even triplet is 3 8th, now make the middle 8th 2 16th, then tie the 1st 8th and the 1st 16th. Now check the beam ;-)

odd-triplet.png

It's an interesting discussion, not one I think we can resolve ourselves. But FWIW as a player, I would definitely prefer see the beaming within the tuplet reflect the actual underlying beat structure. Questions of stress aside, it is useful for me to understand the rhythm and how it lays with whatever else is going on (eg, notes in my other hand, or other instruments in the ensemble).

I'd still like to hear a concrete proposal for what the algorithm actually should be for a tuplet so I have a basis for comparison. We can't just special case this one tuplet - I need a rule I can follow. And as I mentioned, "point in the direction of a dotted quarter if one happens to be around" won't cut it, as it is clearly wrong in some cases, and won't help in any case if no dotted notes are handy.

I do get the comment about the tied case, but the rules for partial beams are special and they differ for good reasons.

I was already trying to come up with a description of such an algorithm, when I noticed, that MuseScore currently doesn't beam (2) as in the image of Gould. I don't know if that's a problem.
Marc, can you point me at the position in the code where (partial) beaming is done?

The current algorithm takes your beam settings in the time signature properties into account when deciding how to point the partial beam - that's one of the heuristics it uses to determine what constitutes a "beat". Since there is no default 6/16 time signature, the beam will depend on how you set this up when you create it. But I'm not sure there is a way to explicitly tell MuseScore you want 6/16 to be interpreted as duple in the way her example suggested. Even if you set the beaming of the sixteenths in two groups of three, it will still see the three eighths beamed together. I think this is just a limitation in the current system for settings default beaming. But still, I take that example to apply to the situation at hand - 4/4 *is* duple, not compound.

Anyhow, most of the relevant code for handling the partial beam is here:

https://github.com/musescore/MuseScore/blob/e5c70a3ad6d2c0458c065261fb6…

As you can see, it's a bit complex in that there are quite a number of different heuristics being followed already to handle a number of different corner cases. Here are the vtests you'd have to be especially careful not to break:

http://vtest.musescore.org/e5c70a3a/vtest.html#beams-10
http://vtest.musescore.org/e5c70a3a/vtest.html#beams-11
http://vtest.musescore.org/e5c70a3a/vtest.html#beams-15
http://vtest.musescore.org/e5c70a3a/vtest.html#beams-16
http://vtest.musescore.org/e5c70a3a/vtest.html#beams-17

But the code is pretty well commented, and the good news is as far as changes go, if we limit changes to notes within tuplets, it's not likely to break *too* much else :-)

FWIW, my take on a simplistic algorithm might be to tap in here:

https://github.com/musescore/MuseScore/blob/e5c70a3ad6d2c0458c065261fb6…

and precede that final "else" clause with something like

if (cr1->tuplet()) {
     take start tick, subtract start tick of tuplet to get offset within tuplet
     multiply that by the ratio to get a "logical" start tick for the note
     take the nominal duration (sixteenth in this case) and double it (eighth)
     if the "logical start tick" for the note is not a multiple of the doubled nominal duration
           len = -len (point left)
     }

The idea basically being, sixteenths not starting on an eighth note boundary will point left. This is probably too simplisitic, but it's the sort of thing I'd be looking at if I were convinced this were the right thing to do.

Actually, this is more or less already what that final "else" clause does - except it does not factor in the start of tuplet offset or the ratio. Instead of looking at the start tick, it looks at the end tick, but I think the goal is the basically similar. This code is a holdover from before I started hacking on it and I believe we don't we actually reach this clause except in cases where we really have no intention of flipping that beam, although I'm not sure about that. Anyhow, could be worth playing with this code and just modifying it as suggested.

Thanks for the hints.
I was actually thinking in the same direction, and I just wondered, why (because it seemed to be done for 3/8) it wouldn't already work for tuplets, and I just noticed, that duration.ticks() does not take tuplet ratios into account.
I added debug prints and it produces these numbers for the 16th note:
measTick=0, tickNext=320, tickMod=240, mod=80, duration.ticks=240

You can see, that tickNext actually is the real (tuplet aware) tick, but tickMod is not.
So I'll try some things here. Let's see if I can come up with something useful.

FWIW, I think Sibelius messes up #1 (response #8) - for the second measure, it points the partial beam left. I think that's pretty clearly wrong. So I wouldn't put too much stock in how it happens to handle tuplets, either. I think this really just underscores the desire to eventually add a mirror command for these partial beams.

2 additions from https://musescore.org/de/node/42656:
1st, heuchi found a workaround to make that triplet look like the original poster wants, by changing the 3rd 8th's beaming to a 16th subbeam.
2nd: the original poster claimes to see this notation in numerours score from Strawinsky / Bärenreiter and AE, old and new.

Is this still being considered? I've found a few examples to support the request and no examples of the case where the flag points to the right.

My understanding of the theory of triplets is that they are identical to the same rhythm in compound time. Triplet rhythms in 2/4 time should be grouped in the same way as in 6/8.

Ex 7.png

It is interesting that as you type the second note of the triplet the flag points to the left but when you add the third note, the flag is rewritten to the right.

As a player, if I saw the rhythm as MuseScore displays it I would play it as a duplet with the second half divided into semiquaver triplets, and a slight emphasis on the semiquaver.

Examples:

Ex. 1 Abraham Baer, Baal T'Fillah (Verlag von J. Bulka in Nurnberg, 1930)

Ex 1.jpeg

Ex. 2 Hans Werner Henze, Royal Winter Music (Schott, Mainz, 1976)

Ex 2.jpeg

Ex. 3 Arnold Schoenberg, Wind Quintet (Philharmonia, Austria, 1952)

Ex 3.jpeg

Ex. 4 Eric Taylor, The AB Guide to Music Theory (Associated Board, Great Britain, 1989)

Ex 4.png

Ex. 5 Gardner Read, Modern Rhythmic Notation (Gollancz, London, 1980)

Ex 5.jpeg

Hope that helps.

Myer

I had the impression that heuchi was going to try to look at this, not sure if that's the case or not. I wasn't planning on it, but could if no one else does.

OK, then I will see what I can do. I am now sufficiently convinced that even if we cannot come up with a general rule to follow that always gives the "right" answer, we can improve this particular case.

Status (old) needs info active

I would like to propose the following compromise:

Using Gould's rule that says a partial beam should point in the direction of the "beat" it belongs to, I will take this to mean the "real" beat (which is what we do currently) only if the tuplet numerator is even. In these cases, the midpoint of the tuplet arguably *is* important (eg, a sextuplet that is parsed as 3+3). For odd tuplet numerators, I will use the "scaled" beat.

Using the example in #20, that means the partial beam will point left, as everyone here agrees they want it. The triplet has three "scaled" beats (eighth notes 1+1+1), and the sixteenth belongs to the second of these. Whereas if I create that exact same rhythm as a sextuplet, the sixteenth will point right, because when I look at the "real" beat, that note falls directly on the "and". The rationale here here is that even-numbered tuplets can be and often are parsed in that way and thus the real "and" is significant in a way it isn't for odd-numered tuplets. And it gives us a way of getting either behavior: use triplet to point it left, sextuplet to point it right.

I don't know that what I just said will make sense to anyone, but the code I have to implement it seems to work and will not affect anything but tuplets, so if there are no strong objections, I'll submit a PR after some more testing.

Thanks all for staying on this, and sorry I didn't "see the light" right away. In hindsight, the clue - which I didn't even really notice until just now after coming up with my "compromise" independently - was in comment #8 above. Gould showing 3/8 beamed one way, 6/16 another, and this exactly mimics what have done with triplets versus sextuplets. I now feel better that this isn't just a compromise but really is the most "correct" interpretation.