\version "2.25.80"
musicextrema =
#(define-music-function (mus)(ly:music?)
(let*
(
(alle-pitches
(let loop ((mus mus) (pitches '()))
(let ((p (ly:music-property mus 'pitch)))
(if (ly:pitch? p)
(cons p pitches)
(let ((elt (ly:music-property mus 'element)))
(fold loop
(if (ly:music? elt)
(loop elt pitches)
pitches)
(ly:music-property mus 'elements)))))))
(alle-sortiert (sort alle-pitches ly:pitch<?))
(tief (car alle-sortiert))
(hoch (car (reverse alle-sortiert)))
)
; (display tief )(display hoch)
; (write-me "alle pitches----> " (list? alle-pitches))
(make-music
'SequentialMusic
'elements
(list
(make-music
'NoteEvent
'duration
(ly:make-duration 2)
'pitch
tief)
(make-music
'NoteEvent
'pitch
hoch
'duration
(ly:make-duration 2))))
))
mymus = \relative { c' c c, c,, }
{ \clef bass \musicextrema \mymus }myVoice = \relativ {
c'4 d e f g2 g
a4 a a a g1
a4 a a a g1
f4 f f f e2 e
d4 d d d c1
}
hi = \highest \myVoice
lo = \lowest \myVoice
%hi = { c' }
%lo = { a' }
\score { <<
\new Staff = "Umfang" <<
\new Voice = "Melodie" { << \hi \lo >> }
>>
>> }
Zitat von: joo4wie am Freitag, 17. April 2026, 08:45Hi Manuela,
kannst du mir sagen, zu welcher Uhrzeit das war?
Viele Grüße,
Joo