Formatting multiple abc tunes onto a page

Formatting multiple abc tunes onto a page

Hi,

I want to generate music in PDF format for dancing. Typically, we use 4 tunes for a dance, 2 to a page. I’d like each page to have the dance name and page number as its title. Each tune needs to have its own title. I have a master abc file with all the possible tunes.

What tools would you recommend?

I currently use easyAbc on Windows. I am fairly technical and could hack something up, but I’m hoping someone already has a solution or at least a good approach.

Re: Formatting multiple abc tunes onto a page

There is probably an easier way but you could save the tunes as PDF files and use a PDF editor to make the pages.

Re: Formatting multiple abc tunes onto a page

This is one way to do it but you’ll have create a new header for each 4 tunes (2 pages). If you want to re-sequence the page numbers, use the %%newpage <integer page number start value>.

A lot of the formats shown probably aren’t necessary for what you’re trying to accomplish. I’m not even certain as what to not include as I’ve used this header format for so long. The only thing I’ve added is the %%footer, I personally only use the %%footer "Page $P" command. You’re allowed two lines in the header format so I’ve used both. I’ve never had good results with the gutter command in EasyABC so I hard-code the margins for each tune. They’re formatted as facing pages but that implies that the first page is even-numbered which it obviously doesn’t show (Page 1). I cannot get the %%newpage <value> to affect the first tune so you would have to include a page of something as the first (odd) page. After that, you should be able to force renumbering if you need to.

Caveat emptor. Someone is surely going to chime in that this is entirely the wrong way to do it. As always, you learn as you go.

I:abc-charset utf-8
%%titlefont Times-Bold 18
%%subtitlefont Times-Bold 16
%%gchordfont Times-Bold 14
%%composerfont Times-Italic 16
%%notationfont Times-Bold 16
%%annotationfont Times-Bold 16
%%textfont Times-Italic 16
%%infofont Times-Italic 16
%%partsfont Times-Bold 14
%%printtempo 0
%%printparts 1
%%partsbox 1
%%bstemdown 1
%%withxrefs 0
%%pageheight 28cm
%%pagewidth 21cm
%%%staffsep .01
%%topspace 0
%%botspace1.5cm
%%notespacingfactor 1
%%titleformat T, R-1 A-1 C1
%%header "Dance #1nPage $P"
%%pageheight 11in
%%pagewidth 8.5in
%%scale 0.7

X:1
%%vskip 25
%%leftmargin 1.5cm % RIGHT GUTTER
%%rightmargin 2.5cm % RIGHT GUTTER
T:Paddy Fahy’s Jig #1
R:Jig %jigs
M:6/8
K:Gm
P:A
"Gm"DGA _B2c | "Gm"c_Bc d2g | "Gm"g=fd _Bcd | "F"cAG =FDC |
"Gm"DGA _B2c | "Gm"c_Bc d2g | "Gm"g=fd _Bcd |1 "F"cA=F G2F :|2 "F"cA=F G_Bd |]
P:B
|: "Gm"g3 =fga | "Gm"g=fd _Bcd | "F"=BcA =f3 | "F"ag=f de=f |
"Gm"g2a _bag | "Gm"=fdg =fdc | "F"A_BG Adc |1 "F"AG=F G_Bd :|2 "F"AG=F G2F |]
%%vskip 20
%%leftmargin 1.5cm % RIGHT GUTTER
%%rightmargin 2.5cm % RIGHT GUTTER
T:Sean Ryan’s Jig
L:1/8
M:6/8
K:Am
P:A
|: "Am" cBA "G" BAG | "Am" AGE "G" DB,G, | "Am" A,2 A, EDB, | "G" DEG A2 B |
"Am" cBA "G" BAG | "C" AGE "G" DB,G, | "Am" A,2 A, "G" EDB, | "Em" DB,A, "Am" A,2 B :|
P:B
|: "Am" cBA a2 a | "Am" bag edB | "G" GBd g2 g | "G" GBd cBA |
"Am" cBc "G" dcd | "F" ede "G" gab | "Am" age "G" dBG |1 "Em" EFG "Am" A2 B :|2 "Em" EFG "Am" A3 |]
%%newpage
%%leftmargin 2.5cm % LEFT GUTTER
%%rightmargin 1.5cm % LEFT GUTTER
T:Pattern Day Jig
R:Jig
M:6/8
L:1/8
K:Amaj
P:A
|: "A"ABA AFE | "D"FAA Ace | "A"fed c3 | "A"cBA "D"F2G |
"A"ABA AFE | "A"FAA Ace | "Bm"fga efd |1 "A"cAA ABA :|2 "A"cAA Acd |]
P:B
|: "A"e3 ecA | "D"cea f3 | "A"fed c3 | "A"cBA "D"F2G |
"A"ABA AFE | "D"FAA Ace | "Bm"fga efd |1 "A"cAA Acd :|2 "A"cAA ABA |]
%%leftmargin 2.5cm % LEFT GUTTER
%%rightmargin 1.5cm % LEFT GUTTER
%%vskip 20
T:Embers in the Fire
R:JIG
M:6/8
K:Gm
P:A
"Gm"Gdc B2 B | "F"ABA FDC | "Gm"Gdc B2 B | "F"ABF"Gm"G2z |
Gdc "Bb"B2 B | "F"AB AFD C | "Gm"DGA "Bb"BAB | "F"cAF "Gm"G2 z :|
P:B
"Bb"GBd "Gm"gfg | "F"agf "Gm"g2 z | "Bb"Bcd fed | "F"cBA F2 z |
"Gm"DGA B"F"A B | dcA F2 z | "Bb"dfe dcB | "F"ABF "Gm"G2 z :|

