]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.71pre release/0.0.71pre
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 1 Jul 1997 12:49:26 +0000 (14:49 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 1 Jul 1997 12:49:26 +0000 (14:49 +0200)
52 files changed:
.version
ANNOUNCE
AUTHORS.text
BUGS
Documentation/AUTHORS.pod
Documentation/lilygut.pod
Documentation/lilyliterature.pod
Documentation/other-packages.pod
INSTALL.text
NEWS
TODO
init/register.ini
init/symbol.ini
input/collisions.ly
input/kortjakje.ly
input/scsii-menuetto.ly
input/standchen.ly
input/twinkle.ly
input/wohltemperirt.ly
lily/.version
lily/acceptor.cc [new file with mode: 0644]
lily/clef-reg.cc
lily/global-acceptor.cc [new file with mode: 0644]
lily/include/acceptor.hh [new file with mode: 0644]
lily/include/global-acceptor.hh [new file with mode: 0644]
lily/include/input-register.hh
lily/include/interpreter.hh
lily/include/key-item.hh
lily/include/key-reg.hh
lily/include/lily-proto.hh
lily/include/midi-walker.hh
lily/include/music-iterator.hh
lily/include/register-group.hh
lily/include/register.hh
lily/include/score-column.hh
lily/include/score-reg.hh
lily/include/score.hh
lily/input-register.cc
lily/interpreter.cc [deleted file]
lily/key-item.cc
lily/key-reg.cc
lily/main.cc
lily/music-iterator.cc
lily/my-lily-parser.cc
lily/notehead.cc
lily/parser.y
lily/register-group.cc
lily/score-reg.cc
lily/score.cc
make/lilypond.lsm
make/lilypond.spec
tex/taupindefs.tex

index 32b8cd6abf1db4eb1c337c5ce9d50c7551176712..e8b651c3d12ffccf49edc45efae7312ce9cd25bf 100644 (file)
--- a/.version
+++ b/.version
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 70
+TOPLEVEL_PATCH_LEVEL = 71
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 7b4d64deed8591db0f9646f7865f342f3328b1c7..3c1450f607980c12282c57fcba44e57c94c98c9d 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -8,13 +8,13 @@
        daughter to Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy'
        Nienhuys
 
-Lily is a healthy, bouncing baby weighing 340 kilobytes
+Lily is a healthy, bouncing baby weighing 345 kilobytes
 
 Visiting hours: 24hrs a day at
 
        ftp://pcnov095.win.tue.nl, 
 
-you can see some diapers and pictures at
+you can see some babyfood, diapers and pictures at
 
        http://www.stack.nl/~hanwen/lilypond/index.html
 
@@ -29,8 +29,9 @@ Wendy (hanwen@stack.nl)
 
        Those deserving special mention (in no particular order):
 Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn,
-Maartje, Suzanne, Ilse (gee, again?), most members of the Eindhovens
-Jongeren Ensemble and last (but certainly not least) Janneke!
+Maartje, Suzanne, Ilse (gee, again?), my friends in the
+Eindhovens Jongeren Ensemble and last (but certainly not least)
+Janneke!
 
        HW
 
index 7187b9e4394747d9733ee318d3ccd100ec75c457..c5e26b01bcd52c20d49b24ab4b86c0a0d52cbd05 100644 (file)
@@ -30,7 +30,7 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNT\bT\bT\bTR\bR\bR\bRI\bI\bI\bIB\bB\bB\bBU\bU\bU\bUT\bT\bT\bTO\bO\bO\bOR\bR\bR\bRS\bS
            reg.cc, clef-item.cc testing, general comments.
 
        +\bo   Werner Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc
-           bugfixes.
+           bugfixes, some Beam and Stem code.
 
 
 
@@ -61,6 +61,6 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNT\bT\bT\bTR\bR\bR\bRI\bI\bI\bIB\bB\bB\bBU\bU\bU\bUT\bT\bT\bTO\bO\bO\bOR\bR\bR\bRS\bS
 
 
 
-19/May/97                LilyPond 0.0.68                        1
+30/Jun/97                LilyPond 0.0.71                        1
 
 
diff --git a/BUGS b/BUGS
index b0b28cd6d1fd38504583b272e030e16f46378fef..76d2ecd7a5e552e996ce106af607649edb0be393 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1,5 +1,8 @@
 This file documents bugs which were "re-introduced" in various pl's
 
+pl 70 
+       * r^"simile"
+
 
 pl69
        * scales.ly
@@ -7,6 +10,7 @@ pl69
        * slurs.ly
 
 pl68:
+       * opening rests wohltemperirt
        
        * lyrics broken,
 
index 7f343d780efc5794080b04b1e814c25e90a45db5..dc2f0b243121c89186aa0f69128de03708a56741 100644 (file)
@@ -39,7 +39,8 @@ testing, general comments.
 
 =item *
 
-Werner Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc bugfixes.
+Werner Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc bugfixes, some
+Beam and Stem code. 
 
 =back
 
index 3278492c6b49d576ddd1b2abc5e058f2b1f72312..52f787c2f7504cc879ec5b8735d1fa6b2b153c8e 100644 (file)
@@ -30,36 +30,9 @@ might be integrated in larger systems.
 
 No difficult algorithms. Associated datastructures have prefix Input
 (eg Input_score, Input_command). The .ly file is read, and converted
-to Requests, Voice_elements, Voices.
+to 
 
-The result looks something like this (? = 0 or 1, * =0 or more, + = 1
-or more)
-
-       Score {
-               Midi_def?
-               Paper_def?
-               Staff+ {
-                       Voice+ {
-                               start_moment
-                               Voice_element* {
-                                       duration
-                                       Request*
-                               }
-                       }
-                       Input_register { ..}
-               }
-       }
-
-Request is a baseclass for almost all kinds of information. As you can
-see, the info is stored horizontally; horizontally is the natural form
-for entering music.
-
-=item Setting up music
-
-Simultaneous  Requests are grouped into columns. Vertical is the
-natural form for processing music.
-
-=item Processing:
+=item Creating elements
 
 Requests are processed and used to create elements (like balls, stems,
 slurs etc). This is done by a hierarchy of "brokers" (called
@@ -104,51 +77,7 @@ determine what to output when.
 
 =head1 INTERNALS
 
-This chapter deals with the internals of Mudela. In the end Mudela
-converted to Voice, which contain Voice_elements which (in turn)
-contain Requests. The former 2 types are basically containers (lists).
-Consider the following simple mudela
-
-       \music { c4 <e4 g4> }
-
-After the parsing, this is converted to: (from the debug output)
-
-       Voice { start: 0
-         voice_element { dur :1/4
-           Stem_req {duration { 4}}
-           Note_req {notename: 0 acc: 0 oct: -1 
-             duration { 4}}
-           Group_change_req {}
-           }
-         voice_element { dur :0
-           Terminate_voice_req {}
-           }
-         }
-
-       Voice { start: 1/4
-         voice_element { dur :1/4
-           Stem_req {duration { 4}}
-           Note_req {notename: 2 acc: 0 oct: -1 
-             duration { 4}}
-           Group_change_req {}
-           }
-         voice_element { dur :0
-           Terminate_voice_req {}
-           }
-         }
-
-       Voice { start: 1/4
-         voice_element { dur :1/4
-           Stem_req {duration { 4}}
-           Note_req {notename: 4 acc: 0 oct: -1 
-             duration { 4}}
-           Group_change_req {}
-           }
-         voice_element { dur :0
-           Terminate_voice_req {}
-           }
-         }
-
+This chapter deals with the internals of Mudela. 
 
 =head2 Requests
 
@@ -224,15 +153,6 @@ Dynamic changes can occur in a smaller time than the length of its
 note, therefore fore each  C<Dynamic> request carries a time, measured
 from the start of its note.
 
-=head2 Voice_element
-
-Voice_element is a list of requests together with a duration. It is
-strictly horizontal
-
-=head2 Voice
-
-Voice is a list of Voice_elements together with a starting time.
-
 =head2 Voice groups
 
 Voice group is a (time-dependent) collection of voices which share
index e92cb72a9a8d3c9ee08ec7baceaf15f35fac58b6..bb56b4a911fa7ed3019243e2a1c426389893a74f 100644 (file)
@@ -133,7 +133,7 @@ ISBN 3-9000 035-96-2.
 some of the conventions and difficulties in printing music]
 
 The University of Colorado Music Engraving page.
-http://obenamots.cc.colorado.edu/cgi-bin/Musicpress/engraving.html
+http://obenamots.cc.colorado.edu/Musicpress/engraving.html
 
 More on GNU Music: http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp
 
index fc3a2585cd1ce86d187c79e62b9c28eab02ee780..55ecd4c6df984a19981679cab97deaf641a22157 100644 (file)
@@ -5,77 +5,80 @@ Other-packages -- related packages
 =head1 DESCRIPTION 
 
 A (not-at-all complete) overview of other music-typesetting/notation
-packages. Feel free to add info (and mail it to me).  Partly based on
-a reflist by Miguel Filgueiras <mig@ncc.up.pt>.
+packages. Feel free to add info (and mail it to me).  
 
 =head2 Free packages (with source)
 
 G Sharp, http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp
 
+An alpha version notation editor for X. Source available on request.
+
 Rosegarden, http://www.math.bath.ac.uk/~masjpf/rose.html
 
-Common Music/Common Notation, ftp://ccrma-ftp.stanford.edu/pub/Lisp
+A Notation editor/Sequencer for X (win95 port underway). Outputs musictex.
+
+Common Notation, ftp://ccrma-ftp.stanford.edu/pub/Lisp
+
+A versatile lisp package. Part of the Common Music system. Input is in Lisp. 
+
+Vivace, http://
 
-Vivace
+A amateurish notation program for TclTk and X
 
 MPP, http://www.stack.nl/~hanwen/mpp-english.html
 
-Jan Nieuwenhuizen, Using TeX and the MusiXTeX macro package to
-write parts and scores of music. Department of Physics, Eindhoven
-University of Technology, 1995.
+A preprocessor to MusixTeX by Jan Nieuwenhuizen and Han-Wen Nienhuys.
+It is outdated by its successor, LilyPond.
 
-MusicEase, ftp://ftp.secret.com/ad-ftp
+Music, http://
 
-Described in Computer vol 29(6)
+A TROFF preprocessor by Eric Foxley
 
+MusicEase, ftp://ftp.secret.com/ad-ftp
 
+Described in Computer vol 29(6)
 
 MusE
 
-A-R Editions, Inc.
+A-R Music Engraving, by A-R Editions, Inc. Professional engraving on
+Sun boxen.
 
 Mup, http://www.arkkra.com/
 
 A program which creates PS from a script input. Although it comes with
-C source code, it is Shareware ($29).
+C source code, it is Shareware ($ 29).
 
-PMX
+PMX, http://www.gmd.de/Misc/Music/
 
-Don Simons, PMX, A Preprocessor for MusiXTeX (Version 1.04).
-dsimons@logicon.com.
+A Preprocessor for MusiXTeX by Don Simons
 
-Musi*TeX, http://www.gmd.de/misc/music
+Musi*TeX, http://www.gmd.de/Misc/Music/
 
-Daniel Taupin, Ross Mitchell and Andreas Egler, MusixTeX: Using TeX
-to Write Polyphonic or Instrumental Music (Version T.64). Laboratoire
-de Physique des Solides, Centre Universitaire, Orsay, 1993.
+MusixTeX is a macro package for TeX to typeset polyphonic or
+instrumental music by Daniel Taupin, Ross Mitchell and Andreas
+Egler. It includes a font set with lots symbols
 
-ABC2MTeX
+ABC2MTeX, http://www.gmd.de/Misc/Music/
 
-Chris Walshaw,  ABC2MTeX --- An easy way of transcribing folk
-and traditional music. School of Maths, University of Greenwich, 1993.
+A preprocessor to MusixTeX by Chris Walshaw for way of transcribing folk
+and traditional music. 
 
 SceX
 
-Miguel Filgueiras and Jos\'e Paulo Leal, A First Formulation of
-SceX, a Music Typesetting System. Centro de Inform\'atica da
-Universidade do Porto, 1993.
+A preprocessor to MusixTeX by Miguel Filgueiras. Source in prolog
+available on request. (?)
 
-MUTEX
+MUTEX, http://www.gmd.de/Misc/Music/
 
-Fran\ccois Jalbert, MuTeX User's Guide (Version 1.1). Computer
-Science Department, University of British Columbia, 1989.
+A TeX macro package for typesetting single-staff music by Angelika
+Schofer & Andrea Steinbach. With some fonts
 
 
 =head2 Free (zero cents)
 
 Calliope, http://www.cl.cam.ac.uk/users/wfc/
 
-A NeXT package
-
-Mozart
-
-A windows package
+A NeXT package by William F Clocksin. Requires Adobe fonts
 
 =head2 Proprietary
 
@@ -87,6 +90,16 @@ Finale
 
 Score
 
+Personal Composer
+
+Mozart,
+
+A shareware windows package, 
+
+Capella
+
+Encore
+
 Musicator
 
 =head2 Unknown
index 128c028facb9af0f57f471eabfc94fc42b1edc00..8d6679153378f8c31efb63b60e204651bef38079 100644 (file)
@@ -61,7 +61,7 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNF\bF\bF\bFI\bI\bI\bIG\bG\bG\bGU\bU\bU\bUR\bR\bR\bRI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG a\b
 
 
 
-28/May/97                LilyPond 0.0.68                        1
+28/May/97                LilyPond 0.0.71                        1
 
 
 
@@ -127,7 +127,7 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
 
-28/May/97                LilyPond 0.0.68                        2
+28/May/97                LilyPond 0.0.71                        2
 
 
 
@@ -193,7 +193,7 @@ R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 
 
 
-28/May/97                LilyPond 0.0.68                        3
+28/May/97                LilyPond 0.0.71                        3
 
 
 
@@ -259,7 +259,7 @@ W\bW\bW\bWI\bI\bI\bIN\bN\bN\bND\bD\bD\bDO\bO\bO\bOZ\bZ\bZ\bZE\bE\bE\bE
 
 
 
-28/May/97                LilyPond 0.0.68                        4
+28/May/97                LilyPond 0.0.71                        4
 
 
 
@@ -325,6 +325,6 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 
 
-28/May/97                LilyPond 0.0.68                        5
+28/May/97                LilyPond 0.0.71                        5
 
 
diff --git a/NEWS b/NEWS
index 5ac7e17c28d3b9f5af3457fd8f848a677fdff807..78e451c794a00a6a8b07f593a150bb4ba1a3589d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+pl 71pre
+       - init id's, Input_register aliases.
+       - bf: notehead x-swap 
+       - bf: auto-keys.
+       - bf: first clef
+       - junked \init_end; construct
+       - Preparatory work for MIDI output:
+               * Acceptor as baseclass for Register_group_register
+               * Global_acceptor as interface of Register to Score
+       - bf: empty voice
+       - Lyrics: partially working
+       - some doco updates (junks, mostly)
+
+
+******
 june 30
 pl 70pre
        - bf: text Script
diff --git a/TODO b/TODO
index 4350bd6d0bb823d6ddc802858f3616d2e4ac1f53..1b65c99ac00d41f86f0b7d7ab343e80fe8ab9ef3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,7 +6,7 @@ done, or is an idea that I want to think about
 Most of the items are marked in the code as well, with full explanation. 
 grep for TODO and ugh/ugr
 
-       * 
+       * whole head on ledger line
 
        * piano staff
 
@@ -26,6 +26,8 @@ grep for TODO and ugh/ugr
 
 PROJECTS
 
+       * accidentals per Voice_group
+
        * Convert all ref/bib stuff into BibTeX.
 
        * Output class, handles : (smallish)
index a7d3257a9a10f583e8f82d49d7098e4a65a96b21..16b868b2060c303311870f09081430b42ad1116e 100644 (file)
@@ -1,4 +1,6 @@
 %
+% setup for Request->Element conversion. Guru-only
+%
 
 \requestregister {
         "Score_register"
@@ -11,8 +13,8 @@
        \consists "Score_horizontal_align_register";
 
        \contains\requestregister {
-                "Staff_registers"
-               
+               "Staff_registers"
+               \alias "Staff";         
                \consists "Bar_register";
                \consists "Clef_register";
                \consists "Key_register";
                        }
                }
        }
