]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/faq.yo
patch::: 1.2.5.jcn1
[lilypond.git] / Documentation / faq.yo
1 article(FAQ - GNU LilyPond FAQs)()()()
2
3 DEFINEMACRO(question)(1)(subsect(ARG1))
4
5 sect(Miscellaneous)
6
7 question(HELP! I'm stuck!)
8
9 Please read this document carefully.  If you are still at loss,
10 send your questions to the bf(mailing list), and not to authors
11 directly.
12
13 Note: relative paths are meant to be relative to the source directory
14
15 sect(Installing)
16
17 COMMENT(look out: can't have line breaks in subsect() macro)
18 question(If I install the .exe file on my DOS/windows 3.11 machine, it doesn't work)
19
20 The DOS port is done with the cygnus gnu/windows32 port of the GNU utils.
21 It does em(not) work with windows 3.x; you need Windows-NT (95/98?).  This
22 is not a recommendation, however.  We recommend you use Unix, in
23 particular, use GNU/Linux.  For further information see file(README-W32).
24
25 question(Where is guile-config)
26
27 RedHat RPMS don't include guile-config.  You need guile-config as it
28 was produced during the RPM build run.  Build the RPM from source
29 (file(.src.rpm)), and use the guile-config that is in
30 file(/usr/src/redhat/BUILD/guile-1.3/guile-config/).
31
32
33 question(I get all kinds of errors while  compiling file(parser.cc))
34
35 LilyPond uses features of bison version 1.25. Please confirm that
36 you are using a version 1.25 or better, that is bf(GNU) bison
37 bf(1.25). Don't forget to do "make clean" after installing it. Don't
38 forget to remove the stale file(bison.simple) as well.
39
40 If the problem persists, then please send a bug report to the mailing list.
41
42 question(I upgraded by applying a patch, and now my configure/build breaks.)
43
44 Patches don't include automatically generated files, i.e. 
45 file(configure) and files generated by file(configure).  Regenerate them 
46 yourself:
47 verb(
48     autoconf
49     configure
50 )
51 You might need to create some extra "out" directories.  Do this with
52 verb(
53     make outdirs
54 )
55 question(Some of your neat scripts fail, what directories do you use:)
56
57 [This only applies if you don't do code(make install), and develop out
58 of the source directory]
59
60 I have a directory which contains all our development projects
61 verb(
62     ~/usr/
63 )
64
65 which looks like file(/usr/)
66 verb(
67     bin/
68     share
69     lib/
70     share/
71     src/
72
73     etc....
74 )
75
76 The directory  file(~/usr/src/) contains something like
77 includefile(../stepmake/Documentation/layout.yo)
78 )       
79
80 ~/usr/src/bin is in the PATH, and contains symbolic links to the
81 compiled executables.
82
83 question(Is there an emacs mode?)
84
85 Yes.  It is included with the source archive as mudela-mode.el.  If
86 you have an rpm it is in /usr/doc/lilypond-X/.  You have to install it
87 yourself.
88
89 question(How do i create the file(.tfm) files?)
90
91 You don't.  The file(.tfm) files should be generated automatically by
92 Metafont when you run TeX().  Check your TeX() installation, or ask
93 your local TeX() guru.  The supplied file(.afm) files are intended to
94 be used by LilyPond, not by any other programs.
95
96
97 sect(Documentation)
98
99 question(Why is the documentation/website/etc. so lousy?)
100
101 LilyPond development is moving quite fast, documentation will often
102 lag a bit behind.  We must always make a choice between writing more
103 doco, writing more code and answering email.
104
105 If you think you can make a correction, or devised a solution that 
106 should be documented, please do so and send in a patch.
107
108 sect(Language: mudela)
109
110 question(Why can't you type code(#c) in stead of code(cis) ?)
111
112 We think that code(#c) looks as if you are entering the symbols to
113 print (which you are not; remember, you're entering the musical
114 content in Mudela)
115
116
117 question(Why do I have to type the accidentals to the note if I specified them?)
118
119 Take this example
120 verb(
121     cis cis
122 )
123 Independently of how it was written and what the current key was, you
124 would say that you are playing and reading "two C-sharp" notes.  We
125 have tried to make the language somewhat context-free.  Of course
126 sheet music is not context-free.  Unfortunately, sheet music is also 2
127 dimensional, and ASCII is not.
128
129 Technically it would be feasible to have the Interpreting phase do
130 tricky things to add (or leave out) the accidentals, but we think that
131 it is impractical: it hampers the readability and portability of your
132 source, since you need LilyPond to fill in the details and actually
133 make sense of it.
134
135
136 question(What is code(cis) anyway)
137
138 code(cis) is the dutch naming for C-sharp. The notes are named
139 a, b,.., g. The suffix -is means sharp, and -es flat. This system is
140 common in a number of languages (such as swedish, dutch, german.)
141 Certain other languages (such as English, French and Italian) just add
142 the word for "sharp" to the notename.
143
144 We chose the Dutch system, because we're dutch. You are free to chose
145 whatever names you like; they are user definable.
146
147
148 question(Why are [] around the notes, and () inbetween?)
149
150 [] designate beams, a note can only be in one beam at the same
151 time. () is a slur, which connects notes.  You need to be able to 
152 specify
153 verb(
154     a()a()a
155 )
156
157 question(I want to insert some TeX commands.)
158
159 You shouldn't: it's against LilyPond philosophy to have typesetting
160 commands in the mudela source. Moreover, this would be difficult.
161 LilyPond uses TeX like a glorified output engine: the output consists
162 of (x,y) positions and symbols.  You can only sensibly do TeX stuff in
163 the symbol string.  You can access the symbol string easily for some
164 symbols (notably lyrics and code(^"text") commands).
165
166
167 sect(Do you support ...)
168
169 question(Do you support pop songs (chords, single staff, lyrics)?)
170
171 Yes, see the file(twinkle-pop) example.
172
173
174 question(Do you support guitar chord diagrams?)
175
176 No. Go ahead and send a patch.
177
178 We ourselves don't play guitar, and don't know the fine points of this
179 notation.  We would welcome anyone who could give this a try.
180
181 question(Do you support TAB notation?)
182
183 No. The same as for the previous question goes, but TAB is a lot
184 more work than diagrams (TAB needs modification of Parser, Lexer,
185 Staff, Notehead, Stem code and all the code that creates these graphic
186 elements.)
187
188 question(Do you support multiple staff-sizes?)
189
190 Yes.  At this time you can choose between 11, 13, 16, 19, 20, 23 and
191 20 pt staff-size.  Use the staffLineLeading property for setting the
192 size of the staff, and fontSize for setting the size of the glyphs.
193
194 question(Do you support Gregorian chant notation?)
195
196 No.  Go ahead.
197
198 question(Do you support grace notes?)
199
200 Yes. See file(input/test/grace.ly)
201
202
203 sect(How do I ....)
204
205 question(How do I change the TeX layout?)
206
207 See file(lilyponddefs.tex), it has some comments.  Or use file(ly2dvi).
208
209 COMMENT(look out: can't have line breaks in subsect() macro)
210 question(How do I place lyrics under em(each) of the staves in a score, as choral music. I can work out how to put lyrics for each line all under the top line, or at the bottom but not between!) 
211
212 You change the order lyrics and staves.  You have to name all
213 staves (lyric and melodic), otherwise they will end up in the same
214 staff/lyricline
215 verb(   
216         \score {
217                 < \melodic \type Staff = "treble" \trebleMelody
218                   \lyric \type Lyrics = "tlyrics" \trebtext
219                   \type Staff = "bass" \melodic \bassMelody        
220                   \lyric \type Lyrics = "blyrics" \basstext      
221                 >
222                 \paper {  }
223         }
224 )
225
226 question(How do I put more than one marking on a note.)
227
228 You can stack them 
229 verb(
230         c4^"a"^"b"
231 )
232 or use spacing-notes to put markings at different horizontal positions 
233 verb(
234         < c1
235           { s4\ff s4^"text" s4-\marcato s4 }
236         >
237 )
238 This also works for crescendi, eg,
239 verb(
240         < c1
241           { s4\< s2 \! s4 }
242         >
243 )
244
245 question(How do I combine multiple pieces into one document)
246
247 There are several solutions:
248
249 itemize(
250 it() 
251 verb(
252         ly2dvi foo.ly bar.ly
253
254 produces one combined file(foo.dvi)
255 it() make a toplevel file(.ly) file that contains al pieces:
256 verb(
257         % booklet.ly
258         \input "piece-1.ly"
259         \input "piece-2.ly"
260         \input "piece-3.ly"
261
262 it() make a hybrid TeX()/LilyPond file(.doc) document (see the
263      file(Documentation/tex) directory).
264 )
265
266 For the first two solutions, you will need to move code(\header) info 
267 in each individual piece from toplevel into the code(\paper) block.
268
269 There are several examples in the file(mutopia) directory.
270
271
272 question(How do I get bar numbers?)
273
274 See file(input/test/bar-scripts.ly).
275
276
277 question(How do I change the tagline 'Lily was here')
278
279 In the code(\header) field, add a code(tagline) entry, eg
280 verb(
281 tagline="Typeset by GNU LilyPond"
282 )
283
284 to get a bit less frivolous tagging.
285
286 sect(Development)
287
288 COMMENT(look out: can't have line breaks in subsect() macro)
289 question(Could you implement feature XXXX? It is really easy, just extend the syntax to allow YYYY!) 
290
291 If it is reasonable, I'll add XXXX to the TODO list. In general
292 finding a cute syntax (such as YYYY) isn't very hard. The complicated
293 issue how to adapt the internals to do XXXX. The parser is really a
294 simple front end to the complicated internals. 
295
296 question(Can I join in on LilyPond development?  How do I do this?)
297
298 LilyPond development is open for anyone who wants to join.  We try
299 to use a Bazaar style development model for LilyPond, see
300 lurl(http://locke.ccil.org/~esr/writings/cathedral.html.)  This means:
301 frequent releases, everyone can send in a patch or do suggestions and
302 all development discussions are public.
303
304 To be precise, discussions take place on the gnu-music-discuss mailing
305 list, which is open for subscription to everyone.
306
307
308 question(I want to implement XXXX!  Should I do this?)
309
310 There might be better ways of doing XXXX, so it's a good thing to
311 ask about this before you start hacking.  If you want to keep in touch
312 with current developments, you should subscribe to the mailing list
313 (see the "links" section of the documentation).
314
315
316 question(Is there a GUI frontend?  Should I start building one?)
317
318 LilyPond currently has no graphical interface.  The authors seriously
319 doubt if a simple-minded approach (dragging and dropping notes) is any
320 easier or quicker to use than mudela.  But for composing a graphical
321 environment probably is indispensable.
322
323 In any case email(Derek Wyatt)(wyatt@scar.utoronto.edu) is working on
324 GTK based editor, but that effort practically died. (see
325 lurl(http://harmonia.scar.utoronto.ca).
326
327 Matthew Hiller is working on extending Midiscore and Koobase to handle
328 mudela.  Check out lurl(http://zoo.cs.yale.edu/~meh25/).
329
330 There is also a GUI package RoseGarden that could be extended to
331 output mudela.
332
333 If you want to work on this, please send e-mail to the mailing list
334 email(gnu-music-discuss@gnu.org).
335
336
337
338 question(I want to implement XXXX!  How should I do this?)
339
340 Your best bet of getting us to include code, is to present it as a
341 "fait accompli", i.e., to send a patch to the mailing list.
342
343
344 question(I made some code, how do I get you to include it?)
345
346 Send in a patch:
347 verb(
348         diff -urN old-file new-file > patch
349 )
350 or 
351 verb(
352         diff -urN old-directory/ new-directory/ > patch 
353 )
354 Alternatively, you can use issue the command
355 verb(
356         make diff
357 )
358
359 Don't forget to put your name and e-mail address
360 in the file(AUTHORS.pod) file, or you won't get credits :-]
361
362
363 em(Please) always send a bf(-u) diff, even if it is larger than the
364 whole file.
365
366 question(How do I learn the C++ code?)
367
368 The entry point is in code(main()). Good luck. :-)
369
370 Seriously, read, reread and reread internals and CodingStyle, and
371 just start anywhere. 
372
373 Anywhere? Well, most of the comment doco are in the header files, so
374 your best bet would be code(less lily/include/*.hh).
375
376 You should also have a look using Javadoc like tools.  Try
377 DOC++, lurl(http://www.imaginator.com/doc++)
378
379
380 question(Why GPL?)
381
382 No comment.
383
384
385 COMMENT(look out: can't have line breaks in subsect() macro)
386 question(Your make system does not adhere to GNU coding standards, could you please fix it?)
387
388 No.  We have evaluated the standard GNU combination for compiling
389 programs (autoconf, automake, libtool) and found to be inadequate in
390 several respects.  More detailed argumentation is included with
391 LilyPond's generic make package code(StepMake) 
392 (see file(stepmake-x.x.x/Documentation/automake.urgh))
393
394 LilyPond already compiles into a different directory ((the different
395 directory is called out/, there is one in every source directory).
396 make distclean essentially reduces to file(rm -f out/*) in every directory
397
398 question(gdb crashes when I debug!)
399
400 Upgrade to 4.17.
401
402 question(Why do I need g++ >= 2.8 / EGCS-1.1 ?)
403
404 Supporting more compilers than EGCS/G++ 2.8 is unlikely to make
405 LilyPond run on more platforms.  It would give us an enormous headache
406 in detecting and catering for every variant of every compiler: not
407 having to support other compilers saves us a em(lot) of trouble.
408
409
410 sect(Running)
411
412
413 question(I use dvilj4, and there are lots of warning messages for the printing)
414
415 You should use dvips and ghostscript to print the code(dvi) output:
416 the slurs and beams are PS code(\special) commands.
417
418
419 COMMENT(look out: can't have line breaks in subsect() macro)
420 question(My symbols are all messed up after I upgraded, I get the wrong symbols and dvi-checksum errors!) 
421
422 We obviously mucked with the fonts in the upgrade.  Remove em(all)
423 previous fonts, including the file(.pk) and file(.tfm) fonts in
424 file(/var/lib/texmf).  A script automating this has been included, see
425 file(buildscripts/clean-fonts.sh).
426
427 COMMENT(look out: can't have line breaks in subsect() macro)
428 question(all the pk and tfm fonts are created in the directory where the mudela file is, not in "/var/spool/texmf" where I think they should be.)
429
430 Mats Bengtsson <mats.bengtsson@s3.kth.se> writes:
431
432 The simple solution used by Anthony Fok in the Debian distribution of
433 Lilypond is to link the mf/ directory to
434 /usr/lib/texmf/fonts/source/public/lilypond Depending on what
435 distribution of teTeX and Linux you have installed, there might also
436 be other places like /usr/local/lib/texmf/fonts/source/public/lilypond
437 or /var/spool/texmf//fonts/source/public/lilypond
438
439 Wherever you put it, don't forget to run mktexlsr (or texhash for
440 older installations) afterwards, so that TeX will find the files.
441 Also, don't forget to remove all old .tfm and .*pk files when the font
442 is updated (as it will be in version 1.1.40, for example).
443
444 question(Are there scalable versions of the font?)
445
446 Yes, they are type-3 fonts.  In the file(mf/) 
447 subdirectory, issue:
448 verb(
449         make pfa
450 ) in the mf/ subdirectory.  This will also  make file(mfplain) for metapost.
451 The file(pfa)s will be in the subdirectory file(out/).
452
453 question(How does PS output work?)
454
455 itemize(
456  it()
457 Generate the PostScript Type-3 fonts. 
458 it()
459 Run lilypond with option tt(-f ps):
460 verb(
461     lilypond -fps foo.ly
462 )
463 it() To view the file(.ps) output with GhostView, set GS_FONTPATH to the 
464 directory containing the file(pfa)s.  In the source tree, this is file(mf/out/).
465
466
467 i.e. do something like:
468 verb(
469    export GS_FONTPATH=$HOME/usr/src/lilypond/mf/out
470    gv foo.ps &
471 )
472 )
473
474 Direct PS output is still experimental.  For creating nice looking ps 
475 output, use TeX() and code(dvips).
476
477   
478 question(The beams and slurs are gone if use the XDvi magnifying glass!?)
479
480 The beams and slurs are done in PostScript.  XDvi doesn't show
481 PostScript in the magnifying glass.  Complain to the XDvi maintainers.
482
483
484 question(I don't get midi-output, even if I use bf(-M)!)
485
486 Your \score should include a \midi block, eg.
487 verb(
488         \score {
489                 \melodic { c4 c g g }
490                 \paper {}       
491                 \midi {
492                         output = "myfile.midi";
493                         \tempo 4=70;
494                 }
495         }
496 )
497 The bf(-M) option was added to LilyPond because processing the \paper
498 block is so slow.
499
500 COMMENT(look out: can't have line breaks in subsect() macro)
501 question(A lot of musical stuff doesn't make it to the MIDI file, eg.  dynamics, articulation, etc.) 
502
503 The MIDI output was originally put in as a proof that MIDI could be
504 done, and as a method of proof"reading" the input.  The MIDI support
505 is by no means finished.  Patches appreciated.
506
507
508 sect(Copyright)
509
510
511 question(What is Urtext?  Critical Edition?)
512
513 Werner Lemberg:
514
515 It may be translated best as `that what the composer intended to tell
516 the reader'
517
518
519 Peter Chubb <peterc@aurema.com> writes:
520
521 An Urtext is a reconstruction of the earliest form of a text,
522 including mistakes the original author wrote.  Where there is no
523 available facsimile of the original, creating this can involve some
524 inspired detective work (in comparing various later editions and
525 trying to deduce what the original form was).  As far as copyright
526 goes, my guess is that, for works that are otherwise out of copyright,
527 an Urtext is copyright to the person who reconstructed it, as a
528 derived work from the editions s/he consulted.  If the edition is
529 created directly from a facsimile, as would be the case for most
530 Urtext editions of music, then the amount of new (copyright) material
531 is minimal.
532
533 A critical edition is an edition that is designed for critical
534 study of a text.  It'll usually have lots of footnotes, alternative
535 readings, possible realisations of bass parts and harmonies, etc.  It
536 aims to elucidate the author's original intentions, as opposed to
537 reproduce exactly what was written.  The critical apparatus will be
538 copyright to its author.
539
540 A playing edition is one that has been edited for modern usage.
541 It'll have fewer or no alternative readings, it'll be in modern
542 notation, it may have additional editorial marks (phrase marks, slurs,
543 etc.) will often have a fully realised basso continuo part (if oone
544 was present in the original) and may have had key changes, time
545 signature changes, time compression (original in 4/1, playing edition
546 in 4/4, for example, with all semibreves replaced with crotchets)
547 Copyright is in the arranger/editor.
548
549
550 question(How does copyright for sheet music work? Can I enter and spread my newly bought Bach urtext?) 
551
552 Silas S. Brown <ssb22@hermes.cam.ac.uk>:
553
554 There are several aspects to sheet music copyright:
555
556 1.  The music itself - copyright for the composer's life plus 70 years (so
557 not applicable to Bach).
558
559 2.  If the music is an arrangement, then the arranger holds copyright on
560 that arrangement.  However, you can produce your own arrangement using
561 that arrangement as a reference point.  Obviously your arrangement must be
562 sufficently different to be called your own arrangement - you need to do
563 more than change one note!
564
565 3.  In some countries, the same applies for editions.  This could be
566 relevant to the Bach example.  If a modern person has edited the music,
567 then they hold the copyright on the edition.  This does not stop you from
568 removing the editorial features - remove all editorial slurs, phrasemarks,
569 ornaments etc and only leave those that you know to be original.  You can
570 then add some of your own if you want to be your own editor.
571
572 4.  If there are lyrics, then the lyricist also holds copyright.  This
573 does not stop you from using the music without the lyrics if it is
574 otherwise out of copyright.
575
576 5.  The copyright of the printed page is held by the publisher for 30
577 years after printing (25 in some countries).  This stops you from
578 photocopying (unless it's "fair use" eg. you're partially sighted and need
579 to enlarge the music) or otherwise reproducing the typesetting that is
580 used on it.  But the copyright is only held over the typesetting work, not
581 the music itself.  Since Mudela specifies the notes, independently of any
582 typesetting work that went into your reference copy, you are not
583 duplicating any of the publisher's work.
584
585 6.  If you want to violate copyright, there are two main cases where you
586 may do so: fair use, and with permission.  The former is rather fuzzily
587 defined, but it includes such things as including small extracts of a
588 score in a critique, and making a large print or Braille copy for a blind
589 or partially-sighted performer (many people argue that in this case it
590 should always be kept with the original copy and/or destroyed after it is
591 no longer needed).  The latter is obvious: You can always write to the
592 composer, arranger, editor, lyricist or publisher in question and ask if
593 you can do whatever it is you're trying to do.  Some will respond more
594 readily than others, but anything that they say will override any copying 
595 restrictions imposed on you.
596
597
598 References - best one I know is the UK-based Performing Right Society,
599 lurl(http://www.prs.co.uk/) (especially "membership") and their links to other
600 international equivalents.  
601
602
603
604 Juergen Reuter <reuterj@ira.uka.de>:
605
606 [More information can be had at: ]
607
608 lurl(http://lcweb.loc.gov/copyright/)
609 (USA copyright law)
610
611 lurl(http://fairuse.stanford.edu/)
612 (meta site about copyright with many links to other resources)
613
614 lurl(http://host.mpa.org/crc.html)
615 (copyright from the viewpoint of the USA music publishers' association)
616
617 lurl(http://www.wipo.int)
618 (World Intellectual Property Organization (a UNO agency); with
619 information about international copyright)
620
621
622 John Sankey:
623
624 See lurl(http://www.geocities.com/Vienna/Studio/1714/harpsichord.html)
625 for a summary of copyright relative to old music, also for the
626 expert forum for such questions.
627
628 Werner Lemberg <sx0005@sx2.HRZ.Uni-Dortmund.DE>:
629
630 This is not correct.  Urtext editions per se are em(not) copyrighted
631 -- if you print exactly what the composer has written, how can there
632 some copyright be added?  Copyrighted are usually only the `Critical
633 notes', the foreword, and the cadenzas some editors have added.
634
635 This means that the `Photocopying forbidden' sign in many scores is
636 not always correct for e.g. J.S. Bach -- you are allowed to copy the
637 pages which don't contain editorial stuff which is probably
638 copyrighted.
639
640 A very unfortunate situation for the publishers.
641
642
643
644
645 sect(Windows32)
646
647 question(I downloaded the windows32 port, and it doesn't match the website!)
648
649 The website is usually made from the latest snapshots.  Binary releases,
650 in particular the windows32 binaries, are only made every once in a while.
651 They may lag several versions behind the latest version. 
652
653 question(But i want a native DOS/Windows-NT/95 port)
654
655 Reconsider.  Try Linux.  It's fun!