Hello everyone. So far I have not been able to reconstruct the exact error message, but I have encountered a problem in connection with the change of staves. I do not understand: why do the notes in the lower staff not stay in the lower staff? Why is the first chord in the upper staff not displayed with the stem up? Here is my code example:
\version "2.24.2" re = { \change Staff = "rechts" } li = { \change Staff = "links" } lira = { \li \stemUp } global = { \time 3/4 s2.*4 } rechtsabXVtoene = { <gis b > 2 ~ 8 \tieNeutral <fis' a' > 8~ 2 ~ 8 <e' bes' c'' >8 ~ 2 ~ 8 8 ~ \tuplet 3/2 { 8 <cis' f' > <d' gis' > ~ } 8 <c' e' >4. } rechtslinksabXV = { \lira \voiceOne s8*5 \stemNeutral \re \oneVoice s8 } rechts = { \context Voice << {\rechtsabXVtoene} { \rechtslinksabXV } >> } linksabXVtoene = { <e, ais, d >2~ 8 f 8 ~ 2 ~ 8 <gis b > ~ 2~ 8 8 \tuplet 3/2 {8 <fis ais > <f b > ~} 8 <e gis > 4. } haelselinksabXV = { \stemDown \voiceTwo s8*5 \stemNeutral \oneVoice } links = { \clef "bass" \context Voice << {\linksabXVtoene} { \haelselinksabXV } >> } \score { << \new Devnull \global \new PianoStaff << \new Staff="rechts" \rechts \new Staff="links" \links >> >> } Am Sa., 15. März 2025 um 19:52 Uhr schrieb <carsonm...@ca.rr.com>: > Stefan, > > > > Without a MWE I cannot be specific, yet when I encounter this error, the > staff to which I want to change does not exist, i.e., does not have any > coding in it. > > > > Mark > > > > *From:* lilypond-user-bounces+carsonmark=ca.rr....@gnu.org > <lilypond-user-bounces+carsonmark=ca.rr....@gnu.org> *On Behalf Of *Stefan > Thomas > *Sent:* Saturday, March 15, 2025 11:22 AM > *To:* lilypond-user <lilypond-user@gnu.org> > *Subject:* problems with shortcut for change staff > > > > Dear community, when writing for piano, I change very often between the > staves. > For this reason, I have defined this abbreviation: > > re = { \change Staff = "rechts" } > li = { \change Staff = "links" } > > But while compiling a file I get very often: > /home/stefan/partituren/vorlagen/klavierstyle.ly:29:8: warning: cannot > find context to change to: Staff = links > li = { > \change Staff = "links" } > How can I avoid this error message? >