Hello all,
In the attached snippet, I’ve defined some custom contexts
(nested/hierarchical) for piano work.
I can’t seem to get staff switching to work correctly: I get “ cannot change
[…] none of these in my family” errors.
Any hints would be appreciated.
Thanks!
Kieren.
%%%% BEGIN SNIPPET
\version "2.19.17"
\layout {
\context {
\Staff
\name PianoSingleStaff
\alias Staff
}
\context {
\PianoSingleStaff
\name PianoSingleStaffUpper
\alias PianoSingleStaff
\alias Staff
\override DynamicLineSpanner #'direction = #UP
\override TextScript #'direction = #UP
}
\context {
\PianoSingleStaff
\name PianoSingleStaffLower
\alias PianoSingleStaff
\alias Staff
\override DynamicLineSpanner #'direction = #DOWN
\override TextScript #'direction = #DOWN
}
\context {
\PianoStaff
\accepts PianoSingleStaffUpper
\accepts PianoSingleStaffLower
}
}
pfU = { \change PianoSingleStaff = "piano_upper" \oneVoice }
pfL = { \change PIanoSingleStaff = "piano_lower" \oneVoice }
theMusic = {
\clef bass
\pfL d,8 \pfU d' \pfL d, \pfU d'
}
\score {
\new PianoStaff <<
\new PianoSingleStaffUpper = "piano_upper" s1
\new PianoSingleStaffLower = "piano_lower" \theMusic
>>
}
%%%% END SNIPPET
_______________________
Kieren MacMillan, composer
www: <http://www.kierenmacmillan.info>
email: [email protected]
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user