lilypond-user
[Top][All Lists]
Advanced

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

Re: Ossia Piano Staff


From: Phil Holmes
Subject: Re: Ossia Piano Staff
Date: Wed, 17 Feb 2016 12:36:27 -0000


I don't know a "good" way.  A hacky way is to place a hidden markup or note within the measure so that it forces the spacing to be what you want.

--
Phil Holmes
 
 
----- Original Message -----
Sent: Wednesday, February 17, 2016 11:44 AM
Subject: Fwd: Ossia Piano Staff

Whoops. forgot to reply-all. Here's my reply to Andrew Bernard's message.

UPDATE: I've discovered the \omit Staff.TimeSignature command, so now the time signature is properly hidden. My last issue with this score is controlling staff spacing within systems on an explicit per-measure basis (ie, set an override at specific points to change spacing allowed for the empty staves). Is there a way to do this? All the instructions I find in the NR are for the Staff or Score level, which would change them for the whole piece. I only want them changed at specific sections. Is there a way to do that?

Cheers,

A
---------- Forwarded message ----------
From: N. Andrew Walsh <address@hidden>
Date: Wed, Feb 17, 2016 at 12:14 PM
Subject: Re: Ossia Piano Staff
To: Andrew Bernard <address@hidden>


Hi Andrew,

thanks for pointing the errors out. I realized it wasn't compiling after I sent it out. I found a workaround by using a \context block, like this:

\version "2.19.36"

VioloncelloMusic = \new Voice \relative c {
\clef bass
\time 4/8
\key es \major
   <<
    { g8.\( f16 es8 g16--( g--) | as4 es8 as | g8. f16 es8 es | f2\) | g4\( es8 g | as4 es8 as | g4 f | es2\) | bes'4\( es, | c' es,8 es | bes'4 es,8 es | f4.\) f8\( |  %% Bar 95
  g8. f16 es8 g | as4 es8 as | g4 f | es2\) | }
    \context PianoStaff = "ossia" \with { \remove "Time_signature_engraver" } << 
        { \startStaff \clef treble \hideNotes | es2^\markup { ossia } \omit PianoStaff.SpanBar | \omit Staff.BarLine \repeat unfold 15 { es2 } \undo \omit Staff.BarLine \undo \omit PianoStaff.SpanBar | \stopStaff }
        { \startStaff \clef bass \hideNotes | es2 \omit PianoStaff.SpanBar | \omit Staff.BarLine \repeat unfold 15 { es2 } \undo \omit Staff.BarLine \undo \omit PianoStaff.SpanBar | \stopStaff }
    >>
   >>%% Bar 99 (end of ossia piano) 
}
   
   \score {
        
    \new Staff = "Staff_violoncello" <<
          \override Staff.InstrumentName.self-alignment-X = #LEFT
          \set Staff.instrumentName = \markup \left-column \abs-fontsize #10 { Violoncello }
          \set Staff.midiInstrument = #"cello"
          \VioloncelloMusic
    >>  
   }
     

Some issues with this:

* sticking an ossia piano part into the cello music is an ugly hack, but I have two simultaneous voices in each hand of the piano, forcing me to use << { } \\ { } >> blocks. These blocks break at %% Bar 95, and I didn't know how to have the \context block extend across them. 
* I can't figure out how to get the time signatures not to appear. 

Any tips how to improve this?

Cheers,

A

On Wed, Feb 17, 2016 at 11:44 AM, Andrew Bernard <address@hidden> wrote:
Hi Andrew,

Can you send something that compiles?
global is missing. Also, I don't kno who wyou compile the version line
- it's a syntax error to have an equals sign.

Better if you can make an MWE - minimal working example, for the list.

Andrew





On 17 February 2016 at 21:30, N. Andrew Walsh <address@hidden> wrote:
> Hi List,
>
> also, in the same ensemble piece I mentioned in the last message, I'd like
> to have a passage in the piano part that also includes such "empty" staves
> for graphics, but only within one section. I'm trying to apply the NR
> instructions for ossia staves, and it's apparently not working. Here's what
> I have:
>
> \version = "2.19.36"
>
> KlavierMusicUpper = \new Voice \relative c'' {
>   \clef treble
>   R1*5/8 |
>   \time 3/8
>   R1*3/8 |
>   \time 4/8
>   s2*127 | %% all the music omitted for brevity
> }
>
> KlavierMusicLower = \new Voice \relative c'' {
>   \clef treble
>   R1*5/8 |
>   \time 3/8
>   R1*3/8 |
>   \time 4/8
>   s2*127 | %% here too. Just imagine it's full of passage-work or something
> }
>
> KlavierOssiaUpper = \new Voice \relative c'' {
>  \clef treble
>  \time 5/8
>  s4 s s8 |
>  \time 3/8
>  s4. |
>  \time 4/8
>  s2*82 | \hideNotes es2 | \omit Staff.BarLine \repeat unfold 14 { es2 }
> \unHideNotes \undo \omit Staff.BarLine |
>  s2*30 | %% End of piece, Bar 129
>
> }
>
> KlavierOssiaLower = \new Voice \relative c {
>  \clef bass
>  \time 5/8
>  s4 s s8 |
>  \time 3/8
>  s4. |
>  \time 4/8
>  s2*82 | \hideNotes es2 | \omit Staff.BarLine \repeat unfold 14 { es2 }
> \unHideNotes \undo \omit Staff.BarLine |
>  s2*30 | %% End of piece, Bar 129
>
> }
>
> \score {
>
>     \new Staff = "Staff_violoncello" <<
>           \override Staff.InstrumentName.self-alignment-X = #LEFT
>           \set Staff.instrumentName = \markup \left-column \abs-fontsize #10
> { Violoncello }
>           \set Staff.midiInstrument = #"cello"
>           \global \VioloncelloMusic
>     >>
>   \new PianoStaff = "Staff_klavier" <<
>           \override PianoStaff.InstrumentName.self-alignment-X = #LEFT
>           \set PianoStaff.instrumentName = \markup \left-column {
> \abs-fontsize #10 \line { Piano } }
>           \new Staff = "pianoupper" <<
>           \global \KlavierMusicUpper \systembreaks
>           >>
>           \new Staff = "pianolower" {
>            \global \KlavierMusicLower
>           }
>
>   >>
>   \new PianoStaff = "ossia"  <<
>     \new Staff = "ossiaupper" \with {
>     \remove "Time_signature_engraver"
>     \hide Clef
>     \magnifyStaff #2/3
>     \RemoveAllEmptyStaves
>   } {
>       \global \KlavierOssiaUpper
>   }
>     \new Staff = "ossialower" \with {
>     \remove "Time_signature_engraver"
>     \hide Clef
>     \magnifyStaff #2/3
>     \RemoveAllEmptyStaves
>   } {
>       \global \KlavierOssiaUpper
>     }
>   >>
>>>
>   \layout {
>   \context {
>     \Staff \RemoveEmptyStaves
>   }
>   }
>   \midi {}
>   \header {
>   opus = ##f
>   }
>
> }
> --------------
> NB: "\global" is a variable that just sets stuff like time signature format,
> initial key/time signature, etc.)
>
> When I try to compile, Lily throws an error that \RemoveAllEmptyStaves is an
> "unrecognized escaped string" and pukes.
>
> What am I formatting wrong here?
>
> Cheers,
>
> A
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user

reply via email to

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