3

So I have two somewhat related questions. Firstly, is there a native way in lilypond to work with piano scores with more than two staves? I am hopefully beginning work on a project soon where I will be working with a three staff piano part, and the PianoStaff environment doesn't seem to support having more than two staves. I've been doing some setup and doing a StaffGroup with three staves seems to work fine for the most part but it does change the bracket on the side and I would like to get the curly piano style brace back.

Relatedly, is it possible to utilise cross-staff beaming within StaffGroup and not in a PianoStaff? I've tried just copying and pasting from the official documentation (here), but it doesn't seem to work. I think it's because I have my staves in the score environment rather than just writing directly into the staves as in the examples. I am working with the template from the wizard in Frescobaldi, should I change this, or am I just missing something obvious?

3

I think you must be doing something wrong if you find that you cannot fit more than two staves into a PianoStaff. It's a completely general construct and it can contain as many staves as you want. Just put three staves into the PianoStaff like this:

\new PianoStaff \with {
    instrumentName = "Piano"
}
<<
    \new Staff = "top" { ... }
    \new Staff = "middle" { ... }
    \new Staff = "bottom" { ... }
>>

You would then use \change Staff = "top", \change Staff = "middle" or \change Staff = "bottom" in your music, and it should Just Work™. (Just make sure that you change between adjacent staves. Otherwise you will probably get something unreadable 🙂.) Here's a little working example for you to play with: http://lilybin.com/prh0gd/1 .

By the way, you can even put staves of different types in it. As an example, I write some guitar arrangements of video game music, and sooner or later, I plan to put them on the Net. Hence, to "appease the crowds" that are always hungry for tabs, I also compile (among others) a version that has a PianoStaff with the standard notation staff and a TabStaff. In some places, I even have two standard staves and a TabStaff, which gives a result like this:

enter image description here

So, as you can see, having three staves in a PianoStaff is perfectly possible.

P. S.: I would be able to help you more if you posted a bit of code that does something else than you expect.

2
  • I don't know what I must have been doing last night, but I am sure that I tried putting three staves in a PianoStaff and it was throwing errors, but this morning I tried and it worked fine. There must have been a typo I kept making or something. Also, for the cross staff beaming, I think what was happening was because I had not filled the above staff with rests properly, it wasn't working. I misunderstood the "keep the bar alive" thing in the documentation. – Jack Doherty May 15 '20 at 10:18
  • 1
    @JackDoherty, yeah, you could have missed a brace or a quote and you could get an error in a totally unrelated place. Sadly, that's how programming goes. And yes, if you want to change staves, the target staff must exist, so you need to fill it with something (even if it were only spacer rests) up to the point where the change occurs. – Ramillies May 15 '20 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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