abcjs
abcjs copied to clipboard
Tuplets: playback and/or display wrong if p or r are set to 1
We're facing some slight issues when playing around with general tuplets according to https://abcnotation.com/wiki/abc:standard:v2.1#duplets_triplets_quadruplets_etc
Example 1:
X:1
T: (3:2:1
M:3/4
L:1/8
K:F
V:1
cccc cc | dddddd |
eeeeee |
V:2
CCCC (3:2:1C3 | DDDDDD |
EEEEEE |
-> if r=1 the printed score is correct, but the playback is not as expected.
Example 2:
X:2
T: (1:2:2
M:3/4
L:1/8
K:F
V:1
ccccc2c2 | dddddd |
eeeeee |
V:2
CCCC (1:2:2CC | DDDDDD |
EEEEEE |
-> if p=1, display and playback are not as expected.
In this 2nd example we get error messages
Both examples work in EasyABC.
Does abcjs in general not support tuplets with p=1?
Thanks in advance!
That's likely a bug. I'll research it.
Thank you!
Von: Paul Rosen @.> Gesendet: Dienstag, 9. April 2024 00:02 An: paulrosen/abcjs @.> Cc: Dreier-Andres Wolfgang @.>; Author @.> Betreff: Re: [paulrosen/abcjs] Tuplets: playback and/or display wrong if p or r are set to 1 (Issue #1007)
That's likely a bug. I'll research it.
— Reply to this email directly, view it on GitHubhttps://github.com/paulrosen/abcjs/issues/1007#issuecomment-2043713782, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQNKUDK6PPPNQNBU4AQ3VIDY4MHVFAVCNFSM6AAAAABFVQLGJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBTG4YTGNZYGI. You are receiving this because you authored the thread.Message ID: @.***>
The first example does look like a bug, but there's something I don't get. Isn't (3:2:1C3 the same as C2 and that would be easier to read? Why would it ever be useful to have one as the last number?
The standard says: (p:q:r which means 'put p notes into the time of q for the next r notes'.
In the second example, I guess I'm not up on my music theory enough to understand it. So you want the number "1" to print over the two "C" notes. But if I'm figuring it right, the length of the "C" isn't changed so the time would be the same as if you hadn't used the (1:2:2 at all. What am I missing?
Hi Paul,
Wolfgang Dreier asked me to answer your question directly, so here it comes. (I will also send this by e-mail to Wolfgang)
- First I want to tell why I am using the (p:q:r construct in my abc-notations
There are several cases where music notation in given sources (often handwritten, sometimes also in print) does not add up to the expected durations. As long as this music is not played this does not cause troubles.
In the moment this gets transcribed to abc-noation the music also can be played back. Now the durations matter (and I get complaints if the sound is not rigth).
My aim in transcribing sources is to keep the music as seen in the source. Combined with the need to decide about a duration for playback I found the possibility available in (p:q:r to change durations without changing the displayed note.
A very typical example is
X:1 K:C M:2/4 L:1/8 | c6 ccc |
often found, but obviousely | c6 ccc | counts nine notes not eight. Written or in print no problem, only the performing musicians have to decide about a common interpretation.
In the moment something like | c6 ccc | is in a multivoice score the ninth note may cause a problem in synchronisation of the music following. So I as transcriber have to decide for a solution.
At the same time I want to pass on the original notation so users can see what was there in the source. That is why I use the (p:q:r construct. It preserves the original note lenght as seen in the source but plays back the way I decided.
By the way for | c6 ccc | I see at least the following possibilities:
| c6 (3ccc | (acellerating the last three 1/8 to a triole) | (6:5:1c6 ccc | (shortening the 1/2 note but keeping the 1/8-Puls) | (9:8:4c6 ccc | (an accellerando keeping the bar durations constant) | c6 ccc | (the bar being a longer, a written out rubato)
If I decide for | (6:5:1c6 ccc | I need (p:q:1
Isn't (3:2:1C3 the same as C2 and that would be easier to read? Why would it ever be useful to have one as the last number?
My usage of (3:2:1C3 is to allow keeping/following/displaying the duration of the historical notation in the black dots representation, while getting the sound representation as intendend/deduced. (In multivoice music, doing nothing would cause the playback to lose the common beat.)
To clear up display I generally combine the tuplet notation with hiding the tuplets properties by using the I:tuplets mechanism - which is obviously not available in abcjs - at least no values I entered causes any change - and I still could not figure out where to find the manual. (this would then be a feature request, to implememt the functionality of tuplet display control)
The problem is, that I got complaints about the (p:q:r notation, because it was not treated correctly by abcjs - but this notation is fully covered by the standard as you know. So I developed the examples you know to report.
The standard says: (p:q:r which means 'put p notes into the time of q for the next r notes'.
Well, that is what it is. There is no limit set about the numbers and I use this feature of the standard in my work and need it to work.
In the second example, I guess I'm not up on my music theory enough to understand it. So you want the number "1" to print over the two "C" notes. But if I'm figuring it right, the length of the "C" isn't changed so the time would be the same as if you hadn't used the (1:2:2 at all. What am I missing?
The p:q of the standard states a proportion. 1:2 should give the same as 3:6 or 11:33. That is not a mater of music theory but a matter of mathematics.
so, the lenght of "C" IS changed, it gets multiplied by the quotient of p:q. (this is the same for the first example)
Not allowing (1:q requires the use of higer digits to achive the same ratio. If my desired ration would be 1:n for example 1:3 then I have to use 2:6 instead.
The full usability of this notation naturally only comes together with a programs ability to display the ratio. But every program at least should be able to handle what is stated the standard. If with the limitations of abcjs this is to draw a (1, (3, or (11 on top of a tuplet and no ratio, so it is.
As you know, the "r" in (p:q:r tells for how many of the following abc notes the calculated quotient applies. This is because the interpreting program by no other meanings could calculate for how long to apply the quotient.
(3:2:3ccc and (3:2:3c4c4c4 or (3:2:3 c/c/c/ and even (3:2:3cc2c3 can be handled. Or, as in my example (3:2:1c and even (1:5:1c
Hope that helps, and please could you point me to the documentation of abcjs, especially the I:tuplets
Thanks, Simon