lilypond-user
[Top][All Lists]
Advanced

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

Re: extract notes into voices


From: Gilles
Subject: Re: extract notes into voices
Date: Fri, 14 Mar 2014 10:13:58 +0100
User-agent: KMail/4.11.4 (Linux/3.12.13-desktop-2.mga4; KDE/4.11.4; x86_64; ; )

Le vendredi 14 mars 2014, 00:47:28 Gilles a écrit :
> Le mercredi 12 mars 2014, 14:12:57 MING TSANG a écrit :
> > Hi, lilyponders,
> > I browse the LSR and find this extractNote. I is somthing that I can use.
> > Please refer to .pdf : Is it possible to modify this LSR so that bar 5
> > also
> > be extracted to soprano staff and alto staff? I don't know scheme code.
> > BTW
> > - congratulation to Janek and Urs and Oskar Fried project
> > Emmanuel,
> > Ming
> 
> I have joined my original file (chord.ly) that contains the \extractNote
> function, a \extractVoice function, and 2 derivated functions
> \extractPartUpper and \extractPartLower, that you can use in your ly file.
> 
> Note that the name of "chord.ly" is probably a bad choice and should rather
> be "chord&voice.ly" or something like that.
Ouch, as you enter notes in a chords beginning by the upper one ( generally a 
chord is read from lowest to top), you have to  re-define the \extractPartUpper 
and \extractPartLower

extractPartUpper = #(define-music-function (parser location music )(ly:music?)
"Extract 1st note of each chords, and 1st element of simultaneous music"
 #{ \extractNote #1 \extractVoice #1 $music    #})

extractPartLower = #(define-music-function (parser location music )(ly:music?)
"Extract last note of each chords, and last element of simultaneous music"
 #{ \extractNote #1000 \extractVoice #1000 $music    #})



reply via email to

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