lilypond-user
[Top][All Lists]
Advanced

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

Re: New voices in scheme?


From: Gilles THIBAULT
Subject: Re: New voices in scheme?
Date: Sun, 20 Feb 2011 23:01:34 +0100

process of converting
them manually to two separate voices:
<c e>8 <d f> <e g> <f a>

becomes

<< { e8 f g a} \\ { c8 d e f } >>


With the function \extractNote of the snippet you have given ( http://lsr.dsi.unimi.it/LSR/Item?id=545 ), you can have something like that :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

splitInTwoVoices = #(define-music-function (parser location music) (ly:music?)
#{
<<
   \extractNote #2 $music
      \\
   \extractNote #1 $music
 >>
#})

music = \relative {<c e>8 <d f> <e g> <f a>}

\new Staff \splitInTwoVoices \music

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Gilles






reply via email to

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