Add Lilypond 2.14 spacing model

This commit is contained in:
Matthias Neeracher 2011-07-24 03:32:43 +00:00
parent d55ba65c0c
commit b054c8f82d
5 changed files with 1936 additions and 632 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
\version "2.8.0"
\version "2.14.0"
\header {
title = "<{TITLE}>"
@ -12,10 +12,23 @@
#(set-paper-size <{PAPERSIZE}>)
indent = 0.0\cm
pagenumber = no
page-top-space = #.1
top-markup-spacing #'padding = #<{TOPPADDING}>
markup-system-spacing #'padding = #<{TITLEPADDING}>
system-system-spacing #'padding = #<{STAFFPADDING}>
<{FORMATTING}>
}
\layout {
\context {
\ChordNames
\override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #<{CHORDPADDING}>
}
\context {
\Lyrics
\override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #<{LYRICPADDING}>
}
}
#(set-global-staff-size <{STAFFSIZE}>)
%
% Rather than write a principled formatting procedure, we just define special cases for

View File

@ -48,6 +48,11 @@ enum {
float chordSize;
float lyricSize;
float staffSize;
float topPadding;
float titlePadding;
float staffPadding;
float chordPadding;
float lyricPadding;
int playElements;
NSString * tmpPath;
NSFileWrapper * vcsWrapper;

View File

@ -84,6 +84,11 @@
chordSize = 6.0f;
lyricSize = 0.0f;
staffSize = 20.0f;
topPadding = 2.0f;
titlePadding = 4.0f;
staffPadding = 3.0f;
chordPadding = 1.5f;
lyricPadding = 1.0f;
playElements = kVLPlayAccompaniment|kVLPlayMelody|kVLPlayCountIn;
sheetWin = nil;
pdfWin = nil;

View File

@ -165,6 +165,16 @@ static const char * sPaperNames[] = {
[NSString stringWithFormat:@"%f", lyricSize]];
[ly substituteMacro:@"STAFFSIZE" withValue:
[NSString stringWithFormat:@"%f", staffSize*scaling]];
[ly substituteMacro:@"TOPPADDING" withValue:
[NSString stringWithFormat:@"%f", topPadding]];
[ly substituteMacro:@"TITLEPADDING" withValue:
[NSString stringWithFormat:@"%f", titlePadding]];
[ly substituteMacro:@"STAFFPADDING" withValue:
[NSString stringWithFormat:@"%f", staffPadding]];
[ly substituteMacro:@"CHORDPADDING" withValue:
[NSString stringWithFormat:@"%f", chordPadding]];
[ly substituteMacro:@"LYRICPADDING" withValue:
[NSString stringWithFormat:@"%f", lyricPadding]];
[ly substituteMacro:@"CHORDS" withValue:
[NSString stringWithUTF8String:writer.Chords().c_str()]];
[ly substituteMacro:@"NOTES" withValue: