lilypond-user
[Top][All Lists]
Advanced

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

Re: 350 "\relative"s on all parts - is it possible to simply the code?


From: MING TSANG
Subject: Re: 350 "\relative"s on all parts - is it possible to simply the code?
Date: Fri, 13 Sep 2013 11:06:07 -0700 (PDT)

Hi, David:
Thank you.
I have been using one "\relative" per part for all my lilypond files. My problem of this one "\repative" is that I cannot reuse the measure other than copy & paste and remove or add ","; "'". 

e.g. 1
\version "2.17.26"
\relative c''{ a4 c b e | g, a b b | c c c a | g, a b b
}
When I reuse bar2 for bar4, I have to remove the "," on g after copy & paste.

e.g 2
\version "2.17.26"
ssOne = \relative c''{ a4 c b e |}
ssTwo = \relative c''{ f, a b b |}
ssThree = \relative c''{ c c c a |}
ssFour = \ssTwo

\score {
\new Staff \with {
}
\new Voice = "soprano" { \ssOne \ssTwo \ssThree \ssFour }
}
On this example, there is no need to copy & paste and remove ",". I wish there is a better way of coding it.

Thanks,
Ming 

From: David Nalesnik <address@hidden>
To: MING TSANG <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Friday, September 13, 2013 1:05:11 PM
Subject: Re: 350 "\relative"s on all parts - is it possible to simply the code?

Hi Ming,


On Fri, Sep 13, 2013 at 11:42 AM, MING TSANG <address@hidden> wrote:
Hi, lilyponders:

Sorry for the long .ly file.
I am using variables for each measure (bar).  I have trouble use one "\relative" for each soprano, alto, tenor, right & left. Now I have 70 "\relative"s.

1.  Is there a better way to code this, so that I don't need to have 70 "\relative"s? ( 70 x 5 = 350 for all parts)

To answer your first question, you ought to use a single variable to represent the entire soprano part, a single variable for the whole alto part, etc.  You can store music expressions of any length in a variable, not just one measure chunks.  A \relative for each of four variables won't be cumbersome at all!

Hope this helps,
David 



reply via email to

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