lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: voiceOne and oneVoice


From: Lukas-Fabian Moser
Subject: Re: voiceOne and oneVoice
Date: Thu, 30 Sep 2021 09:50:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Hi Silvain,
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.
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.

That's true, but in this case, it's a feature not a bug: If there were a music function \voice accepting an integer parameter, then LilyPond would parse \voice1 equivalently to \voice 1.

voice =
#(define-music-function (number) (index?)
   #{
     <>^#(format #f "(voice ~a)" number)
   #})

\relative {
  \voice1 c'4 d e f
  \voice3 g f e d
}

Of course this function does not do anything useful yet.

Lukas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]