[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: chord.ly to extract notes from chords breaks with new Guile
From: |
Jean Abou Samra |
Subject: |
Re: chord.ly to extract notes from chords breaks with new Guile |
Date: |
Thu, 01 Jun 2023 11:29:12 +0200 |
User-agent: |
Evolution 3.48.1 (3.48.1-1.fc38) |
Better make that:
\version "2.24.1"
#(define ((Keep_only_engraver i) context)
#(define ((Keep_only_performer i) context)
(let ((j 0))
(make-performer
(listeners
((note-event performer event)
(unless (eqv? i j)
(ly:event-set-property! event 'pitch #f))
(set! j (1+ j))))
((stop-translation-timestep performer)
(set! j 0)))))
#(define (scores n music)
(apply values
(map (lambda (i)
#{
\score {
\midi { \context { \Score \consists #(Keep_only_engraver i) } }
\midi { \context { \Score \consists #(Keep_only_performer i) } }
#music
}
#})
(iota n))))
mus = <<
\new Staff { c'1 d'2 d'4 e'4 }
\new Staff << { g'1 a'2 a'4 b'4 } \\ { g1 g1 } >>
>>
{ \mus }
$(scores 3 mus) % 3 is the max number of simutaneous notes
(yay for muscle memory)
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: chord.ly to extract notes from chords breaks with new Guile,
Jean Abou Samra <=