2

How can I remove the entirety of the barlines (including that between the staves) from these examples using a \with-based solution?

I continue trying the solutions shown in the documentation, but with no success. Note that the \new StaffGroup is necessary for my larger project, so this should only apply to this particular PianoStaff.

\version "2.20.0"

music = \relative c' {
  c1 c
}

<<
  \new StaffGroup
  \new PianoStaff \with {
    \omit Staff.BarLine
  }
  
  <<
    \new Staff \music
    \new Staff \music
  >>
>>

enter image description here

8
  • Do you need StaffGroup and nothing else? Your problem is essentially in the fact that the StaffGroup adds barlines through all its systems. So I don't think your problem can be solved without touching the StaffGroup. I could perhaps give some recommendation if you described what the final product should look like.
    – Ramillies
    Commented Sep 4, 2022 at 0:24
  • @Ramillies I was afraid of this. I think the StaffGroup is the best environment, since I'm going to have multiple staves moving simultaneously. See music.stackexchange.com/q/124631/21766 for some context.
    – Richard
    Commented Sep 4, 2022 at 0:26
  • So you want all of the staves in your StaffGroup above and below this one to have connected barlines that would be interrupted in this PianoStaff only? Still not sure about what you want. If you don't want that, use ChoirStaff, which is just like StaffGroup but without the connected barlines. If you do want that, I guess it would be better to use no group at all for this and stick the braces on it ex post.
    – Ramillies
    Commented Sep 4, 2022 at 0:33
  • Ultimately it will be three staves where only the bottom staff has barlines. The ChoirStaff is a clever workaround. But does its barline properties revert to those of StaffGroup if the ChoirStaff is nested within a larger StaffGroup?
    – Richard
    Commented Sep 4, 2022 at 0:41
  • Are you sure you still want the time signature?
    – Dekkadeci
    Commented Sep 4, 2022 at 15:11

3 Answers 3

3

I went through the previous question you linked once more and hopefully I will be able to provide the solution you're looking for.

Simply put, replace all occurrences of StaffGroup in your score with ChoirStaff (don't forget to do it in \contexts too). Then, do \omit Staff.Barline (that's the barlines inside the staves), as well as \omit PianoStaff.SpanBar (the parts between the staves).

So your example would be written thus:

music = \relative c' {
  c1 c
}

<<
  \new ChoirStaff
  \new PianoStaff \with {
    \omit Staff.BarLine
    \omit PianoStaff.SpanBar
  }
  <<
    \new Staff \music
    \new Staff \music
  >>
>>

enter image description here

ChoirStaff is just like StaffGroup, but without the connecting barlines. So the only thing supplying the barlines is the PianoStaff, from which we can easily remove them.

In your larger project, it would do something like this: (I used the code in the answer to your linked question and performed the aforementioned changes):

enter image description here

Would that be what you need, or have I misunderstood?

1

As Ramillies said getting rid of the Spanbar can be done by simply using a ChoirStaff instead, with exactly that being the defining difference.

But if you want to do it you way the grob you’re looking for is SpanBar. But keep in mind that the Span_bar_engraver exists in both the PianoStaff and the StaffGroup, so you need to do it in both of them.

0

Are you looking for something like this?

\version "2.20.0"

music = \relative c' {
  c1 c
}
leftHand = \relative c {
  \clef bass
  c1 c 
}

<<
  \new ChoirStaff << 
    \new PianoStaff \with {
      \omit BarLine
      \omit SpanBar
    }
    <<
      \new Staff \music
      \new Staff \leftHand
    >>
    \new Staff \music
  >>
>>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.