Melodeon.net Forums
Discussions => Tunes => ABC => Topic started by: Thrupenny Bit on March 10, 2021, 12:43:05 PM
-
I'm just working my way through a relatively large tune book.
It is divided up into sections 'Jigs', 'Quicksteps', '9/8 jigs' etc.
I want to keep the notated tunebook as a single file, so don't want to split it up into individual abc files of jigs, quicksteps etc but see the worth of indicating the type ( jig, quickstep etc. ) when the abc tune is displayed as music.
From what my abc info says, the R: field should be how to indicate this information, but it doesn't seem to translate or be displayed when viewed as the music in my abc app ( ABCExplorer ).
Just wondering how others display this information so it can be seen displayed within the music.
cheers
Q
-
Hi Q,
Yes, you are correct, the R: field is not displayed either on-screen or when exporting to PDF.
The best way to display the type of tune is to duplicate it as an additional T: field on a separate line after the title T: fields, e.g.
X:1
T:Merch Megan
T:(Megan's Daughter)
T:Waltz
C:Traditional
S:Blodau'r Grug
M:3/4
K:G
|:d3/c/|B2 G2 G2|e4 d2|c2 B2 A3/G/|F2 D2d3/c/|
B2 G2 G2|e4 d2|c2 B2 A2|G4:|
d2|g2 ga ga|f2 fg fg|e2 ef ge|f2 d2 d2|
g2 ga bg|f2 fg af|eb ag fe|d4 d3/c/|B2 G2 G2|e4 d2|
c2 B2 A3/G/|F2 D2d3/c/|B2 G2 G2|e4 d2|c2 B2 A2|G4|]
-
Thanks Steve for confirming the R: field isn't displayed.
Yes, I thought another T: field would work, seems a sensible option but I thought I'd check.
Right, onwards!
Cheers
Q
-
Just about to rush out of the door now, haven't time to check fully, but I think you'll be able to solve the problem using one or more of the %%infoline, %%infoname and %%writefields formatting commands.
-
Just about to rush out of the door now, haven't time to check fully, but I think you'll be able to solve the problem using one or more of the %%infoline, %%infoname and %%writefields formatting commands.
This is absolutely correct.
abcm2ps/abc2svg documentation (http://moinejf.free.fr/abcm2ps-doc/infoline.xhtml) confirms this.
Adding '%%infoline 1' and slightly altering Steve's code gives output with both Area and Rhythm. (Sample output attached.)
X:3
T:Merch Megan
T:(Megan's Daughter)
R:Waltz
A:Wales
C:Traditional
S:Blodau'r Grug
M:3/4
%%infoline 1
K:G
|:d3/c/|B2 G2 G2|e4 d2|c2 B2 A3/G/|F2 D2d3/c/|
B2 G2 G2|e4 d2|c2 B2 A2|G4:|
d2|g2 ga ga|f2 fg fg|e2 ef ge|f2 d2 d2|
g2 ga bg|f2 fg af|eb ag fe|d4 d3/c/|B2 G2 G2|e4 d2|
c2 B2 A3/G/|F2 D2d3/c/|B2 G2 G2|e4 d2|c2 B2 A2|G4|]
-
Ah so that's the way to make the R: field appear!
Oh blow...
Q
( just finished adding T:Jig to 130 tunes :( )
-
OK, thanks both to Stiamh and Mike.
Will take a break from my tunebook and decide which way to carry on.
I suppose in reality it doesn't matter as both methods give me the same result, albeit formally or informally if you see what I mean, though I do like to get things right!
Thanks for the information.
-
I have to confess ignorance of the '%%infoline 1' command. :|bl
I suppose it depends on where you want the tune rhythm/genre to appear. Personally, I prefer to have it centred below the title rather than bunched up beneath the C: field entry which the '%%infoline 1' generates.
-
Yes I agree, so long as it is seen somewhere on the music layout to my mind it doesn't really matter.
It also saves me going back *again* to the first 140 tunes :Ph
-
A bit late but... if you put tune type in the C field it appears neatly and discreetly on the right - always assuming there isn't actually a composer that is! Fine for traditional tunes.
Edited to add - if you use C field for composer and O field for tune type, the word "jig" appears in brackets after the composer.
-
or you could put it in as a text block. Defaults to right alignment
before you start the actual notes code put
%%begintext
put rhythm type
%%endtext
-
Oh ok, seems like I have options, will go away and play with them.
Thanks peeps.
-
Thanks for Mike to the link to J-F Moine's documentation. Browsing the examples there, I discovered that we can do everything Q wants, and a good deal more, with the %%titleformat command.
http://moinejf.free.fr/abcm2ps-doc/titleformat.html
Generally I think it's not a good idea to use ABC header fields for anything other than their intended purpose. OK if you are never going to share tunes with anyone else and all that concerns you is an quick and dirty way of positioning some piece of information, I suppose.
But EasyABC, for example, allows you to quickly sort tunes in a collection based on any header field. So sorting on R: would put all your jigs together, and so on. Or you might want to sort by origin, or source, or book.... If you have irrelevant info in fields, this sorting feature is not going to be of much use.
And if you wanted to send a collection of tunes to someone else, they might be less than impressed by your use of such practices. :|glug
-
I can see that being able to use the sort facility can be a good idea to order tunes.
Might have to re-think this ???
-
You can always use R: to classify a tune by Rhythm and one of the other none specific options to display it on the score.
-
Just about to rush out of the door now, haven't time to check fully, but I think you'll be able to solve the problem using one or more of the %%infoline, %%infoname and %%writefields formatting commands.
Yes. If you use '%%writefields R 1', the Rhythm will appear as 'Rhythm: Jig' (say) below the music.
I couldn't get it work completely as advertised though, for example '%%writefields RA 1' failed to
produce an 'Area' label as specified with A:, when (according to how you read Guido Gonzato's
manual), it should work. However, according to the standard (2.1), A: is deprecated, maybe that's
why...
-
Generally I think it's not a good idea to use ABC header fields for anything other than their intended purpose. OK if you are never going to share tunes with anyone else and all that concerns you is an quick and dirty way of positioning some piece of information, I suppose.
But EasyABC, for example, allows you to quickly sort tunes in a collection based on any header field. So sorting on R: would put all your jigs together, and so on. Or you might want to sort by origin, or source, or book.... If you have irrelevant info in fields, this sorting feature is not going to be of much use.
And if you wanted to send a collection of tunes to someone else, they might be less than impressed by your use of such practices. :|glug
I'm afraid I'm not at all an abc purist. I just use it as a tool for producing dots. The end (output dots) justifies the means (cheating with the fields). I'd never want to share the abc files, just the staff notation. I like the idea of being able to sort files but currently find it good enough to save them in appropriate folders. I use abc Explorer - don't know how this differs from other programmes. But lets me keep all my reels, say, in one folder so I can select any combination to generate a set on a page, which is all I ask.
-
Who loves a purist? I just think that if you are using ABC to produce printed output via abcm2ps (via the command line or using EasyABC and similar front ends), it doesn't take much effort to explore the options provided by abcm2ps.
In reply to Greg's comment, if you look at the page on the %%titleformat command I linked to, you'll see that you don't need to use any field other than R: to display the tune type/rhythm information at the top of the page.
I played around with the %%titleformat, %%infoname and %%writefields to produce this, just as an example:
%%titleformat R-T C1,P- T O1,
%%infoname D "Recordings: "
%%infoname Z "Committed to dots by: "
%%infoname N "Interesting facts: "
%%infoname H "History: "
%%writefields DSZNH
X:42
T:PHOENIX, THE
T:Hennessy's
R:Reel
C:Dave Hennessy
O:Ireland (Cork)
S:Composer
D:Any Old Time, "Phoenix" - Arcady, "After the Ball"
H:Named after the famous music pub in Cork
N:Recorded by Any Old Time in E-maj/C#-min
Z:Steve Jones 2017-10-16
P:AABB
M:C|
K:D
P:A
de|f2df edcA|BAGB AGFA|f2df edcA|BAGB A2de|
f2df edcA|BAGB AGFE|Dddc defd| edce d2:|
P:B
ce|:B3A Bcde|f2df edcA|B3A Bcde|f2ef d2cd|
B2Fd B2Fd|BFBd cBAc|BBBA Bcde|1 fedc B3A:|2 fedc d2|]
PDF output from EasyABC attached
-
In reply to Greg's comment, if you look at the page on the %%titleformat command I linked to, you'll see that you don't need to use any field other than R: to display the tune type/rhythm information at the top of the page.
Fair enough. I need to understand this solution better. It looks like the appropriate one.
-
I played around with the %%titleformat, %%infoname and %%writefields to produce this, just as an example:
Doesn't seem to work in ABC Explorer, none of the info in your PDF appears in the preview and the tune cannot be saved because it doesn't start with X:
Should the %% commands go into the file header rather than the tune text? If so that wouldn't work for me as I like my abc tunes to be stand alone to make them portable. Try as I may I can't get the commands to work within the tune header even when it's exported to PDF
-
Seems to work fine in EasyABC and MCMusiceditor, which are my go to editors.
Maybe it's time to update?
-
Changing my ABC editor is not an option and shouldn't be necessary.
-
I played around with the %%titleformat, %%infoname and %%writefields to produce this, just as an example:
Doesn't seem to work in ABC Explorer, none of the info in your PDF appears in the preview and the tune cannot be saved because it doesn't start with X:
Should the %% commands go into the file header rather than the tune text? If so that wouldn't work for me as I like my abc tunes to be stand alone to make them portable. Try as I may I can't get the commands to work within the tune header even when it's exported to PDF
They ought to work whether you put them before or after the X: field. EasyABC doesn't have a separate place to put a file header... I think any formatting commands that are not part of a tune will apply to all following tunes until revoked by another command - that's the way I've been using them in the large tunebook I maintain, anyway.
FWIW in J-F Moine's example, he puts the %% commands after X:, as part of the tune header.
-
Ah... I use abcexplorer as my 'go to' app. so that might be pertinent.
I apologise for not being pro-active with these suggestions and trialling them here and giving you feedback.
I am currently 'indisposed' for a couple of days so can't play around with them in abcexplorer.
Keep the idea coming though. I will get back to it and the ideas are much appreciated.
Q
-
EasyABC doesn't have a separate place to put a file header.
Easy ABC displays the whole ABC file in the editor window so the first bit in your example is the file header and will apply to all of the tunes in that file. The trouble with putting the formatting info in the header is that copying and pasting a single tune will lose all of the info in the header . . .
-
The trouble with putting the formatting info in the header is that copying and pasting a single tune will lose all of the info in the header . . .
That's true. Have you ever thought of using format files? Bit like having a css stylesheet for your webpages. I keep meaning to do it but am too lazy...
http://moinejf.free.fr/abcm2ps-doc/format.xhtml