3 FAQ - GNU LilyPond FAQs
7 Some questions that have been answered before. (note: relative paths
8 are meant to be relative to the source directory)
12 Q: I get all kinds of errors while compiling F<parser.cc>
14 A: LilyPond uses features of bison version 1.25. Please confirm that
15 you are using a version 1.25 or better, that is B<GNU> bison
16 B<1.25>. Don't forget to do "make clean" after installing it. Don't
17 forget to remove the stale F<bison.simple> as well.
19 If the problem persists, then please mail me.
21 Q: Some of your neat scripts fail, what directories do you use:
23 A: [This only applies if you don't do C<make install>, and develop out
24 of the source directory]
25 I have a directory which contains all music related stuff,
31 lilypond/ # the directory as unpacked from the tarball
32 releases/ # directory for .tar.gz releases
33 patches/ # directory for patches between different releases
34 test/ # create tarballs and do diffs from this directory
36 ~/something/lilypond/bin is in the PATH, and contains symlinks to the
37 compiled executables. For some of the scripts to work, you have to set
39 LILYPOND_SOURCEDIR=/home/myself/something/lilypond
43 If you don't use patches, you'd probably want to symlink
45 lilypond -> lilypond-x.y.z
47 =head2 Language: mudela
49 Q: Why can't you type C<#c> in stead of C<cis> ?
51 A: We think that C<#c> looks as if you are entering the symbols to
52 print (which you are not; remember, you're entering the musical
55 We're not sure on leaving out this feature. If you think this is a
56 good idea, please let us know.
59 Q: Why do I have to type the accidentals to the note if I specified them?
65 Independently of how it was written and what the current key was, you
66 would say that you are playing and reading "two C-sharp" notes. We
67 have tried to make the language somewhat context-free. Of course
68 sheet music is not context-free. Unfortunately, sheet music is also 2
69 dimensional, and ASCII is not.
71 Technically it would be feasible to have the Interpreting phase do
72 tricky things to add (or leave out) the accidentals, but we think that
73 it is impractical: it hampers the readability and portability of your
74 source, since you need LilyPond to fill in the details and actually
78 Q: What is C<cis> anyway
80 A: C<cis> is the dutch naming for C-sharp. The notes are named
81 a, b,.., g. The suffix -is means sharp, and -es flat. This system is
82 common in a number of languages (such as swedish, dutch, german.)
83 Certain other languages (such as English, French and Italian) just add
84 the word for "sharp" to the notename.
86 We chose the Dutch system, because we're dutch. You are free to chose
87 whatever names you like; they are user definable.
93 to make a few chords, but why do I have to type
96 < { a~ e } { c ~ g } >
102 to generate ties between the chords?
108 this is shorthand for
110 < { a } { c } > < { e } { g } >
112 Ties have to be confined to `voices', and the a and the e are in
113 different {} blocks, so they are in different voices. You should view
114 the desired construct as a "generalised chord" (two voices stacked
115 vertically). It might help you visualise this by using the following
122 Q: and where do the beams come into this picture?
124 A: Beams are voicegroup-wide, and may be entered in any part of the
127 < { [a ~ e] } { c ~ g } >
128 < { [a ~ e } { c ~ g] } >
129 < { [a ~ e] } { [c ~ g] } >
131 These all give the same result.
133 Q: Why are [] around the notes, and () inbetween?
135 A: [] designate beams, a note can only be in one beam at the same
136 time. () is a slur, which connects notes. You need to be able to
142 Q: I want to insert some TeX commands
144 A: You shouldn't: it's against LilyPond philosophy to have typesetting
145 commands in the mudela source. Moreover, this would be difficult. The
146 manner in which Request (the basic building blocks of mudela) are
147 translated into printable items is complex: it is not always possible
148 to associate one Request with one Item or Spanner.
150 As a further notice, we want to move away from TeX (and perhaps
151 output PostScript or render to an X window too), so using TeX will
152 make sources non-portable at some time.
154 =head2 Do you support ...
156 Q: Do you support pop songs (chords, single staff, lyrics)?
158 A: Yes, see the F<twinkle-pop> example.
160 Q: Do you support guitar chord diagrams?
162 A: No, not yet. We ourselves don't play guitar, and don't know the
163 fine points of this notation. We would welcome anyone who could give
166 Q: Do you support TAB notation?
168 A: No. The same as for the previous question goes, but TAB is a lot
169 more work than diagrams (TAB needs modification of Parser, Lexer,
170 Staff, Notehead, Stem code and all the code that creates these graphic
173 Q: Do you support multiple staff-sizes?
175 A: Yes and no. At this time you can choose between 16 or 20 pt
176 staff-size (you can have other sizes, but you need to tinker with the
177 fonts to get those). The sizes can't be changed per staff (yet).
178 Look at F<standchen.ly> for an example.
183 Q: How do I change the TeX layout?
185 A: See F<lilyponddefs.tex>, it has some comments.
187 Q: How do I place lyrics under I<each> of the staves in a score, as in
188 choral music. I can work out how to put lyrics for each line all under
189 the top line, or at the bottom but not between!
191 A: You change the order lyrics and staves. You have to name all
192 staves (lyric and melodic), otherwise they will end up in the same
197 < \melodic \type Staff = "treble" \trebleMelody
198 \lyric \type Lyrics = "tlyrics" \trebtext
199 \type Staff = "bass" \melodic \bassMelody
200 \lyric \type Lyrics = "blyrics" \basstext
206 Q: How do I put more than one marking on a note.
208 A: You can stack them
212 or use spacing-notes to put markings at different horizontal positions
215 { s4\ff s4^"text" s4-\marcato s4 }
222 Q: Could you implement feature XXXX? It is really easy, just extend
223 the syntax to allow YYYY!
225 A: If it is reasonable, I'll add XXXX to the TODO list. In general
226 finding a cute syntax (such as YYYY) isn't very hard. The complicated
227 issue how to adapt the internals to do XXXX. The parser is really a
228 simple front end to the complicated internals.
230 Q: Can I join in on LilyPond development? How do I do this?
232 A: LilyPond development is open for anyone who wants to join. We try
233 to use a Bazaar style development model for LilyPond, see
234 http://locke.ccil.org/~esr/writings/cathedral.html. This means:
235 frequent releases, everyone can send in a patch or do suggestions and
236 all development discussions are public.
238 To be precise, discussions take place on the gnu-music-discuss mailing
239 list, which is open for subscription to everyone.
242 Q: I want to implement XXXX! Should I do this?
244 A: There might be better ways of doing XXXX, so it's a good thing to
245 ask about this before you start hacking. If you want to keep in touch
246 with current developments, you should subscribe to the mailing list
247 (see the "links" section of the documentation).
250 Q: I want to implement XXXX! How should I do this?
252 A: Your best bet of getting me to include code, is to present it as a
253 "fait accompli", ie., to send me a patch.
256 Q: I made some code, how do I get you to include it?
260 diff -urN old-file new-file > patch
264 diff -urN old-directory/ new-directory/ > patch
266 Alternatively, you can use F<bin/make-patch.py>. Don't forget to put
267 in your name and e-mail address.
269 Q: How do I learn the C++ code?
271 A: The entry point is in C<main()>. Good luck. :-)
273 Seriously, read, reread and reread internals and CodingStyle, and
276 Anywhere? Well, most of the comment doco are in the header files, so
277 your best bet would be C<less lily/include/*.hh>. Some of the most
278 important data-structures are to be found in:
297 Q: Why do I need g++ >= 2.7?
299 A: By using g++, GNU LilyPond is portable to all platforms which support
300 g++ (there are quite a few). Not having to support other compilers
301 saves us a I<lot> of trouble.
305 Q: There are lots of warning messages for the printing, all
308 dvilj4l: warning: Invalid keyword or value in \special -
310 A: You should use dvips and ghostscript to print it: the slurs and
311 beams are PS C<\special> commands
314 Q: My symbols are all messed up after I upgraded, and I get
317 A: We mucked with the fonts in the upgrade. Remove I<all> previous
318 fonts, including the .pk and .tfm fonts in F</var/lib/texmf>. A
319 script automating this has been included, see F<bin/clean-fonts.sh>
321 Q: I don't get midi-output, even if I use B<-M>!
323 A: Your \score should include a \midi block, eg.
326 \melodic { c4 c g g }
329 \output "myfile.mid";
334 The B<-M> option was added to LilyPond because processing the \paper
337 Q: A lot of musical stuff doesn't make it to the MIDI file (dynamics,
340 A: The MIDI output was originally put in as a proof that MIDI could be
341 done, and as a method of proof"reading" the input. The MIDI support
342 is by no means finished.
346 can't load library 'libflower.so'
348 A: You are using the dynamically compiled Flower library. Please set
349 LD_LIBRARY_PATH to a directory containing F<libflower.so>
353 Q: I want a DOS/NT/W95 port.
355 A.0: Reconsider. Try Linux. It's fun!
357 A.1: Currently (0.0.27), GNU LilyPond (and flowerLib) compiles,
358 links and runs on Windows-nt, using Cygnus' gnu port (release b17.1).
359 I (JCN) only had to make a minor workaround for missing library calls.
360 Have a look at http://www.cygnus.com/gnu-win32. To make GNU LilyPond
361 type C<make>. (I am not promising to maintain this platform, it is just
362 that when forced into doze, i'm sometimes too lazy to reboot.)
364 A.2: I haven't had time to find a Linux GCC crosscompiler (I<with> g++
365 and libg++, mind you) to DOS/Windows (in rpm, please :-)
367 A.3: If you are knowledgeable enough to make w32 compiles from time to
368 time, please do so! We want to keep away from w32 as far as possible.
370 Q: I just love to blindly run the (sometimes bit stale) .exe's you distribute.
371 Why do i need cygwin.dll?
373 A: It's all in this cut-n-paste:
375 Minimalist GNU-Win32 Readme
378 Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
382 0.3 Fixes and Improvements
385 In the "coming soon" category I have a version of the GNU Standard C++
386 library ported to Mingw32. This means you can use iostreams, complex
387 numbers and all those neat STL (Standard Template Library) things
388 without needing the Cygwin DLL. I hope to put this port up for
389 downloading soon (along with the source of course).
395 To add C++ Support to the above the following extra files are required:
397 In C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-
401 Note that this does not include support for the standard C++ libraries
402 (only the C run time libraries) or for iostreams. That support is still
403 only available with the Cygwin32 API.