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 #}) _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user