lilypond-user
[Top][All Lists]
Advanced

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

Re: how to split into two parts


From: Gilles Thibault
Subject: Re: how to split into two parts
Date: Sat, 23 Apr 2022 17:12:03 +0200
User-agent: Webmail Free/1.3.3

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



reply via email to

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