Is there an easy way to get this result automatically?
Sorry Stephan, to answer so late.
%%%%%%%%%%%%%%%%%
\version "2.22.0"
\include "chordsAndVoices.ly"
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
}
noteToRest = #(define-music-function (music) (ly:music?)
(map-some-music
(lambda(evt)
(case (name-of evt) ;; defined in "chordsAndVoices.ly"
((EventChord) evt)
((NoteEvent) (make-music 'RestEvent
'duration (ly:music-property evt
'duration)))
(else #f)))
music))
flA = { \global \extractNote #2 \flutes }
flB = { \global \extractNote #1 \noteToRest \flutes }
\score { <<
\new Staff \flutes
\new Staff \flA
\new Staff \flB >>}
%%%%%%%%%%%%%%%%
Didn't know about the chordsAndVoices
http://lsr.di.unimi.it/LSR/Item?u=1&id=545
Download link : http://gillesth.free.fr/Lilypond/chordsAndVoices/
chordsAndVoices.ly is also include in the arranger.ly project :
https://github.com/gilles-th/arranger.ly
--
Gilles