Dear Hans,
sorry, it was a mistake of mine.
I should have written
flA = { \global \extractNote #2 \flutes }
flB = { \global  \extractNote #1 \flutes }
My idea is: if there are 2 pitches at once, they shall be splitted (this
works fine), if there is only one sinle, it should be only in the first
flute and there should be a rest in the second one.
Best,
Stefan

Am Mo., 18. Apr. 2022 um 13:43 Uhr schrieb Hans Aikema <
[email protected]>:

>
>
> > On 18 Apr 2022, at 12:23, Stefan Thomas <[email protected]>
> wrote:
> >
> > 
> > Dear community,
> > I would like to split the following example into two parts:
> > \version "2.22.1"
> > global = { \time 7/8 }
> > flutes = {
> >   \global
> > <f' g'>8 r fis' 8 r  <d' gis'>8 r8 r
> > <f' g'>8  r fis'  <d' gis'>8 r r4
> > }
> > I know I can do it with chordsAndVoices.ly
> > But the result is the desired only for the first flute.
> > Whe I do
> > flA = { \global \extractNote #2 \flutes }
> > flB = { \global \extractNote #2 \flutes }
> > I get
> > flA = { \global g'8 r fis' 8 r   gis'8 r8 r
> > g'8  r fis'   gis'8 r r4
> > } % as expexted
> > flB = { \global
> > f' 8 r fis' 8 r  d' 8 r8 r
> > f'8  r fis'  d'8 r r4
> > }
> > But I would like to get for the 2nd flute:
> > flB = { \global
> > f' 8 r r4  d' 8 r8 r
> > f'8  r r d'8 r r4
> > }
> >
> > Is there an easy way to get this result  automatically?
> > Thanks,
> > Stefan
>
> Didn't know about the chordsAndVoices, but I do spot that you both times
> "\extractNote #2" - which to me seems to instruct to extract the second
> note of the chord.
>
> I expect
> flB = { \global \extractNote #1 \flutes }
>
> to yield you the result you're after
>
> regards,
> Hans
>
>

Reply via email to