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: Wed, 23 Jan 2013 09:18:22 -0500

Hi David,

> 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]