lilypond-user
[Top][All Lists]
Advanced

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

Re: A simple diagram of a .ly file?


From: Mats Bengtsson
Subject: Re: A simple diagram of a .ly file?
Date: Thu, 05 Jan 2006 21:52:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3

Ray wrote:

Through the tutorial I quickly gained fluency in the make up of an .ly file,
but I found that as the file got larger it got harder and harder to keep track
of. Furthermore, when any kind of bug appeared it was almost impossible to
sleuth out...as there is almost no documentation (that I could find, anyway)
dealing with the syntax or _general_ form of a .ly document.  I don't see this
as a failing per se, but perhaps it might be something that folks could push
for as time permits?  Alternatively, additional templates might be nice, ones
that address non-classical music forms.

One answer to this problem is to use jEdit, which includes
an "assistant" to setup a template that matches your specific
needs.

...

"A .ly file has 3 basic parts.  The header, the body, and the score.  In the
header, info about the piece is given (composer, title, etc.) as well as any
other useful info the program may need but which doesn't relate to the notes
themselves.  The body is where the notes and the lyrics are set down.  The
score is where the "printing" (whether to paper or MIDI) is done.  Variables
are written in the 'body' part and then used later as part of the score."

This is merely a convention. I hope you have realized that there
is no need at all to use variables, for example. However, I and
most other people find that it helps to structure your file.

I'm not even sure I'm right about what I've just written, actually, but it's
what I'm gleaning from the current examples, most of which are fine for
explaining the particular microscopic issue but which don't place it in a
macroscopic context.  After about 2 weeks of solid sleuthing and head
scratching,  I am still having a heck of a time getting my .ly file to print
a pdf and a MIDI file at the same time, and I haven't had any luck in using
the "score" section.

Basically, the structure of the score block, if you want both
MIDI and PDF output, should be:
\score{
 Here comes the music as {...} or <<...>>
 \layout{...}
 \midi{...}
}
One tricky detail is that if you don't have any \midi, then you
don't need any \layout either, but as soon as you have a \midi,
you also explicitly have to include a \layout as well to also get
a PDF.

 I can get a nice pdf if I comment out my score part,
but then it won't play MIDI.  I also have had a heck of a time with getting
my lyrics to match the right notes.  I tried using the "\lyrics" line but
couldn't get the syntax to work.
The basic idea is very simple, provide a name for the music
voice that the lyrics should follow:
\context Voice = theMelody {...}
then use \lyricsto to attach your lyrics to that voice:
\new Lyrics \lyricsto theMelody {Here come the ly -- rics}

This is not in the tutorial, you have to read the main manual.

Also, what the tutorial needs is some kind of sense of how these smaller
pieces fit into a larger whole.  It's easy enough to see that "{a2 b1 c4is
(d8 e16)}" will write appropriate notes.  It's much harder to know what's
going wrong when they _don't_ appear that way as part of a larger song.

Please don't take this as a vent or that I'm upset---I'm not:  I could never
write music like this without Lilypond and really want to become more fluent
in writing it so that it doesn't take me so long to write songs down.  If I
can help in providing some new documentation along these lines please let me
know.
Yes, please take this opportunity as a relative beginner, to
come with suggestions for improvements on the documentation.
I've used the program for almost 10 years, so it's much harder
for me to provide suggestions for improvements that are relevant
to the beginner. Note that the manual for version 2.7 includes
many updates that also are relevant to version 2.6, but haven't
been included in that manual.

Send any comments to the mailing list.

  /Mats




reply via email to

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