[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make defining new contexts simpler with better \alias functionality
From: |
Paul Morris |
Subject: |
Re: Make defining new contexts simpler with better \alias functionality |
Date: |
Sun, 8 Mar 2015 08:57:02 -0700 (MST) |
I thought of another limit case: trying to create more than one custom
context inside a single score block, as follows, will result in more than
one typeset score:
\score {
<<
\new myVoice { c' d' e' f' }
\new myOtherVoice { e' f' g' a' }
>>
\accept-like Voice myVoice \layout {
\context {
\Voice
\name myVoice
\alias Voice
\override NoteHead.color = #blue
}
}
\accept-like Voice myOtherVoice \layout {
\context {
\Voice
\name myOtherVoice
\alias Voice
\override NoteHead.color = #green
}
}
}
One way around this would be to edit the function to work as follows,
accepting an alist as the first argument.
\score {
<<
\new myVoice { c' d' e' f' }
\new myOtherVoice { e' f' g' a' }
>>
\accept-like #'((Voice . myVoice) (Voice . myOtherVoice)) \layout {
\context {
\Voice
\name myVoice
\alias Voice
\override NoteHead.color = #blue
}
\context {
\Voice
\name myOtherVoice
\alias Voice
\override NoteHead.color = #green
}
}
}
That's less elegant as the user has to switch into scheme to supply the
first argument.
-Paul
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Make-defining-new-contexts-simpler-with-better-alias-functionality-tp172723p172810.html
Sent from the Bugs mailing list archive at Nabble.com.
- Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/06
- Re: Make defining new contexts simpler with better \alias functionality, David Kastrup, 2015/03/06
- Re: Make defining new contexts simpler with better \alias functionality, David Kastrup, 2015/03/06
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/06
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/06
- Re: Make defining new contexts simpler with better \alias functionality, David Kastrup, 2015/03/07
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/07
- Re: Make defining new contexts simpler with better \alias functionality, David Kastrup, 2015/03/07
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/08
- Re: Make defining new contexts simpler with better \alias functionality,
Paul Morris <=
- Re: Make defining new contexts simpler with better \alias functionality, David Kastrup, 2015/03/08
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/08
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/16
- Re: Make defining new contexts simpler with better \alias functionality, Colin Campbell, 2015/03/16
- Re: Make defining new contexts simpler with better \alias functionality, Paul Morris, 2015/03/17