While this is certainly useful, one should be aware of what is happening. With the syntax
soprano.1 = c’4 you are not defining a variable soprano.1 as c’4, you are defining the value corresponding to key 1 in an alist that is the value of variable soprano. This can be very powerful, useful and stylish, but also cause problems if you’re unaware of it, for instance: If you uncomment the fourth line in the following example it will stop working, since you overwrite the whole variable soprano containing the alist instead of creating a new variable with a shorter name. \version "2.22.1" soprano.1 = e'4 soprano.2 = c'4 %soprano = d'4 \score { << \soprano.1 \soprano.2 >> } There is more about alists in the documentation, and they’re used in very many places in lilypond. You can see them in the common structure Thing.property = value , for instance in overrides. Best /Leo > 30 sep. 2021 kl. 09:37 skrev Silvain Dupertuis <silvain-dupert...@bluewin.ch>: > > Hi everyone, > > One problem with this suggestion that Lilypond does not support the simple > use of digits in variable names. > As far as I understand, it is because a digit following directly alphabetic > characters is interpreted as a duration. > > I took me a long time to discover that there is a way out > (and I suggest these feature should be more accessible in the documentation!) > > One can use numbered variables using a full-stop mark like these examples > -- soprano.1, soprano.2 ... > -- mel.354, mel.521 -- using the song number in a songbook > May-be other separation marks would work too. > One can also use quote marks for more sophisticated names, but it is more > complicated and rather inelegant... > > Silvain > > Le 30.09.21 à 07:52, Valentin Petzel a écrit : > <x-msg://86/#> <x-msg://86/#> <x-msg://86/#>Hi David, >> >> I'd say singleVoice would even be clearer. >> But I think maybe it would also be a good idea if we had a synax like \voice >> number. Currently Lilypond only supports four voices, and any more requires >> knowledge about the scheme interface, but \voice1 \voice2, ... could >> directly support an arbitrary amount of voices. >> >> Cheers, >> Valentin >> >> 30.09.2021 00:50:41 David Kastrup <x-msg://86/#><d...@gnu.org> >> <mailto:d...@gnu.org>: >> >>> Lukas-Fabian Moser <l...@gmx.de> <mailto:l...@gmx.de> writes: >>> >>>> Hi Kira, >>>> >>>> Am 30.09.21 um 00:32 schrieb Kira Garvie: >>>>> I realize this is a pretty basic question... but what is the >>>>> difference between voiceOne and oneVoice? I am writing a multivoice >>>>> keyboard-style hymn (as opposed to SATB chorale style) and the >>>>> directions say to switch between oneVoice and voiceOne as needed for >>>>> stem direction... >>>>> "(d) Add voiceOne and oneVoice tags throughout to indicate stem >>>>> direction. If >>>>> there is no separately stemmed second part at the first note, >>>>> oneVoice is assumed." >>>>> Do I need to give an example? >>>> \voiceOne sets the layout for the current voice as if it is the first >>>> of several simultaneous voices. >>>> \oneVoice sets the layout for the current voice as if it is an only voice. >>> It would probably be clearer if we had >>> >>> \firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively. >>> >>> -- >>> David Kastrup > > Visa citerat innehåll >> Hi David, >> >> I'd say singleVoice would even be clearer. >> But I think maybe it would also be a good idea if we had a synax like \voice >> number. Currently Lilypond only supports four voices, and any more requires >> knowledge about the scheme interface, but \voice1 \voice2, ... could >> directly support an arbitrary amount of voices. >> >> Cheers, >> Valentin >> >> 30.09.2021 00:50:41 David Kastrup <d...@gnu.org> <mailto:d...@gnu.org>: >> >>> Lukas-Fabian Moser <l...@gmx.de> <mailto:l...@gmx.de> writes: >>> >>>> Hi Kira, >>>> >>>> Am 30.09.21 um 00:32 schrieb Kira Garvie: >>>>> I realize this is a pretty basic question... but what is the >>>>> difference between voiceOne and oneVoice? I am writing a multivoice >>>>> keyboard-style hymn (as opposed to SATB chorale style) and the >>>>> directions say to switch between oneVoice and voiceOne as needed for >>>>> stem direction... >>>>> "(d) Add voiceOne and oneVoice tags throughout to indicate stem >>>>> direction. If >>>>> there is no separately stemmed second part at the first note, >>>>> oneVoice is assumed." >>>>> Do I need to give an example? >>>> \voiceOne sets the layout for the current voice as if it is the first >>>> of several simultaneous voices. >>>> \oneVoice sets the layout for the current voice as if it is an only voice. >>> It would probably be clearer if we had >>> >>> \firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively. >>> >>> -- >>> David Kastrup >> >> -- >> Silvain Dupertuis >> Route de Lausanne 335 >> 1293 Bellevue (Switzerland) >> tél. +41-(0)22-774.20.67 >> portable +41-(0)79-604.87.52 >> web: silvain-dupertuis.org <mailto:d...@gnu.org> <mailto:l...@gmx.de> > -- > Silvain Dupertuis > Route de Lausanne 335 > 1293 Bellevue (Switzerland) > tél. +41-(0)22-774.20.67 > portable +41-(0)79-604.87.52 > web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org/>