Melodeon.net Forums

Discussions => Tunes => ABC => Topic started by: Hugh Taylor on October 25, 2022, 10:22:51 AM

Title: Score goes over two pages
Post by: Hugh Taylor on October 25, 2022, 10:22:51 AM
I have some abc that when I convert to .pdf goes onto two pages.
How do I make it fit onto one page?
Thanks
Title: Re: Score goes over two pages
Post by: Stiamh on October 25, 2022, 12:20:57 PM
It's time for you to start exploring all the various abcm2ps formatting commands that allow you to control page output. The easiest one to start with is %%staffscale.

Try putting %%staffscale 0.9 on a new line somewhere in the tune headers and if that's not enough, reduce the figure.

There are lots of other commands to control other parameters. You can browse them here: http://moinejf.free.fr/abcm2ps-doc/index.html

And try this for bedtime reading: https://abcplus.sourceforge.net/abcplus_en.pdf


 
Title: Re: Score goes over two pages
Post by: Thrupenny Bit on October 25, 2022, 12:56:16 PM
If it is only just over onto a second page, I will see if I can tweak the notation- increase bars per line etc - to get it onto page 1.
Not possible if it's way over one page though...
Title: Re: Score goes over two pages
Post by: Hugh Taylor on October 25, 2022, 04:41:06 PM
I've tried %%staffscale 0.9, but with no effect.
I've also tried %%pageheight, but not sure how it works.

The abc that I'm trying to fit onto one page of print is shown below.

X:1
T:Night at Trafalgar-3-concert, no melody, horns
S:Pieced together from the song and riffs of the same name played by Brass Monkey
C:Tune composed by Howard Evans
M:4/4
L:1/8
Q:1/2=90
Z:abc by Hugh Taylor
P:A6 %set to the number of times you want the tune to play without pause.
K:G
P:A
V:1 name="Melody"
%%MIDI program 21 % Accordion
"G"z8|"C"z8|"G"z8|"D"z8|
"G"z8|"C"z8|"G"z8|"G" z8:|
|:"C"z8|"G"z8|"G"z8|"D"z4"G" z4|
"C"z8|"G"z8|"G"z8|1 "D"z4"G" z4:|2 "D"z4"G" z4|
V:2 name="Trumpet"
%%MIDI program 58 % Trumpet
d3 e d2 d2|G4 c2 z2|z8|z8|
d3 e d2 d2|G4 c2 z2|z8|z8:|
|:e4 c2 e2|d4 B2 z2|z8|z8|
e4 c2 e2|d4 B2 z2|z8|1 z8:|2 z8|
V:3 name="Alto sax"
%%MIDI program 67 % Alto sax
B3 c B2 B2|E4 G2 z2|z8|z8|
B3 c B2 B2|E4 G2 z2|z8|z8:|
|:c4 G2 c2|B4 G2 z2|z8|z8|
c4 G2 c2|B4 G2 z2|z8|1 z8:|2 z8|
V:4 name="Tenor Sax"
%%MIDI program 68 % Tenor sax
G3 A G2 G2|C4 G2 z2|z8|z8|
G3 A G2 G2|C4 G2 z2|z8|z8:|
|:G4 E2 G2|G4 D2 z2|z8|z8|
G4 E2 G2|G4 D2 z2|z8|1 z8:|2 z8|
Title: Re: Score goes over two pages
Post by: Roger Hare on October 25, 2022, 05:36:33 PM
I've tried %%staffscale 0.9, but with no effect.
I've also tried %%pageheight, but not sure how it works.
The simplest way seems to be to add %%scale to your ABC code:
Code: [Select]
X:1
T:Night at Trafalgar-3-concert, no melody, horns
S:Pieced together from the song and riffs of the same name played by Brass Monkey
C:Tune composed by Howard Evans
M:4/4
L:1/8
Q:1/2=90
Z:abc by Hugh Taylor
P:A6 %set to the number of times you want the tune to play without pause.
%%scale 0.7                  %This reduces the overall scale
%%score 1|2|3|4              %This removes the duplicated Volta brackets
K:G
P:A
V:1 name="Melody"
%%MIDI program 21 % Accordion
"G"z8|"C"z8|"G"z8|"D"z8|
"G"z8|"C"z8|"G"z8|"G" z8:|
|:"C"z8|"G"z8|"G"z8|"D"z4"G" z4|
"C"z8|"G"z8|"G"z8|1 "D"z4"G" z4:|2 "D"z4"G" z4|
V:2 name="Trumpet"
%%MIDI program 58 % Trumpet
d3 e d2 d2|G4 c2 z2|z8|z8|
d3 e d2 d2|G4 c2 z2|z8|z8:|
|:e4 c2 e2|d4 B2 z2|z8|z8|
e4 c2 e2|d4 B2 z2|z8|1 z8:|2 z8|
V:3 name="Alto sax"
%%MIDI program 67 % Alto sax
B3 c B2 B2|E4 G2 z2|z8|z8|
B3 c B2 B2|E4 G2 z2|z8|z8:|
|:c4 G2 c2|B4 G2 z2|z8|z8|
c4 G2 c2|B4 G2 z2|z8|1 z8:|2 z8|
V:4 name="Tenor Sax"
%%MIDI program 68 % Tenor sax
G3 A G2 G2|C4 G2 z2|z8|z8|
G3 A G2 G2|C4 G2 z2|z8|z8:|
|:G4 E2 G2|G4 D2 z2|z8|z8|
G4 E2 G2|G4 D2 z2|z8|1 z8:|2 z8|
I highlighted the line with a comment. You can play around with the value supplied to the %%score directive, but over the last few years, I've found that 0.7 usually gets the result I want (which sometimes, is not just forcing the tune on to a single page). I also added a %%score directive which gets rid of the multiple Volta brackets (also highlighted with a comment).

These formatting directives are a bit of a rats-nest. They sometimes seem to interact with one another in ways that aren't entirely predictable (by me, at least!). I think that somewhere in the manual which was mentioned, there is a 'warning' to keep it simple and use only a small sub-set of the available formatting directives. In my experience, that is very sensible advice!

A further word of warning. Stiamh quite properly pointed to the most recent edition (2022) of Guido Gonzato's manual. However, if you are using abcm2ps, as opposed to abc2svg, you might be best advised to pick up the 2019 edition of that manual which is oriented towards formatting using abcm2ps rather than abc2svg.

%%pageheight does exactly what it says on the tin - sets the paper height. You may be able to get the tune onto a single page by decreasing %%topmargin and %%bottommargin (or %%botmargin). I think these both default to 1cm, so you don't have much room to play around...
Title: Re: Score goes over two pages
Post by: Tone Dumb Greg on October 25, 2022, 06:00:30 PM
I lied to it about the page height and reduced the title font size. When exported to pdf it printed onone page

%%pageheight 31cm
%%titlefont Times-Bold 15
Title: Re: Score goes over two pages
Post by: Hugh Taylor on October 25, 2022, 07:31:58 PM
The simplest way seems to be to add %%scale to your ABC code:

Thanks Roger, that works fine.
SimplePortal 2.3.5 © 2008-2012, SimplePortal