]> git.donarmstrong.com Git - lilypond.git/blob - TODO
release: 1.1.40
[lilypond.git] / TODO
1 -*-outline-layout:(2 (-1 -1 0 :) 0);outline-stylish-prefixes:nil -*-
2
3 * GNU LilyPond TODO
4 Features you cannot find in the doco as working, should be
5 mentioned here.  This is an assorted collection of stuff that will be
6 done, might be done, or is an idea that I want to think about
7
8 Most of the items are marked in the code as well
9 Grep for TODO and ugh/ugr/urg.  
10
11 .* BUGS
12 . * header for PS enteredby = "bla <bla@bar.com>"
13 . * Hash_table::remove ().
14 . * 1.  With "lilypond -f ps": The black notes with ledger lines seem to
15 > have extra "blobs" over and to the left of them and all the ledger
16 > lines from the staff to the note will have a blob too.  For example,
17 > with the note "a4" there will be a black note at the ledger line where
18 > "c" would be too.  However, only the "a4" will have the extra blob.
19 . * clefs.ly
20 . * ps/lily.ps
21 . * devise standard for functioning of Vertical_align_element.
22 . * fix interstaff slurs & beams.
23 . * staff size for post/prebreaks
24 . * .ly files
25 .  * input/star-spangled-banner
26 .  * input/scripts.ly
27 .  * mutopia/J.S.Bach/wtk1-fugue2.ly
28 .  * input/test/grace
29 .  * fix: text on rests: ridiculous dims
30 .  * clefs.ly
31 . * m=\notes\relative c'''{
32   \time 2/4;
33
34   R2*4 | c2 | c2 | c2 | c2 | c2 | c2 | c2 | c2 | c2 | \break
35   <{R2*10}{s2 \mark "A"; }> | % Too narrow space for the first rest in
36 1.1.29
37   r4 r8 [g16 \p ( a ] |
38 [ ) g8-. fis16 ( g ][ ) fis8-. f16 ( g ] |
39 [ ) f8-. e16 ( f ][ ) e8-. es16 ( f ] |
40 [ ) es8 \f c16 ( d][es8 d16 c ] |
41 ) d4 r8 [g16 \p ( a ] |
42 [ ) g8-. fis16 ( g ][ ) fis8-. f16 ( g ] | \break
43 ) c2 | c2 | c2 | c2 | c2 | c2 | c2 | c2 | c2 |
44 }
45
46 \score{
47   \m
48   \paper{
49     \translator{
50       \ScoreContext
51       SkipBars = 1;
52     }
53     \translator {
54       \OrchestralPartStaffContext
55     }
56   }
57 }
58 . * midi key.
59 . * P.P.S. It can be cool in mudela-book to distinguish in pre,postMudelaExample,
60 whether MudelaExample is epsed or not: ( if this fragment is floating eps, than 1,
61 otherwise 2). say preMudelaExample[eps]{}, and change it in document body sometimes.
62 . * fix singleStaffBracket
63 . * declare performers in \midi
64 . * fix MIDI
65 . * \shape 1st dim skipped? 
66 . * turn slope-damping on/off
67 . * tremolo stuff
68 . * fix height of / collisions with lyrics (chords), 
69     see input/test/vertical-text.ly; input/test/repeat.ly
70 . * We need feta-din*.mf files for more sizes than 10.
71 . * latex bla.tex broken (titles / \lilyfooter stuff?
72 . * fix dynamics decently, ie. use kerning & ligatures.  
73 . * dots & rest collisions?
74 . * mudela-book.py
75 .  * \mudelafile{} to have decent functionality
76 .  * use less RE's
77 . * support_l_arr_ empty in staff-margin's G_staff_side_item
78 . * slurs colllide with lyrics.
79 . * minVerticalAlign for StaffGroups.
80 . * fix OrchestralScore and Hara-kiri (i.e., fix Coriolan)
81 . * Phrasing:  Indicating the textual underlay of a piece, or
82 otherwise dividing a piece into phrases.
83
84 There are distinct ways of specifying the first two (although at
85 present, they're not properly distinguished) but no distinct way to
86 specify the third.  Should there be?
87 . * spacing of mmrests.
88 . * mem leak: redo p-score object deletion.
89 . * rest collision minimum dist.
90 . * Matanya's tips: 
91 .  * spacing for prefatory matter
92 .  * Score does not use points to describe musical sizes. I think becaue the music
93 > symbols are not part of any PostScript font. The line length is 7.5 inch (19.05
94 > cm) and the height of normal size is equivalent to the traditional raster 1
95 > size. (The Schott company sells Letraset sheets of musical symbols which are
96 > measured in raster sizes). It is agreed among most engravers I know that the
97 > standard size for adult readers in solo music should 70% of raster 1.  Jeff's
98 > example was 75%, so I had to modify my file to match. Of course, the amount of
99
100 So that makes for a staff space of 4 2/3 point. I'll add the
101 dimensions to the TODO file.
102
103 .  * accidentals closer to note head
104 .  * ledger line for rest dim less
105 .  * heavier beams?
106
107
108 .* Cleanups needed
109 . * Beam
110 . * Stem + Notehead
111 . * Slur
112 . * Repeats
113 . * Rhythmic_grouping
114 . * Duration
115 . * Spring generation
116 . * Collision
117 . * Rest_collision
118
119 .* TODO before 1.2
120 . * \selectmusic to cut pieces from music. 
121 . * Morally pure LilyPond.
122 .  * Remove mutopia ramblings.
123 .  * Remove non-free software links.
124 .  * Remove meta article LilyPond.
125 . * TODO: merge atom & molecule; make  tree from molecule.
126 . * break priority setting from SCM.
127 . * Gade score
128 .  * remove [] in favour of auto-beamer
129 .  * The minimum distance between different staffs works only within 
130   StaffGroups, not between StaffGroups. The Gade Score looks quite
131   strange on the pages where the Timpani and/or Brass sections don't
132   play. I've set the minimum distance with:
133     \translator {
134        \OrchestralScoreContext
135         minVerticalAlign = 2.5*\staffheight;
136     }
137 . * hangOnClef with non-breakable clefs.
138 . * Aha, the problem is the new TeX code generation for changing fonts.
139 > (The explanation below is mostly intended for Han-Wen and Jan)
140 > Before, the font was changed with macros declared separately for 
141 > pure TeX and LaTeX, but now all the fonts are declared directly in
142 > the generated code using the low-level TeX commands. This circumvents
143 > the fontencoding mechanism of LaTeX and is a potential source of
144 > problems also for us users of the Latin-1 character set. 
145 > I think it still works since the inputencoding latin1 is 
146 > declared by ly2dvi, but it still means that e.g. an o with
147 > umlaut is typeset as a combination of the two symbols 'o' and
148 > 'umlaut' instead of as a single character, as would be the case
149 > if fontencoding OT1 had been used. This shouldn't give any 
150 > difference in layout, though. One of the main argument for using
151 > fontencoding OT1 is for the hyphenation mechanism to work, an 
152 > argument that's clearly irrelevant in our application. Yet we
153 > see the problem for August.
154 . * Check gcc 2.8.1 compatibility
155 . * Abstraction for engravers:
156 .  * make "in-between" engraver (Tie, Extender)
157 .  * make wide_spanner_engraver (line_group_spanne,r staff_symbol)
158 . * remove Interval dim_ from Dimension_cache and rename the struct.
159 . * do scaled fonts generally 
160 . * The Lilypond accidental symbols are available through the TeX macros, 
161 \textflat, \textsharp and \textnatural defined in the init file
162 lilyponddefs.tex. All the symbols are defined in the files fetaXX.tex
163 where XX corresponds to the size. I don't know where (or even if) they
164 are installed but they are generated in the mf/out/ directory during the
165 compilation.
166 . * make dependencies () a virtual function.
167 . * fix Repeated_music design
168 . * one big ly2dvi input that includes *all* tests.
169 . * store req -> element, element -> element causes for warnings
170 . * include examples in RPM.
171 . * fix partial measures in meaningful way.
172 . * add scripts to bars eg.  |^"bla" 
173 . * relative mode for mi2mu
174 . * uniformise recent feta contributions.
175 .  * use SCM and Molecules for {accordeon stuff, }
176 .  * bigger and fatter 4/4 C
177 . * sort out directory stuff.
178 .  * --prefix option?
179 .  * -I option per filetype?
180 .  * kpathsea?
181 . * ly2dvi/lilypond logfile.
182 . * fractional chord durs.
183 . * hang Item on Spanner
184 . * do --safe for PS output?
185 . * convert-mudela --output
186 . * Staff_margin (with a partial measure.)
187 . * fix pletvisibility properties:
188 .  * bracket on/off/no-bracket-when-beam
189 .  * num on/off/no-num-when-beam
190 . * fix: standchen.
191 . * junk text{sharp,flat,etc}
192 . * fix convert-mudela manpage
193 . * decimal point in \paper {}
194 . * {  \voiceone <a'4.*2/3  d''4.*2/3 fis''4.*2/3>  [g''8 fis'' e''] d''4 |}
195          and
196          { \voicetwo  d'4 d'2.*2/3 } spacing
197 . * tied notes for MIDI
198 . * sharp / flat on trills (in MIDI ??)
199 . * scm-ify \property values.
200 . * move class Lookup {} into scm
201 . * msgfmt -o check?
202 . * \breathmark TeX macro 
203 . * add new glyphs to font.ly
204 . * formatting of input stuff. 
205 . * \notes{ a \< b \cr } vs \notes{ a \< b \! }
206 . * space after bars?
207 . * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
208 . * Summary of minor spelling irregularities:
209 .  *  capitalization/use of underscores in property names
210 .  * fix SkipBars  -> skipBars
211 . * broken scripts:
212         lbheel = \script { "bheel" 0 0 -1  0 0 }
213         rbheel = \script { "bheel" 0 0 1 0 0 }
214         lbtoe = \script { "btoe" 0 0 -1 0 0 }
215         rbtoe = \script { "btoe" 0 0 1 0 0 }
216         lfheel = \script { "fheel" 0 0 -1  0 0 }
217         rfheel = \script { "fheel" 0 0 1 0 0 }
218         lftoe = \script { "ftoe" 0 0 -1 0 0 }
219         rftoe = \script { "ftoe" 0 0 1 0 0 }
220         and also
221         portato= \script { "portato" 0 -1 0 1 0 }
222 . * ly2dvi
223 .  * bottomnote for ly2dvi
224 .  * deps for ly2dvi
225 .* STUFF
226 . * compulsory hshift
227 . * Give # lines in linebreaking.  
228 . * arrows on slurs.
229 . * Align_element::padding  ?
230 . * uniformise property names...
231 .  * ydirection <-> yDirection
232 .  * rather allow '_' in identifiers first (i.e. junk ^ and _),
233 and do y_direction?
234 .  * typo checks on property names?
235 . * use streambufs and iostream
236         to provide IO handling for TeX stream, mudela stream, data-file.
237 . * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
238 . * strip EXEs before installing
239 . * zip target for binary windows dist (JBR)
240 . * junking \skip req in lyrics
241 . * mi2mu empty staffs.
242 . * horizontal centering of dynamics 
243 . * $DEPENDENCIES_OUTPUT support
244 . * Xdvi zooming ?! Try to understand GS garbage collection.
245 gs: Error: /undefined in draw_beam
246 gs: Operand stack:
247 . * fix vertical alignment and stafflines
248 . * declaring Performers
249 . * GrandStaff needs more work -- I want a single word
250         `harpsichord' to the left of the grandstaff, not one on each
251         stave.  (Organ staff -- with separate pedal -- but common
252         properties may be something to think about.  Of course for
253         organ you want to be able to give stop indications on the way
254         through, so the \property Voice.Instrument would be a stop,
255         and \property GrandStaff.instrument would be PipeOrgan...)
256 . * *.yo: fix pod manpage layout legacy
257 . * text-items clash with stems/beams
258 . * --include, -I option for ly2dvi (pass on to lily)
259 . * fix placement of beam-less abbrev
260 . * \meter 3/4;
261         <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
262          {\voicetwo cis,4 r r | r2. | r1 }> |
263         }
264 . * Musical_pitch (analogous to Duration and Rhythmic_req)
265           think about, analogous to pitch: 
266            * { a4 a16 } c <-- duration of c?
267            * < a4 b8 > c <-- duration of c?
268 . * \tempo 4. = 90;
269 . * fix audio-items (don't use (input) requests, but copy data)
270 . * make sure all ex's have a mudela-version
271 . * do rest-collisions for Multi_measure_rests as well.
272 . * split error/warning in error/warning/non_fatal_error
273 . * add a Duration_convert member to Duration_iter to set parameters.
274         Junk global duration settings. 
275 . * en-,discouraged linebreaking: 
276 .  * handle DISALLOW < penalty > FORCE
277 .  * discourage breaking of slurs
278 . * fix variable define/lookup parser global<->paper
279 . * fix title/instrument placements; see input/test/title.ly
280 . * <\voiceone c4. \voicetwo c4>
281 . * add full cello suites to web site (kom op, Maarten!)
282 . * Rethink Time_description
283 \cadenza , \meter, \grouping should all be \properties
284 . * rename
285 .  * measure -> bar
286 .  * abbrev -> tremolo
287 .  * abbreviation-beam -> (measured/unmeasured) tremolo
288 .  * partial -> anacrouse
289 . * robustify Beam (in case of no stems, 32nd notes)
290 . * move paper vars into engraver properties
291 . * check for groff / troff/ nroff et
292 . * more intelligent file searching
293 . * disable spaces in TeX stuff
294 . * handle ^C for tmp/file creation.
295 . * make LilyPond RPM fully relocatable
296 . * dots & rest collisions.
297 . * the warning about the negative slur/tie length appears twice
298 which is irritating.
299 . * better hshift (dots, distance, head dependent)
300 . * clefs (AG): The "8" should appear closer to the actual clef,
301 touching it.
302 . * put errorlevel in Input class
303 . * junk nesting slurs
304 . * integrate midi-elts from mi2mu and lily?
305
306 .* FONT
307 . * the bracket is ugly (wings are too parabolic, should be more circular)
308 . * versioning for Feta
309 . * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
310         in the middle:
311 . * design macro for penstroke with rounded endings
312 . * timesig C: fat yet less curved.  Check out relations. 
313 . * design decent macro for bulbed endings
314 . * printer dependencies.
315 . * y-refpoint for rests should be the 4th staffline (gclef: b')
316 . * clean-up eight+ rests
317 . * versioning  
318 . * lo-res fixes.
319 . * work out sizes of character fonts.
320 . * more symbols
321 .  * piano pedals: Ped/*
322 .  * maxima notehead
323 .  * coda signs: Segno, O+
324 .  * glissando, arpeggio
325 .  * lengthened trill
326 . * 128th flags
327 . * include important spacing dims in fetalog 
328 .* 3RD PARTY BUGS
329 . * GNU diff 2.7: diff -rN does not see a new directory with empty file
330 . * check out GCC signatures?
331 . * glibc 2.0:
332           f = fopen ("/dev/null", "r")
333           assert (feof (f))
334
335 . * tetex: mfplain.mem
336 .* 3RD PARTY PROJECTS:
337 . * make GCC warn about ctor that leaves member vars  uninitialised.
338 . * GNU patch 
339 .  * 'double-fix' mode: ignore identical fix, rather than suggest 
340             to revert patch direction when (more or less? exactly) the same 
341             thing is fixed
342 .* PROJECTS
343 . * Scripts:
344 .  * fix position of bar number
345 .  * stack scripts in chords:
346           % fingering:        footing:
347             < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
348 .  * script-spacing
349 .  * slur parts as a script
350 .  * stack parameterised scripts for fingering and footing:
351
352 . * convert-mudela:
353 .  * automatically add  a \version if not present.
354 .  * better parsing
355 .  * make smarter
356 .  * convert-mudela -e empty.ly
357
358 . * emacs mudela-mode
359 .  *  should handle block comments too.
360 .  *  handle lexer modes (\header, \melodic, \lyric) etc.
361 .  *  indentation
362 .  *  notenames?
363 .  *  fontlock: \melodic \melodic
364
365 . * use properties for:
366 .  * default tempo.
367 .  * cadenza mode? 
368
369 . * page handling:
370 .  * PS output
371 .  * optimal pagebreaking.
372
373 . * Unicode support? -> man 7 unicode
374 .  * 16 bit Strings
375 .  * -u switch
376 .  * detect of 16/8 bit files
377 .  * examples to go with it.
378
379 . * Spring_spacer:
380 .  * write a faster Spring_spacer (without matrices if possible)
381 .  * relate energybound to linelen unitspace fontsize etc.
382 .  * used fixed point fp?
383
384 . * \header
385 .  * output header info to MIDI too.
386
387 . * a musical dictionary. See Documentation/vocabulary-*, other
388         languages:
389 .  * explanations
390 .  * italian
391 .  * german
392 .  * dutch
393 .  * swedish
394          .. ?
395
396 . * chords
397 .  * guitar chords (fret diagrams)
398 .  * other chord name styles (american(?) style)
399 .  * basso continuo
400 .  * MIDI output?
401
402 . * Debug logs:
403 .  * derive lily_stream, Dstream, texstream from ostream?
404 .  * indentable stream as baseclass for TeX stream, lily stream, Dstream.
405 .  * use dstream feature in mi2mu
406 .  * integrate IO checking into stream class
407
408 . * input converters
409 .  * NIFF?
410 .  * ABC? 
411 .  * SMDL?
412
413 . * add to MIDI output:
414 .  * tempo change
415 .  * ornaments (and trills?)
416 .  * repeat/volta
417 .  * slurs
418 .  * accents
419 .  * dynamics
420 > Would it be hard to add support for proper dynamics in MIDI output?  I
421 > would really like to have this feature...
422
423 To answer this, I have to give a little background.  Please say so if
424 I am being obtuse.
425
426 Both audio and notation elements are created decentrally, when
427 LilyPond says "Interpreting music ... [8][16] etc."  After all
428 elements are created, they are processed again to calculate all
429 parameters.  After that is done, they are dumped onto the output (the
430 MIDI stream or the TeX file).
431
432 The audio and notation elements are created by objects called
433 performer and engraver respectively.  They work by taking a chunk of
434 input (a so-called request), and using the request to create an audio
435 or notation element.
436
437 After some processing, the engraver sends the created elements to
438 its enclosing notation/performance context.
439
440 In the case of notation, engravers can also modify existing elements
441 created by sibling engravers.  Eg. the beam-engraver will modify stems
442 when it creates a beam over a couple of stems.  This is done in
443 Engraver::do_acknowledge_element () and
444 Engraver::do_process_acknowledged ().
445
446 In the case of audio, there are no mechanisms to modify existing audio
447 elements. After the audio elements are created, they are sent directly
448 to the enclosing context (an instance of Performer_group_performer),
449 through the method Performer::play ()
450
451 Concretely spoken, for dynamics you have to write a performer
452 (Dynamics_performer), that will take the input requests. If I
453 understand correctly, every MIDI note played must have its dynamic
454 strength set separately.  That means the the Dynamics_performer must
455 set the strength of every Audio_note it finds.  This means that one
456 has to modify existing Audio items.  The best way of doing this is
457 with a broadcast/acknowledge process.
458
459 So the best way of handling this, is
460
461   1 supporting dynamic settings in Audio_note
462
463   2 mimicking the broadcast/acknowledge mechanism of the Engravers in
464   the Performers
465
466   3 using that mechanism to write a Dynamics_performer that will modify
467   any notes it finds to set appropriate strengths.
468
469 You could also kludge this by deriving from Performer_group_performer
470 a performer that also sets dynamics within notes, but that is not the
471 elegant way to do it.
472
473 I'd say that the work involved is not hard, but you have to be fluent
474 with C++ and need some insight into the working of Notation Contexts
475 and friends.  I guess I could do it in a day or so, but if you are not
476 so fluent with the inner workings of LilyPond, it could take you some
477 more time (A few more days?).
478
479 Please note, that I am *not* going to code this myself: my days are
480 valuable, and I think I have more interesting things to do than fixing
481 the MIDI output (I don't even have a soundcard).  But I *do* want to help
482 you or other people with implementing this, so if you need help, don't
483 hesitate to ask.
484
485 .  * account for rhythmic position in measure
486 .  * etc.
487
488 . * grace notes
489 .  * make separate class for Grace_*_engravers 
490         (which is at Voice_gravs level)
491 .  * make encapsulated spacing problems.
492
493 . * accidentals per Voice_group
494
495 . * Output class, handles : (smallish)
496 .  * help text /(c) notice?
497 .  * version line
498 .  * warning /errors/progress
499 .  * abort on error/warning; exit status
500 .  * quiet/ignore-version options
501 .  * logfile output
502
503 . * PS 
504 .  * speed up PS code.
505 .  * PS lines to .eps files
506 .  * write custom prolog
507
508 . * SGML input
509
510 . * Documentation
511 .  * remove links to non-free SW.
512 .  * internal documentation
513 .  * a general paper. 
514 .  * \properties
515 .   * left/rightbeamcount
516 .   * various other new properties.
517 .  * introduction?
518 .  * info?
519 .  * LaTeX?
520 .  * more manpages?
521 .  * Doc (C) stuff of sheet music
522 .  * a better format?  SGML?  TeX?  Info?
523 .  * a better tutorial
524
525 . * more spanners (smallish)
526 .  * Glissando
527 .  * trill
528
529 . * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
530 .  * [c8. c32 c32]
531 .  * doc on Rhythmic_grouping
532 .  * general shaving on Beam and Stem
533 .  * use plet grouping
534 .  * separate visual from rhythmic info even more
535 .  * beams over bars
536
537 . * lines:
538 .  * Ledger lines, should be separate item: Ledger_lines
539 .  * set different line sizes / thicknesses
540 .  * beam stem showthrough, inter beam sizes (french vs german style)
541
542 . * Collisions
543 .  * left/right note balls should be handled by Collision:
544         < \multi 2; { \stem 1; <b c> } { <f as b> } >
545
546 . * Keys:
547 .  * merge key{item} & localkey{item}?
548 .  * spacing, national styles?
549
550 . * Support for TAB
551 .  * redo Notehead to allow digits as heads
552 .  * add a \tablature {} lexer mode for easy entering
553
554 . * should adjust stemlength for flag number.
555
556 . * breaking:
557 .  * caching breakpoints
558 .  * saving them
559 .  * specify number of lines
560
561 .* INPUTLANGUAGE
562 . * \rhythms 4 16 16 16 16; c c c c c -> c4 c16 etc. 
563 . * Language:
564 .  * \type -> \context ?
565 .  * \translator -> ?
566 .  * fix \partial 
567 .  * \bla {} vs \bla ; 
568 .  * mix engraver hacking with music ?
569 .  * \once\property  KEY = VAL
570 .  * \addtranslator, \removetranslator
571 .  * junk ^ and _ for scripts
572 .  * junk _ for lyrics.
573 .  * abstract grammar.
574 . * Figure out semicolons.
575 . * c4 4 4 4 for c4 c4 c4 c4?
576 . * <c f a>4 ?
577 . * Viola mode?
578
579                 @c c g e g 
580         for
581                 c g es g, 
582
583                 @A c g e g
584         for
585                 cis gis e gis
586 . * configure pitch_byte
587 . * rest name configurable
588
589
590 .* SMALLISH PROJECTS
591
592 . * Faulenzer sign (% repeat)
593
594 . * fix confusing naming in Engraver vs Engraver_group_engraver (context)
595
596 . * progress when creating MIDI elts.
597
598 . * A range for context errors (eg. mark both { and }. )
599
600 . * lyric in staff  (sharpsharp in staff, text below)
601
602 . * half sharps/flats
603
604 . * write Dynamic_line (to group dynamics horizontally)
605
606 . * use Real for all y positions.
607
608 . * half-sharps, half-flats
609
610 . * adaptive accidental spacing.
611
612 . * handle EOF graciously in error messages.
613
614 . * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
615
616 . * stafftypes: voice names/ instrument names.
617
618 . * lily \tempo
619
620 . *   % toe to bheel   four to five
621             %   ^_u            4_5  
622             %     -                           
623             %  --|x--         --|x--
624             %  --|---         --|---
625             %  --|---         --|---
626           (where "to" is a tiny bow)
627
628 . * auxilliary file for caching info.
629
630 . * Text_crescendo
631
632 . * revise calcideal
633
634 .* IDEAS
635 . * Output data structures of Mudela in XML/SGML.
636 . * create libmudela, or liblily_frontend
637 . * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
638 . * Spacing_request for manually adjusting spacing
639 . * caching breakpoints
640 . * used fixedpoint arithmetic for min. energy.
641 . * move towards incremental algorithms.
642 . * versioning stuff (cvt mudela, mudela, etc.)
643 . * dynamic loading of engravers? 
644 .* SMOBS
645 Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
646
647 >       class Foo_class {
648 >               Foo_smob *smob_ptr_;
649 >       }
650
651 >       struct Foo_smob {
652 >               Foo_class *class_ptr_
653 >       }
654
655 Usually you can get away without having this interlinked structure.
656 One piece of information you need when exporting objects to scheme is
657 the smob tag for your class.  You might store this value (a long) into
658 a class static variable, or a file static variable.  I'll use a class
659 static variable in this example.
660
661 I typically use code that works like this (untested code ahead):
662
663 class Foo_class {
664     static long *Foo_smob_tag;
665     SCM obj; // representation as a scheme object, description comes later
666 }
667
668 // call this once on startup
669 void init_Foo_class {
670     static scm_smobfuns type_rec;
671
672     type_rec.mark = foo_mark;
673     type_rec.free = foo_free;
674     type_rec.print = foo_display;
675     type_rec.equalp = 0;
676     Foo_class::Foo_smob_tag = new int(scm_new_smob(type_rec));
677 }
678
679 When you want to export an object to scheme, you put a pointer to the
680 object itself in the cdr of the cell, and the tag in the car of the
681 cell.  The code looks like this:
682
683 // Is this a Foo?
684 static int
685 foo_p(SCM obj)
686 {
687     return(SCM_NIMP(obj) && SCM_CAR(obj) == Foo_class::Foo_smob_tag);
688 }
689
690 // given a Scheme representation, return, a C++ representation
691 static Foo_class *
692 foo_unbox(SCM obj)
693 {
694     return((Foo_class*)SCM_CDR(obj));
695 }
696
697 // the SCM representation of the object is stored inside itself
698 // this will become useful when destructor gets called
699 static SCM
700 foo_box(Foo_class *foo)
701 {
702     SCM_DEFER_INTS;
703     SCM_NEWCELL(foo->obj);
704     SCM_SETCAR(foo->obj, Foo_class::Foo_smob_tag);
705     SCM_SETCDR(foo->obj, (SCM)foo);
706     SCM_ALLOW_INTS;
707     return foo->obj;
708 }
709
710 > C++ determines life time, so what is the strategy?
711
712 What happens now when the destructor gets called?  Lets set the cdr to
713 NULL, and then check for that in all of the primitive functions that
714 use your smob.  We'll call this notion 'live'; a scheme object is
715 'live' if the C++ representation still exists, it's dead if the C++
716 object is gone.  You can still have references to dead objects in
717 scheme code; it's just an error to use them.  This idea is stolen from
718 Emacs's handling of buffers ('buffer-live-p' and friends).
719
720 Add another function, foo_live_p:
721
722 static int
723 foo_live_p(SCM obj)
724 {
725     return(foo_p(obj) && SCM_CDR(obj) != NULL);
726 }
727
728 In you destructor, you need to do:
729
730 ~Foo_class()
731 {
732     SCM_CDR(this->obj, NULL);
733 }
734
735 When writing new primitives, now just check foo_live_p().
736
737 I hope the above helps,
738
739 -russ
740
741
742 --
743 "Even if you are on the right track, you'll get run over 
744 if you just sit there."  
745              --Will Rogers (1879-1935)
746
747 * OUTLINE SETUP
748 .* .EMACS
749 ;;; from outline.el
750 (defvar outline-font-lock-keywords
751   '(;; Highlight headings according to the level.
752     ;; must change this to allout node layout
753     ;;("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$"
754     ("^\\([.]*[ ]*[*]\\)[ \t]*\\(.*\\)$"
755      (1 font-lock-string-face)
756      (2 (let ((len (- (match-end 1) (match-beginning 1))))
757           (or (cdr (assq len '((1 . font-lock-function-name-face)
758                                (2 . font-lock-keyword-face)
759                                (3 . font-lock-comment-face))))
760               font-lock-variable-name-face))
761         nil t))
762     ;; Highlight citations of the form [1] and [Mar94].
763     ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face))
764   "Additional expressions to highlight in Outline mode.")
765
766 (add-hook 'outline-mode-hook
767           '(lambda ()
768             (setq font-lock-maximum-decoration t)
769             (setq font-lock-maximum-decoration t)
770             (make-local-variable 'font-lock-defaults)
771             (setq font-lock-defaults '(outline-font-lock-keywords t))
772             (font-lock-mode global-font-lock-mode)
773         ))
774  
775 (require 'allout)
776 (outline-init 't)