Re: Formatting multiple abc tunes onto a page

I use a similar method to @callison to keep sets together - but it’s a much more sparse (lazy) approach.
I use the T: field for the title of the set and the P: field for the name of each tune.
Example:

X:2
T:Top of Cork Road-Haste To The Wedding-Saddle the Pony
P:Top of Cork Road (Father O’Flynn)
M:6/8
L:1/8
K:D
dAF DFA|Bed cBA|dcd efg|aed cBA|
dAF DFA|Bed cBA|dcd efg|fdd d2 R:|
fdf fga|ecd efg|dcd fed|cAA A2 c|
BGB Bcd|AFA DFA|dcd efg|fdd d2 e:|
P: Haste To The Wedding
|:AFA Agf|ede fdB|AFA dAF|
EFE EFG|AFA Agf|ede fdB|A2g faf|ded d3:|
|:afa afa|bgb bgb|afa agf|ede efg|
a3 f3|ede fdB|A2g faf|ded d3:|
P:Saddle the Pony
K:G
D|GBA G2B|def gdB|GBA G2B|AFD AFD|
GBA G2B|def gfg|ege dBA|BGF G2:|
d|efe edB|def gfg|ege edB|dBA ABd|
efe edB|def gfg|ege dBA|BGF G2:|
%%newpage

You’ll notice that once the M: and L: fields have been defined for the first tune after an X: field you don’t have to define them again for the rest of the tunes unless you need to change the value. This holds for the K: field as well. So in the example, the first K:D applies to the first and second tune and only needs to be redefined as K:G for the third tune.

So using this for your dances it would look something like this:

X:1
T: Name of Dance
P: Tune 01
ABC code for Tune 01
P:Tune 02
ABC code for Tune 02
%%newpage

Re: Formatting multiple abc tunes onto a page

I do much as Muircheartaigh. If copying and pasting from a file of individual tunes I just leave the R,M,L,K etc fields in place and put an N: before the original X and T as a reminder to where they came from and so it’s easy to lift the tune out again later.

Re: Formatting multiple abc tunes onto a page

Great. It sounds like you would extract the individual tunes from the master file into a single dance file and add in formatting commands. This sounds like something I could automate. Thanks. I’ll give it a go.

Re: Formatting multiple abc tunes onto a page

What Muircheartaigh stated above worked on the output for Pdf on the convertor page for me just fine if I understood the point and all I did was copy/paste the example- http://www.mandolintab.net/abcconverter.php

Posted by .