From 30e3032d4e2b4734af722532e32b13a0ea6c11c3 Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Tue, 20 Jan 2026 09:30:07 +0100 Subject: [PATCH] d --- string-quartet.ly | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 string-quartet.ly diff --git a/string-quartet.ly b/string-quartet.ly new file mode 100644 index 0000000..940cce0 --- /dev/null +++ b/string-quartet.ly @@ -0,0 +1,86 @@ + + +makePiece = #(define-scheme-function + (p) + (string?) + #{ \markup { \bold \fontsize #+1 $p } #} + ) + +makeScriptum = #(define-scheme-function + (s) + (string?) + #{ \markup { \fontsize #-1 \normal-text $s } #} + ) + +makeHdr = #(define-scheme-function + (thePiece theScriptum) + (markup? markup?) + #{ + \header { + subsubtitle = $theScriptum + piece = $thePiece + } + #} + ) + +makeScore = #(define-scheme-function + (instrument music) + (string? ly:music?) + #{ + \score { + \new Staff \with { instrumentName = $instrument } + $music + \layout { + \context { + \Score + \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/3) + } + } + } + #} + ) + +makeScoreVI = #(define-scheme-function + (music) + (ly:music?) + (makeScore "Violin I" music) + ) + +makeScoreVII = #(define-scheme-function + (music) + (ly:music?) + (makeScore "Violin II" music) + ) + +makeScoreVa = #(define-scheme-function + (music) + (ly:music?) + (makeScore "Viola" #{ { \clef alto $music } #}) + ) + +makeScoreCl = #(define-scheme-function + (music) + (ly:music?) + (makeScore "Cello" #{ { \clef bass $music } #}) + ) + +makeScoreFull = #(define-scheme-function + (vI vII va cl) + (ly:music? ly:music? ly:music? ly:music?) + #{ + \score { + << + \new Staff \with { instrumentName = "Violin I" } $vI + \new Staff \with { instrumentName = "Violin II" } $vII + \new Staff \with { instrumentName = "Viola" } { \clef alto $va } + \new Staff \with { instrumentName = "Cello" } { \clef bass $va } + >> + \layout { + \context { + \Score + \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/3) + } + } + } + #} + )