On 22/06/12 22:38, Anders Eriksson wrote:
Hello,

I have just started using Lilypond and I have found some functions on the net which I would like to put in an include file. But I can't figure out how!?

One of these function is Mr. John Mandereaus "Diatonic/modal transposition
function"

I have put the code in a file (diatonic-transpose.lyi) and is calling it like
this

%% Start of file
\version "2.14.2"

\include "diatonic-transpose.lyi"

notes = \relative c' {
  c d e f g a b c
}

\score {
  <<
  \new Staff { \clef "G"
               \notes
               \diatonicTranspose c \major #2 \notes
  }
  >>
  \layout {}
  \midi {}
}
%% EOF

When I compile it I get:
Starting lilypond-windows.exe 2.14.2 [test-dia-transpose.ly]...
Processing `C:/Users/ame/Documents/Lilipond/Tests/test-dia-transpose.ly'
Parsing...
C:/Users/ame/Documents/Lilipond/Tests/test-dia-transpose.ly:13:15: error:
unknown escaped string: `\diatonicTranspose'

               \diatonicTranspose c \major #2 \notes

C:/Users/ame/Documents/Lilipond/Tests/test-dia-transpose.ly:13:15: error: syntax
error, unexpected STRING

               \diatonicTranspose c \major #2 \notes

C:/Users/ame/Documents/Lilipond/Tests/test-dia-transpose.ly:10:2: error: errors
found, ignoring music expression

  <<

error: failed files: "C:/Users/ame/Documents/Lilipond/Tests/test-dia-
transpose.ly"
Exited with return code 1.

So WHY can't it find \diatonicTranspose ???

It works fine for me when I create the same files with the same code on my machine.

Is the include file in the same directory as the main file?

Nick

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to