lilypond-user
[Top][All Lists]
Advanced

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

Re: remove a staff


From: Graham King
Subject: Re: remove a staff
Date: Wed, 9 Oct 2019 14:34:04 +0100

How about this?  It gets you a bit closer to what you want, but \omit Score.Barline seems to take effect too early.  I'll leave it to the real experts to comment on that.

BTW, Simon, did you reply and omit to copy the list?

\version "2.19.82"

hideS = {
  \stopStaff
  \hideNotes
  \hide Staff.TimeSignature
  \hide Staff.Clef
  \omit Score.Slur
  \omit Score.KeySignature
  \omit Score.Tie
  \omit Score.BarNumber
  \omit Score.BarLine
}

unhideS = {
  \startStaff
  \unHideNotes
  \undo \hide Staff.TimeSignature
  \undo \hide Staff.Clef
  \undo \omit Score.Slur
  \undo \omit Score.KeySignature
  \undo \omit Score.Tie
  \undo \omit Score.BarNumber
  \undo \omit Score.BarLine
}

lineofnotes = { \repeat unfold 6 { cis''2 ~ cis''4( d''4 ) } \break }

notes = {
  \key d \major
  \lineofnotes
  \hideS
  \lineofnotes
  \unhideS
  \lineofnotes
}

words = \lyricmode { \repeat unfold 18 la  }

\score{
  <<
    \new Voice = "one" {
      \notes
    }
    \new Lyrics \lyricsto "one" \words
  >>
  \layout { }
}


On 9 Oct 2019, at 12:37, MING TSANG <address@hidden> wrote:

Hi, Graham:

Thank you verymuch for the answer.
I manage to use the following code to  hide every on the staff except the bar number and key signature. I can live with bar number, but would like to hide the key signature as well.
 
hideS = { \hide Staff.BarLine
          \override Staff.StaffSymbol.line-count = #0
          \hideNotes %\hide Staff.NoteHead
          \hide Staff.TimeSignature
          \hide Staff.Clef }

The result:
<1570620986187blob.jpg>
Thanks,
Ming.
On Wednesday, October 9, 2019, 05:49:17 a.m. EDT, Graham King <address@hidden> wrote:



On 9 Oct 2019, at 02:22, MING TSANG <address@hidden> wrote:

Hi, lilyponders,

Is it possible to remove a staff ( everything)?

Thanks for the help,
Ming

Hi Ming,
you need to give us some context, or you'll just get the answer "yes" !

For example, if you're trying to remove a staff from a system when that staff contains just empty bars, the answer might be \RemoveEmptyStaves.  But if you're trying to remove an entire part from a score, the answer will be different and will include advice about how to structure the lilypond code.

Over to you.

-- Graham

<1570620986187blob.jpg>


reply via email to

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