On Thu, Nov 3, 2016 at 9:00 AM, David Kastrup [via Lilypond] <
ml-node+s1069038n196051...@n5.nabble.com> wrote:
> Werner LEMBERG <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=196051&i=0>> writes:
>
> >> So
> >> \voiceOne \voiceTwo \voiceThree \voiceFour
> >> becomes
> >> \voiceUp \voiceDown \voiceUpTwo \voiceDownTwo
> >
> > I would make \voiceUp and \voiceDown be the same as \voiceUpOne and
> > \voiceUpTwo, respectively, so that we can write
> >
> > \voiceUpOne \voiceDownOne \voiceUpTwo \voiceDownTwo
>
> Here is another variant that's a bit bold:
>
> \voice^1 \voice_1 \voice^2 \voice_2
>
> This will syntactically take a fingering event as input. However, this
> does not work as
>
> \voices 1,2,-2,-1 << \\ ... \\ >>
>
> does. I am not totally sure whether \voices ^1^2_1_2 << \\ ... \\ >>
> might not be parseable (as a single post-event) but it won't mix with
> symbolic names for voice contexts. So while it is a cute replacement
> for \voiceOne ... and is expressive concerning its direction, I am not
> sure it's a winner.
>
I like this idea. Here's another thought to throw into the mix, more of an
enhancement idea for the current way voices are stacked. What about
something like this:
%%%%%%%%
\version "2.19.36"
% This command takes an integer and derives the stem direction from its
% sign and then calculates the currently expected zero-based voice index
% so that 1, 2, 3, 4, etc. represent the 1st, 2nd, 3rd, 4th up-stem voices
% respectively and -1, -2, -3, etc. represent the 1st, 2nd, and 3rd down-
% stem voices, respectively.
% The integer also represents the voice's relative column priority for being
% shifted away from the principal column (i.e., larger numbers get pushed
% farther out). Positive integer voices get shifted right, negative integer
% voices get shifted left.
voice = #(define-music-function (nbr) (number?)
(let* ((dir (/ (abs nbr) nbr))
(idx (+ (* 2 dir (- nbr dir)) (/ (- 1 dir) 2)))
)
(format #t "Voice input: ~a, direction: ~a, index: ~a" nbr dir
idx)(newline)
(context-spec-music (make-voice-props-set idx) 'Voice)))
% and now an example
\new Staff <<
{ \voice 1 c''4 c'' c'' c'' } % what we know as \voiceOne, so no
difference here
\\
{ \voice 5 a'2. g'4 } % what we would call \voiceNine, if there was such
a thing
\\
{ \voice -11 g'2 b' } % what we would call \voiceTwentyTwo, but seriously
folks...
>>
%%%%%%%%
This doesn't really change the above discussion about implicit voicing and
how they should stack, but it does make it a little easier to create any
number of explicit directional voices. I guess I'm too used to the current
way of stacking. Pardon the noise if this doesn't contribute constructively
to the discussion. It was just a thought I had yesterday that I finally got
around to implementing.
Best,
Abraham
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Changing-voice-order-tp195757p196058.html
Sent from the User mailing list archive at Nabble.com.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user