Ich bastle noch an meinen Psalmen: Immer wiederkehrende Tonfolgen mit unterschiedlichen Rhytmen.
Jetzt ist es mir Dank der großen Hilfe von harm6 gelungen, Funktionen zu schreiben, damit ich nur noch die Tonlängen eingeben muss. Die Tonhöhen sind in Funktionen ausgelagert.
(code siehe hier:
https://liarchiv.joonet.de/index.php?topic=1719.msg9611#msg9611 )
Es gibt im Moment aber noch zwei Probleme:
Wenn ich \break einfüge wird eine zusätzliche Notenzeile erzeugt (siehe code unten). Außerdem weiß ich nicht, wo ich ein \markup unterbringen kann (und der code ist so elend lang..)
\version "2.18.2"
\paper
{
myStaffSize = #20
#(define fonts
(make-pango-font-tree "Ubuntu Condensed"
"Ubuntu"
"Ubuntu"
(/ myStaffSize 20)))
}
\include "gregorian.ly"
#(define (make-m-list-5 pitch duration-list)
(do ((i 0 (1+ i))
(l duration-list)
(result-ls '()))
((or (= i (length l))
(= (list-ref l i) 0))
(reverse result-ls))
(let ((dur (ly:make-duration (ly:intlog2 (list-ref l i)))))
(set! result-ls
(cons #{ $pitch $dur #}
result-ls)))))
TenA =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4)
(list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ c' #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ c' #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ c' #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ b #} Notenwerte4))
#}
)
BarA =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4)
(list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ e #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte4))
#}
)
BasA =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4)
(list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ a, #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ a, #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ g, #} Notenwerte4))
#}
)
TenB =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ c' #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ b #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte4))
$(make-sequential-music (make-m-list-5 #{ gis#} Notenwerte5))
#}
)
BarB =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte4))
$(make-sequential-music (make-m-list-5 #{ b, #} Notenwerte5))
#}
)
BasB =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ e #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte4))
$(make-sequential-music (make-m-list-5 #{ e #} Notenwerte5))
#}
)
TenC =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3)
(list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ f' #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ d' #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ b #} Notenwerte3))
#}
)
BarC =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3)
(list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte3))
#}
)
BasC =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3)
(list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ a, #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ g, #} Notenwerte3))
#}
)
TenD =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ b #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ gis#} Notenwerte4))
$(make-sequential-music (make-m-list-5 #{ a #} Notenwerte5))
#}
)
BarD =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ e #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte4))
$(make-sequential-music (make-m-list-5 #{ c #} Notenwerte5))
#}
)
BasD =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
$(make-sequential-music (make-m-list-5 #{ f #} Notenwerte1))
$(make-sequential-music (make-m-list-5 #{ d #} Notenwerte2))
$(make-sequential-music (make-m-list-5 #{ e #} Notenwerte3))
$(make-sequential-music (make-m-list-5 #{ b, #} Notenwerte4))
$(make-sequential-music (make-m-list-5 #{ a, #} Notenwerte5))
#}
)
seqA =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4)
(list? list? list? list?)
#{
\context ChoirStaff
<<
\context Staff = "UP"
<<
\context Voice = "1"
{
\clef"G_8"
\voiceOne { c'\breve }
\TenA #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4
\divisioMaior
}
\context Voice = "2"
{
\voiceTwo { e\breve }
\BarA #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4
}
>>
\context Staff = "DOWN"
{
\clef bass
{ a,\breve }
\BasA #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4
\divisioMaior
}
>>
#}
)
seqB =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
\context ChoirStaff
<<
\context Staff = "UP"
<<
\context Voice = "1"
{
{c'\breve }
\TenB #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4 #Notenwerte5
\divisioMaior
}
\context Voice = "2"
{
{ e\breve }
\BarB #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4 #Notenwerte5
}
>>
\context Staff = "DOWN"
{
\clef bass
{ c\breve }
\BasB #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4 #Notenwerte5
\divisioMaior
}
>>
#}
)
seqC =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3)
(list? list? list?)
#{
\context ChoirStaff
<<
\context Staff = "UP"
<<
\context Voice = "1"
{
{ c'\breve }
\TenC #Notenwerte1 #Notenwerte2 #Notenwerte3
\divisioMaior
}
\context Voice = "2"
{
{ e\breve }
\BarC #Notenwerte1 #Notenwerte2 #Notenwerte3
}
>>
\context Staff = "DOWN"
{
\clef bass
{ a,\breve }
\BasC #Notenwerte1 #Notenwerte2 #Notenwerte3
\divisioMaior
}
>>
#}
)
seqD =
#(define-music-function
(parser location Notenwerte1 Notenwerte2 Notenwerte3 Notenwerte4 Notenwerte5)
(list? list? list? list? list?)
#{
\context ChoirStaff
<<
\context Staff = "UP"
<<
\context Voice = "1"
{
{ e'\breve }
\TenD #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4 #Notenwerte5
\finalis
}
\context Voice = "2"
{
{ g\breve }
\BarD #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4 #Notenwerte5
}
>>
\context Staff = "DOWN"
{
\clef bass
{ c\breve }
\BasD #Notenwerte1 #Notenwerte2 #Notenwerte3 #Notenwerte4 #Notenwerte5
\finalis \break
}
>>
#}
)
Ausnahme =
#(define-music-function (parser location Tenor Bariton Bass) (ly:music? ly:music? ly:music?)
#{
\context ChoirStaff
<<
\context Staff = "UP"
<<
\context Voice = "1"
{
$Tenor
\divisioMaior
}
\context Voice = "2"
$Bariton
>>
\context Staff = "DOWN"
{
$Bass
\divisioMaior
}
>>
#}
)
links = { \once \override LyricText #'self-alignment-X = #-1 }
Text = \lyricmode
{
\override LyricText #'font-size = #0.5
\links \markup \concat { "Mein Gott, mein " \underline Gott ", warum"}
hast du mich ver -- las -- sen,
\links \markup \concat {"bist fern meinem " \underline Schreien", den"}
Wor -- ten mei -- ner Kla -- ge?
\links \markup \concat {"Mein " \underline Gott ", ich rufe bei " \underline Tag ", doch"}
du gibst kei -- ne Ant -- wort;
\links \markup \concat {"ich rufe bei " \underline Nacht }
und fin -- de doch kei -- ne Ru -- he.
\links "Aber" du bist hei -- lig,
\links \markup \concat {"du " \underline thronst}
ü -- ber dem Lob -- preis Is -- ra -- els.
\links "Dir haben unsere" Vä -- ter ver -- traut,
\links \markup \concat {"sie haben ver- " \underline traut ", und"}
du hast sie ge -- ret -- tet.
\links \markup \concat {"Zu dir riefen " \underline sie " und" }
wur -- den be -- freit,
\links \markup \concat {"sie hofften auf " \underline dich }
und wur -- den nicht ent -- täuscht.
}
<<
{
\seqA #'(4 0) #'(4 0) #'(4 4 0) #'(2 2 0)
\seqB #'(4 0) #'(4 0) #'(4 0) #'(4 0) #'(2 2 0)
\seqC #'(4 4 0) #'(4 4 0) #'(2 2 0)
\seqD #'(4 4 4 0) #'(2 0) #'(4 0) #'(4 0) #'(2 2 0)
\Ausnahme
{ c'\breve c'2 c'4 b2 c' }
{ e \breve d4 (e4) f4 f2 e }
{ a,\breve a,2 d4 g,2 c }
\Ausnahme
{ c'\breve c'4 c' c' b a gis gis gis2 }
{ e \breve a4 a a f d b, b, b,2 }
{ c\breve f4 f e d f e e e2 } \break
\seqA #'(4 0) #'(4 0) #'(4 0) #'(2 0)
\seqB #'(4 0) #'(4 0) #'(4 0) #'(4 0) #'(2 2 0) \break
\seqC #'(4 4 0) #'(4 0) #'(2 0)
\seqD #'(4 0) #'(4 4 0) #'(4 0) #'(4 0) #'(2 0)
% usw.
}
\new Lyrics \with { alignBelowContext = #"UP" } \lyricsto "1" \Text
>>
\layout
{
\context
{
\Staff
\remove "Time_signature_engraver"
\remove "Bar_engraver"
\override Stem #'stencil = ##f
}
}
freue mich über Hilfe.
Stefan