Jump to content

Representation/rendering Of Triplets In Abc


Roger Hare

Recommended Posts

I've just had occasion to use a triplet for the first time in an ABC script, ie:

 

(3ABc

 

It looks OK in the score, but sounds rotten when I play back the MIDI representation

[I'm using EasyABC] - the three notes are not the same duration.

 

If I 'fudge' it - (3AB<c - it is better, but still not good [and strictly is not 'correct' ABC?

As I understand it, the notes are intended to be the same length, and should be

specified as such in the code].

 

As far as I can see, using the full form of tuplet specification:

 

(a:b:c

 

wouldn't help here.

 

Any suggestions for ensuring that the three notes of a triplet can be forced to be of

the same duration on playback? Or is this just a 'feature' of EasyABC?

 

Thank you.

 

Roger

Edited by lachenal74693
Link to comment
Share on other sites

I don't think there's anything wrong with (3AB<c - I just tried it on both BarFly and abcm2ps and it works fine on both.

 

But if abc2midi doesn't play the three notes in (3ABc as the same length, it's a bug. abc2midi has always been the most infuriatingly bug-ridden piece of widely adopted ABC software.

Edited by Jack Campin
Link to comment
Share on other sites

I don't think there's anything wrong with (3AB<c - I just tried it on both BarFly and abcm2ps and it works fine on both.

 

But if abc2midi doesn't play the three notes in (3ABc as the same length, it's a bug. abc2midi has always been the most infuriatingly bug-ridden piece of widely adopted ABC software.

 

Thank you for taking the time to investigate my query!

 

I haven't, so far, investigated the underlying components of EasyABC, other than to confirm

that abcm2ps works 'as advertised'. Perhaps it's time I did, and looked at the functioning of the

other components such as abcmidi.

 

I based my idea that (3AB<c was 'wrong' on the fairly unambiguous statement in Gonzato's

manual that "The notes in a tuplet must have the same length." (page 19 of the current version).

If that is itself inaccurate (and there doesn't seem to be any other reason that notes in a triplet

(tuplet) can not be of differing lengths), then 'Bob's yer uncle'.

 

I wasn't aware that abcmidi was 'buggy'. Useful qualitative information to bear in mind for

the future, and I'll stick with the better-sounding(3AB<c in my transcription...

 

Edit: I've now looked at the ABC2.2 spec(http://abcnotation.com/wiki/abc:standard:v2.2), and

in section 4.13, in the discussion relating to tuplets, although it's talking about a different method

of specifying different-length notes, there is a paragraph beginning "This can be useful to

include notes of different lengths within a tuplet", so clearly it is permissible.

 

Job done!

 

Thanks again.

 

Roger

Edited by lachenal74693
Link to comment
Share on other sites

I've just had occasion to use a triplet for the first time in an ABC script, ie:(3ABc

 

It looks OK in the score, but sounds rotten when I play back the MIDI representation

[I'm using EasyABC] - the three notes are not the same duration.

 

Can you post the full tune abc you are using? I have used triplets in abc in several tunes and not had problems with them being played unevenly.

Link to comment
Share on other sites

Can you post the full tune abc you are using? I have used triplets in abc in

several tunes and not had problems with them being played unevenly.

 

I've sent you the ABC script as a PM - because I'm a little twitchy about publishing a

script based on what may be copyright material on the public forum. Hope that's OK?

 

Roger.

Edited by lachenal74693
Link to comment
Share on other sites

I've sent you the ABC script as a PM ...

Interesting. Those triplets play smoothly if played with ABCExplorer, but unevenly if played with EasyABC.

 

The key thing about your abc is that it has a R:Hornpipe indication in the header. This can be used by abc2midi as an indication that the tune should be swung,

lengthening the first and shortening the second of each pair of quavers (eight notes) - like saying THURSday, THURSday, THURSday, THURSday.

 

Usually this swinging is only applied to 4/4 (C or Common time) hornpipe tunes, and yours is in 2/2 (C| or Cut time), so ABCExplorer doesn't swing any of it.

However EasyABC does swing the pairs of quavers, and it also swings the triplets.

 

Simple solution - change the R: line to March, or to ".Hornpipe", indeed anything other than "Hornpipe" or "HP", which would remove the swinging.

 

If you want the quavers swung and the triplets not, then ABCExplorer does that as standard for 4/4 hornpipes - I leave it to others to argue whether or not such triplets should be swung in swung hornipes!

 

I do believe there are bugs in EasyABC in this area - it seems to swing hornpipes if the M: is M:4/4, but not if it is M:C, which I believe should always be identical.

For cut time, it does the opposite - swings for M:C|, but doesn't for M:2/2. This must be wrong?

If you want to test yourselves, here is a minimal tune - change the M: line between 4/4, C, 2/2, and C|. Change the R: line from Hornpipe to March or similar.

 

X:1
T:Triplet and Swing Test
M:C|
L:1/8
Q:1/4=100
R:Hornpipe
K:G
B,2 |"Em"E2 E2 E2 E2| E2 EE E2 EE | EE EE EE EE | (3EEE (3EEE (3EFG (3ABc |E4 E2:||
Edited by Paul_Hardy
Link to comment
Share on other sites

This follow-up is a little shorter than it would have otherwise been - I just lost the lot for no apparent reason!!

2nd attempt coming up...

 

Thank you folks for the informative follow-ups (follows-up?) to my OP.

 

(1) Interesting. Those triplets play smoothly if played with ABCExplorer, but unevenly if played with EasyABC.

 

(2) The key thing about your abc is that it has a R:Hornpipe indication in the header...Simple solution - change

the R: line to March, or to ".Hornpipe", indeed anything other than "Hornpipe" or "HP", which would remove

the swinging.

(3) I do believe there are bugs in EasyABC in this area - it seems to swing hornpipes if the M: is M:4/4, but not

if it is M:C...Change the R: line from Hornpipe to March or similar.

 

Taking the points in your (edited by me) post in order:

 

(1) Thank you - I was beginning to think it was me. I tried it with ABCExplorer before posting my original message,

but couldn't get it to work (I always have trouble with ABCExplorer :(). Maybe I should try it with MuseScore.

 

(2) Mea Culpa! I had put the R:Hornpipe in there while trying to get the brute to play properly. I inadvertently

left it in there when I posted the script to you. My apologies!

I have been trying out the R: field in any case, and my empirical conclusion is that it's not particularly helpful.

I now use the C: or O: field to include information about the rhythm.

 

(3) I think, when I get the chance, I will try and run a few test files directly through abc2midi to to see if it's abc2midi

or EasyABC which is barfing...

Thank you for the exhaustive analysis and for the 'triplet exerciser' - I must try that out (later, after lunch...).

I too, even with my limited knowledge, would have expected M:C and M:4/4 to behave in the same way...

 

Using R: is almost always a mistake. You can't tell what a player program will do with it. I use G: to indicate the

kind of dance the tune is meant for - no program will do anything "creative" with that.

 

See my comment above. I am now following the same strategy, albeit using different fields!

 

Thanks again folks.

 

Roger

Edited by lachenal74693
Link to comment
Share on other sites

EasyABC uses abc2midi to produce the playback. There is a setting that causes abc2midi to look at the R: and set up a slightly uneven rhythm that more closely corresponds to the way these tunes might be played. Some folks don't like that. If you have a reasonably uptodate version of EasyABC you can go to the ABC Settings under the settings menu. Pick the ABC2MIDI tab, and uncheck "Barfly Mode" That is an unfortunate name, since Barfly had the capability, but it was not turned on unless you did it on purpose. I believe the Barfly Mode is turned on by default in EasyABC. If that is unchecked the rhythms should be accurate to the written page. Incidentally, the swung rhythms that BarflyMode creates sound good...but only at the proper tempo. Otherwise they are terrible.

 

There really is no need to not use the R: field, just be sure you have the BarflyMode unchecked and playback should match the printed page. I don't know of other issues with that field, but I did not read all the posts carefully, so I may have missed something.

Link to comment
Share on other sites

C: and O: both have definite meanings - G: and I: are both left vague in the specs ("group" and "information"), so their semantics is up for grabs. N: or a comment line are other possibilities.

 

Fair comment.

 

I'm still learning/experimenting. I'm using C: and O: for the simple (and probably not very good)

reason that these fields appear in the ABC score window below the title. For me that's 'useful' at

the moment, but I may change later - possibly if I try typesetting my scripts.

 

<off-topic>

I also just stumbled across another interesting 'feature' of the R: field.

 

In a French ABC file I found: R:Bourrée

 

This simply refused to play at all using EasyABC. When I replaced it with: R:Bourr/'ee it played fine,

 

I don't know if this is behaviour is 'expected', but to be on the safe side I went through the file replacing

all instances of accented characters with their explicit 3-character 'backslash' representations. What a

pain...

</off-topic>

 

Roger

Edited by lachenal74693
Link to comment
Share on other sites

...If you have a reasonably uptodate version of EasyABC you can go to the ABC Settings under the settings menu. Pick the ABC2MIDI tab, and uncheck "Barfly Mode" ...

 

I'm using 1.3.7.1 which is not absolutely up-to-date, but I followed your instructions - it works!!!

 

Thank you very much!

 

Roger

Link to comment
Share on other sites

It's unreasonable to require users of your ABC to locate and change such an obscurely named and located option. R: is fine for personal use but not for published material.

 

Absolutely. The material is already out there for others to find and exploit.

I wouldn't think of (re-)publishing it myself - any 'modifications' are for private

use only...

 

R.

Link to comment
Share on other sites

Just a slight deviation from this question: does anybody know how you can divide one or several notes in the triplet and still have the "3" over the correct notes?

If I type (3 c/d/ef/g/ ABC seems to simply count the 3 notes following the 3 and ignores the fact that I've halved the value of the first and last notes of the triplet. I only use EasyABC, so perhaps it's a bug in this particular program. I also not worried about MIDI playback, it's only for creating a score.

 

Adrian

Link to comment
Share on other sites

This should work:

X:1
T:triplet test
M:2/2
L:1/4
Q:1/2=80
K:C
c/ed/ (3::5c/d/ef/g|d/fe/ (3::5(d/e/fg/a/)|

I put it in a tango-like context since that seemed the most likely place you'd want it...

 

Perfect! Thanks a lot Jack - I've been pondering this one for a while...

 

I think I've understood it, but just to get the syntax clear: in (3::5, the 3 indicates a triplet and 5, how many notes in the triplet there are? So (5::7 would give me a quintuplet with 2 of the notes divided in 2: (5::7AGA/G/A/B/c

I was actually using it in some recorder diminutions in the style of Ganassi :-)

 

Thanks again,

 

Adrian

 

Link to comment
Share on other sites

The syntax is described in the ABC 1.6 spec. The middle field can also be used. Here is an example of using it perversely: strathspeys are normally played with the dotted-note ratios larger than 3:1. ABC can notate that, and BarFly can play it, but staff notation converters choke on it:

X:1
T:The Earl of Angus and Arran
M:C
L:1/8
Q:1/4=108
K:Eb
B,|(6:2:2EE5 B2 {A}(6:2:4G5FE5G|(6:2:4AC5F5E  (6:2:4DB,5C5D|\
   (6:2:2EE5~B2 {A}(6:2:4G5FE5G|(5:2:4AC5F5D        E2E   :|
B|G<BE>A G<BE>d|e<EG>E  D<FF>A|G<BE>B GBE>g |f>ed>c ~B2BG |
  A<cF>A G<BE>G|F>~GA>G FEDB, |E<GF<A G<BA>c|B<ed>f  e2e2|]

I only munged the first half of the tune that way. If you pass it to a MIDI converter it'll play just fine.

Edited by Jack Campin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...