lilypond-user
[Top][All Lists]
Advanced

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

Re: repeat syntax


From: Carl Sorensen
Subject: Re: repeat syntax
Date: Mon, 27 Aug 2007 17:21:16 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Palmer, Ralph <rpalmer <at> keene.edu> writes:

> 
> Aha! I have been unable to reference an external file in a \score block
> if the external file had a space or a digit in it. (Running LilyPond
> 2.11.13 under Windows XP Pro, SP 2.) For example:
> 
Ralph,

I think you have a couple of mistakes here.

First, you need to distinguish between "identifiers" and "files".  In your
example, you had both the identifer Test1 and the file Test1.ly.

Digits and special characters are not allowed in identifiers.  Thus, you need to
change the identifier to TestOne.  However, digits are just fine in file names.

The second mistake you made is that you never \included the other file.

Here's a rewrite that works.

%%%%%%%%%%%%%%%%Test1.ly

\version "2.11.23"
TestOne = {
        \key d \minor
        \clef treble
        \time 4/4

c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4
c''4 c''4

}

%%%%%%%%%%% End of Test1.ly

Note that I didn't include english.ly, as that will be done in the score file. 
All this file does is define the identifier TestOne.  I included a version
string, so that I could run convert-ly if I wanted to later on.

The second file, which will use Test1.ly, is shown below.

%%%%%%%%%%%%%%%MyScore.ly

\version "2.11.23"
\include "english.ly"
\include "Test1.ly"

\layout {
        ragged-right = ##t
        }

\score {
        \TestOne
}

%%%%%%%%%% End of MyScore.ly

This file sets up the layout, and the language, and the version, then includes
the file Test1.ly, then uses the identifier defined in Test1.ly.

This example works, at least on my system.

I hope this has helped clarify the difference between identifiers, where digits
aren't allowed, and files, where they are.

Carl Sorensen





reply via email to

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