lilypond-user
[Top][All Lists]
Advanced

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

Re: extract notes into voices


From: MING TSANG
Subject: Re: extract notes into voices
Date: Fri, 14 Mar 2014 03:11:37 -0700 (PDT)

Hi Gilles,
Thank you very much. I change chord.ly to include_extract-chord&voice.ly as you recommend. I ran and I got the following error: For now it works for me as I seldom have voice three and/or voice four. 
As for chord coding, I normally enter the upper first. Is there any difference which way it enter? What lilypond recommend? 
Emmanuel,
Ming

Starting lilypond-windows.exe 2.19.3 [include_extract-chord&voice.ly]...
Processing `C:/Users/Tsang/Dropbox/LP_includes/include_extract-chord&voice.ly'
Parsing...
C:/Users/Tsang/Dropbox/LP_includes/include_extract-chord&voice.ly:299:55: error: wrong type for argument 1. Expecting integer, found 1.2
\new Staff \extractNote #2 \extractVoice
#1.2 \music
C:/Users/Tsang/Dropbox/LP_includes/include_extract-chord&voice.ly:300:55: error: wrong type for argument 1. Expecting integer, found 2.1
\new Staff \extractNote #1 \extractVoice
#2.1 \music
C:/Users/Tsang/Dropbox/LP_includes/include_extract-chord&voice.ly:1: warning: no \version statement found, please add
\version "2.19.3"
for future compatibility
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `include_extract-chord&voice.ps'...
Converting to `./include_extract-chord&voice.pdf'...
fatal error: failed files: "C:/Users/Tsang/Dropbox/LP_includes/include_extract-chord&voice.ly"
Exited with return code 1.


On Friday, March 14, 2014 5:13:58 AM, Gilles <address@hidden> wrote:
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]