Greetings claire, And welcome to LilyPond!
This may not be the kind of answer that you are looking for, but I thought to throw in my "two cents." In principle, I like the idea of variables, and I do use them on occasion. But apart from certain pitchless content, such as dynamics or or unusual notehead or accidental modifications, I try to stay away from employing them for large swaths of pitch content. This is because I find them to be less flexible when I need to return to a score to make changes, especially if those changes happen to be structural in nature - i.e. voltas and alternatives, da cappo and d.c. al fine, etc. So, a piano score for me might look something like: \version "2.20.0" dynamics = { DYNAMICS } pedals = { PEDALS } \score { \new PianoStaff << \new Staff \relative c' { << { VOICEONE MUSIC } \\ { VOICETWO MUSIC } \\ { VOICETHREE MUSIC (if necessary) } >> } \new Dynamics \dynamics \new Staff \relative c' { LEFTHAND MUSIC (similarly structured) } \new Dynamics \pedals >> } But even this structure only works in optimal cases. There are many instances in my scores where dynamics simply cannot go between the staves, or when each staff requires its own dynamics. The same holds true for pedaling. This is why I prefer to have most of the content within the \PianoStaff block itself, even if it may look less tidy. I allot one line of text per measure of music. At the end of each line of music, I comment measure numbers, such as %1 or %2 - or, in the case of many voices, %1A or %1B. These make locating the necessary text extremely easy. HTH, Hwaen Ch'uqi On 7/5/20, Claire Meyer <clairemeyerbour...@gmail.com> wrote: > Hi everybody, > > I'm a new user (~1 month old) wondering about best practice for score > structure. Let's say I've got a piano score, with two voices per hand, and > the occasional third voice here and there, and all my dynamics between the > two staves of the piano. Then I'll probably write it with : > - four variables for my four voices (and add the occasional additional > voices in those when needed) > - one variable for the dynamics > > And round everything nicely in my score (with some intermediate variables, > like one for each hand etc...). > > But I have yet to find a place that seems like good practice (let alone > best practice) for the structural aspects of my score, like bars and > voltas, especially when they stop being trivial. I don't mind much when > I've got one "||" bar at the end of my score to put it wherever. But when I > have several voltas, dal segnos, alternative ends, special bars, etc... I > wonder where is the best place to write that. Maybe in a null voice, like > for lyrics that aren't aligned with any written rhythm ? Should I write it > in each voice ? > > Thanks, > Claire >