Compare commits
7 Commits
5ee1a7b6be
...
88f0dc9f8f
Author | SHA1 | Date | |
---|---|---|---|
88f0dc9f8f | |||
e9b904c32c | |||
fd14138d0b | |||
a1bc48b824 | |||
b4690f63bc | |||
958efca6aa | |||
81a5676965 |
@ -1,7 +1,8 @@
|
||||
#(define noStandaloneOutput (if (defined? 'noStandaloneOutput) noStandaloneOutput #f))
|
||||
|
||||
#(if (defined? 'LAYOUT) #f (load "json_parser.scm"))
|
||||
#(if (defined? 'LAYOUT) #f (load (string-append (dirname (current-filename)) file-name-separator-string "json_parser.scm")))
|
||||
#(use-modules (json parser))
|
||||
\include "resolve_inherits.ly"
|
||||
\include "basic_format_and_style_settings.ly"
|
||||
\include "eps_file_from_song_dir.ly"
|
||||
\include "title_with_category_images.ly"
|
||||
|
@ -147,4 +147,15 @@ repStopWithTag = \lyricmode {
|
||||
\once \override StanzaNumber.direction = 1
|
||||
\set stanza = \markup { \repStop }
|
||||
}
|
||||
}
|
||||
|
||||
rightHyphen = \lyricmode {
|
||||
\once \override StanzaNumber.font-series = #'normal
|
||||
\once \override StanzaNumber.direction = 1
|
||||
\set stanza = "-"
|
||||
}
|
||||
|
||||
leftHyphen = \lyricmode {
|
||||
\once \override StanzaNumber.font-series = #'normal
|
||||
\set stanza = "-"
|
||||
}
|
@ -38,6 +38,32 @@ shiftChords = #(define-music-function (parser location xshift chords) (number? l
|
||||
$chords
|
||||
#})
|
||||
|
||||
altChord = #(define-music-function (parser location mainchord altchord) (ly:music? ly:music?)
|
||||
(define (chord-namer in-pitches bass inversion context)
|
||||
#{
|
||||
\markup {
|
||||
\translate #'(-0.5 . 0)
|
||||
\score {
|
||||
\chords { #mainchord \klamm #altchord }
|
||||
\layout {
|
||||
\LAYOUT
|
||||
\context {
|
||||
\ChordNames
|
||||
\override ChordName.extra-spacing-width = #'(0 . 0.3)
|
||||
}
|
||||
\context {
|
||||
\Score
|
||||
\override SpacingSpanner.spacing-increment = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#})
|
||||
#{
|
||||
\once \set chordNameFunction = #chord-namer
|
||||
#mainchord
|
||||
#})
|
||||
|
||||
% kleine Mollakkorde und Alteration ausgeschrieben
|
||||
#(define (note-name->german-markup-nosym pitch lowercase?)
|
||||
(define (pitch-alteration-semitones pitch) (inexact->exact (round (* (ly:pitch-alteration pitch) 2))))
|
||||
@ -112,3 +138,44 @@ generalLayout = \layout {
|
||||
}
|
||||
}
|
||||
#}))
|
||||
|
||||
% If you add this engraver to ChordNames Context chords get only printed on chordchanges and not at newline.
|
||||
% See https://lists.gnu.org/archive/html/lilypond-user/2020-07/msg00187.html
|
||||
Ignoring_newline_chord_changes_engraver =
|
||||
#(lambda (ctx)
|
||||
(let* ((chord #f)
|
||||
(last-chord #f))
|
||||
|
||||
(define (at-line-beginning? grob)
|
||||
(let* ((col (ly:item-get-column grob))
|
||||
(ln (ly:grob-object col 'left-neighbor))
|
||||
(col-to-check (if (ly:grob? ln) ln col)))
|
||||
(and (eq? #t (ly:grob-property col-to-check 'non-musical))
|
||||
(= 1 (ly:item-break-dir col-to-check)))))
|
||||
|
||||
(make-engraver
|
||||
(acknowledgers
|
||||
((chord-name-interface this-engraver grob source-engraver)
|
||||
|
||||
(if chord
|
||||
(begin
|
||||
(set! last-chord chord)
|
||||
(set! chord #f)))
|
||||
|
||||
(set! chord (ly:grob-property grob 'text))
|
||||
|
||||
;; If two subsequent chords are equal and chordChanges is enabled,
|
||||
;; set 'after-line-breaking to a procedure which sets the stencil
|
||||
;; to an empty-stencil if the new chord is at line-start.
|
||||
(if (and (equal? chord last-chord)
|
||||
(ly:context-property ctx 'chordChanges #f))
|
||||
(ly:grob-set-property! grob 'after-line-breaking
|
||||
(lambda (grob)
|
||||
(if (at-line-beginning? grob)
|
||||
(ly:grob-set-property! grob 'stencil empty-stencil))
|
||||
;; keep default
|
||||
(ly:chord-name::after-line-breaking grob))))))
|
||||
((finalize this-engraver)
|
||||
;; house keeping
|
||||
(set! chord #f)
|
||||
(set! last-chord #f)))))
|
22
resolve_inherits.ly
Normal file
22
resolve_inherits.ly
Normal file
@ -0,0 +1,22 @@
|
||||
#(define (resolve-inherit-entry-in-list alist entry)
|
||||
(let* ((key (car entry))
|
||||
(attributes (cdr entry))
|
||||
(inherits (assoc-ref attributes "inherits")))
|
||||
(if inherits
|
||||
(let* ((alist-without-entry (alist-delete key alist))
|
||||
(inherit-entry (assoc inherits alist-without-entry))
|
||||
(inherits-attributes (if inherit-entry (alist-copy (cdr (resolve-inherit-entry-in-list alist-without-entry inherit-entry)))))
|
||||
(override-attributes (alist-delete "inherits" attributes)))
|
||||
(if inherit-entry
|
||||
(begin
|
||||
(for-each (lambda (attribute) (assoc-set! inherits-attributes (car attribute) (cdr attribute))) override-attributes)
|
||||
(cons key inherits-attributes)
|
||||
)
|
||||
(ly:error "~a can not inherit from ~a" key inherits))
|
||||
)
|
||||
entry
|
||||
)))
|
||||
|
||||
#(define (resolve-inherits alist)
|
||||
(map (lambda (entry) (resolve-inherit-entry-in-list alist entry)) alist)
|
||||
)
|
@ -167,11 +167,11 @@
|
||||
(reverse (map (lambda (m)
|
||||
(make-size-box-to-box-markup #f #t m target-size-markup))
|
||||
(cons
|
||||
(make-fill-with-pattern-markup 1 RIGHT "." (car revlist) page)
|
||||
(make-with-link-symbol-ref-markup 'index:label (make-fill-with-pattern-markup 1 RIGHT "." (car revlist) page))
|
||||
(cdr revlist)))))))))
|
||||
|
||||
\paper {
|
||||
indexItemMarkup = \markup \with-link-symbol-ref #'index:label {
|
||||
indexItemMarkup = \markup {
|
||||
\index-item-with-pattern
|
||||
}
|
||||
indexSectionMarkup = \markup \override #'(baseline-skip . 1.5) \left-column {
|
||||
|
@ -253,21 +253,17 @@
|
||||
#{
|
||||
\markup {
|
||||
\override #`(baseline-skip . ,intraverse-vspace)
|
||||
\pad-left #-7
|
||||
\score-equal-height #verse-line-height \score-lines {
|
||||
\transposable #transposition
|
||||
<<
|
||||
\new Devnull { #verse-break-voice }
|
||||
\new NullVoice = "dummyvoice" { #verse-reference-voice }
|
||||
#(music-clone verse-chords)
|
||||
\new NullVoice { #verse-reference-voice }
|
||||
\addlyrics { #lyrics }
|
||||
\new Lyrics \lyricsto "dummyvoice" { #lyrics }
|
||||
>>
|
||||
\layout {
|
||||
\verselayout
|
||||
\context {
|
||||
\Staff
|
||||
\override LeftEdge.space-alist.first-note = #'(fixed-space . 7.0)
|
||||
}
|
||||
ragged-right = ##t
|
||||
\context {
|
||||
\Lyrics
|
||||
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = #verse-text-chord-distance
|
||||
@ -277,9 +273,16 @@
|
||||
\override LyricSpace.minimum-distance = 0.8
|
||||
\override LyricText.stencil = #custom-lyric-text::print
|
||||
}
|
||||
\context {
|
||||
\ChordNames
|
||||
\override VerticalAxisGroup.staff-affinity = ##f
|
||||
\override ChordName.extra-spacing-width = #'(-0.1 . 0.1)
|
||||
\consists \Ignoring_newline_chord_changes_engraver
|
||||
}
|
||||
\context {
|
||||
\Score
|
||||
\override PaperColumn.keep-inside-line = ##f
|
||||
% \override SpacingSpanner.strict-note-spacing = ##t
|
||||
\override SpacingSpanner.uniform-stretching = ##t
|
||||
\override SpacingSpanner.spacing-increment = 0
|
||||
\remove Bar_number_engraver
|
||||
@ -292,6 +295,8 @@
|
||||
\remove Staff_symbol_engraver
|
||||
\remove Clef_engraver
|
||||
\remove Time_signature_engraver
|
||||
\remove Bar_engraver
|
||||
\remove Separating_line_group_engraver
|
||||
\omit KeySignature
|
||||
\omit KeyCancellation
|
||||
}
|
||||
@ -306,6 +311,13 @@
|
||||
\remove Dynamic_engraver
|
||||
\remove Note_heads_engraver
|
||||
}
|
||||
\context {
|
||||
\NullVoice
|
||||
\consists Rest_engraver
|
||||
\omit Rest
|
||||
% \undo \omit NoteHead
|
||||
% \hide NoteHead
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user