Kieren MacMillan <kieren_macmillan <at> sympatico.ca> writes: > > can I ask what the \global tag is doing in your snippet? It seems > > to me like it's laying out a map of the time signature change in a piece. Is > > this the recommended way to go about this? Up till now I've just written all > > the time changes into the first staff as I put the notes in. > > I don't know about "recommended", but I certainly prefer laying out the code that way. > > My 'global' variable tends to have all score-level items: time signature changes (if score-level), key > signature changes (if score-level), and marks (e.g. MetronomeMark, RehearsalMark), and so on.
To explain the concrete benefit a little more: If you're making only a score, it doesn't matter. If you need to make parts, a \global variable will save you from having to extract time signatures and rehearsal marks from the first part. These "score- level" marks do NOT automatically transfer from the music expression for staff 1 into the music expressions for other staves when laying out parts (where the music expression for staff 1 is not present). Lilypond has a different philosophy from other notation packages. You don't extract parts from a score. You write the parts as components -- variables -- and then lay out the variables into whatever formats are required. A score's music expression creates several staves and fills them with content defined in variables. A part creates (usually) a single staff and fills it with the variables relevant to that part -- omitting variables for other parts. Anything that needs to be shared across multiple parts should go in a separate variable, or group of variables. hjh _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user