Compare commits
3 Commits
chord-spac
...
c97c856b05
| Author | SHA1 | Date | |
|---|---|---|---|
| c97c856b05 | |||
| 76b81a9968 | |||
| 3ff5a36106 |
@@ -21,8 +21,17 @@
|
||||
)))))
|
||||
(scm-load "resolve_inherits.scm")
|
||||
(scm-load "yaml_parser.scm")))
|
||||
#(define AUTHOR_DATA (if (defined? 'AUTHOR_DATA) AUTHOR_DATA (parse-yml-file "../../lilypond-song-includes/data/authors.yml")))
|
||||
#(define SONG_DATA (if (defined? 'SONG_DATA) SONG_DATA (parse-yml-file "../../lilypond-song-includes/data/songs.yml")))
|
||||
|
||||
#(define (song-includes-data-path filename)
|
||||
(string-join
|
||||
(list
|
||||
(dirname (dirname (dirname (dirname (current-filename)))))
|
||||
"lilypond-song-includes"
|
||||
"data"
|
||||
filename)
|
||||
file-name-separator-string))
|
||||
#(define AUTHOR_DATA (if (defined? 'AUTHOR_DATA) AUTHOR_DATA (parse-yml-file (song-includes-data-path "authors.yml"))))
|
||||
#(define SONG_DATA (if (defined? 'SONG_DATA) SONG_DATA (parse-yml-file (song-includes-data-path "songs.yml"))))
|
||||
|
||||
\include "merge_rests_engraver_override.ily"
|
||||
\include "basic_format_and_style_settings.ily"
|
||||
|
||||
@@ -49,6 +49,7 @@ generalLayout = \layout {
|
||||
\context {
|
||||
\Score
|
||||
\remove "Bar_number_engraver"
|
||||
\remove "Metronome_mark_engraver"
|
||||
\RemoveEmptyStaves
|
||||
\override VerticalAxisGroup.remove-first = ##t
|
||||
\overrideTimeSignatureSettings
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
(for-each (lambda (category)
|
||||
(let* ((catsym (string->symbol category))
|
||||
(catlist (hashq-ref category-index-hash catsym
|
||||
(list (list label 'indexCategoryMarkup `(((rawtext . ,category))))))))
|
||||
(list (list label 'indexCategoryMarkup `(((combine-with-next . #t) (rawtext . ,category))))))))
|
||||
(if (assq catsym category-names)
|
||||
(hashq-set! category-index-hash catsym
|
||||
(cons (list label markup-symbol textoptions) catlist))
|
||||
@@ -114,7 +114,7 @@
|
||||
(for-each (lambda (authorID)
|
||||
(let* ((authorsym (string->symbol authorID))
|
||||
(authorlist (hashq-ref author-index-hash authorsym
|
||||
(list (list label 'indexAuthorMarkup `(((rawtext . ,authorID))))))))
|
||||
(list (list label 'indexAuthorMarkup `(((combine-with-next . #t) (rawtext . ,authorID))))))))
|
||||
(hashq-set! author-index-hash authorsym
|
||||
(cons (list label markup-symbol textoptions) authorlist))
|
||||
))
|
||||
@@ -218,20 +218,29 @@
|
||||
}
|
||||
|
||||
#(define (prepare-item-markup items layout)
|
||||
(map (lambda (index-item)
|
||||
(let* ((label (car index-item))
|
||||
(index-markup (cadr index-item))
|
||||
(textoptions (caddr index-item))
|
||||
(text (chain-assoc-get 'rawtext textoptions))
|
||||
(alternative (chain-assoc-get 'alternative textoptions))
|
||||
(songnumber (chain-assoc-get 'songnumber textoptions)))
|
||||
(markup #:override (cons 'index:label label)
|
||||
#:override (cons 'index:page (markup #:custom-page-number label -1))
|
||||
#:override (cons 'index:text text)
|
||||
#:override (cons 'index:alternative alternative)
|
||||
#:override (cons 'index:songnumber songnumber)
|
||||
(ly:output-def-lookup layout index-markup))))
|
||||
(items)))
|
||||
(define (single-item-markup index-item)
|
||||
(let* ((label (car index-item))
|
||||
(index-markup (cadr index-item))
|
||||
(textoptions (caddr index-item))
|
||||
(text (chain-assoc-get 'rawtext textoptions))
|
||||
(alternative (chain-assoc-get 'alternative textoptions))
|
||||
(songnumber (chain-assoc-get 'songnumber textoptions)))
|
||||
(markup #:override (cons 'index:label label)
|
||||
#:override (cons 'index:page (markup #:custom-page-number label -1))
|
||||
#:override (cons 'index:text text)
|
||||
#:override (cons 'index:alternative alternative)
|
||||
#:override (cons 'index:songnumber songnumber)
|
||||
(ly:output-def-lookup layout index-markup))))
|
||||
(if (null? items)
|
||||
items
|
||||
(let* ((index-item (car items))
|
||||
(combine-with-next (chain-assoc-get 'combine-with-next (caddr index-item) #f))
|
||||
(restitems (cdr items))
|
||||
(item-markup (single-item-markup index-item)))
|
||||
(if (and combine-with-next (not (null? restitems)))
|
||||
(cons (make-column-markup (list item-markup (single-item-markup (car restitems)))) (prepare-item-markup (cdr restitems) layout))
|
||||
(cons item-markup (prepare-item-markup restitems layout))))
|
||||
))
|
||||
|
||||
#(define-markup-list-command (index-in-columns-with-title layout props index-type title-markup) (symbol? markup?)
|
||||
( _i "Outputs index alphabetical sorted or in categories" )
|
||||
@@ -245,7 +254,7 @@
|
||||
(make-columnlayout-markup-list songTocColumns 2
|
||||
(let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
|
||||
(cons (- h (interval-length (ly:stencil-extent title Y))) h))
|
||||
(prepare-item-markup items layout))))))
|
||||
(prepare-item-markup (items) layout))))))
|
||||
|
||||
indexItem =
|
||||
#(define-music-function (parser location sorttext text) (string? markup?)
|
||||
@@ -255,7 +264,7 @@ indexItem =
|
||||
indexSection =
|
||||
#(define-music-function (parser location sorttext text) (string? markup?)
|
||||
"Add a section line to the alphabetical index, using @code{indexSectionMarkup} paper variable markup. This can be used to divide the alphabetical index into different sections, for example one section for each first letter."
|
||||
(add-index-item! 'indexSectionMarkup (prepend-alist-chain 'rawtext text '()) sorttext))
|
||||
(add-index-item! 'indexSectionMarkup (prepend-alist-chain 'combine-with-next #t (prepend-alist-chain 'rawtext text '())) sorttext))
|
||||
|
||||
#(define (extract-and-check-vars-from-header bookheader varlist)
|
||||
(let* ((headervars (hash-map->list cons (struct-ref (ly:book-header bookheader) 0)))
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
% set the speed of the midi music
|
||||
#(define midiQuarterNoteSpeed (if (defined? 'midiQuarterNoteSpeed) midiQuarterNoteSpeed 90))
|
||||
|
||||
MUSIC = { \transposable #TRANSPOSITION \MUSIC }
|
||||
|
||||
verselayout = \layout {
|
||||
@@ -70,11 +67,6 @@ TEXT = \markuplist {
|
||||
\score {
|
||||
\unfoldRepeats { \MUSIC \INLINESCOREMUSIC }
|
||||
\midi {
|
||||
\context {
|
||||
\Score
|
||||
% Tempo des midi files
|
||||
tempoWholesPerMinute = #(/ midiQuarterNoteSpeed 4)
|
||||
}
|
||||
\context {
|
||||
\Staff
|
||||
\remove "Staff_performer"
|
||||
|
||||
Reference in New Issue
Block a user