lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: cascading context definitions (\alias?)


From: Kieren MacMillan
Subject: re: cascading context definitions (\alias?)
Date: Mon, 4 Feb 2013 17:01:31 -0500

Hi David (et al.),

Just reposting, because you asked for a minimal example, I gave one, and then I 
got no response.

> I don't think it should be necessary to explain the idea of a minimal 
> complete example to you.


My apologies — the minimal complete example included below triggers the 
following error:
warning: cannot change `Staff' to `upper': not changing to same context  type: 
Staff

Thanks,
Kieren.
_____________________

\version "2.17.9"

\layout {
  \context {
    \Staff
    \name PianoSingleStaff
    \alias Staff
  }
  \context {
    \PianoSingleStaff
    \name PianoSingleStaffUpper
    \alias PianoSingleStaff
    \override DynamicLineSpanner #'direction = #UP
    \override TextScript #'direction = #UP
  }
  \context {
    \PianoSingleStaff
    \name PianoSingleStaffLower
    \alias PianoSingleStaff
    \override DynamicLineSpanner #'direction = #DOWN
    \override TextScript #'direction = #DOWN
  }
  \context {
    \PianoSingleStaffUpper
    \name ReductionSingleStaffUpper
    \alias PianoSingleStaffUpper
    fontSize = #-2.5
    \override StaffSymbol #'staff-space = #(magstep -2)
  }
  \context {
    \PianoSingleStaffLower
    \name ReductionSingleStaffLower
    \alias PianoSingleStaffLower
    fontSize = #-2.5
    \override StaffSymbol #'staff-space = #(magstep -2)
  }
  \context {
    \Score
    \accepts ReductionSingleStaffUpper
    \accepts ReductionSingleStaffLower
  }
}

switchingMusic = \relative c' {
  \change Staff = "upper" c4\f d e f    |
  \change Staff = "lower" c4\f d e f    |
}

\score {
  <<
    \new ReductionSingleStaffUpper = "upper" s1 
    \new ReductionSingleStaffLower = "lower" \switchingMusic 
  >>
}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]