Melodeon.net Forums
Discussions => Tunes => ABC => Topic started by: smiley on May 29, 2015, 12:29:20 AM
-
Firstly, is there an active internet forum where users of abc notation can get educated answers to abc-related queries? The one at http://abcnotation.com/discuss appears to have been discontinued, and I don't want to bother abc software developers on their mailing list with my basic newbie user issues.
My current problem is: I want to insert linebreaks into my PDF output to improve the layout of the heading text above the printed music (the format varies for each page). The abc below is an example of how I've bodged up some lines by using an extra T: field, but it looks crappy. I've gone through the abc standard 2.1 manual and still can't find a solution to such a simple issue.
[I've tried creating a title page in MS Word and saving it as a PDF, but then I don't know how to combine this page with the main music PDF file for distribution.]
-------------------------------
X:1
T: ENGLISH CEILIDH WORKSHOP
T:-
T:Called by
T:-
T: DANCE: Hamburger Special
T: -
T:My Lad's Ower Bonny for the Coal Trade
M:2/4
L:1/8
K:G
|:"Am"A/B/c/d/ eg|"D"fd "Am"ec|"G"BG GB| gB B2|"Am"A/B/c/d/ eg|"D" fd "Am"ec|"G"BG GB|"Am"cA A2:|
|:"Am"ae cA|ae cA|"G"BG GB| gB Bg|"Am"ae cA| ae cA|"G"BG GB |"Am"cAA2:|]
-
Use the special typesetting commands in abcm2ps. Copy this and paste it into the input box at http://mandolintab.net/abcconverter.php :
%%textfont Times-Roman 24
%%vskip 0.5cm
%%center ENGLISH CEILIDH WORKSHOP
%%textfont Times-Roman 18
%%center DANCE: Hamburger Special
X:1
T:My Lad's Ower Bonny for the Coal Trade
M:2/4
L:1/8
K:G
"Am"A/B/c/d/ eg|"D"fd "Am"ec|"G"BG GB| gB B2 |
"Am"A/B/c/d/ eg|"D"fd "Am"ec|"G"BG GB|"Am"cA A2:|
"Am"ae cA| ae cA|"G"BG GB| gB Bg |
"Am"ae cA| ae cA|"G"BG GB|"Am"cA A2:|
I have attached the resulting PDF. Does it do the trick?
Note, :|] is not legal ABC. The right hand line of a right repeat is drawn thick anyway.
-
I just deleted your T fields, and left a space with a carriage return. It seemed to work OK in the Mac package Easy ABC. I'm not sure that's what you're looking for, but it seems to fit your description.
-
You can adjust the space that appears above subtitle lines (subtitle lines are any lines starting with 'T:' after the initial one):
%% subtitlespace ##
Your example:
X:1
%% subtitlespace 20
T: ENGLISH CEILIDH WORKSHOP
T:Called by
T: DANCE: Hamburger Special
T:My Lad's Ower Bonny for the Coal Trade
M:2/4
L:1/8
K:G
|:"Am"A/B/c/d/ eg|"D"fd "Am"ec|"G"BG GB| gB B2|"Am"A/B/c/d/ eg|"D" fd "Am"ec|"G"BG GB|"Am"cA A2:|
|:"Am"ae cA|ae cA|"G"BG GB| gB Bg|"Am"ae cA| ae cA|"G"BG GB |"Am"cAA2:|]
-
Thanks, my first question was quickly solved. Melodeon.net is an excellent forum for getting good answers to my abc problems. I just wish I'd asked earlier and saved myself so much wasted effort.
Both Jack & Tom's solutions will fix my formatting issues and I appreciate those examples of how to apply typesetting commands. Jack's rewrite of my abcs is an invaluable lesson to improve my abc coding habits. A practical demonstration is worth a thousand words to me ;)
And thanks Matthew - I should've explained that I'm mainly using ABCexplorer on a windows PC (so Jack's typesetting commands needed to be copied into the file header). But I'm actually planning to buy a Mac very soon and will give EasyABC a go.
cheers, Ian
-
As a more general question, where might one find the documentation for the typesetting markup? I have often seen it but not yet felt the urge to enquire further.
-
As a more general question, where might one find the documentation for the typesetting markup? I have often seen it but not yet felt the urge to enquire further.
http://www.stephenmerrony.co.uk/uploads/ABCquickRefv0_6.pdf
-
On the rare occasions I've needed to do this I just used the stave graphical output available on several web ABC facilities. Then tweaked that on an image editor - MSpaint actually. Easy peasy
You have more precision in placing the chords, and can also easily adjust the bars to bring out the music's structure. I've always found dots for a melody in say 16 bars … but laid out as say 5 per line particularly hard to follow. But I guess that's to say I'm no real musician? :|glug
-
http://www.stephenmerrony.co.uk/uploads/ABCquickRefv0_6.pdf
Ooh, that's handy!
For a more detailed description of what those codes do, try Guido Gonzato's documentation (http://abcplus.sourceforge.net/#ABCGuide) for ABC plus. (As far as I know, most of the ABC plus extensions are incorporated in current ABC standards, and it's certainly implemented by abcm2ps, which is the backend for several ABC editors)
On the rare occasions I've needed to do this I just used the stave graphical output available on several web ABC facilities. Then tweaked that on an image editor
If you are really pernickety about layout, you could use Lilypond. Like ABC, that uses a text-based format for describing music, but goes into far more typographical detail. I've never found it necessary, myself, and there's a lot to learn.
I've always found dots for a melody in say 16 bars … but laid out as say 5 per line particularly hard to follow. But I guess that's to say I'm no real musician? :|glug
That's two of us, then...
However, it's trivial in ABC to put the stave line breaks where you want them.
Line break in text = line break in stave. '\' at end of line to override (i.e. two lines of text -> 1 line of ,music)
-
I've always found dots for a melody in say 16 bars … but laid out as say 5 per line particularly hard to follow. But I guess that's to say I'm no real musician? :|glug
That's two of us, then...
However, it's trivial in ABC to put the stave line breaks where you want them.
Line break in text = line break in stave. '\' at end of line to override (i.e. two lines of text -> 1 line of ,music)
Three!
And ! to force a line break anywhere in ABC-code.
-
Get easyABC for windows here:
http://www.nilsliberg.se/ksp/easyabc/
-
And ! to force a line break anywhere in ABC-code.
That doesn't always work. Ideally I'd want both ! and \ to be usable in the same tune, but I can't do that in BarFly. And abcm2ps fucked it up by using ! for something else entirely.
You can make staff line lengths and ABC line lengths different this way, which preserves readability pretty well:
X:1
T:Geamparalele de la Murfatlar
M:7/8
L:1/8
Q:1/4=172
K:APhr ^c
|: "A" cAcA cde|"Dm"d2dc BAG| "A" cAcA cde|"Dm"d2dc BAG |
[1 "A" cAcA cde|"Dm"d2dc def| "Bb"gffe dcd|"A" e2eA eAA:|
[2 "Gm"gffe ded|"A" c2cA BAG| "Bb"ABBA GFG|"A" A2A2 Ace||
|: "A" a2a2 Aca|"A7"g2g2 Acg| "Dm"f2fe ded|"A" c2cA BAG |\
"Dm"f2fe ded|
"A" c2cA BAG|[1 "Bb"f2fe dcd|"A" e2e2 Ace:|\
[2 "Bb"ABBA GFG|"A" A2AE AEE||
|: "A" e2dc def|"Gm"gfga gfe| "Dm"gffe ded|"A" c2cA BAG |\
"Dm"effe ded|
"A" c2cA BAG|[1 "Bb"effe dcd|"A" e2eA eAA:|\
[2 "Bb"ABBA GFG|"A" A2AE AEE|]
That works in BarFly, despite its screwed up implementation of !. If Phil and Jean-Francois had done it right, I could have written this:
X:2
T:Geamparalele de la Murfatlar
M:7/8
L:1/8
Q:1/4=172
K:APhr ^c
|: "A" cAcA cde| "Dm"d2dc BAG| "A" cAcA cde|"Dm"d2dc BAG |
[1 "A" cAcA cde| "Dm"d2dc def| "Bb"gffe dcd|"A" e2eA eAA:|
[2 "Gm"gffe ded| "A" c2cA BAG| "Bb"ABBA GFG|"A" A2A2 Ace||
|: "A" a2a2 Aca| "A7"g2g2 Acg| "Dm"f2fe ded|"A" c2cA BAG |\
"Dm"f2fe ded|!"A" c2cA BAG|[1 "Bb"f2fe dcd|"A" e2e2 Ace:|\
[2 "Bb"ABBA GFG|"A" A2AE AEE||
|: "A" e2dc def| "Gm"gfga gfe| "Dm"gffe ded|"A" c2cA BAG |\
"Dm"effe ded|!"A" c2cA BAG|[1 "Bb"effe dcd|"A" e2eA eAA:|\
[2 "Bb"ABBA GFG|"A" A2AE AEE|]
which keeps the visual flow of the ABC source a bit better.
-
And ! to force a line break anywhere in ABC-code.
That doesn't always work. Ideally I'd want both ! and \ to be usable in the same tune, but I can't do that in BarFly. And abcm2ps fucked it up by using ! for something else entirely.
I use abcm2ps on a command line in Linux and ! and \ work perfectly well in the same tune.
BTW Geamparalele de la Murfatlar is a great tune. Is it from Romania?
-
I use abcm2ps on a command line in Linux and ! and \ work perfectly well in the same tune.
How does that work? In abcm2ps, !ff! means a fortissimo dynamic indication. If ! meant a line break it ought to generate a two-note line.
BTW Geamparalele de la Murfatlar is a great tune. Is it from Romania?
Yep, Murfatlar is in Dobrogea, the largely Turkish-influenced part of the country of the southern Black Sea coast (probably the most ethnically heterogeneous region in Europe).
-
How does that work? In abcm2ps, !ff! means a fortissimo dynamic indication. If ! meant a line break it ought to generate a two-note line.
It seems that behaviour can be changed by a switch either in the command line or embedded in the ABC code.
From the abcm2ps manual
decoration character
Define the decoration separator. It may be set to either !
(the default) or + (for compatibility with the ABC 2.0
standard).
Also this may be relevant (second paragraph especially):
linebreak separators
Define the character(s) for breaking music lines. separators
is a blank-separated list of none, one, or more of: >EOL<
(system end-of-line character, the default), $, !, or >none<.
For compatibility, when >EOL< is in the list, the !
character also causes a line break if it does not look like
it is introducing a decoration.
This is abcm2ps-6.6.17 (June 10, 2012)
My own experience of using '!' in a file with abcm2ps is that once it has occurred anywhere in the file, it stops interpreting text line breaks as as output line breaks, thus messing up my formatting. I found removing all occurrences of '!' fixed it.
-
How does that work? In abcm2ps, !ff! means a fortissimo dynamic indication. If ! meant a line break it ought to generate a two-note line.
Acknowledging Anahata's post which happened while I was writing this, we all seem to have different experiences of usage here caused by cross platform and different software.
Some software still allows ! at the end of a line to be a forced line break, but if used in one line then all subsequent lines must end in ! or carriage returns are ignored and auto line-wrapping takes over. !ff! Will still produce the expected dynamic marking in any event as ! is only a line break if there are no following characters on the line.
All very messy, which is why the in the current official standard the use of ! as a line break has been deprecated. Please don't shoot me I'm only the messenger! ;D
-
! is only a line break if there are no following characters on the line.
I would only ever want to use it in situations like the one in my second tune above, where there ARE following characters in the line. The point is to control ABC and staff line breaks independently, so you can get optimally readable source which also produces appropriately spaced staff notation. A (non-escaped) linebreak in the ABC source already produces a staff line break, you don't need anything to reinforce that.
I pointed out exactly why I wanted to do this on the (pre-Yahoo) ABC forum when Moine and Gonzato first suggested that !<something>! syntax. And was ignored.
-
The point is to control ABC and staff line breaks independently
I'm sure than was Jim Vint's intention when he wrote ABC2WIN. He was obviously thinking of popular programming languages where line breaks and blanks are all 'white space' and have identical semantics, but it was a flagrant violation of Chris Walshaw's original ABC standard which used line breaks and '\' and didn't use '!' at all. That also allows you to control staff line breaks and keep your formatting sensible, unless your idea of 'sensible' insists on allowing a staff line break in the middle of a source text line; I can't think why you would really need to do that.
I guess it was unwise of the ABC Plus folks to start using '!' for something different, but I'm glad to hear
it's deprecated as a line break, because huge compatibility problems resulted from its introduction in a piece of software which unfortunately became widely used.
Yes, I know, stable doors etc.
-
Some software still allows ! at the end of a line to be a forced line break, but if used in one line then all subsequent lines must end in ! or carriage returns are ignored and auto line-wrapping takes over.
Yes, that's a more accurate description of the problem I mentioned earlier.
-
I pointed out exactly why I wanted to do this on the (pre-Yahoo) ABC forum when Moine and Gonzato first suggested that !<something>! syntax. And was ignored.
I don't know if you are a member of the current ABC Users Yahoo group Jack but I can assure you that things still can and do become quite heated in debate! Percussion notation is being discussed at the moment from some deeply entrenched positions, as for the matter of how to describe the shape of special note heads to abcm2ps, well, you need an umbrella to fend of the number of dummies (soothers to our U.S. brethren) that are being spat out!
On that basis alone simply being ignored seems quite civilised!
-
Illustration of the above comments, I believe these to be 'proposed' and have not seen the coding used to produce the notation.
Symbols (http://abcplus.sourceforge.net/Symbols.pdf)
Special Heads and Marks (http://abcplus.sourceforge.net/SpecialHeadsAndMarks.pdf)
-
I use abcm2ps on a command line in Linux and ! and \ work perfectly well in the same tune.
How does that work? In abcm2ps, !ff! means a fortissimo dynamic indication. If ! meant a line break it ought to generate a two-note line.
In my version of abcm2ps any symbols between two !! or two ++
(e.g. !ff!, !fine!, !D.C.! or +ff+, +fine+, +D.C.+) will be interpreted as intended.
Any single ! is equal to a line break.
I simply use the abcm2ps version in the standard repository of current Ubuntu.
Command line usage is a bit fiddly compared to just one programme.
You need to open at least three windwos: a simple text editor, postscript viewer, command line terminal and maybe a file manager to locate abc files.
There are no simple and working graphical ABC music programmes for Linux - none that I know of.
EDITED to write proper English ( I hope so. )
-
Full stop outside the bracket, Tom. But otherwise "A minus" :|glug
-
There are no simple and working graphical ABC music programmes for Linux - none that I know of.
Runabc (http://ifdo.pugmarks.com/~seymour/runabc/top.html) claims to do that, but maybe you don't count it as simple or working. It's a bit crude and I gave up on it fairly quickly.
You need to open at least three windows
I have made a couple of shell scripts to help me, and once I have loaded a .ps file in ghostview, I can do edits and view the changes all from vim, which can run external commands in its own command line. It's pretty quick.
-
You need to open at least three windows
I have made a couple of shell scripts to help me, and once I have loaded a .ps file in ghostview, I can do edits and view the changes all from vim, which can run external commands in its own command line. It's pretty quick.
Runabc.tkl used to be quite good, but after a system upgrade it crashed quite often. EasyABC et al. for Windows are much more reliable.
Using vim together with shell scripts seems promising. I have to familiarize myself to it.
Thanks for your sharing your experience.