[Top][All Lists]

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

detecting current voice number (voiceOne/voiceTwo/...)

From: Jan-Peter Voigt
Subject: detecting current voice number (voiceOne/voiceTwo/...)
Date: Thu, 03 Apr 2014 08:32:26 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hello list,

I'd like to detect the current voice-number for the voice-context:
for example it might be something like:
\oneVoice -> 0
\voiceOne -> 1
\voiceTwo -> 2
\voiceThree -> 3

If I look at the horizontal-shift for the NoteColumn, I get
\oneVoice -> #f
\voiceOne -> 0
\voiceTwo -> 0
\voiceThree -> 1

So how do I discriminate voiceOne and voiceTwo?
I might look at Stem-direction or the like, but this might be overridden.
Is there a property with the group number?


\applyContext #(lambda (context) (display (chain-assoc-get
'horizontal-shift (ly:context-property context 'NoteColumn))))

reply via email to

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