+
+       \contains\requestregister {
+               "Staff_registers"
+               \alias "Lyric";
+               \contains\requestregister{
+                       "Voice_group_registers"
+                       \alias "Voice_group";
+                       \contains\requestregister{
+                               "Voice_registers"
+                               \consists "Lyric_register";
+                               \consists "Swallow_register";
+                       }
+               }
+       }
 }
 
 
index d14a1037a0d3d850d13d4a3dca0d4129b84f2b23..df9c040652d7465e6567181e6e3bba66bd1577a2 100644 (file)
@@ -7,5 +7,3 @@
 \include "table_sixteen.ini"
 
 
-%% Fix Me. This sux.
-\init_end ;
index 5edeb80f23ac5ed4780c642ffc2707ccd3cadef6..de6805fed93ae0b8a87ed7d446c76dba04bf3623 100644 (file)
@@ -3,7 +3,7 @@
  filename: collisions.ly
  title:
  description:  random counterpoint to test collisions
- composer(s): HWN,JCN
+ composer(s): 
  entered-by: HWN,JCN
  copyright: public domain
 
index 95e8187dd921e4a7b2483f6c8687c7e493e0fa5d..91e733abe3da2ff7c71b67c6d0639c1652dc6967 100644 (file)
@@ -10,7 +10,7 @@
  Tested Features: example file with comments
 EndMudelaHeader
 %}
-\version "0.0.59";
+\version "0.0.60";
 
 
 % the % is a comment.
