Melodeon.net Forums
Discussions => Tunes => ABC => Topic started by: Tone Dumb Greg on March 10, 2020, 07:36:02 PM
-
I've got a tune I want to score in 4 bars per line.
However, it starts with a two bar intro that I want to have by itself, on the first line.
I want the bar width on the two bar line to be consistent with the width of the bars on the four bar lines
but, they stretch themselves out to the full page width.
I have tried using %%right margin 12cm, that gives me the first line I want, but I can't get it to change back to full width lines with a statement within the coding. Also, it tends to throw my editor into a spin when I try to create a pdf.
Is there a right way to do this?
-
Add:
%%stretchstaff 0
to the headers.
Please note that it is a zero not a capital O. The following tune is a bit of nonesense, I just copied and pasted two bars at the begining to illustrate the point. Please note this will probably not work using phone or tablet apps, they tend to ignore %% commands. It certainly works in ABC Explorer.
X:78
T:Beaux of London City - Adderbury
T:Shooting
M:6/8
L:1/8
A:Adderbury
%%titlefont Helvetica 22
%%subtitlefont Helvetica 16
%%composerfont Helvetica
%%partsfont Arial 20
%%partsbox
%%gchordfont Arial 16
%%barnumbers 1
%%MIDI program 73 % flute
%%MIDI chordprog 1 % piano
%%stretchstaff 0
V:1 gchord=down
V:2
P:A(AB)6
K:G
V:1
P:A
"G"G2G B>AG| Bd2-d2D|
D|"G"G2G B>AG| Bd2-d2D|G2 G B2"D" A| "G" G3-G2D|
G>GG B>AG| Bd2-d2D|"C"G>DG "D"B2A| "G"G3-G2|
P:B
|:z|"G" d2c B>AG| Bd2-d3 |"D7"A2 A A2"G"B| "C"c3-c3 |
"G"d2c B>AG| "Bm"Bd2-d2D|"C"G>DG "D7"B2A| "G"G3-G2:|
-
Add:
%%stretchstaff 0
to the headers...
That works great for the 2 bar line, but it leaves the 4 bar lines at random lengths. I want them justified.
Can it be easily cancelled in the coding for subsequent lines?
I want:
score|score|
score| score|score|score|
score| score|score|score|
score| score|score|score|
score| score|score|score|
if that makes sense.
-
Off the top of my head I would try this (I'll have a mess about another day but right now I haven't got the time).
score|score|
%%stretchstaff 1
score| score|score|score|
score| score|score|score|
score| score|score|score|
score| score|score|score|
-
Thanks for taking the time, Pete.
[Edit, after trying it:unfortunately that cancels the %%stretchstaff 0]
[further edit: I've just discovered that %%stretchstaff 0 seems to work on just the first line in portrait, but not in landscape. However, I'm working in landscape.
Maybe I just need a bit more page formatting]
-
I wonder if you could do what you want using an 'Ossia stave'?
I haven't checked it out in detail, but there's a lengthy thread (with examples)
discussing these on The Session:
https://thesession.org/discussions/43650 (https://thesession.org/discussions/43650)
It looks as this might provide an approximation to what you are looking for?
-
I wonder if you could do what you want using an 'Ossia stave'?
Thanks Roger. That looks a lot like a possible solution...if I can figure out the format and syntax.
There's plenty of exploring to do.
Another thought I had was to split the line into two columns. Haven't tried it yet, though.
-
Following on from a post in the Facebook ABC Notation Users group, I think this is the answer. You will need to edit the margin and staff widths to suit your landscape layout but this definitely works in ABC Explorer.
X1
T:Beaux of London City - Adderbury
T:Shooting
M:6/8
L:1/8
A:Adderbury
%%titlefont Helvetica 22
%%subtitlefont Helvetica 16
%%composerfont Helvetica
%%partsfont Arial 20
%%partsbox
%%gchordfont Arial 16
%%barnumbers 1
%%MIDI program 73 % flute
%%MIDI chordprog 1 % piano
V:1 gchord=down
V:2
P:A(AB)6
K:G
V:1
%%leftmargin 1cm
%%staffwidth 8.5cmP:A
"G"G2G B>AG| Bd2-d2D|
%%leftmargin 1cm
%%staffwidth 17cm
D|"G"G2G B>AG| Bd2-d2D|G2 G B2"D" A| "G" G3-G2D|
G>GG B>AG| Bd2-d2D|"C"G>DG "D"B2A| "G"G3-G2|
P:B
|:z|"G" d2c B>AG| Bd2-d3 |"D7"A2 A A2"G"B| "C"c3-c3 |
"G"d2c B>AG| "Bm"Bd2-d2D|"C"G>DG "D7"B2A| "G"G3-G2:|
Edit:I've just tried it in Easy ABC and it works in that too.
-
That looks promising. Thanks Pete.
-
No probs, I learned something new myself.
-
No probs, I learned something new myself.
Thanks again Pete
I would never have worked that one. Guido's Guide has one reference to %%staffwidth which just describes it as an alternative to %%pageheight and %%pagewidth.
Is there a more comprehensive guide?
-
Is there a more comprehensive guide?
http://abcnotation.com/wiki/abc:standard:v2.1
Definitive and pretty comprehensive!
-
I would never have worked that one. Guido's Guide has one reference to %%staffwidth which just describes it as an alternative to %%pageheight and %%pagewidth.
Is there a more comprehensive guide?
See Anahata's link above. Guido is exceptionally gifted but suffers from the same malady as many others bordering on genius, it all seems so childishly simple to him that he doesn't consider a explanation to be necessary. There is as Yahoo! group where many of these geeks hang out and chat, it might as well be wriiten in ancient Greek for the amount of info I can gleen from it! ::)
-
http://abcnotation.com/wiki/abc:standard:v2.1
Definitive and pretty comprehensive!
Hmmm. Seems pretty good, but I can't find any mention of %%staffwidth in there.
-
Guido is exceptionally gifted but suffers from the same malady as many others bordering on genius, it all seems so childishly simple to him that he doesn't consider a explanation to be necessary. There is as Yahoo! group where many of these geeks hang out and chat, it might as well be wriiten in ancient Greek for the amount of info I can gleen from it! ::)
The reason I like to ask for help here is that I generally have half a chance of understanding the answer :D :D :D
-
You need to look up abcm2ps, not the abc spec.
Also I feel bad because I thought exactly that approach might have worked, from learning about those in the incipits thread, but, didn't end up posting it. I'm glad you have a solution!
-
You need to look up abcm2ps, not the abc spec.
Also I feel bad because I thought exactly that approach might have worked, from learning about those in the incipits thread, but, didn't end up posting it. I'm glad you have a solution!
Please don't feel bad Gina ;D ;D ;D
I read the incipits thread and didn't pick up on this.
-
http://abcnotation.com/wiki/abc:standard:v2.1
Definitive and pretty comprehensive!
Hmmm. Seems pretty good, but I can't find any mention of %%staffwidth in there.
You're right. I looked for %%staff and checked no further.
So it's apparently an abcm2ps extension. I think abcm2ps implements the ABCplus spec. So as Gena says, look at abcm2ps documentation but I'm not sure that's very detailed either, so Gonzato may be your best bet, with a bit of trial+error and guesswork.
-
If you can find the right link to click (not an easy task, I can assure you, that's actually why I didn't include a link with my post earlier, haha) there is quite a lot of info on what is (supposed) to be available:
http://moinejf.free.fr/abcm2ps-doc/index.html
Bear in mind that abcm2ps has been conceptually superseded by abc2svg, which has several features not in abcm2ps, but, it's not really a like for like replacement (ie, there's not really a binary that you can drop in to our preferred abc editors)
-
If you can find the right link to click (not an easy task, I can assure you, that's actually why I didn't include a link with my post earlier, haha) there is quite a lot of info on what is (supposed) to be available:
http://moinejf.free.fr/abcm2ps-doc/index.html
Bear in mind that abcm2ps has been conceptually superseded by abc2svg, which has several features not in abcm2ps, but, it's not really a like for like replacement (ie, there's not really a binary that you can drop in to our preferred abc editors)
Thank you Gena. This is a great place to get answers I can understand.
-
If you ever want an answer you don't understand, many of the programs involved are open source, meaning that it is both a) possible to figure out why they don't do the thing you want and b) at least in theory, possible to change them. However, they're quite old and a bit impenetrable, so, the best I've been able to do is figure out vaguely how something probably works. So, feel free to chuck any mysteries my way and we can maybe get some idea of the reasons behind it.
Plus, whatever abcm2ps.exe your ABC editor has is probably super out of date compared with the one packed into your ABC editor of choice:
My ABCExplorer has
abcm2ps-5.9.25 (November 2, 2011)
My EasyABC has
abcm2ps-8.13.14 (2017-08-05)
And current result bug fixing development puts the current version at v8.14.7 from February this year, but, I don't have a suitable build environment for C or C++ right now to build an updated version to see if would even be compatible.
-
Bear in mind that abcm2ps has been conceptually superseded by abc2svg, which has several features not in abcm2ps
And vice versa, further confused by the fact that abcm2ps can be made to produce SVG output.
My ABCExplorer has
abcm2ps-5.9.25 (November 2, 2011)
My EasyABC has
abcm2ps-8.13.14 (2017-08-05)
And current result bug fixing development puts the current version at v8.14.7 from February this year
My Debian Linux 10 system has 8.14.2 (2018-12-18), which is quite new for a Debian package. (Debian 10 was released in July 2019)
-
...My ABCExplorer has
abcm2ps-5.9.25 (November 2, 2011)
My EasyABC has
abcm2ps-8.13.14 (2017-08-05)...
Moi aussi! All the executables in my EasyABC (1.3.7.7) 'bin' directory are of a similar (recent) vintage.
Does this mean that if I replace the copies of abcm2ps, etc. in my ABCExplorer 'tools' directory with
copies of the abcm2ps, etc. in my EasyABC 'bin' directory, I will magically get an 'updated' version of
ABCExplorer - at least as far as the underlying tools are concerned?
Or is it not as simple as that, and am I just being a very silly boy?
-
You can do that and it will work just fine. Alternatively you can go into the options section of Explorer and point the 'Tools' locations to the Easy ABC directory where the newer tools are.
-
You can do that and it will work just fine. Alternatively you can go into the options section of
Explorer and point the 'Tools' locations to the Easy ABC directory where the newer tools are.
Who says we don't learn something every day? Thank you sir - I'll give that a go...