]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/faq.pod
b98fa6865cbb25949af2dd939db584173d942424
[lilypond.git] / Documentation / faq.pod
1 =head1 NAME
2
3 FAQ - GNU LilyPond FAQs
4
5 =head1 DESCRIPTION
6
7 Some questions that have been answered before.
8
9 =head2 Installing
10
11 Q: I get all kinds of errors while  compiling F<parser.cc>
12
13 A: LilyPond uses features of bison version 1.25. Please confirm that
14 you are using a version 1.25 or better, that is B<GNU> bison
15 B<1.25>. Don't forget to do "make clean" after installing it. Don't
16 forget to remove the stale F<bison.simple> as well.
17
18 If the problem persists, then please mail me.
19
20 Q: Some of your neat scripts fail, what directories do you use:
21
22 A: [This only applies if you don't do C<make install>, and develop out
23 of the source directory]
24         
25         ~/something/
26
27 which contains:
28
29           lilypond/     # the directory as unpacked from the tarball
30           releases/     # directory for .tar.gz releases
31           patches/      # directory for patches between different releases
32           test/
33         
34 ~/something/lilypond/bin is in the PATH, and contains symlinks to the
35 compiled executables.
36
37 If you don't use patches, you'd probably want to symlink
38
39         lilypond -> lilypond-x.y.z
40
41 =head2 Language: mudela
42
43 Q: Why can't you type C<#c> in stead of C<cis> ?
44
45 A: We think that C<#c> looks as if you are entering the symbols to
46 print (which you are not; remember, you're entering the musical
47 content in Mudela)
48
49 We're not sure on leaving out this feature. If you think this is a
50 good idea, please let us know.
51
52 Be warned we will I<not> allow you to leave out the C<#> if the note
53 already has an accidental. We won't allow
54
55         c# c    % no way! 
56
57 in stead of:
58
59         cis cis
60         #c #c
61
62 Why, you might ask? Because independently of how it was written, you
63 would say that you are playing and reading "two C-sharp" notes.
64
65
66 Q: What is C<cis> anyway
67
68 A: C<cis> is the dutch naming for C-sharp. The notes are named
69 a, b,.., g. The suffix -is means sharp, and -es flat. This system is
70 common in a number of languages (such as swedish, dutch, german.)
71 Certain other languages (such as English, French and Italian) just add
72 the word for "sharp" to the notename.
73
74 We chose the Dutch system, because we're dutch. You are free to chose
75 whatever names you like; they are user definable.
76
77 Q: I can type
78
79         <a c> <e g>
80
81 to make a few chords, but why do I have to type
82
83
84         < { a~ e } { c ~ g } >
85
86 instead of
87
88         <a~ c~> <e g>
89
90 to generate ties between the chords?
91
92 A: When you type 
93
94         <a c> <e g>
95
96 this is shorthand for
97
98         < { a } { c } > < { e } { g } >
99
100 Ties have to be confined to `voices', and the a and the e are in
101 different {} blocks, so they are in different voices. You should view
102 the desired construct as a "generalised chord" (two voices stacked
103 vertically). It might help you visualise this by using the following
104 formatting:
105
106         < { a ~ e }
107           { c ~ g }
108         >
109
110 Q: and where do the beams come into this picture?
111
112 A: Beams are voicegroup-wide, and may be entered in any part of the
113 voicegroup:
114
115         < { [a ~ e] } { c ~ g } >
116         < { [a ~ e } { c ~ g] } >
117         < { [a ~ e] } { [c ~ g] } >
118
119 These all give the same result.
120
121 Q: Why are [] around the notes, and () inbetween?
122
123 A: [] designate beams, a note can only be in one beam at the same
124 time. () is a slur, which connects notes.  You need to be able to 
125 specify
126
127         a()a()a
128
129 Q: I want to insert some TeX commands
130
131 A: You shouldn't: it's against LilyPond philosophy to have typesetting
132 commands in the mudela source. Moreover, this would be difficult. The
133 manner in which Request (the basic building blocks of mudela) are
134 translated into printable items is complex: it is not always possible
135 to associate one Request with one Item or Spanner.
136
137 As a further notice, we want to move away from TeX (and perhaps
138 output PostScript or render to an X window too), so  using TeX will
139 make sources non-portable at some time.
140
141 =head2 Miscellaneous
142
143 Q: Do you support pop songs (chords, single staff, lyrics)?
144
145 A: Yes, see the F<twinkle-pop> example
146
147 Q: Do you support guitar chord diagrams?
148
149 A: No, not yet. We ourselves don't play guitar, and don't know the
150 fine points of this notation.  We would welcome anyone who could give
151 this a try.
152
153 Q: Do you support TAB notation
154
155 A: No. The same as for the previous question goes, but TAB is a lot
156 more work than diagrams (TAB needs modification of Parser, Lexer,
157 Staff, Notehead, Stem code and all the code that creates these graphic
158 elements.)
159
160 Q: How do I change the TeX layout?
161
162 A: See F<lilyponddefs.tex>, it has some comments.
163
164 Q: How do I learn the C++ code?
165
166 A: The entry point is in C<main()>. Good luck. :-)
167
168 Seriously, read, reread and reread lilygut and CodingStyle, and
169 just start anywhere. 
170
171 Anywhere? Well, most of the comment doco are in the header files, so
172 your best bet would be C<less lily/include/*.hh>. Some of the most
173 important data-structures are to be found in:
174
175         - p-col.hh
176         - *request.hh
177         - engraver.hh
178         - performer.hh
179         - translator.hh
180         - score-elem.hh
181         - music.hh
182         - music-list.hh
183         - music-iterator.hh
184         - item.hh
185         - spanner.hh
186
187
188 Q: Why GPL?
189
190 A: Yes.
191
192 Q: Could you implement feature XXXX? It is really easy, just extend
193 the syntax to allow YYYY!
194
195 A: If it is reasonable, I'll add XXXX to the TODO list. In general
196 finding a cute syntax (such as YYYY) isn't very hard. The complicated
197 issue how to adapt the internals to do XXXX. The parser is really a
198 simple front end to the complicated internals. 
199
200
201 Q: I want to implement XXXX!  Should I do this?
202
203 A: There might be better ways of doing XXXX, so it's a good thing to
204 ask about this before you start hacking.  If you want to keep in touch
205 current developments, you should subscribe to the mailing list.
206
207
208 Q: I want to implement XXXX!  How should I do this?
209
210 A: Your best bet of getting me to include code, is to present it as a
211 "fait accompli", ie., to send me a patch.
212
213
214 Q: Why do I need g++ >= 2.7?
215
216 A: By using g++, GNU LilyPond is portable to all platforms which support
217 g++ (there are quite a few). Not having to support other compilers
218 saves us a I<lot> of trouble. 
219
220 =head2 Running
221
222 Q: I don't get midi-output, even if I use B<-M>
223
224 A: Your \score should include a \midi block, eg.
225
226         \score {
227                 \melodic { c4 c g g }
228                 \paper {}       
229                 \midi {
230                         \output "myfile.mid";
231                         \tempo 4=70;
232                 }
233
234 The B<-M> option was added to LilyPond because processing the \paper
235 block is so slow.
236
237 Q: A lot of musical stuff doesn't make it to the MIDI file (dynamics,
238 articulation, etc).
239
240 A: The MIDI output was originally put in as a proof that MIDI could be
241 done, and as a method of proof"reading" the input.  The MIDI support
242 is by no means finished. 
243
244 Q: I get 
245
246         can't load library 'libflower.so'
247
248 A: You are using the dynamically compiled Flower library. Please set
249 LD_LIBRARY_PATH to a directory containing F<libflower.so>
250
251 =head2 DOZE
252
253 Q: I want a DOS/NT/W95 port.
254
255 A.0: Reconsider.  Try Linux.  It's fun!
256
257 A.1: Currently (0.0.27), GNU LilyPond (and flowerLib) compiles, 
258 links and runs on Windows-nt, using Cygnus' gnu port (release b17.1). 
259 I (JCN) only had to make a minor workaround for missing library calls.  
260 Have a look at http://www.cygnus.com/gnu-win32.  To make GNU LilyPond 
261 type C<make>. (I am not promising to maintain this platform, it is just
262 that when forced into doze, i'm sometimes too lazy to reboot.)
263
264 A.2: I haven't had time to find a Linux GCC crosscompiler (I<with> g++
265 and libg++, mind you) to DOS/Windows (in rpm, please :-)
266
267 A.3: If you are knowledgeable enough to make w32 compiles from time to
268 time, please do so!  We want to keep away from w32 as far as possible.
269
270 Q: I just love to blindly run the (sometimes bit stale) .exe's you distribute. 
271 Why do i need cygwin.dll?
272
273 A: It's all in this cut-n-paste:
274
275 Minimalist GNU-Win32 Readme                   
276 version 0.1.3                           
277 March 20, 1997                       
278 Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
279
280 [...]
281
282 0.3 Fixes and Improvements          
283
284 [...]
285 In the "coming soon" category I have a version of the GNU Standard C++
286 library ported to Mingw32. This means you can use iostreams, complex
287 numbers and all those neat STL (Standard Template Library) things
288 without needing the Cygwin DLL. I hope to put this port up for
289 downloading soon (along with the source of course).
290        
291 [...] 
292
293 3.2 C++ Support                                                         
294
295 To add C++ Support to the above the following extra files are required: 
296
297 In C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-    
298 961023:                                                                         
299         cc1plus.exe                                                   
300
301 Note that this does not include support for the standard C++ libraries
302 (only the C run time libraries) or for iostreams. That support is still
303 only available with the Cygwin32 API.
304