lilypond-common-includes/basic_format_and_style_settings.ly

169 lines
5.3 KiB
Plaintext

\language "deutsch"
\include "default_style.ly"
\include "default_songinfo_style.ly"
\include "footer_with_songinfo.ly"
\include #(if (defined? 'customStyleOverridesFile) customStyleOverridesFile "void.ly")
#(set-default-paper-size songFormatAndSize)
#(set-global-staff-size globalSize)
\paper {
property-defaults.fonts.serif = \songChordFont
property-defaults.fonts.sans = \songLyricFont
%annotate-spacing = ##t
% spacing stuff
two-sided = ##t
inner-margin = 1.5\cm
outer-margin = \songMargin
binding-offset = 0\cm
top-margin = \songMargin
bottom-margin = \songMargin
system-system-spacing = #'((basic-distance . 10) (padding . 1.5))
markup-system-spacing = #'((basic-distance . 1))
score-markup-spacing = #'((padding . 2))
top-markup-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0))
}
generalLayout = \layout {
indent = #0
\context {
\Lyrics
\override LyricText.font-size = #lyricSize
\override StanzaNumber.font-size = #lyricSize
\override StanzaNumber.font-family = #'sans
\override LyricText.font-family = #'sans
\override LyricExtender.minimum-length = 0
}
\context {
\Staff
\accidentalStyle modern
\consists Merge_rests_engraver
}
\context {
\Score
\remove "Bar_number_engraver"
\RemoveEmptyStaves
\override VerticalAxisGroup.remove-first = ##t
\overrideTimeSignatureSettings
4/4 % timeSignatureFraction
1/4 % baseMomentFraction
#'(1 1 1 1) % beatStructure
#'() % beamExceptions
\overrideTimeSignatureSettings
3/4 % timeSignatureFraction
1/4 % baseMomentFraction
#'(1 1 1 1) % beatStructure
#'() % beamExceptions
}
\context {
\Voice
% ich will lines breaken wie ich will!
\remove "Forbid_line_break_engraver"
\override NoteHead.layer = 2
\override Dots.layer = 2
\override Stem.layer = 2
\override Flag.layer = 2
\override Beam.layer = 2
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% kleine Helferlein:
textp = \lyricmode { \markup { \raise #1 \musicglyph #"rests.3" } }
% zweite Stimme alles grau
secondVoiceStyle = {
\override NoteHead.color = #grey
\override Dots.color = #grey
\override Stem.color = #grey
\override Flag.color = #grey
\override Beam.color = #grey
\override NoteHead.layer = 1
\override Dots.layer = 1
\override Stem.layer = 1
\override Flag.layer = 1
\override Beam.layer = 1
}
firstVoiceStyle = {
\override NoteHead.color = #black
\override Dots.color = #black
\override Stem.color = #black
\override Flag.color = #black
\override Beam.color = #black
}
% Deprecated: einzelne Noten innerhalb von \secondVoiceStyle mit schwarzem statt grauem Kopf
schwarzkopf =
#(define-music-function (parser location noten) (ly:music?)
(begin (ly:warning "\\schwarzkopf brauchts nicht mehr, das kann ersatzlos weg!") noten))
romanStanza =
#(define-music-function (parser location) ()
#{ \override StanzaNumber.style = #'roman #})
stanza =
#(define-music-function (parser location stanzanumber) (number?)
#{
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
\applyContext
#(lambda (context)
(let* ((stanzastyle (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber)))
(formattedStanzaNumber (format #f (if (eq? stanzastyle 'roman) romanStanzaFormat stanzaFormat) stanzanumber)))
(ly:context-set-property! context 'stanza formattedStanzaNumber)))
#}
)
ref = {
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
\set stanza = \refString
}
% prints a repStart Sign as stanza if the tag 'repeats is kept.
% if there was a stanza already set by the stanza function with StanzaNumber.layer = 23 we set that also as stanza.
repStartWithTag = \lyricmode {
\tag #'repeats {
\applyContext
#(lambda (context)
(let ((lastStanza (ly:context-property context 'stanza))
(printLastStanza (= (ly:assoc-get 'layer (ly:context-grob-definition context 'StanzaNumber) 0) 23))
(stanzaFontSeries (ly:assoc-get 'font-series (ly:context-grob-definition context 'StanzaNumber) 'normal)))
(ly:context-set-property! context 'stanza
(make-concat-markup
(if printLastStanza
(list (make-override-markup `(font-series . ,stanzaFontSeries) lastStanza) (make-hspace-markup 1) repStart)
(list repStart)
)))))
\once \override StanzaNumber.font-series = #'normal
}
}
repStopWithTag = \lyricmode {
\tag #'repeats {
\once \override StanzaNumber.font-series = #'normal
\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 = "-"
}
multiverseSkips =
#(define-music-function (parser location skips) (number?)
#{ \tag #'multiVerse { \repeat unfold #skips { \skip4 } } #})
alt =
#(define-music-function (parser location a b) (ly:music? ly:music?)
#{ \tag #'firstVerse { #a } \tag #'multiVerse { #b } #})