refactor include system
This commit is contained in:
3
public_includes/book_top.ily
Normal file
3
public_includes/book_top.ily
Normal file
@@ -0,0 +1,3 @@
|
||||
\include "../private_includes/book/book_include.ily"
|
||||
\include "../private_includes/book/toc_include.ily"
|
||||
\include "../private_includes/book/appendix.ily"
|
2
public_includes/break_paged_output.ily
Normal file
2
public_includes/break_paged_output.ily
Normal file
@@ -0,0 +1,2 @@
|
||||
\include "lilypond-book-preamble.ly"
|
||||
#(ly:set-option 'separate-page-formats "pdf")
|
88
public_includes/layout_bottom.ily
Normal file
88
public_includes/layout_bottom.ily
Normal file
@@ -0,0 +1,88 @@
|
||||
% set the speed of the midi music
|
||||
#(define midiQuarterNoteSpeed (if (defined? 'midiQuarterNoteSpeed) midiQuarterNoteSpeed 90))
|
||||
|
||||
MUSIC = { \transposable #TRANSPOSITION \MUSIC }
|
||||
|
||||
verselayout = \layout {
|
||||
\LAYOUT
|
||||
\context {
|
||||
\ChordNames
|
||||
\override ChordName.font-size = \songTextChordFontSize
|
||||
}
|
||||
}
|
||||
|
||||
LAYOUT = \layout {
|
||||
\LAYOUT
|
||||
#(let
|
||||
((custom-size (ly:output-def-lookup LAYOUT 'size #f)))
|
||||
(if custom-size (layout-set-staff-size custom-size)))
|
||||
}
|
||||
|
||||
TEXT = \markuplist {
|
||||
\override #`(transposition . ,TRANSPOSITION)
|
||||
\override #`(verselayout . ,verselayout)
|
||||
\override #`(verse-chords . ,#{ \chords { \verseChords } #})
|
||||
\override #`(verse-reference-voice . ,#{ \global \firstVoice #})
|
||||
\TEXT
|
||||
}
|
||||
|
||||
#(define TEXT_PAGES
|
||||
(map
|
||||
(lambda (text) #{
|
||||
\markuplist {
|
||||
\override #`(transposition . ,TRANSPOSITION)
|
||||
\override #`(verselayout . ,verselayout)
|
||||
\override #`(verse-chords . ,#{ \chords { \verseChords } #})
|
||||
\override #`(verse-reference-voice . ,#{ \global \firstVoice #})
|
||||
#text
|
||||
}
|
||||
#})
|
||||
(if
|
||||
(and
|
||||
(defined? 'TEXT_PAGES)
|
||||
(pair? TEXT_PAGES))
|
||||
TEXT_PAGES
|
||||
(list TEXT))))
|
||||
|
||||
#(define (add-text-pages text-pages)
|
||||
(if (pair? text-pages)
|
||||
(begin
|
||||
(add-score (car text-pages))
|
||||
(for-each
|
||||
(lambda (text)
|
||||
(add-music (pageBreak))
|
||||
(add-score text))
|
||||
(cdr text-pages)))))
|
||||
|
||||
#(if (not noStandaloneOutput)
|
||||
(begin
|
||||
(let ((header (ly:book-header HEADER)) (paper (ly:book-paper HEADER)))
|
||||
(if header (set! $defaultheader header))
|
||||
(if paper (set! $defaultpaper paper))
|
||||
)
|
||||
(add-score #{
|
||||
\score {
|
||||
\MUSIC
|
||||
\layout { \LAYOUT }
|
||||
}#})
|
||||
(add-text-pages TEXT_PAGES)
|
||||
(add-score #{
|
||||
\score {
|
||||
\unfoldRepeats { \MUSIC \INLINESCOREMUSIC }
|
||||
\midi {
|
||||
\context {
|
||||
\Score
|
||||
% Tempo des midi files
|
||||
tempoWholesPerMinute = #(/ midiQuarterNoteSpeed 4)
|
||||
}
|
||||
\context {
|
||||
\Staff
|
||||
\remove "Staff_performer"
|
||||
}
|
||||
\context {
|
||||
\Voice
|
||||
\consists "Staff_performer"
|
||||
}
|
||||
}
|
||||
}#})
|
||||
))
|
5
public_includes/layout_top.ily
Normal file
5
public_includes/layout_top.ily
Normal file
@@ -0,0 +1,5 @@
|
||||
#(ly:set-option 'relative-includes #t)
|
||||
|
||||
#(define noDefaultOutput #t)
|
||||
|
||||
\include "../private_includes/base/all.ily"
|
7
public_includes/pool_bottom.ily
Normal file
7
public_includes/pool_bottom.ily
Normal file
@@ -0,0 +1,7 @@
|
||||
#(define noDefaultOutput (if (defined? 'noDefaultOutput) noDefaultOutput #f))
|
||||
HEADER = \bookpart {
|
||||
\header {
|
||||
\basicSongInfo
|
||||
}
|
||||
}
|
||||
\include #(if noDefaultOutput "../private_includes/void.ily" "layout_bottom.ily")
|
5
public_includes/pool_top.ily
Normal file
5
public_includes/pool_top.ily
Normal file
@@ -0,0 +1,5 @@
|
||||
#(ly:set-option 'relative-includes #t)
|
||||
|
||||
#(define noDefaultOutput (if (defined? 'noDefaultOutput) noDefaultOutput #f))
|
||||
|
||||
\include #(if noDefaultOutput "../private_includes/void.ily" "../private_includes/base/all.ily")
|
Reference in New Issue
Block a user