@@ -50,7 +50,7 @@ begeleiding = \melodic{
        'c4                     % ' before note means one octave lower.
                                % Similarly: ' after means one higher.
           c    e c     f c     e c     d 'b    c 'a    'f 'g   'c2 |
-       \octave  'c ;
+       \octave  c ;
        e4 'g   d 'g    c 'g    'b 'g   e 'g    d 'g    c 'g    'b 'g
        %%%% var 1
        r8 e8()  c4     r8 e8()  c4     r8 f8() c4      r8 e8() c4
@@ -64,7 +64,7 @@ begeleiding = \melodic{
         \begeleiding 
        >
        \paper{
-               \unitspace 2.5\cm       % a whole note takes 2.5 \cm ideally.
+               \unitspace 2.5\cm;      % a whole note takes 2.5 \cm ideally.
        }
 }
 
index 769a032cc71e669617ac509ed511ce2ce5da80be..1af7644ba5583e256d0e9d5348d911c7c9a494f9 100644 (file)
@@ -1,11 +1,11 @@
 %{MudelaHeader
 
  filename: scsii-menuetto.ly
- title:Solo Cello Suites,
- description: Suite II part V, Menuetto I
+ title: Solo Cello Suites, Suite II part V, Menuetto I
+ description: Cello suite transcribed for Viola
  composers: Johann Sebastian Bach (1685-1750)
  entered-by: JCN
- copyright: 
+ copyright: public domain
 
  Tested Features:breaking algorithm, chords, multivoice, accents
 
index 867b6caaa12d24e775038a783a8e961c019a8803..a4dd55c3fdacfc67e0e42f3f6d6c35404d60ef25 100644 (file)
@@ -465,11 +465,13 @@ tekstII = \lyric{
 }
 
 \score{
-%      \staff{ lyricregs tekstI }
-%      \staff{ lyricregs tekstII }
+       <       \multi 3; 
+               { \id "Lyric" "1"; tekstI } % ugh
+               { \id "Lyric" "2"; tekstII }
 
-       \melodic < \multi 3; < \melodie \commands >
-         <\begeleiding \commands >
+               \melodic < \melodie \commands >
+               \melodic <\begeleiding \commands >
+       
        >
        \paper{
                \width 195.\mm;
index 8a1772795958cd5262b33b152319b2657129f764..fb986f1ae4e7e564ad15733475381693fd66507a 100644 (file)
@@ -14,7 +14,7 @@
  Tested Features: lyrics
 EndMudelaHeader
 %}
-\version "0.0.58";
+\version "0.0.60";
 
 melody = \melodic{
        \clef\violin;
@@ -22,8 +22,8 @@ melody = \melodic{
        c4 c | g g | a a | g g |
        f f | e e | d d8.( e16 | )c2 | % :|
 
-       g g | f f | e e | d d |
-       g g | f f | e( e8. f16 | e )d |
+       g4 g | f f | e e | d d |
+       g g | f f | e( e8. f16 | e4 )d |
 
        c c | g g | a a | g g |
        f f | e e | d d8.( e16 | )c2 % :|
@@ -37,8 +37,8 @@ accompany = \melodic {
        c4 c' | e' c' | f' c' | e' c' | 
        d' b | c' a | f g | c2 | 
 
-       e' g | d g | c' g | b g | 
-       e' g | d' g | c' c'8.( d'16 | c' )b |
+       e'4 g | d g | c' g | b g | 
+       e' g | d' g | c' c'8.( d'16 | c'4 )b |
 
        c c' | e' c' | f' c' | e' c' | 
        d' b | c' a | f g | c2 
@@ -52,78 +52,82 @@ global = \melodic {
        }
 
 tekst = \lyric{ 
-       Al- tijd is Kort- jak- je ziek,2
-       midden in_de week maar s'_zon- dags niet.2
-       s'_Zon- dags gaat ze naar de kerk,2
-       met een boek vol zil- ver werk.2
-       Al- tijd is Kort- jak- je ziek,2
-       midden in_de week maar s'_zon- dags niet.2
+       Al-4 tijd is Kort- jak- je ziek,2
+       midden4 in_de week maar s'_zon- dags niet.2
+       s'_Zon-4 dags gaat ze naar de kerk,2
+       met4 een boek vol zil- ver werk.2
+       Al-4 tijd is Kort- jak- je ziek,2
+       midden4 in_de week maar s'_zon- dags niet.2
 }
 
 hegedraagjetekst = \lyric{ 
-       Al- tijd zuigt Bill Gates mijn piek,2
-       "\TeX" is slecht- ser dan mu- ziek.2
-       s'_Zon- dags gaat het door een raam,2
-       Weet dat ik me er- voor schaam.2
-       Al- tijd zuigt Bill Gates mijn piek,2
-       "\TeX" is slecht- ser dan mu- ziek.2
+       Al-4 tijd zuigt Bill Gates mijn piek,2
+       "\TeX"4 is slecht- ser dan mu- ziek.2
+       s'_Zon-4 dags gaat het door een raam,2
+       Weet4 dat ik me er- voor schaam.2
+       Al-4 tijd zuigt Bill Gates mijn piek,2
+       "\TeX"4 is slecht- ser dan mu- ziek.2
 }
 
 texte = \lyric{ 
         
        \textstyle "italic" ;
-       Ah! vous dir- ai_- je ma man2
-       Ce qui cau- se mon tour- ment2
-       Pa- pa veut que je rai- sonne2
-       Comme un- e grand- e per- sonne2
-       Moi je dis que les bon- bons2
-       Val- ent mieux que la rai- son2
+       Ah!4 vous dir- ai_- je ma man2
+       Ce4 qui cau- se mon tour- ment2
+       Pa-4 pa veut que je rai- sonne2
+       Comme4 un- e grand- e per- sonne2
+       Moi4 je dis que les bon- bons2
+       Val-4 ent mieux que la rai- son2
        
 }
 
 texti = \lyric{
        
        \textstyle "roman";
-       Twin- kle, twin- kle, lit- tle star,2
-       How I won- der what you are.2
-       Up a- bove the world so high,2
-       Like a dia- mond in the sky.2
-       Twin- kle, twin- kle, lit- tle star,2
-       How I won- der what you are!2
+       Twin-4 kle, twin- kle, lit- tle star,2
+       How4 I won- der what you are.2
+       Up4 a- bove the world so high,2
+       Like4 a dia- mond in the sky.2
+       Twin-4 kle, twin- kle, lit- tle star,2
+       How4 I won- der what you are!2
 }
 
 textii = \lyric{
-       When the bla- zing sun is gone,2
-       When he no- thing shines up- on,2
-       Then you show your lit- tle light,2
-       Twin- kle, twin- kle, all the night.2
-       Twin- kle, twin- kle, lit- tle star,2
-       How I won- der what you are!2
+       When4 the bla- zing sun is gone,2
+       When4 he no- thing shines up- on,2
+       Then4 you show your lit- tle light,2
+       Twin-4 kle, twin- kle, all the night.2
+       Twin-4 kle, twin- kle, lit- tle star,2
+       How4 I won- der what you are!2
        
 }
 
 textiii = \lyric{
        
-       Then the tra- veler in the dark2
-       Thanks you for your ti- ny spark;2
-       He_could not see which way to go,2
-       If you did not twin- kle so.2
-       Twin- kle, twin- kle, lit- tle star,2
-       How I won- der what you are!2
+       Then4 the tra- veler in the dark2
+       Thanks4 you for your ti- ny spark;2
+       He_could4 not see which way to go,2
+       If4 you did not twin- kle so.2
+       Twin-4 kle, twin- kle, lit- tle star,2
+       How4 I won- der what you are!2
        
 }
 
 \score{
-       \staff{ melodicregs global melody }
-       \staff{ lyricregs global tekst hegedraagjetekst }
-       \staff{ lyricregs global texte }
-       \staff{ lyricregs global texti textii textiii }
-       \staff{ melodicregs global accompany }
+       < \multi 3;
+               \melodic <\global \melody >
+               
+               % ugh
+               \lyric < \id "Lyric" "1"; \global \tekst \hegedraagjetekst >
+%              \lyric < \id "Lyric" "2";  \global \texte >
+%              \lyric < \id "Lyric" "3"; \global \texti \textii \textiii >
+               \melodic < \global \accompany >
+       >
        \paper{
-               \unitspace 2.5\cm
+               \unitspace 2.5\cm;
        }
        \midi{ 
-               \tempo 4:120 
+               \tempo 4:120 ;
        }
 }
 
index 00ad8716ac4c8c5a0c08ce694d8841b8351320fc..ff2f0a6ef974221185364d98bf80ad39daabf77b 100644 (file)
@@ -2,18 +2,11 @@
  title: Das Wohltemperirte Clavier I, Fuga II (c-minor)
  description: following Henle's Urtext
  composer(s): JS Bach
- entered-by: HWN
- corrected-by: Werner Lemberg (tested with pl 64; 1997-05-17)
+ entered-by: HWN and Werner Lemberg
  copyright: Public Domain 
 
  Tested Features: stem direction, multivoice, forced accidentals.
 
- Remarks: the stem direction algorithm is severely broken (look at the
-bass dux) with pl64. [this is supposedly fixed in pl68, can anybody
-knowledgeable remove this comment if it's not appropriate anymore?]
-    
-
-
 %}
 
 \version "0.0.60";
@@ -38,9 +31,10 @@ dux =
         [es c' b a] [g f! es d] [c8 es' d' c'] |
         [bes a bes c'] [fis g a fis] |
 %% 5
-        g4 r16 [c d es] [f g as8~] [as16 d es f]|
-        [g a bes8~] [bes16 es f g] [as g f es] [d8 c'16 b]|
-        c'4 r4 r8 [f' es' d'] 
+        g4 r16 [c d es] [f g as8~] [as16 d es f] |
+        [g a bes8~] [bes16 es f g] [as g f es] [d8 c'16 b!] |
+                                                    % forced accident!
+        c'4 r4 r8 [f' es' d'] |
         r8 [as g f] [g f16 es] [f8 d] | 
         g4 r8 b [c' c'16 b] [c'8 g] |
 %% 10   
@@ -50,16 +44,9 @@ dux =
         [bes8 c' bes as] [bes g f es] |
         [f des' c' bes] [c' as g f] |
 %% 15
-        g8 \octave c'; [g16 fis] [g8 c] [es g16 fis] [g8 a] |
-%        [d g16 fis] [g8 a] [c16 d] es4 [d16 c] |
-        [d g16 fis] [g8 a] [c16 d] es4 [d16 c] |
-                                    % wouldn't it be better if I can write
-                                    % `a' instead of `a!' here to get really
-                                    % an `a natural'? Processing this melody
-                                    % alone (only having `a') would yield a
-                                    % different result! (WL)
-%% I don't understand the complaint. The ! makes no difference in output. HWN
-
+        g8 \octave c'; [g16 fis] [g8 c] [es g16 fis!] [g8 a] |
+        [d g16 fis] [g8 a!] [c16 d] es4 [d16 c] |
+                                                    % forced accident!
         'bes8 r8 r16 [d e fis] [g a bes8~] [bes16 e f g] |
         [a bes c'8~] [c'16 fis16 g a] [bes8 es!16 d] [es8 'g] |
         ['as f16 es] [f8 'a8] ['bes g16 f] [g8 'b] |
@@ -77,12 +64,7 @@ dux =
         [f16 d es c]~ [c8 B] c4 r8 e |
 %% 30
         f4 r8 f [f es16 d] [es8 <f as]> |
-%        f4 r8 <f as b> [f es16 d] [es8 <f as]> |
-                                    % bug! if you say
-                                    %   f4 r8 <f as b> ...
-                                    % the chord overlaps. WL
-%% confirmed. added to TODO. HWN
-       <B d> r <B d> r <G2 c> |
+        <B d> r <B d> r <G2 c> |
     }
 
 
@@ -97,7 +79,7 @@ comes =
 %% 5
         ['bes8 es16 d] [es8 'g8] ['as f16 es] [f8 'a] 
         ['bes8 g16 f] [g8 'b] [c8 d16 es] f4~ |
-        [f8 es16 d] [c16 'bes 'as 'g] ['f8 as g f] 
+        [f8 es16 d] [c16 'bes! 'as 'g] ['f8 as g f] 
         [es d es f] ['b c d 'b] |
         [c g16 fis] [g8 d] es4 r8 e8 |
 %% 10 
@@ -107,9 +89,9 @@ comes =
         [G16 Es F G] [As Bes c d] [es d c d] [es f g a] |
         [bes F G As] [Bes c d e] [f es d es] [ f g a b] |
 %% 15
-        [c'8 b16 a] [g f es d] [c8 es d c] |
+        [c'8 b16 a] [g f! es d] [c8 es d c] |
         [Bes A Bes c] [Fis! G A Fis] |
-                                    % see comment above about forced acc. 
+                                                    % forced accident
         [G8 d16 c] d8 r8 r8 [e16 d] e8 r8 |
         r [fis16 e] fis8 r r [G16 F] G8 r8 |
         r8 [A16 G] A8 r r [B16 A] B8 r |
@@ -144,13 +126,7 @@ bassdux =
         r8 [c16 B] [c8 G] [As c16 B] [c8 d] |
         [G c16 B] [c8 d] [F16 G] As4 [G16 F] | 
         \octave c; [es c' b a] [g f es d] [c d es d] [c Bes! As! G] |
-                                    % I think we shouldn't need to force
-                                    % accidents here because they are in
-                                    % another octave range. WL
-
-%% I don't understand the complaint. Accidentals are valid for one octave range
-%% only. Without ! (and printed flat), this still is valid. HWN
-
+                                                    % -> \classic_accidentals
 %% 10
         [F bes as g] [f es d c] [Bes c d c] [Bes As G F] |
         [Es as g f] [es des c Bes] [As8 c' bes as] |
@@ -164,13 +140,13 @@ bassdux =
         [f d'16 c'] [d'8 fis] g4 r16 [G A B] |
         [c16 d es8~] [es16 A Bes c] [d es f8~] [f16 'b c d] |
 %% 20    
-        es8 r r e [f F Es! D] |     % see comment above about octave range
+        es8 r r e [f F Es! D] |                     % -> \classic_accidentals
         r [As G F] [G F16 Es] [F8 G] |
         [c16 d  es d] [c Bes As G] [F bes as g] [f es d c] |
         [Bes c d c] [Bes As G F] [Es as g f] [es d c Bes] |
         [As Bes c Bes] [As G F Es] [D g f es] [d c B A] |
 %% 25
-        g4 r4 r16 [G A B] [c d es f] |
+        G4 r4 r16 [G A B] [c d es f] |
         [g f as g] [f es d c] [B8 c16 B] [c8 G] |
         [As c16 B] [c8 d] [G c16 B] [c8 d] |
         [F16 G] As4 [G16 F] Es4 r8 es |
@@ -182,22 +158,20 @@ bassdux =
         >
     }
 
-
-
         
 \score {
-       \melodic < \multi 1;
-               < \multi 2; 
-                       \global 
-                       \dux
-                       \comes 
-               >
-               < \multi 2;
-                       \global
-                       \bassdux
-               >
-               
-       >
+    \melodic < \multi 1;
+                 < \multi 2; 
+                       \global 
+                       \dux
+                       \comes 
+                 >
+                 < \multi 2;
+                       \global
+                       \bassdux
+                 >
+             >
+
     \paper{}
     \midi {
         \tempo 4:84;
@@ -205,5 +179,3 @@ bassdux =
 }
 
 % EOF
-
-
index e613199be6f6880f78fed4b4d623af73aaeddde5..27a118a8d6f368ea760e669bb5566e3645a5a379 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 70
+PATCH_LEVEL = 71
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
diff --git a/lily/acceptor.cc b/lily/acceptor.cc
new file mode 100644 (file)
index 0000000..0164b83
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+  acceptor.cc -- implement Acceptor
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "acceptor.hh"
+Acceptor::Acceptor()
+{
+    iterator_count_  = 0;
+}
+
+IMPLEMENT_STATIC_NAME(Acceptor);
+IMPLEMENT_IS_TYPE_B(Acceptor);
index 4e3d25eb401dd986497da0431b54bdc73df99dd9..3f4c311937ce358a3f1305c266e7520583885f93 100644 (file)
@@ -56,10 +56,9 @@ void
 Clef_register::acknowledge_element(Score_elem_info info)
 {
     if (info.elem_l_->name() == Bar::static_name() ) {
-       if (!clef_p_){
-           create_clef();
+       create_clef();
+       if ( !clef_req_l_ )
            clef_p_->default_b_ = true;
-       }
     }
 }
 
@@ -79,8 +78,7 @@ Clef_register::do_try_request(Request * r_l)
 
     clef_req_l_ = creq_l->clefchange();
     
-    // do it now! Others have to read c0_pos.
-    read_req(creq_l->clefchange()); 
+    read_req(clef_req_l_); 
     return true;
 }
 
@@ -89,13 +87,11 @@ Clef_register::create_clef()
 {
     if (!clef_p_) {
        clef_p_ = new Clef_item;
-        announce_element(Score_elem_info(clef_p_,
-                                    clef_req_l_));
-    
-       clef_p_->read(*this);
+        announce_element(Score_elem_info(clef_p_,clef_req_l_));
     }
-
+    clef_p_->read(*this);
 }
+
 void
 Clef_register::do_process_requests()
 {
diff --git a/lily/global-acceptor.cc b/lily/global-acceptor.cc
new file mode 100644 (file)
index 0000000..057881a
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+  global-acceptor.cc -- implement 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "music.hh"
+#include "global-acceptor.hh"
+#include "score.hh"
+#include "score-column.hh"
+
+Global_acceptor::Global_acceptor()
+{
+    score_l_ = 0;
+    last_mom_ = 0;
+}
+
+Acceptor*
+Global_acceptor::ancestor_l(int)
+{
+    return this;
+}
+
+void
+Global_acceptor::add_moment_to_process(Moment m)
+{
+    if (m  > last_mom_)
+       return;
+    
+    for (int i=0; i <  extra_mom_pq_.size(); i++)
+       if (extra_mom_pq_[i] == m)
+           return;
+    extra_mom_pq_.insert(m);
+}
+
+int
+Global_acceptor::depth_i()const
+{
+    return 0;
+}
+
+void
+Global_acceptor::set_score(Score *s)
+{
+    score_l_ = s;
+    last_mom_ = score_l_->music_p_->time_int().max();
+}
+
+void
+Global_acceptor::modify_next(Moment &w)
+{
+    while (extra_mom_pq_.size() && 
+       extra_mom_pq_.front() <= w)
+       
+       w =extra_mom_pq_.get();
+}
+
+int
+Global_acceptor::moments_left_i()const
+{
+    return extra_mom_pq_.size();
+}
+
+void
+Global_acceptor::prepare(Moment)
+{
+}
diff --git a/lily/include/acceptor.hh b/lily/include/acceptor.hh
new file mode 100644 (file)
index 0000000..f298951
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+  acceptor.hh -- declare Acceptor
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef ACCEPTOR_HH
+#define ACCEPTOR_HH
+
+#include "string.hh"
+#include "lily-proto.hh"
+#include "interpreter.hh"
+#include "virtual-methods.hh"
+
+class Acceptor {
+public:
+    String id_str_;
+    
+    int iterator_count_;
+    
+    virtual Interpreter * interpreter_l() { return 0; }
+
+    /// Score_register = 0, Staff_registers = 1, etc)
+    virtual int depth_i()const=0;
+    virtual Acceptor *find_get_acceptor_l(String name, String id)=0;
+    virtual Acceptor *ancestor_l(int l=1)=0;
+    virtual ~Acceptor(){}
+    NAME_MEMBERS();
+    Acceptor();
+    virtual Acceptor *get_default_interpreter()=0;
+};
+
+class Interpreter : public virtual Acceptor {
+public:
+    virtual bool interpret_request_b(Request*) { return false;}
+};
+#endif // ACCEPTOR_HH
diff --git a/lily/include/global-acceptor.hh b/lily/include/global-acceptor.hh
new file mode 100644 (file)
index 0000000..6d18720
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  global-acceptor.hh -- declare Global_acceptor
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef GLOBAL_ACCEPTOR_HH
+#define GLOBAL_ACCEPTOR_HH
+
+#include "acceptor.hh"
+#include "pqueue.hh"
+
+class Global_acceptor : public virtual Acceptor {
+    PQueue<Moment> extra_mom_pq_;
+    Moment last_mom_;
+public:
+    Score *score_l_;
+    Global_acceptor();
+    int moments_left_i()const;
+    void modify_next(Moment&);
+    void add_moment_to_process(Moment);
+
+    virtual void set_score(Score*);
+    virtual void prepare(Moment);
+    virtual void process() {}
+    virtual void finish() {}
+    
+protected:
+    virtual int depth_i() const;
+    virtual Acceptor *ancestor_l(int);
+};
+
+
+
+#endif // GLOBAL_ACCEPTOR_HH
index 2d088a146b84040804b41aa0de93783f8222b3fc..f1988b0374c84e640d27ea2038185261ca789b9b 100644 (file)
@@ -24,7 +24,7 @@ struct Input_register : Input {
     String name_str_;
 
     void add(Input_register *);
-    
+    bool is_name_b(String);
     bool accept_req_b();
     bool accepts_b(String);
     void print() const;
index 92541c7211a94d28ed9f37e3f16d8c95fe80bc3d..6645ab00528e5a5999fe1dd8d205825719d9f835 100644 (file)
 
 #include "lily-proto.hh"
 
-class Interpreter {
-public:
-    int music_list_i_;
-    Interpreter();
-    virtual ~Interpreter();
-    virtual bool interpret_request_b(Request*) { return false;}
-};
-
 #endif // INTERPRETER_HH
index 447ea7e078d66f4764c2e6cbb70cf80c30d3b04f..0d8505d4257dd43152b3b7c82f79ecc26f6cef7c 100644 (file)
@@ -16,6 +16,7 @@ struct Key_item : Item {
     Array<int> pitch;
     Array<int> acc;
     int c_position;
+    bool default_b_;
 
     
     /* *************** */
@@ -26,7 +27,7 @@ struct Key_item : Item {
     void add(int pitch, int acc);
     void read(const Key_register&);
     void set_c_position(int);
-    void preprocess();
+    virtual void do_pre_processing();
     Molecule* brew_molecule_p()const;
 };
 
index 39a416bb647c1a829afe0d48c7f5970dbf0f6acb..ec9b5a2ab9894db08cd80e0bc506acbdbfbbf551 100644 (file)
@@ -29,6 +29,7 @@ struct Key_register : Request_register {
     Key_register();
     NAME_MEMBERS();
 private:
+    void create_key();
     
     void read_req(Key_change_req * r);
 };
index 380b5d105689ed45c962165eaef9cc0af8d789d4..5a2a9345789209990db0e3e6f28b63786b5a1d3d 100644 (file)
@@ -12,7 +12,7 @@
 
 struct My_lily_lexer;
 struct Absolute_dynamic_req;
-struct Accidental;
+struct Acceptor;
 struct Atom;
 struct Bar;
 struct Bar_register;
@@ -50,6 +50,7 @@ struct Element_group;
 struct Element_group_item;
 struct Feature;
 struct General_script_def;
+struct Global_acceptor;
 struct Group_change_req;
 struct Group_feature_req;
 struct Horizontal_align_item;
index 96005c8931a460363a0f1d5abaf7653f4e7aec6d..dea2478d24006fe5d38b9570c995d35bdd837dda 100644 (file)
@@ -7,8 +7,35 @@
 #ifndef MIDIWALKER_HH
 #define MIDIWALKER_HH
 
-#if 0
+
 #include "lily-proto.hh"
+
+#if 0
+
+// sketch. . .
+class Midi_register {
+};
+
+class Midi_group_reg : public Midi_register, public Acceptor {
+    
+};
+
+class Midi_staff_reg : public Midi_group_reg {
+};
+
+
+class Midi_note_reg : public Midi_register {
+    
+};
+
+class Midi_voice_reg : public Midi_group_reg, public Interpreter {
+    
+};
+
+class Midi_score_reg: public Midi_group_reg, public Global_acceptor {
+};
+
+
 #include "grouping.hh"
 #include "staff-walker.hh"
 #include "pcursor.hh"
index a375dc35d1e495bcc868dbe1543555885f57a13e..d2326a6e53639f9e0e05b62a37e462ce93150b82 100644 (file)
@@ -22,11 +22,11 @@ protected:
 public:
     Music_iterator *daddy_iter_l_;
     NAME_MEMBERS();
-    Register_group_register *report_to_reg_l_;
+    Acceptor *report_to_l_;
     
-    static Music_iterator* static_get_iterator_p(Music*,Register_group_register*);
+    static Music_iterator* static_get_iterator_p(Music*,Acceptor*);
     Music_iterator* get_iterator_p(Music*)const;
-    void set_reg(Register_group_register*);
+    void set_acceptor(Acceptor*);
     Music_iterator();
     virtual void next(Moment until);
     virtual Moment next_moment()const;
@@ -34,7 +34,7 @@ public:
     virtual ~Music_iterator();
     virtual void construct_children();
     void print()const;
-    virtual Register_group_register * get_req_acceptor_l();
+    virtual Acceptor * get_req_acceptor_l();
 };
 
 // duh.
index 0c47919b6b8fec3f255f5d1b06ef87066772e732..466b47361ba465fe89120c0718f24589846f2857 100644 (file)
 #include "plist.hh"
 #include "score-elem-info.hh"
 #include "register.hh"
+#include "acceptor.hh"
+
 
 /**
   Group a number of registers. Usually delegates everything to its contents.
   Postfix: group
   */
-class Register_group_register : public Request_register {
+class Register_group_register : public Request_register, public virtual Acceptor {
 protected:
+    
     Pointer_list<Request_register*> reg_list_;
     Link_array<Register_group_register> group_l_arr_;
     Link_array<Request_register> nongroup_l_arr_;
-    String id_str_;
     
     Array<Score_elem_info> announce_info_arr_;
     
@@ -33,25 +35,17 @@ protected:
     virtual bool removable_b()const;
 
 public:
-    int iterator_count_;
+    Input_register * ireg_l_;
     void check_removal();
     Register_group_register();
     ~Register_group_register();
     
-    /// Score_register = 0, Staff_registers = 1, etc)
-    virtual int depth_i()const;
-    /**
-      Go up in the tree. default: choose next parent
-     */
-    Register_group_register * ancestor_l(int l=1);
-    
-    Input_register * ireg_l_;
+
     
     /**
       Junk #reg_l#.
-
       Pre:
-        #reg_l# is in #reg_list_#
+      #reg_l# is in #reg_list_#
      */
     virtual void terminate_register(Request_register * reg_l);
     
@@ -75,12 +69,20 @@ public:
     virtual Register_group_register * find_register_l(String name,String id);
     virtual void do_announces();    
     virtual void announce_element(Score_elem_info);
-    virtual Register_group_register* find_get_reg_l(String name, String id);
-    virtual Register_group_register * get_default_interpreter();
-    
+
+        
     virtual void add(Request_register* reg_p);
 
     virtual bool contains_b(Request_register*)const;
+
+    virtual Acceptor* find_get_acceptor_l(String name, String id);
+    virtual Acceptor * get_default_interpreter();
+    /**
+      Go up in the tree. default: choose next parent
+     */
+    Acceptor * ancestor_l(int l=1);
+    int depth_i() const;
+
 };
 
 #endif // REGISTERGROUP_HH
index c628276429dd4e9d0ebe35339826ff3fca2d97bb..18a6e41a4259f169cb6c84438b99d5c6021d3325 100644 (file)
@@ -125,7 +125,6 @@ public:
     bool try_request(Request*);
 
     void post_move_processing();
-    virtual Interpreter * interpreter_l() { return 0; }
     
     Register_group_register * daddy_reg_l_;
 
index 80986a4f825a5e9313f965c026d63e384c651fe6..fb7f10872934d1619ba91e25ae640bde8b1623cb 100644 (file)
@@ -27,7 +27,7 @@
 
 class Score_column {
     friend class Score;
-    friend class Score_walker;
+    friend class Score_register;
 
     bool musical_b_;
     Moment when_;
index 569ddb7ac20c9722e11e95e7717bcc1253ea46e3..3c4c668ea6197100e5681db658450b00e31357f1 100644 (file)
 #define SCORE_REG_HH
 
 #include "register-group.hh"
-#include "pqueue.hh"
+#include "global-acceptor.hh"
 
-class Score_register : public Register_group_register {
+class Score_register : public Register_group_register, public Global_acceptor {
     Line_of_score * scoreline_l_;
-    Score * score_l_;
+
     
     Array<Item*> nobreak_item_p_arr_;
     Link_array<Score_elem> musical_item_p_arr_;
@@ -27,18 +27,22 @@ class Score_register : public Register_group_register {
     void set_cols(Score_column*,Score_column*);
     void typeset_all();
     
-    PQueue<Moment> extra_mom_pq_;
-    Moment last_mom_;
 public:
     NAME_MEMBERS();
 
-    void add_moment_to_process(Moment);
     Score_register();
-    int depth_i() const;
-protected:   
-    void set_score(Score * score_l);
-    
 
+protected:   
+    /* Global_acceptor interface */
+    virtual void set_score(Score * score_l);
+    virtual void prepare(Moment);
+    virtual void finish();
+    virtual void process();
+    virtual int depth_i() const { return Global_acceptor::depth_i();}
+    virtual Acceptor* ancestor_l(int l) { return Global_acceptor::ancestor_l(l);}
+
+protected:
+    /* Register_group_register interface */
     virtual Staff_info get_staff_info()const;
     virtual bool do_try_request(Request*);
     virtual void do_creation_processing();
@@ -49,7 +53,6 @@ protected:
     virtual void typeset_element(Score_elem*elem_p);
     virtual Paper_def * paper() const;
     virtual void do_pre_move_processing();
-    
 };
 
 #endif // SCORE_REG_HH
index 846144d0cdf7d97558ef03ffa58af1d5f63b18a2..56e29b851374a1fcc86b6b4c40ad58179cb1b0ba 100644 (file)
@@ -64,8 +64,8 @@ public:
     Score(Score const&);
 
 private:
+    void run_acceptor(Global_acceptor*);
     void paper_output();
-    void setup_music();
     /// do midi stuff
     void midi();
 
index f946e622fe9e1d4413bbecc770f46b2b84233c7d..d1a8b584e36047f25fb1b7a8ed860a3483986767 100644 (file)
 #include "input-register.hh"
 #include "register-group.hh"
 
+bool
+Input_register::is_name_b(String n)
+{
+    bool b = (n == name_str_);
+    for (int i=0; !b && i < alias_str_arr_.size(); i++)
+       b = b || (alias_str_arr_[i] == n);
+    return b;
+}
+
 void
 Input_register::print() const
 {
@@ -42,16 +51,18 @@ Input_register *
 lookup_reg(String nm)
 {
     for (int i=0; i < iregs_p_arr.size(); i++)
-       if (iregs_p_arr[i]->name_str_ == nm)
+       if (iregs_p_arr[i]->is_name_b(nm))
            return iregs_p_arr[i];
 
     error("can't find reg `" + nm + "'");
 }
 
+
+
 Input_register *
 Input_register::recursive_find(String nm)
 {
-    if ( nm == name_str_)
+    if ( is_name_b( nm) )
        return this;
 
     Input_register * r =0;
@@ -64,7 +75,7 @@ Input_register *
 Input_register::find_ireg_l(String nm)
 {
     for (iter(contains_ireg_p_list_.top(), i); i.ok(); i++)
-       if (i->name_str_ == nm)
+       if (i->is_name_b( nm))
            return i;
 
     return 0;
diff --git a/lily/interpreter.cc b/lily/interpreter.cc
deleted file mode 100644 (file)
index 15f400b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-  interpreter.cc -- implement Interpreter
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include <assert.h>
-#include "interpreter.hh"
-
-Interpreter::Interpreter()
-{
-    music_list_i_ =0;
-}
-
-Interpreter::~Interpreter()
-{
-//    assert(!music_list_i_ );
-}
index 54ee56b195179f1f951e678d21b76010b3a89d15..bf64b3e97983ab5a9877ac3322374c3a12fc09d6 100644 (file)
 const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
 const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
 
-
-
 Key_item::Key_item(int c)
 {
+    default_b_ = false;
     set_c_position(c);
 }
 
@@ -63,12 +62,22 @@ Key_item::brew_molecule_p()const
        Molecule m(a);
        output->add_right(m);   
     }
-    Molecule m(paper()->lookup_l()->fill(Box(
+    if ( pitch.size() ) {
+       Molecule m(paper()->lookup_l()->fill(Box(
        Interval(0, paper()->note_width()),
        Interval(0,0))));
-    if ( pitch.size() )
+
        output->add_right(m);
+    }
     return output;
 }
 IMPLEMENT_STATIC_NAME(Key_item);
 IMPLEMENT_IS_TYPE_B1(Key_item,Item);
+
+void 
+Key_item::do_pre_processing()
+{
+    if (default_b_ ) {
+       empty_b_ = transparent_b_ = (break_status_i() != 1);
+    }
+}
index 4effed1fee1dad133e154ffc5cb342df952d5a50..70dea983e99e528f5e61c6a786c12dfd1fd8a5bd 100644 (file)
 
 Key_register::Key_register()
 {
+    kit_p_ = 0;
     do_post_move_processing();
 }
 
+void
+Key_register::create_key()
+{
+    if (!kit_p_) {
+       int c0_i= *get_staff_info().c0_position_i_l_;   
+       
+       kit_p_ = new Key_item(c0_i);
+       announce_element(Score_elem_info(kit_p_,keyreq_l_));
+       kit_p_->read(*this);
+    }
+}
+
 bool
 Key_register::do_try_request(Request * req_l)
 {
@@ -33,7 +46,6 @@ Key_register::do_try_request(Request * req_l)
     if (keyreq_l_)
        return false;           // TODO
     keyreq_l_ = creq_l->keychange();
-    change_key_b_ = true;
     read_req(keyreq_l_);
     return true;
 }
@@ -41,23 +53,13 @@ Key_register::do_try_request(Request * req_l)
 void
 Key_register::acknowledge_element(Score_elem_info info)
 {
-    int c0_i= *get_staff_info().c0_position_i_l_;      
-        Command_req * r_l = info.req_l_->command() ;
+    Command_req * r_l = info.req_l_->command() ;
     if (r_l && r_l->clefchange()) {
-
-        if (!kit_p_) {
-           kit_p_ = new Key_item(c0_i);
-           announce_element(Score_elem_info(kit_p_,0));
-        }
-        change_key_b_ = true;
-    }
-    
-    if (info.elem_l_->name() == Bar::static_name()) {
-       default_key_b_ = true;
-        if (!kit_p_) {
-           kit_p_ = new Key_item(c0_i);
-           announce_element(Score_elem_info(kit_p_,0));
-        }
+       create_key();
+    } else if (info.elem_l_->name() == Bar::static_name()) {
+       if ( !keyreq_l_)
+           default_key_b_ = true;
+       create_key();
     }
 
 }
@@ -65,14 +67,10 @@ Key_register::acknowledge_element(Score_elem_info info)
 void
 Key_register::do_process_requests()
 {
-    int c0_i= *get_staff_info().c0_position_i_l_;
-
     if (key_.multi_octave_b_)
        assert(false); // TODO . 
     else if (keyreq_l_) {
-       kit_p_ = new Key_item(c0_i);
-       kit_p_->read(*this);
-       announce_element(Score_elem_info(kit_p_, keyreq_l_));
+       create_key();
     }
 }
 
@@ -80,6 +78,7 @@ void
 Key_register::do_pre_move_processing()
 { 
     if (kit_p_) {
+       kit_p_->default_b_ = default_key_b_;
        typeset_breakable_item( kit_p_);
        kit_p_ = 0;
     }
@@ -110,9 +109,8 @@ Key_register::do_post_move_processing()
 {
     keyreq_l_ = 0;
     default_key_b_ = false;
-    kit_p_ = 0;
-    change_key_b_ = false;
 }
+
 IMPLEMENT_STATIC_NAME(Key_register);
 IMPLEMENT_IS_TYPE_B1(Key_register,Request_register);
 ADD_THIS_REGISTER(Key_register);
index 7fbaf0c24ff25c8db1eb50ed365208742ce45e37..22f226d182bf1901300cbdc41d9bc1633ba8b0e3 100644 (file)
@@ -17,6 +17,7 @@
 #include "path.hh"
 #include "config.hh"
 #include "source.hh"
+#include "debug.hh"
 #include "my-lily-parser.hh"
 
 Sources* source_l_g = 0;
@@ -98,14 +99,22 @@ notice()
        "USA.\n";
 }
 
-static File_path * path_l =0;
+
+static File_path path;
 
 void
 do_one_file(String init_str, String file_str)
 {
+    if ( "" == path.find( init_str ) )
+       error ( "Can not find `" + init_str +"'");
+
+    if ( path.find( file_str ) == "" )
+       error ( "Can not find `" + file_str + "'");
+       
+    
     Sources sources;
     source_l_g = &sources; 
-    source_l_g->set_path(path_l);
+    source_l_g->set_path(&path);
     {
        My_lily_parser parser(source_l_g);
        parser.set_version_check(version_ignore_b_);
@@ -121,8 +130,6 @@ main (int argc, char **argv)
     debug_init();              // should be first
 
 
-    File_path path;
-    
     // must override (come before) "/usr/local/share/lilypond"!
     char const * env_l=getenv("LILYINCLUDE");
     if (env_l) {
@@ -131,8 +138,7 @@ main (int argc, char **argv)
     path.add( "" );
     path.add( String( DIR_DATADIR ) + "/init/" );
     
-    path_l = & path;
-    path_l->push(DIR_DATADIR );
+    path.push(DIR_DATADIR );
 
     Getopt_long oparser(argc, argv,theopts);
     cout << get_version_str() << endl;
index 2d404bfa5fdb30213579f4f913ad803e3522f991..3e8befb193c4b9bcf1305835fad9544e9adf879b 100644 (file)
@@ -8,8 +8,8 @@
 
 #include "music-list.hh"
 #include "music-iterator.hh"
-#include "register.hh"
-#include "register-group.hh"
+#include "acceptor.hh"
+#include "request.hh"
 #include "interpreter.hh"
 #include "debug.hh"
 
@@ -27,37 +27,37 @@ Music_iterator::print() const
 {
 #ifndef NPRINT
     mtor << name() << "{";
-    mtor << "report to " << report_to_reg_l_ << " (" << report_to_reg_l_->name() << ")\n";
+    mtor << "report to " << report_to_l_ << " (" << report_to_l_->name() << ")\n";
     mtor << "next at " << next_moment() << " ";
     do_print();
     mtor << "}\n";
 #endif
 }
 
-Register_group_register * 
+Acceptor*
 Music_iterator::get_req_acceptor_l()
 {
-    assert(report_to_reg_l_);
-    if (report_to_reg_l_->interpreter_l() )
-       return report_to_reg_l_;
+    assert(report_to_l_);
+    if (report_to_l_->interpreter_l() )
+       return report_to_l_;
 
-    set_reg( report_to_reg_l_->get_default_interpreter() );
-    return report_to_reg_l_;
+    set_acceptor( report_to_l_->get_default_interpreter() );
+    return report_to_l_;
 }
 
 void
-Music_iterator::set_reg(Register_group_register*reg)
+Music_iterator::set_acceptor(Acceptor*reg)
 {    
-    if (report_to_reg_l_==reg)
+    if (report_to_l_==reg)
        return;
 
-    if (report_to_reg_l_)
-       report_to_reg_l_->iterator_count_ --;
+    if (report_to_l_)
+       report_to_l_->iterator_count_ --;
 
-    report_to_reg_l_ = reg;
+    report_to_l_ = reg;
  
-    if (report_to_reg_l_)
-       report_to_reg_l_->iterator_count_ ++;
+    if (report_to_l_)
+       report_to_l_->iterator_count_ ++;
 }
 
 void
@@ -68,7 +68,7 @@ Music_iterator::construct_children()
 
 Music_iterator::~Music_iterator()
 {
-    set_reg(0);
+    set_acceptor(0);
 }
 
 Moment
@@ -91,7 +91,7 @@ Music_iterator::ok()const
 
 Music_iterator*
 Music_iterator::static_get_iterator_p(Music *m,
-                                     Register_group_register *report_l)
+                                     Acceptor *report_l)
 {
     Music_iterator * p =0;
     if (m->is_type_b( Change_reg::static_name()))
@@ -108,12 +108,16 @@ Music_iterator::static_get_iterator_p(Music *m,
      if ( m->is_type_b( Music_list::static_name())) {
        Music_list* ml = (Music_list*) m;
        if (ml -> type_str_ != "") {
-           p->set_reg(report_l->find_get_reg_l(ml-> type_str_, ml->id_str_));
+           Acceptor * a =report_l->
+               find_get_acceptor_l(ml-> type_str_, ml->id_str_);
+
+               
+           p->set_acceptor( a);
            
        } 
      } 
-     if (! p->report_to_reg_l_ )
-        p ->set_reg(report_l);
+     if (! p->report_to_l_ )
+        p ->set_acceptor(report_l);
     
     return p;
 }
@@ -121,7 +125,7 @@ Music_iterator::static_get_iterator_p(Music *m,
 Music_iterator*
 Music_iterator::get_iterator_p(Music*m)const
 {
-    Music_iterator*p = static_get_iterator_p(m,report_to_reg_l_);
+    Music_iterator*p = static_get_iterator_p(m,report_to_l_);
     p->daddy_iter_l_ = (Music_iterator*)this;
     p->construct_children();
     return p;
@@ -130,7 +134,7 @@ Music_iterator::get_iterator_p(Music*m)const
 Music_iterator::Music_iterator()
 {
     daddy_iter_l_ =0;
-    report_to_reg_l_ = 0;
+    report_to_l_ = 0;
     first_b_ = true;
 }
 
@@ -148,8 +152,11 @@ Chord_iterator::construct_children()
     for(iter(chord_C_->music_p_list_.top(), i); i.ok(); j++, i++) {
        
        Music_iterator * mi =  get_iterator_p( i.ptr());
-       set_reg(mi->report_to_reg_l_->ancestor_l( chord_C_->multi_level_i_ ));
-       children_p_list_.bottom().add( mi );
+       set_acceptor(mi->report_to_l_->ancestor_l( chord_C_->multi_level_i_ ));
+       if ( mi->ok() )
+           children_p_list_.bottom().add( mi );
+       else 
+           delete mi;
     }
 }
 void
@@ -221,8 +228,8 @@ Voice_iterator::construct_children()
 {
     if (ok()) {
        iter_p_ = Music_iterator::get_iterator_p( ptr() );      
-       if (iter_p_->report_to_reg_l_->depth_i() > report_to_reg_l_->depth_i())
-           set_reg(iter_p_->report_to_reg_l_);
+       if (iter_p_->report_to_l_->depth_i() > report_to_l_->depth_i())
+           set_acceptor(iter_p_->report_to_l_);
     }
 }
 
@@ -292,7 +299,7 @@ void
 Request_iterator::next(Moment m)
 {
     if ( first_b_) {
-       bool gotcha = daddy_iter_l_->report_to_reg_l_->
+       bool gotcha = daddy_iter_l_->report_to_l_->
            interpreter_l()->interpret_request_b(req_l_);
        if (!gotcha)
            req_l_->warning("Junking request: " + String(req_l_->name()));
@@ -337,13 +344,14 @@ IMPLEMENT_IS_TYPE_B1(Change_iterator,Music_iterator);
 void
 Change_iterator::next(Moment mom)
 {
+#if 0
     Register_group_register *group_l =
-       report_to_reg_l_->find_get_reg_l(change_l_->type_str_, 
+       report_to_l_->find_get_reg_l(change_l_->type_str_, 
                                         change_l_->id_str_);
 
-    report_to_reg_l_->daddy_reg_l_->remove_register_p(report_to_reg_l_);
-    group_l->add(report_to_reg_l_);
-
+    report_to_l_->daddy_reg_l_->remove_register_p(report_to_l_);
+    group_l->add(report_to_l_);
+#endif
     Music_iterator::next(mom);
 }
 
@@ -361,7 +369,7 @@ Voice_element_iterator::construct_children()
 /*
     if ( daddy_iter_l_ 
         && daddy_iter_l_->is_type_b(Voice_iterator::static_name() )) {
-       set_reg(daddy_iter_l_-> get_req_acceptor_l());
+       set_acceptor(daddy_iter_l_-> get_req_acceptor_l());
     } else if (daddy_iter_l_
               && daddy_iter_l_-> is_type_b( Chord_iterator::static_name() )) {
 
index a4b7f13a8e25a7d075290b7c5e3333f727859aeb..69be888d94c3bebcdea41904490e6bacb2c9dcae 100644 (file)
@@ -42,6 +42,7 @@ My_lily_parser::print_declarations()
 {
 #ifndef NPRINT
     String s = "";
+    
     if (init_parse_b_) 
        s = "Init";
     if (!monitor->silence(s+"Declarations") && check_debug) {
@@ -50,31 +51,25 @@ My_lily_parser::print_declarations()
 #endif   
 }
 
-void
-My_lily_parser::do_init_file()
-{
-    init_parse_b_ = true;
-    set_debug();
-    lexer_p_->new_input(init_str_, source_l_);
-}
-
 void
 My_lily_parser::parse_file(String init, String s)
 {
     lexer_p_ = new My_lily_lexer;
     init_str_ = init;
     
+    *mlog << "Parsing ... ";
     
+    init_parse_b_ = true;
+    lexer_p_->new_input( init, source_l_);
+    do_yyparse();
+    print_declarations();
 
-    *mlog << "Parsing ... ";
-    lexer_p_->new_input(s, source_l_);
-    if (!lexer_p_->source_file_l()) {
-       warning("Can not find toplevel file. Ignoring " + s);
-       return; 
-    }
+    init_parse_b_ = false;
+    lexer_p_->new_input( s , source_l_);
     do_yyparse();
     print_declarations();
 
+    
     if(!define_spot_array_.empty())
        warning("Braces don't match.");
 }
index 02033be2e441dd9f05c4385c4ba9ac88178b1f4d..acf7bb59d1513870c8cc00f48f67ff7f387bc41a 100644 (file)
@@ -114,6 +114,7 @@ Note_head::brew_molecule_p() const
        s = p->lookup_l()->rest(balltype_i_, streepjes_b);
     }
     out = new Molecule(Atom(s));
+    out->translate_x( x_dir_i_ * s.dim.x.length() );
     if (dots_i_) {
        Symbol d = p->lookup_l()->dots(dots_i_ );
        Molecule dm;
index 1beab2956e9310dbaddde800bf83231ea8f8c717..cf4b75c8c2d63ce35637eb5cdaf9a2293bf8b372 100644 (file)
@@ -79,17 +79,13 @@ yylex(YYSTYPE *s,  void * v_l)
        My_lily_parser   *pars_l = (My_lily_parser*) v_l;
        My_lily_lexer * lex_l = pars_l->lexer_p_;
        
-       if (pars_l->first_b_) {
-               pars_l->first_b_ = false;
-               pars_l->do_init_file();
-       }
-
        lex_l->lexval_l = (void*) s;
        return lex_l->yylex();
 }
 
 
 %}
+
 %pure_parser
 
 /* tokens which are not keywords */
@@ -189,7 +185,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %type <melreqvec>      pitch_list 
 %type <midi>   midi_block midi_body
 %type <moment> duration_length
-%type <music>  init_melodic init_lyrics init_music
+
 %type <music>  Music transposed_music
 %type <musiclist> Voice Voice_body 
 %type <chord>  Chord Chord_body
@@ -220,16 +216,9 @@ mudela:    /* empty */
        | mudela error
        | mudela check_version { } 
        | mudela add_notenames { }
-       | mudela init_end       {}
        | mudela input_register_spec { add_global_input_register($2); }
        ;
 
-init_end: INIT_END ';'         {
-           THIS->print_declarations();
-           THIS->init_parse_b_ = false;
-           THIS->set_debug();
-       }
-       ;
 check_version:
        VERSION STRING ';'              {
                if (*$2 != MUDELA_VERSION) {
@@ -299,7 +288,7 @@ declaration:
                $$ = new Script_id(*$1, $3, SCRIPT_IDENTIFIER);
                delete $1;
        }
-       | declarable_identifier '=' init_music  {
+       | declarable_identifier '=' Music  {
                $$ = new Music_id(*$1, $3, MUSIC_IDENTIFIER);
                delete $1;
        }
@@ -370,7 +359,7 @@ score_body:         {
        | SCORE_IDENTIFIER {
                $$ = $1->score(true);
        }
-       | score_body init_music {
+       | score_body Music      {
                $$->music_p_ = $2;
        }
        | score_body paper_block                {
@@ -443,27 +432,6 @@ midi_body: {
 
 
 
-/*
-       let the lexer switch mode.
-*/
-init_music:
-       init_melodic    { $$ = $1; }
-       | init_lyrics   { $$ = $1; }
-       ;
-
-init_lyrics:
-       LYRIC 
-               { THIS->lexer_p_->push_lyric_state(); } 
-       Music
-               { $$ = $3; THIS->lexer_p_->pop_state(); }
-       ;
-
-init_melodic:
-       MELODIC 
-               { THIS->lexer_p_->push_note_state(); } 
-       Music
-               { $$=$3; THIS->lexer_p_->pop_state(); }
-       ;
 
 /*
        MUSIC
@@ -497,6 +465,15 @@ Music:
        | Chord                 { $$ = $1; }
        | transposed_music      { $$ = $1; }
        | MUSIC_IDENTIFIER      { $$ = $1->music(true); }
+       | MELODIC 
+               { THIS->lexer_p_->push_note_state(); } 
+       Music
+               { $$=$3; THIS->lexer_p_->pop_state(); }
+
+       | LYRIC 
+               { THIS->lexer_p_->push_lyric_state(); } 
+       Music
+               { $$ = $3; THIS->lexer_p_->pop_state(); }
        ; 
 
 Chord:
index 4d60d50fb5a935f5a8fdff29e6f10ac2ca6357d8..5812b2fb04252092b76997d6f5c0db2c6d242747 100644 (file)
@@ -42,7 +42,6 @@ Register_group_register::removable_b()const
 Register_group_register::Register_group_register()
 {
     ireg_l_ =0;
-    iterator_count_ =0;
 }
 
 void
@@ -162,7 +161,7 @@ Register_group_register::terminate_register(Request_register*r_l)
     delete reg_p;
 }
 
-IMPLEMENT_IS_TYPE_B1(Register_group_register,Request_register);
+IMPLEMENT_IS_TYPE_B2(Register_group_register,Request_register, Acceptor);
 IMPLEMENT_STATIC_NAME(Register_group_register);
 ADD_THIS_REGISTER(Register_group_register);
 
@@ -190,19 +189,28 @@ Register_group_register::find_register_l(String n, String id)
     return r;
 }
 
-Register_group_register*
-Register_group_register::find_get_reg_l(String n,String id)
+Acceptor*
+Register_group_register::find_get_acceptor_l(String n,String id)
 {
-    Register_group_register * ret=0;
-    if (ireg_l_-> find_ireg_l( n )) {
+    Acceptor * ret=0;
+    Input_register * ireg_l= ireg_l_-> recursive_find ( n );
+    if (ireg_l ) {
        ret = find_register_l(n,id);
        if (!ret) {
-           ret = ireg_l_-> find_ireg_l(n) -> get_group_register_p();
-           add (  ret );
-           ret ->id_str_ = id;
+           Register_group_register * group = 
+               ireg_l-> get_group_register_p();
+           
+           add(group);
+           ret = group;
+           
+           if (group->ireg_l_->is_name_b( n ) )
+               ret ->id_str_ = id;
+           else
+               return ret->find_get_acceptor_l(n,id);
+
        }
     } else if (daddy_reg_l_)
-       ret =daddy_reg_l_->find_get_reg_l(n,id);
+       ret =daddy_reg_l_->find_get_acceptor_l(n,id);
     else {
        warning("Can't find or create `" + n + "' called `" + id + "'\n");
        ret =0;
@@ -216,7 +224,7 @@ Register_group_register::depth_i()const
     return daddy_reg_l_->depth_i()  + 1;
 }
 
-Register_group_register*
+Acceptor*
 Register_group_register::ancestor_l(int l)
 {
     if (!l || !daddy_reg_l_)
@@ -273,7 +281,7 @@ Register_group_register::get_staff_info()const
     return inf;
 }
 
-Register_group_register*
+Acceptor*
 Register_group_register::get_default_interpreter()
 {
     if ( interpreter_l() )
index b83c1e3872a17be58f3f3663632d263c6d46d286..35de3a344da22bee594c6557c53b4e7b6234d303 100644 (file)
 #include "musical-request.hh"
 #include "score-column.hh"
 
-int
-Score_register::depth_i()const
-{
-    return 0;
-}
 
 void
 Score_register::set_score(Score *s)
 {
-    score_l_ = s;
+    Global_acceptor::set_score(s);
     scoreline_l_ = s->pscore_p_->super_elem_l_->line_of_score_l_;
-    last_mom_ = score_l_->music_p_->time_int().max();
 }
 
 Score_register::Score_register()
 {
-    score_l_ = 0;
     scoreline_l_ =0;
     command_column_l_ =0;
     musical_column_l_ =0;
 }
 
  
+void
+Score_register::prepare(Moment w)
+{
+    Score_column* c1 = new Score_column(w);
+    Score_column* c2 = new Score_column(w);
+    
+    c1->musical_b_ = false;
+    c2->musical_b_ = true;
+    
+    score_l_->cols_.bottom().add(c1);
+    score_l_->cols_.bottom().add(c2);
+    set_cols(c1,c2);
+
+
+    post_move_processing();
+}
+void
+Score_register::finish()
+{
+    check_removal();
+    do_removal_processing();
+}
 
 void
 Score_register::do_creation_processing()
@@ -66,6 +81,14 @@ Score_register::do_removal_processing()
     typeset_all();
 }
 
+void
+Score_register::process()
+{
+       process_requests();
+       do_announces();
+       pre_move_processing();
+       check_removal();
+}
 
 void
 Score_register::announce_element(Score_elem_info info)
@@ -120,6 +143,7 @@ Score_register::typeset_breakable_item(Item * nobreak_p)
        nobreak_item_p_arr_.push(nobreak_p);
     }
 }
+
 void
 Score_register::typeset_all()
 {
@@ -190,14 +214,3 @@ IMPLEMENT_IS_TYPE_B1(Score_register,Register_group_register);
 IMPLEMENT_STATIC_NAME(Score_register);
 ADD_THIS_REGISTER(Score_register);
 
-void
-Score_register::add_moment_to_process(Moment m)
-{
-    if (m  > last_mom_)
-       return;
-    
-    for (int i=0; i <  extra_mom_pq_.size(); i++)
-       if (extra_mom_pq_[i] == m)
-           return;
-    extra_mom_pq_.insert(m);
-}
index 3d7ad33de0abcb4b3d3e7be56bb0cf0d187e2b77..f2899451e7612e10c821d63254156e3c56174d3b 100644 (file)
@@ -34,55 +34,29 @@ Score::Score(Score const &s)
 }
 
 void
-Score::setup_music()
+Score::run_acceptor(Global_acceptor * acc_l)
 {
-    *mlog << "\nSetting up requests..." << flush;
-    
-    Score_register * score_reg =  
-       (Score_register*)lookup_reg("Score_register")->get_group_register_p();
-
-    score_reg->set_score (this);
+    acc_l->set_score (this);
     Music_iterator * iter = Music_iterator::static_get_iterator_p(music_p_, 
-                                                                 score_reg);
+                                                                 acc_l);
     iter->construct_children();
 
-    while ( iter->ok() || score_reg->extra_mom_pq_.size() ) {
+    while ( iter->ok() || acc_l->moments_left_i() ) {
        Moment w = INFTY;
        if (iter->ok() ) {
            w = iter->next_moment();
            iter->print();
        }
-       if (score_reg->extra_mom_pq_.size() && 
-           score_reg->extra_mom_pq_.front() <= w)
-           
-           w = score_reg->extra_mom_pq_.get();
-
-       mtor << "processing moment " << w << "\n";
-
-       Score_column* c1 = new Score_column(w);
-       Score_column* c2 = new Score_column(w);
-       
-       c1->musical_b_ = false;
-       c2->musical_b_ = true;
-       
-       cols_.bottom().add(c1);
-       cols_.bottom().add(c2);
-       score_reg->set_cols(c1,c2);
-       
-       score_reg->post_move_processing();
+       acc_l->modify_next( w );
+       acc_l->prepare(w);
        iter->next( w );
-       
-       score_reg->process_requests();
-       score_reg->do_announces();
-       score_reg->pre_move_processing();
-       score_reg->check_removal();
+       acc_l->process();
     }
     delete iter;
-    score_reg->check_removal();
-    score_reg->do_removal_processing();
-    delete score_reg;
+    acc_l->finish();
 }
 
+
 void
 Score::process()
 {
@@ -94,14 +68,20 @@ Score::paper()
 {
     if (!paper_p_)
        return;
-
+    
+    *mlog << "\nCreating elements ..." << flush;
+    pscore_p_ = new PScore(paper_p_);
+    
+    Score_register * score_reg =  
+       (Score_register*)lookup_reg("Score_register")->get_group_register_p();
+    run_acceptor( score_reg );
+    delete score_reg;
+    
     if( errorlevel_i_){
        // should we? hampers debugging. 
        warning("Errors found, /*not processing score*/");
 //     return;
     }
-    pscore_p_ = new PScore(paper_p_);
-    setup_music();
     do_cols();
     
     clean_cols();    // can't move clean_cols() farther up.
@@ -124,7 +104,6 @@ Score::paper()
 void
 Score::clean_cols()
 {
-#if 1
     for (iter_top(cols_,c); c.ok(); ) {
        if (!c->pcol_l_->used_b()) {
            delete c.remove_p();
@@ -133,7 +112,6 @@ Score::clean_cols()
            c++;
        }
     }
-#endif
 }
 
 PCursor<Score_column*>
index 13303f5d72a0afb8012764f57a0b4a319f44d0d3..4900432eea9cddc4d9eaafc95825aecfd91fb5d2 100644 (file)
@@ -2,8 +2,8 @@
 
 Begin3
 Title: LilyPond
-Version: 0.0.70pre
-Entered-date: 06/29/97
+Version: 0.0.71pre
+Entered-date: 07/01/97
 Description: LilyPond is a program which converts a music-script (mudela) into
 TeX output, or MIDI to produce multi-staff scores. Features include multiple
 meters, clefs, keys, lyrics, versatile input-language, cadenzas
@@ -13,7 +13,7 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: pcnov095.win.tue.nl /pub/lilypond/  
-       300k lilypond-0.0.70pre.tar.gz
+       300k lilypond-0.0.71pre.tar.gz
 Alternate-site: 
 Original-site: 
 Platform: unix/win32, GNU C++
index ec4ab4ea4b153e7c26cdf0f7a086ba07a1411de5..fcf5c03a722b5cc6804dd418d7182898b192ff47 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.0.70pre
+Version: 0.0.71pre
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.70pre.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.71pre.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
index 1622b990cbc639e8053d73e9aed59cde329ceb70..0c71bea3a17a54b8a4f6aef360fe3035000cab43 100644 (file)
@@ -27,7 +27,7 @@
         \font\hslurdfont=xslhd16
         \font\hslurhfont=xslhz20
         \font\musicfnt=musix16
-        \font\dynfont=cmbxti12
+        \font\dynfont=cmbxti10
         \font\musicdraw=musixsps
         \font\mathfont=cmsy8
 }