Mar 5, 2015

Different Staff Sizes

I've seen a lot of discussion as to how to deal with staves of different heights, either within the same score or elsewhere. I don't propose to have a great solution for this, but I'd like to share something I discovered (accidentally) while preparing some LilyPond tutorials.

Normally, to change the staff size for the entire document you use
#(set-global-staff-size 16)
to set a staff height to 16pt, which works great. Normally, putting multiple set-global-staff-size statements in the same file is fruitless since the last one will override any prior statements. However, I discovered that this is not always true...

For example, let's create a simple musical passage--let's have use some microtonal accidentals, just for fun:
music = \relative c' {
  cff dtqf ef fqf gqs as btqs css
}
If we explicitly put the passage within a \book block, then we can set the global staff size for that book like we normally do.
#(set-global-staff-size 11)
\book {
  \score {
    { \music }
    \header { piece = "11pt" }
  }
}
Now, let's say we want to create a LARGER version of this same passage. I learned that we can use ANOTHER set-global-staff-size statement before this new \book block and it will be sized correctly, spacing and everything! Here is the passage in 11pt, 20pt, and 26pt sizes:
\version "2.18.2"
\language "english"

\paper {
  indent = 0
}

music = \relative c' {
  cff dtqf ef fqf gqs as btqs css
}

#(define output-suffix "26pt")
#(set-global-staff-size 26)
\book {
  \score {
    { \music }
    \header { piece = "26pt" }
  }
}

#(define output-suffix "20pt")
#(set-global-staff-size 20)
\book {
  \score {
    { \music }
    \header { piece = "20pt" }
  }
}

#(define output-suffix "11pt")
#(set-global-staff-size 11)
\book {
  \score {
    { \music }
    \header { piece = "11pt" }
  }
}



These three documents were compiled in the same file. Amazing! I had no idea this was even possible! I also am not sure of the extent that this works. I do know that you can't place set-global-staff-size statements in between \score blocks and have that work, but you can with \book blocks! This might come in handy when compiling both a full ensemble score and the individual parts from the same file...

What have you done to print scores with varying staff sizes? Let me know in the comments!

No comments:

Post a Comment