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,19 +1,32 @@
\version "2.8.0" \version "2.14.0"
\header { \header {
title = "<{TITLE}>" title = "<{TITLE}>"
poet = "<{POET}>" poet = "<{POET}>"
composer= "<{COMPOSER}>" composer = "<{COMPOSER}>"
arranger = "<{ARRANGER}>" arranger = "<{ARRANGER}>"
tagline = #(string-append "Created with VocalEasel <{VLVERSION}> / Lilypond " (lilypond-version)) tagline = #(string-append "Created with VocalEasel <{VLVERSION}> / Lilypond " (lilypond-version))
} }
\paper { \paper {
#(set-paper-size <{PAPERSIZE}>) #(set-paper-size <{PAPERSIZE}>)
indent = 0.0\cm indent = 0.0\cm
pagenumber = no pagenumber = no
page-top-space = #.1 top-markup-spacing #'padding = #<{TOPPADDING}>
<{FORMATTING}> 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}>) #(set-global-staff-size <{STAFFSIZE}>)

View File

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

View File

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

View File

@ -154,17 +154,27 @@ static const char * sPaperNames[] = {
[ly substituteMacro:@"COMPOSER" withValue:songComposer]; [ly substituteMacro:@"COMPOSER" withValue:songComposer];
[ly substituteMacro:@"ARRANGER" withValue:songArranger]; [ly substituteMacro:@"ARRANGER" withValue:songArranger];
[ly substituteMacro:@"VLVERSION" withValue: [ly substituteMacro:@"VLVERSION" withValue:
[bndl objectForInfoDictionaryKey:@"CFBundleVersion"]]; [bndl objectForInfoDictionaryKey:@"CFBundleVersion"]];
[ly substituteMacro:@"PAPERSIZE" withValue:paper]; [ly substituteMacro:@"PAPERSIZE" withValue:paper];
// [ly substituteMacro:@"FORMATTING" withValue:@"ragged-last-bottom = ##f"]; // [ly substituteMacro:@"FORMATTING" withValue:@"ragged-last-bottom = ##f"];
[ly substituteMacro:@"VLVERSION" withValue: [ly substituteMacro:@"VLVERSION" withValue:
[bndl objectForInfoDictionaryKey:@"CFBundleVersion"]]; [bndl objectForInfoDictionaryKey:@"CFBundleVersion"]];
[ly substituteMacro:@"CHORDSIZE" withValue: [ly substituteMacro:@"CHORDSIZE" withValue:
[NSString stringWithFormat:@"%f", chordSize]]; [NSString stringWithFormat:@"%f", chordSize]];
[ly substituteMacro:@"LYRICSIZE" withValue: [ly substituteMacro:@"LYRICSIZE" withValue:
[NSString stringWithFormat:@"%f", lyricSize]]; [NSString stringWithFormat:@"%f", lyricSize]];
[ly substituteMacro:@"STAFFSIZE" withValue: [ly substituteMacro:@"STAFFSIZE" withValue:
[NSString stringWithFormat:@"%f", staffSize*scaling]]; [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: [ly substituteMacro:@"CHORDS" withValue:
[NSString stringWithUTF8String:writer.Chords().c_str()]]; [NSString stringWithUTF8String:writer.Chords().c_str()]];
[ly substituteMacro:@"NOTES" withValue: [ly substituteMacro:@"NOTES" withValue: