lilypond-1.1.24
[lilypond.git] / TODO
blob30d5c972c8860aa62082e977c60a357453876ef4
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         * check widths of TFM, something's wrong here. 
24         * hang Item on Spanner
26         * junk Text_def, use G_text_item in stead.
28         * remove Interval dim_ from Dimension_cache and rename the struct.
30         * do --safe for PS output?
32         * staff_margin (with a partial measure.)
34         * fix "I've been drinking too much"
36         * add scripts to bars eg.  |^"bla" 
38         * fix Staff_margin_engraver.
40         * fix pletvisibility properties:
41           - bracket on/off/no-bracket-when-beam
42           - num on/off/no-num-when-beam
44         * fix: standchen.
46         * junk backlinks?
48         * junk text{sharp,flat,etc}
50         * fix convert-mudela manpage
52         * automatic staff selection.
54         * decimal point in \paper {}
56         *{  \voiceone <a'4.*2/3  d''4.*2/3 fis''4.*2/3>  [g''8 fis'' e''] d''4 |}
57          and=20
58          { \voicetwo  d'4 d'2.*2/3 } spacing
60         * tied notes for MIDI
62         * sharp /flat on trills (in MIDI ??)
64         * scm-ify \property values.
66         * move class Lookup {} into scm
68 BUGS:
70         * collisions/voices \voiceone \voicetwo are broken; see 
71           input/praeludium-fuga-E.ly
72           mutopia/J.S.Bach/wtk1-fugue2.ly
74         * fix: text on rests: rediculous dims
76         * ly2dvi
77           - barfs on linewidth = -1.
78           - bottomnote for ly2dvi
79           - deps for ly2dvi
81         * fix midi output:
82            - default duration?  duration must be not entered
83              explicitely on first note.
85         * turn slope-damping on/off
87         * c4 \! \> c4
89         * tremolo stuff
91         * gallina barlines.
93         * fix height of / collisions with lyrics (chords), 
94            see input/test/vertical-text.ly; input/test/repeat.ly
96         * latex bla.tex broken (titles / \lilyfooter stuff?)
98         * check/set minimum slur/tie length
100         * msgfmt -o check?
102         * \breathmark TeX macro 
104         * catch GUILE errors?
106         * add new glyphs to font.ly
108         * formatting of input stuff. 
110         * \notes{ a \< b \cr } vs \notes{ a \< b \! }
112         * if possible, it might be nice for a warning to appear if someone does
113         \translator with no name and without assigning it to an
114         identifier.  
116         * space after bars?
118         * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
120         * \type Voice \times 2/3 { [c8 c16 c16 c16 c16] }
122         * fix singleStaffBracket
124         * repeat bars: need distance after ":|" and before "|:"
126         Summary of minor spelling irregularities:
127         -  capitalization/use of underscores in property names
129         * fix SkipBars  -> skipBars
131         * \shape 1st dim skipped? 
133         * fix marks/barnumbers/marginal notes
135         * broken scripts:
136         lbheel = \script { "bheel" 0 0 -1  0 0 }
137         rbheel = \script { "bheel" 0 0 1 0 0 }
138         lbtoe = \script { "btoe" 0 0 -1 0 0 }
139         rbtoe = \script { "btoe" 0 0 1 0 0 }
140         lfheel = \script { "fheel" 0 0 -1  0 0 }
141         rfheel = \script { "fheel" 0 0 1 0 0 }
142         lftoe = \script { "ftoe" 0 0 -1 0 0 }
143         rftoe = \script { "ftoe" 0 0 1 0 0 }
144         
145         and also
146         
147         portato= \script { "portato" 0 -1 0 1 0 }
149 STUFF
150         * uniformise recent feta contributions.
152         * check out legal/(c) matters for scores.
154         * check out GCC signatures?
156         * Align_element::padding  ?
158         * uniformise property names...
159           - ydirection <-> yDirection
160           - rather allow '_' in identifiers first (i.e. junk ^ and _),
161             and do y_direction?
162           - typo checks on property names?
164         * use streambufs and iostream
165         to provide IO handling for TeX stream, mudela stream, data-file.
167         * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
169         * strip EXEs before installing
171         * zip target for binary windows dist (JBR)
173         * junking \skip req in lyrics
175         * Language:
176         - \type -> \context ?
177         - \translator -> ?
178         - fix \partial 
179         - \bla {} vs \bla ; 
180         - mix engraver hacking with music ?
181         - \once\property  KEY = VAL
182         - \addtranslator, \removetranslator
183         - junk ^ and _ for scripts
184         - junk _ for lyrics.
185         - abstract grammar.
187         * percussion note heads
189         * mi2mu empty staffs.
191         * horizontal centering of dynamics 
193         * \font\fontA=feta20.afm (.afm?)
195         * gzip RH manpage
197         * stable make/config stuff
199         * $DEPENDENCIES_OUTPUT support
201         * fix weird behaviour when .AFMs/.SCMs not found.
203         * Xdvi zooming ?! Try to understand GS garbage collection.
204                 gs: Error: /undefined in draw_beam
205                 gs: Operand stack:
207         * fix vertical alignment and stafflines
209         * GrandStaff needs more work -- I want a single word
210         `harpsichord' to the left of the grandstaff, not one on each
211         stave.  (Organ staff -- with separate pedal -- but common
212         properties may be something to think about.  Of course for
213         organ you want to be able to give stop indications on the way
214         through, so the \property Voice.Instrument would be a stop,
215         and \property GrandStaff.instrument would be PipeOrgan...)
217         * revise the Score_priority_align_engraver concept.  It sucks. 
219         * make new VoiceOne, VoiceTwo, VoiceThree contexts with
220 ydirection and hshift preset
222         * *.yo: fix pod manpage layout legacy
224         * text-items clash with stems/beams
226         * --include, -I option for ly2dvi (pass on to lily)
228         * fix placement of beam-less abbrev
230         * \meter 3/4;
231         <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
232          {\voicetwo cis,4 r r | r2. | r1 }> |
233         }
235         * try to use template<Type> iso MACRO(Type)
237         - NEWS: ... Musical_pitch (analogous to Duration and Rhythmic_req)
238           think about, analogous to pitch: 
239            * { a4 a16 } c <-- duration of c?
240            * < a4 b8 > c <-- duration of c?
242         * \tempo 4. = 90;
244         * fix audio-items (don't use (input) requests, but copy data)
246         * make sure all ex's have a mudela-version
248         * do rest-collisions for Multi_measure_rests as well.
250         * split error/warning in error/warning/non_fatal_error
252         * add a Duration_convert member to Duration_iter to set parameters.
253         Junk global duration settings. 
255         * minimum length second part broken tie
257         * en-,discouraged linebreaking: 
258           - handle DISALLOW < penalty > FORCE
259           - discourage breaking of slurs
261         * fix variable define/lookup parser global<->paper
263         * fix title/instrument placements; see input/test/title.ly
265         * <\voiceone c4. \voicetwo c4>
267         * add full cello suites to web site (kom op, Maarten!)
269         * Rethink Time_description
270           * \cadenza , \meter, \grouping should all be \properties
272         * rename
273           - measure -> bar
274           - abbrev -> tremolo
275           - abbreviation-beam -> (measured/unmeasured) tremolo
276           - partial -> anacrouse
278         * shared lib
280         * robustify Beam (in case of no stems, 32nd notes)
282         * decentralised spring factory
284         * move paper vars into engraver properties
286         * check for groff / troff/ nroff et
288         * more intelligent file searching
290         * make LilyPond RPM fully relocatable
292         * disable spaces in TeX stuff
293         
294         * handle ^C for tmp/file creation.
296         * dots & rest collisions.
298         * documentation
299         - introduction?
300         - info?
301         - LaTeX?
302         - more manpages?
304         * versioning for Feta
306         * the warning about the negative slur/tie length appears twice
307         which is irritating.
309         * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
310         in the middle:
312         * the bracket is ugly (wings are too parabolic, should be more circular)
314         * better hshift (dots, distance, head dependent)
316         * clefs (AG): The "8" should appear closer to the actual clef,
317           touching it.
319         * put errorlevel in Input class
321         * junk nesting slurs
323         * integrate midi-elts from mi2mu and lily?
326 3RD PARTY BUGS:
327 ****************
331 signature S {
332   int foo ();
335 signature V {
336   S * s();
340 V*v();
341 f ()
343   return v( )->foo ();
348   egcs-1.1
350 foo.cc: In function `int f()':
351 foo.cc:6: label `b' used but not defined
353 void
354 f ()
356   bool b;
357   if (b && && b)
358          ;      
360 ***************
362         * make GCC warn about ctor that leaves member vars  uninitialised.
364         * GNU diff 2.7: diff -rN does not see a new directory with empty file
366         * glibc 2.0:
368           f = fopen ("/dev/null", "r")
369           assert (feof (f))
371 3RD PARTY PROJECTS:
373         * GNU patch 
374           - 'double-fix' mode: ignore identical fix, rather than suggest 
375             to revert patch direction when (more or less? exactly) the same 
376             thing is fixed
378 PROJECTS
380         * Scripts:
381         - fix position of bar number
382         - stack scripts in chords:
383           % fingering:        footing:
384             < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
385         - script-spacing
386         - slur parts as a script
387         - stack parameterised scripts for fingering and footing:
389         * convert-mudela:
390         - automatically add  a \version if not present.
391         - better parsing
392         - make smarter
393         - convert-mudela -e empty.ly
395         * emacs mudela-mode
396         -  should handle block comments too.
397         -  handle lexer modes (\header, \melodic, \lyric) etc.
398         -  indentation
399         -  notenames?
400         -  fontlock: \melodic \melodic
402         * use properties for:
403         - plet?
404         - Staff_sym size
405         - default tempo.
406         - font size
407         - bartypes (get rid of derived Span_bar_engravers)
408         - cadenza mode? 
410         * page handling:
411         - PS output
412         - optimal pagebreaking.
414         * Unicode support? -> man 7 unicode
415         - 16 bit Strings
416         - -u switch
417         - detect of 16/8 bit files
418         - examples to go with it.
420         * Spring_spacer:
421         - write a faster Spring_spacer (without matrices if possible)
422         - relate energybound to linelen unitspace fontsize etc.
423         - used fixed point fp?
425         * \header
426         - output header info to MIDI too.
428         * a musical dictionary. See Documentation/vocabulary-*, other
429         languages:
430         - explanations
431         - italian
432         - german
433         - dutch
434         - swedish
435          .. ?
437         * chords
438         - guitar chords (fret diagrams)
439         - other chord name styles (american(?) style)
440         - basso continuo
441         - MIDI output?
443         * Debug logs:
444         - derive lily_stream, Dstream, texstream from ostream?
445         - indentable stream as baseclass for TeX stream, lily stream, Dstream.
446         - use dstream feature in mi2mu
447         - integrate IO checking into stream class
449         * input converters
450         - NIFF?
451         - ABC? 
452         - SMDL?
454         * add to MIDI output:
455         - tempo change
456         - ornaments (and trills?)
457         - repeat/volta
458         - slurs
459         - accents
460         - dynamics
461         - account for rhythmic position in measure
462         - etc.
464         * grace notes
465         - make separate class for Grace_*_engravers 
466         (which is at Voice_gravs level)
467         - make encapsulated spacing problems.
469         * accidentals per Voice_group
471         * Output class, handles : (smallish)
472         - help text /(c) notice?
473         - version line
474         - warning /errors/progress
475         - abort on error/warning; exit status
476         - quiet/ignore-version options
477         - logfile output
479         * elaborate Staff_side baseclass:
480         - scripts
481         - text
482         - slur start/end
484         * PS 
485         - speed up PS code.
486         - PS lines to .eps files
487         - write custom prolog
489         * Output an output format independent (ofi) typeset file; and 
490           make ofi2 TeX, MusiXTex, Display PostScript, PostScript,
491           Ascii... interpreters. (difficult)
493         - NIFF ?
494         - Common Music Notation
495         - PostScript output (esp. Beams, Slurs, etc)
496         - Move all Score_elems, into libmutype.a
497         - SGML
499         * Documentation
500         - Doc (C) stuff of sheet music
501         - a better format?  SGML?  TeX?  Info?
502         - a better tutorial
504         * more spanners (smallish)
505         - Glissando
506         - trill
508         * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
509         - [c8. c32 c32]
510         - doc on Rhythmic_grouping
511         - general shaving on Beam and Stem
512         - use plet grouping
513         - separate visual from rhythmic info even more
514         - beams over bars
516         * lines:
517         - Ledger lines, should be separate item: Ledger_lines, Ledger_lines
518         - set different line sizes / thicknesses
519         - beam stem showthrough, inter beam sizes (french vs german style)
521         * Collisions
522         - left/right note balls should be handled by Collision:
523         < \multi 2; { \stem 1; <b c> } { <f as b> } >
525         * Keys:
526         - merge key{item} & localkey{item}?
527         - spacing, national styles?
529         * Support for TAB
530         - redo Notehead to allow digits as heads
531         - add a \tablature {} lexer mode for easy entering
533         * should adjust stemlength for flag number.
535         * breaking:
536         - caching breakpoints
537         - saving them
538         - specify number of lines
540 INPUTLANGUAGE
542         * c4 4 4 4 for c4 c4 c4 c4?
544         * neatly (and readably) expressing concurrent
545         voices
547         * <c f a>4 ?
549         * Viola mode?
551                 @c c g e g 
552         for
553                 c g es g, 
555                 @A c g e g
556         for
557                 cis gis e gis
559         * relative mode for pitch entering
561         * configure pitch_byte
563         * rest name configurable
565 SMALLISH PROJECTS
567         * limit memory usage; the full coriolan takes up too much resources.
569         * fix confusing naming in Engraver vs Engraver_group_engraver (context)
571         * progress when creating MIDI elts.
573         * A range for context errors (eg. mark both { and }. )
575         * lyric in staff  (sharpsharp in staff, text below)
577         * half sharps/flats
579         * write Dynamic_line (to group dynamics horizontally)
581         * use Real for all y positions.
582         - use translate_axis( .. ,Y_AXIS)  iso separate variables.
584         * half-sharps, half-flats
586         * adaptive accidental spacing.
588         * handle EOF graciously in error messages.
590         * declare notenametab?
592         * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
594         * stafftypes: voice names/ instrument names.
596         * lily \tempo
598         * C meter iso 4/4, idem for alla breve, etc.
600         * textspanner: center position
602         *   % toe to bheel   four to five
603             %   ^_u            4_5  
604             %     -                           
605             %  --|x--         --|x--
606             %  --|---         --|---
607             %  --|---         --|---
608           (where "to" is a tiny bow)
610         * auxilliary file for caching info.
612         * Text_crescendo
614         * clean solution for staffsize in items.
616         * revise calcideal
618 IDEAS
620         * Output data structures of Mudela in XML/SGML.
622         * create libmudela, or liblily_frontend
624         * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
626         * Spacing_request for manually adjusting spacing
628         * caching breakpoints
630         * used fixedpoint arithmetic for min. energy.
632         * move towards incremental algorithms.
634         * far fetched language ideas
635         - design meta-language like TeX and Metafont
636         - programming/macros input
638         * versioning stuff (cvt mudela, mudela, etc.)
640         * Klavarskribo?
642         * dynamic loading of engravers? 
644 SMOBS:
646 ****************************************
647 Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
649 > mcmanus@IDT.NET writes:
650 > > > I want different C++ objects (with scheme embedded) to be linked by
651 > > > C++ pointers.  I want to access these other objects from the Scheme
652 > > > code, and I want access to these pointers from C++.
653 > > 
654 > > You can do this with a  combination of smob's and primitive functions,
655 > > though it may not be  be exactly what you wanted.   You would have one
656 > > smob  for each class in  your application, and then  you would write a
657 > > primitive function that would return the objects  that are linked to a
658 > > base object.
660 > And the smob and the C++ class are interlinked?  Like
662 >       class Foo_class {
663 >               Foo_smob *smob_ptr_;
664 >       }
666 >       struct Foo_smob {
667 >               Foo_class *class_ptr_
668 >       }
670 Usually you can get away without having this interlinked structure.
671 One piece of information you need when exporting objects to scheme is
672 the smob tag for your class.  You might store this value (a long) into
673 a class static variable, or a file static variable.  I'll use a class
674 static variable in this example.
676 I typically use code that works like this (untested code ahead):
678 class Foo_class {
679     static long *Foo_smob_tag;
680     SCM obj; // representation as a scheme object, description comes later
683 // call this once on startup
684 void init_Foo_class {
685     static scm_smobfuns type_rec;
687     type_rec.mark = foo_mark;
688     type_rec.free = foo_free;
689     type_rec.print = foo_display;
690     type_rec.equalp = 0;
691     Foo_class::Foo_smob_tag = new int(scm_new_smob(type_rec));
694 When you want to export an object to scheme, you put a pointer to the
695 object itself in the cdr of the cell, and the tag in the car of the
696 cell.  The code looks like this:
698 // Is this a Foo?
699 static int
700 foo_p(SCM obj)
702     return(SCM_NIMP(obj) && SCM_CAR(obj) == Foo_class::Foo_smob_tag);
705 // given a Scheme representation, return, a C++ representation
706 static Foo_class *
707 foo_unbox(SCM obj)
709     return((Foo_class*)SCM_CDR(obj));
712 // the SCM representation of the object is stored inside itself
713 // this will become useful when destructor gets called
714 static SCM
715 foo_box(Foo_class *foo)
717     SCM_DEFER_INTS;
718     SCM_NEWCELL(foo->obj);
719     SCM_SETCAR(foo->obj, Foo_class::Foo_smob_tag);
720     SCM_SETCDR(foo->obj, (SCM)foo);
721     SCM_ALLOW_INTS;
722     return foo->obj;
725 > C++ determines life time, so what is the strategy?
727 What happens now when the destructor gets called?  Lets set the cdr to
728 NULL, and then check for that in all of the primitive functions that
729 use your smob.  We'll call this notion 'live'; a scheme object is
730 'live' if the C++ representation still exists, it's dead if the C++
731 object is gone.  You can still have references to dead objects in
732 scheme code; it's just an error to use them.  This idea is stolen from
733 Emacs's handling of buffers ('buffer-live-p' and friends).
735 Add another function, foo_live_p:
737 static int
738 foo_live_p(SCM obj)
740     return(foo_p(obj) && SCM_CDR(obj) != NULL);
743 In you destructor, you need to do:
745 ~Foo_class()
747     SCM_CDR(this->obj, NULL);
750 When writing new primitives, now just check foo_live_p().
752 I hope the above helps,
754 -russ
758 "Even if you are on the right track, you'll get run over 
759 if you just sit there."  
760              --Will Rogers (1879-1935)
762 ***************************