lilypond-user
[Top][All Lists]
Advanced

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

Re: include puzzlement


From: Shane Brandes
Subject: Re: include puzzlement
Date: Fri, 29 Dec 2017 13:35:06 -0500

o.k. back to the include with book part problem. Here is my almost
minimal code example, which consists of files a.ly, b.ly and test.ly.
The two files compile alone correctly but when stuck in the bookpart
they go to pieces. I even tried it running lilypond-book as a tex file
which interestingly yields no page break but otherwise identically
incorrect.

%--- file a.ly
\version "2.17.97"

\header {
  title = "a"

}




righteOne = \relative g' {
    \clef "treble"
        g8
    }


righteTwo = \relative a' {

    d2
    }

lefteOne = \relative c' {
    \clef "bass"
    }

lefteTwo =  \relative a, {
    \clef "bass"  r2

    }


\score {
  \new PianoStaff \with {
    instrumentName = "Organ"
  } <<
    \new Staff = "right"  << \righteOne \\ \righteTwo >>
    \new Staff = "left"  { \clef bass << \lefteOne \\ \lefteTwo >> }
  >>
  \layout { }

}

%--- file b.ly

\version "2.17.97"

\header {

  title = "b"

}


\layout {
  \context {
    \Score
    \remove "Bar_number_engraver"
  }
}



rightTwo = \relative c'' {


r2
}

rightOne = \relative c'' {

  a2.
}

leftOne = \relative c' {

 a2.
}

leftTwo = \relative c' {


}

pedal = \relative c {

 c4 }

\score {
  <<
    \new PianoStaff \with {
      instrumentName = "Organ"
    } <<
      \new Staff = "right"  << \rightOne \\ \rightTwo >>
      \new Staff = "left"  { \clef bass << \leftOne \\ \leftTwo >> }
    >>
    \new Staff = "pedal"{ \clef bass \pedal }
  >>
  \layout { }

}

%---- bookpart test.ly

\bookpart {\include "a.ly"}
\bookpart {\include "b.ly"}

On Fri, Dec 29, 2017 at 12:37 PM, Shane Brandes <address@hidden> wrote:
> Never mind that code does not function. Still trying to reduce the
> full files into minimal examples that both preserve the problem and
> compile correctly independently and then crash when included.
>
> Shane
>
> On Fri, Dec 29, 2017 at 11:05 AM, Shane Brandes <address@hidden> wrote:
>> O.k. after reducing things here is the problem that causes the snafu.
>> The independent files to be included all happen to have the same
>> structure where the score is defined and the voices called to a
>> variable. as in the following.
>>
>> altoVoice = \relative c' {
>>
>>   a
>> }
>>
>> \score {
>>   \new Staff \with {
>>     instrumentName = "Treble"
>>   } { \altoVoice }
>>
>> so the result is as far as I can tell that after the first file which
>> we can call alto1.ly is included the second one, identical in
>> structure, lets call alto2.ly has called for the same input here when
>> the program looks around for the variable altoVoice it decides there
>> is an unrecognized string. Is there anyway around this bar renaming
>> all these variables into unique indentifiers? That would be possible
>> but definitely a time consuming drag.
>>
>> On Fri, Dec 29, 2017 at 3:20 AM, David Kastrup <address@hidden> wrote:
>>> Shane Brandes <address@hidden> writes:
>>>
>>>> O.k. having gone in circles trying to figure out the whole bookpart
>>>> apparatus I discovered that the documentations statement that using
>>>> include is the same as copying and pasting the include into a document
>>>> is false if the include consists of a complete lilypond file.
>>>
>>> Care to show a minimal example?
>>>
>>>> Is there a way around that?
>>>
>>> First one needs to know what your problem is.
>>>
>>> --
>>> David Kastrup



reply via email to

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