lilypond-1.1.25
[lilypond.git] / TODO
blob6fa02b569fd0b009a6366d629a7ffd49def2a6c1
1 Features you cannot find in the doco as working, should be mentioned
2 here.
4 This is an assorted collection of stuff that will be done, might be
5 done, or is an idea that I want to think about
7 Most of the items are marked in the code as well, with full explanation. 
8 grep for TODO and ugh/ugr/urg
10 **************
11 I also found a few bugs:
13 * The examples in input/test/bar-scripts.ly and score-bar-scripts.ly
14   don't work. The problem seems to be that you can't define a 
15   a score identifier and then use it in the \score block.
17 * Instrument names in the margin. Example: 
18   input/test/hara-kiri.ly. The text should of course
19   be to the left of the staff lines.
20 **************
22 - Textual scripts and dynamics are printed in the middle of the staff.
24         * fix AFM for BlueSky AFM files.
26 - I didn't find any working example of the Staff_margin-engraver in 
27   input/test, and I couldn't invent one myself either. 
28   bar-scripts.ly, score-bar-scripts.ly and hara-kiri.ly don't work
29   properly.
31         * check widths of TFM, something's wrong here. 
33         * hang Item on Spanner
35         * junk Text_def, use G_text_item in stead.
37         * remove Interval dim_ from Dimension_cache and rename the struct.
39         * do --safe for PS output?
41         * convert-mudela --output
43         * staff_margin (with a partial measure.)
45         * fix "I've been drinking too much"
47         * add scripts to bars eg.  |^"bla" 
49         * fix Staff_margin_engraver.
51         * fix pletvisibility properties:
52           - bracket on/off/no-bracket-when-beam
53           - num on/off/no-num-when-beam
55         * fix: standchen.
57         * junk backlinks?
59         * junk text{sharp,flat,etc}
61         * fix convert-mudela manpage
63         * automatic staff selection.
65         * decimal point in \paper {}
67         *{  \voiceone <a'4.*2/3  d''4.*2/3 fis''4.*2/3>  [g''8 fis'' e''] d''4 |}
68          and=20
69          { \voicetwo  d'4 d'2.*2/3 } spacing
71         * tied notes for MIDI
73         * sharp /flat on trills (in MIDI ??)
75         * scm-ify \property values.
77         * move class Lookup {} into scm
79 BUGS:
81         * collisions/voices \voiceone \voicetwo are broken; see 
82           input/praeludium-fuga-E.ly
83           mutopia/J.S.Bach/wtk1-fugue2.ly
85         * fix: text on rests: rediculous dims
87         * ly2dvi
88           - bottomnote for ly2dvi
89           - deps for ly2dvi
91         * fix midi output:
92            - default duration?  duration must be not entered
93              explicitely on first note.
95         * turn slope-damping on/off
97         * c4 \! \> c4
99         * tremolo stuff
101         * gallina barlines.
103         * fix height of / collisions with lyrics (chords), 
104            see input/test/vertical-text.ly; input/test/repeat.ly
106         * latex bla.tex broken (titles / \lilyfooter stuff?)
108         * check/set minimum slur/tie length
110         * msgfmt -o check?
112         * \breathmark TeX macro 
114         * catch GUILE errors?
116         * add new glyphs to font.ly
118         * formatting of input stuff. 
120         * \notes{ a \< b \cr } vs \notes{ a \< b \! }
122         * if possible, it might be nice for a warning to appear if someone does
123         \translator with no name and without assigning it to an
124         identifier.  
126         * space after bars?
128         * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
130         * \type Voice \times 2/3 { [c8 c16 c16 c16 c16] }
132         * fix singleStaffBracket
134         * repeat bars: need distance after ":|" and before "|:"
136         Summary of minor spelling irregularities:
137         -  capitalization/use of underscores in property names
139         * fix SkipBars  -> skipBars
141         * \shape 1st dim skipped? 
143         * fix marks/barnumbers/marginal notes
145         * broken scripts:
146         lbheel = \script { "bheel" 0 0 -1  0 0 }
147         rbheel = \script { "bheel" 0 0 1 0 0 }
148         lbtoe = \script { "btoe" 0 0 -1 0 0 }
149         rbtoe = \script { "btoe" 0 0 1 0 0 }
150         lfheel = \script { "fheel" 0 0 -1  0 0 }
151         rfheel = \script { "fheel" 0 0 1 0 0 }
152         lftoe = \script { "ftoe" 0 0 -1 0 0 }
153         rftoe = \script { "ftoe" 0 0 1 0 0 }
154         
155         and also
156         
157         portato= \script { "portato" 0 -1 0 1 0 }
159 STUFF
160         * uniformise recent feta contributions.
162         * check out legal/(c) matters for scores.
164         * check out GCC signatures?
166         * Align_element::padding  ?
168         * uniformise property names...
169           - ydirection <-> yDirection
170           - rather allow '_' in identifiers first (i.e. junk ^ and _),
171             and do y_direction?
172           - typo checks on property names?
174         * use streambufs and iostream
175         to provide IO handling for TeX stream, mudela stream, data-file.
177         * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
179         * strip EXEs before installing
181         * zip target for binary windows dist (JBR)
183         * junking \skip req in lyrics
185         * Language:
186         - \type -> \context ?
187         - \translator -> ?
188         - fix \partial 
189         - \bla {} vs \bla ; 
190         - mix engraver hacking with music ?
191         - \once\property  KEY = VAL
192         - \addtranslator, \removetranslator
193         - junk ^ and _ for scripts
194         - junk _ for lyrics.
195         - abstract grammar.
197         * percussion note heads
199         * mi2mu empty staffs.
201         * horizontal centering of dynamics 
203         * \font\fontA=feta20.afm (.afm?)
205         * gzip RH manpage
207         * stable make/config stuff
209         * $DEPENDENCIES_OUTPUT support
211         * fix weird behaviour when .AFMs/.SCMs not found.
213         * Xdvi zooming ?! Try to understand GS garbage collection.
214                 gs: Error: /undefined in draw_beam
215                 gs: Operand stack:
217         * fix vertical alignment and stafflines
219         * GrandStaff needs more work -- I want a single word
220         `harpsichord' to the left of the grandstaff, not one on each
221         stave.  (Organ staff -- with separate pedal -- but common
222         properties may be something to think about.  Of course for
223         organ you want to be able to give stop indications on the way
224         through, so the \property Voice.Instrument would be a stop,
225         and \property GrandStaff.instrument would be PipeOrgan...)
227         * revise the Score_priority_align_engraver concept.  It sucks. 
229         * make new VoiceOne, VoiceTwo, VoiceThree contexts with
230 ydirection and hshift preset
232         * *.yo: fix pod manpage layout legacy
234         * text-items clash with stems/beams
236         * --include, -I option for ly2dvi (pass on to lily)
238         * fix placement of beam-less abbrev
240         * \meter 3/4;
241         <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
242          {\voicetwo cis,4 r r | r2. | r1 }> |
243         }
245         * try to use template<Type> iso MACRO(Type)
247         - NEWS: ... Musical_pitch (analogous to Duration and Rhythmic_req)
248           think about, analogous to pitch: 
249            * { a4 a16 } c <-- duration of c?
250            * < a4 b8 > c <-- duration of c?
252         * \tempo 4. = 90;
254         * fix audio-items (don't use (input) requests, but copy data)
256         * make sure all ex's have a mudela-version
258         * do rest-collisions for Multi_measure_rests as well.
260         * split error/warning in error/warning/non_fatal_error
262         * add a Duration_convert member to Duration_iter to set parameters.
263         Junk global duration settings. 
265         * minimum length second part broken tie
267         * en-,discouraged linebreaking: 
268           - handle DISALLOW < penalty > FORCE
269           - discourage breaking of slurs
271         * fix variable define/lookup parser global<->paper
273         * fix title/instrument placements; see input/test/title.ly
275         * <\voiceone c4. \voicetwo c4>
277         * add full cello suites to web site (kom op, Maarten!)
279         * Rethink Time_description
280           * \cadenza , \meter, \grouping should all be \properties
282         * rename
283           - measure -> bar
284           - abbrev -> tremolo
285           - abbreviation-beam -> (measured/unmeasured) tremolo
286           - partial -> anacrouse
288         * shared lib
290         * robustify Beam (in case of no stems, 32nd notes)
292         * decentralised spring factory
294         * move paper vars into engraver properties
296         * check for groff / troff/ nroff et
298         * more intelligent file searching
300         * make LilyPond RPM fully relocatable
302         * disable spaces in TeX stuff
303         
304         * handle ^C for tmp/file creation.
306         * dots & rest collisions.
308         * documentation
309         - introduction?
310         - info?
311         - LaTeX?
312         - more manpages?
314         * versioning for Feta
316         * the warning about the negative slur/tie length appears twice
317         which is irritating.
319         * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
320         in the middle:
322         * the bracket is ugly (wings are too parabolic, should be more circular)
324         * better hshift (dots, distance, head dependent)
326         * clefs (AG): The "8" should appear closer to the actual clef,
327           touching it.
329         * put errorlevel in Input class
331         * junk nesting slurs
333         * integrate midi-elts from mi2mu and lily?
336 3RD PARTY BUGS:
337 ****************
341 signature S {
342   int foo ();
345 signature V {
346   S * s();
350 V*v();
351 f ()
353   return v( )->foo ();
358   egcs-1.1
360 foo.cc: In function `int f()':
361 foo.cc:6: label `b' used but not defined
363 void
364 f ()
366   bool b;
367   if (b && && b)
368          ;      
370 ***************
372         * make GCC warn about ctor that leaves member vars  uninitialised.
374         * GNU diff 2.7: diff -rN does not see a new directory with empty file
376         * glibc 2.0:
378           f = fopen ("/dev/null", "r")
379           assert (feof (f))
381 3RD PARTY PROJECTS:
383         * GNU patch 
384           - 'double-fix' mode: ignore identical fix, rather than suggest 
385             to revert patch direction when (more or less? exactly) the same 
386             thing is fixed
388 PROJECTS
390         * Scripts:
391         - fix position of bar number
392         - stack scripts in chords:
393           % fingering:        footing:
394             < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
395         - script-spacing
396         - slur parts as a script
397         - stack parameterised scripts for fingering and footing:
399         * convert-mudela:
400         - automatically add  a \version if not present.
401         - better parsing
402         - make smarter
403         - convert-mudela -e empty.ly
405         * emacs mudela-mode
406         -  should handle block comments too.
407         -  handle lexer modes (\header, \melodic, \lyric) etc.
408         -  indentation
409         -  notenames?
410         -  fontlock: \melodic \melodic
412         * use properties for:
413         - plet?
414         - Staff_sym size
415         - default tempo.
416         - font size
417         - bartypes (get rid of derived Span_bar_engravers)
418         - cadenza mode? 
420         * page handling:
421         - PS output
422         - optimal pagebreaking.
424         * Unicode support? -> man 7 unicode
425         - 16 bit Strings
426         - -u switch
427         - detect of 16/8 bit files
428         - examples to go with it.
430         * Spring_spacer:
431         - write a faster Spring_spacer (without matrices if possible)
432         - relate energybound to linelen unitspace fontsize etc.
433         - used fixed point fp?
435         * \header
436         - output header info to MIDI too.
438         * a musical dictionary. See Documentation/vocabulary-*, other
439         languages:
440         - explanations
441         - italian
442         - german
443         - dutch
444         - swedish
445          .. ?
447         * chords
448         - guitar chords (fret diagrams)
449         - other chord name styles (american(?) style)
450         - basso continuo
451         - MIDI output?
453         * Debug logs:
454         - derive lily_stream, Dstream, texstream from ostream?
455         - indentable stream as baseclass for TeX stream, lily stream, Dstream.
456         - use dstream feature in mi2mu
457         - integrate IO checking into stream class
459         * input converters
460         - NIFF?
461         - ABC? 
462         - SMDL?
464         * add to MIDI output:
465         - tempo change
466         - ornaments (and trills?)
467         - repeat/volta
468         - slurs
469         - accents
470         - dynamics
471         - account for rhythmic position in measure
472         - etc.
474         * grace notes
475         - make separate class for Grace_*_engravers 
476         (which is at Voice_gravs level)
477         - make encapsulated spacing problems.
479         * accidentals per Voice_group
481         * Output class, handles : (smallish)
482         - help text /(c) notice?
483         - version line
484         - warning /errors/progress
485         - abort on error/warning; exit status
486         - quiet/ignore-version options
487         - logfile output
489         * elaborate Staff_side baseclass:
490         - scripts
491         - text
492         - slur start/end
494         * PS 
495         - speed up PS code.
496         - PS lines to .eps files
497         - write custom prolog
499         * Output an output format independent (ofi) typeset file; and 
500           make ofi2 TeX, MusiXTex, Display PostScript, PostScript,
501           Ascii... interpreters. (difficult)
503         - NIFF ?
504         - Common Music Notation
505         - PostScript output (esp. Beams, Slurs, etc)
506         - Move all Score_elems, into libmutype.a
507         - SGML
509         * Documentation
510         - Doc (C) stuff of sheet music
511         - a better format?  SGML?  TeX?  Info?
512         - a better tutorial
514         * more spanners (smallish)
515         - Glissando
516         - trill
518         * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
519         - [c8. c32 c32]
520         - doc on Rhythmic_grouping
521         - general shaving on Beam and Stem
522         - use plet grouping
523         - separate visual from rhythmic info even more
524         - beams over bars
526         * lines:
527         - Ledger lines, should be separate item: Ledger_lines, Ledger_lines
528         - set different line sizes / thicknesses
529         - beam stem showthrough, inter beam sizes (french vs german style)
531         * Collisions
532         - left/right note balls should be handled by Collision:
533         < \multi 2; { \stem 1; <b c> } { <f as b> } >
535         * Keys:
536         - merge key{item} & localkey{item}?
537         - spacing, national styles?
539         * Support for TAB
540         - redo Notehead to allow digits as heads
541         - add a \tablature {} lexer mode for easy entering
543         * should adjust stemlength for flag number.
545         * breaking:
546         - caching breakpoints
547         - saving them
548         - specify number of lines
550 INPUTLANGUAGE
552         * c4 4 4 4 for c4 c4 c4 c4?
554         * neatly (and readably) expressing concurrent
555         voices
557         * <c f a>4 ?
559         * Viola mode?
561                 @c c g e g 
562         for
563                 c g es g, 
565                 @A c g e g
566         for
567                 cis gis e gis
569         * relative mode for pitch entering
571         * configure pitch_byte
573         * rest name configurable
575 SMALLISH PROJECTS
577         * limit memory usage; the full coriolan takes up too much resources.
579         * fix confusing naming in Engraver vs Engraver_group_engraver (context)
581         * progress when creating MIDI elts.
583         * A range for context errors (eg. mark both { and }. )
585         * lyric in staff  (sharpsharp in staff, text below)
587         * half sharps/flats
589         * write Dynamic_line (to group dynamics horizontally)
591         * use Real for all y positions.
592         - use translate_axis( .. ,Y_AXIS)  iso separate variables.
594         * half-sharps, half-flats
596         * adaptive accidental spacing.
598         * handle EOF graciously in error messages.
600         * declare notenametab?
602         * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
604         * stafftypes: voice names/ instrument names.
606         * lily \tempo
608         * C meter iso 4/4, idem for alla breve, etc.
610         * textspanner: center position
612         *   % toe to bheel   four to five
613             %   ^_u            4_5  
614             %     -                           
615             %  --|x--         --|x--
616             %  --|---         --|---
617             %  --|---         --|---
618           (where "to" is a tiny bow)
620         * auxilliary file for caching info.
622         * Text_crescendo
624         * clean solution for staffsize in items.
626         * revise calcideal
628 IDEAS
630         * Output data structures of Mudela in XML/SGML.
632         * create libmudela, or liblily_frontend
634         * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
636         * Spacing_request for manually adjusting spacing
638         * caching breakpoints
640         * used fixedpoint arithmetic for min. energy.
642         * move towards incremental algorithms.
644         * far fetched language ideas
645         - design meta-language like TeX and Metafont
646         - programming/macros input
648         * versioning stuff (cvt mudela, mudela, etc.)
650         * Klavarskribo?
652         * dynamic loading of engravers? 
654 SMOBS:
656 ****************************************
657 Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
659 > mcmanus@IDT.NET writes:
660 > > > I want different C++ objects (with scheme embedded) to be linked by
661 > > > C++ pointers.  I want to access these other objects from the Scheme
662 > > > code, and I want access to these pointers from C++.
663 > > 
664 > > You can do this with a  combination of smob's and primitive functions,
665 > > though it may not be  be exactly what you wanted.   You would have one
666 > > smob  for each class in  your application, and then  you would write a
667 > > primitive function that would return the objects  that are linked to a
668 > > base object.
670 > And the smob and the C++ class are interlinked?  Like
672 >       class Foo_class {
673 >               Foo_smob *smob_ptr_;
674 >       }
676 >       struct Foo_smob {
677 >               Foo_class *class_ptr_
678 >       }
680 Usually you can get away without having this interlinked structure.
681 One piece of information you need when exporting objects to scheme is
682 the smob tag for your class.  You might store this value (a long) into
683 a class static variable, or a file static variable.  I'll use a class
684 static variable in this example.
686 I typically use code that works like this (untested code ahead):
688 class Foo_class {
689     static long *Foo_smob_tag;
690     SCM obj; // representation as a scheme object, description comes later
693 // call this once on startup
694 void init_Foo_class {
695     static scm_smobfuns type_rec;
697     type_rec.mark = foo_mark;
698     type_rec.free = foo_free;
699     type_rec.print = foo_display;
700     type_rec.equalp = 0;
701     Foo_class::Foo_smob_tag = new int(scm_new_smob(type_rec));
704 When you want to export an object to scheme, you put a pointer to the
705 object itself in the cdr of the cell, and the tag in the car of the
706 cell.  The code looks like this:
708 // Is this a Foo?
709 static int
710 foo_p(SCM obj)
712     return(SCM_NIMP(obj) && SCM_CAR(obj) == Foo_class::Foo_smob_tag);
715 // given a Scheme representation, return, a C++ representation
716 static Foo_class *
717 foo_unbox(SCM obj)
719     return((Foo_class*)SCM_CDR(obj));
722 // the SCM representation of the object is stored inside itself
723 // this will become useful when destructor gets called
724 static SCM
725 foo_box(Foo_class *foo)
727     SCM_DEFER_INTS;
728     SCM_NEWCELL(foo->obj);
729     SCM_SETCAR(foo->obj, Foo_class::Foo_smob_tag);
730     SCM_SETCDR(foo->obj, (SCM)foo);
731     SCM_ALLOW_INTS;
732     return foo->obj;
735 > C++ determines life time, so what is the strategy?
737 What happens now when the destructor gets called?  Lets set the cdr to
738 NULL, and then check for that in all of the primitive functions that
739 use your smob.  We'll call this notion 'live'; a scheme object is
740 'live' if the C++ representation still exists, it's dead if the C++
741 object is gone.  You can still have references to dead objects in
742 scheme code; it's just an error to use them.  This idea is stolen from
743 Emacs's handling of buffers ('buffer-live-p' and friends).
745 Add another function, foo_live_p:
747 static int
748 foo_live_p(SCM obj)
750     return(foo_p(obj) && SCM_CDR(obj) != NULL);
753 In you destructor, you need to do:
755 ~Foo_class()
757     SCM_CDR(this->obj, NULL);
760 When writing new primitives, now just check foo_live_p().
762 I hope the above helps,
764 -russ
768 "Even if you are on the right track, you'll get run over 
769 if you just sit there."  
770              --Will Rogers (1879-1935)
772 ***************************