Hi Mark,
On Sat, May 24, 2014 at 1:18 PM, mark damerell
<markdamer...@googlemail.com>wrote:
> The file I posted is only intended as a tiny file to show my current
> problem.
> I could post something longer but I dont think this would give the experts
> any better idea of my problem.
>
>
> In outline, I wanted to
>
> print out a \score with the handbell music in plain black, collecting
> information as it goes.
>
> call a Scheme procedure to assign bells to ringers. In my example
> "shout" stands for this procedure. My problem is: how to get "shout" to
> run after the first \score is printed?
>
> Then do the Scheme equivalent of
> for ( i=0; i<n; i++ )
> print the \score again, highlighted for the i-th ringer
>
>
Does the following file do what you want? It can be improved to allow for
multiple pitches per part, but perhaps this serves as a start.
--David
\version "2.18.2"
colorPitch =
#(define-music-function (parser location p col) (ly:pitch? color?)
#{
\override NoteHead.color =
#(lambda (grob)
(let ((pitch (ly:event-property (ly:grob-property grob 'cause) 'pitch)))
(if (equal? pitch p)
col)))
#})
upper = \relative c' {
c4 d es f
}
\score {
\new Staff \upper
\layout { }
}
\score {
\new Staff {
\colorPitch #(ly:make-pitch 0 1 0) #green
\upper
}
\layout { }
}
\score {
\new Staff {
\colorPitch #(ly:make-pitch 0 2 -1/2) #blue
\upper
}
\layout { }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user