]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.1.13 release/0.1.13
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 11 Sep 1997 13:39:19 +0000 (15:39 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 11 Sep 1997 13:39:19 +0000 (15:39 +0200)
324 files changed:
.dstreamrc
AUTHORS.text
BUGS
COPYING
Documentation/AUTHORS.pod
Documentation/CodingStyle.pod
Documentation/faq.pod
Documentation/index.pod
Documentation/lilypond.pod
Documentation/mudela-course.doc
Documentation/mudela-man.doc
Documentation/other-packages.pod
Documentation/vocabulary-data
INSTALL.text
NEWS
README
TODO
VERSION
bin/convert-mudela.in
bin/make-website.in
flower/NEWS
flower/choleski.cc
flower/diagonal-storage.cc
flower/directed-graph.cc
flower/dstream.cc
flower/flower-debug.cc
flower/full-storage.cc
flower/include/assoc.hh
flower/include/cursor.hh
flower/include/cursor.icc
flower/include/cursor.tcc
flower/include/dictionary-iter.hh [new file with mode: 0644]
flower/include/dictionary.hh [new file with mode: 0644]
flower/include/flower-debug.hh
flower/include/fproto.hh
flower/include/link.icc
flower/include/list.hh
flower/include/list.icc
flower/include/list.tcc
flower/include/nscalar.hh [new file with mode: 0644]
flower/include/pcursor.hh
flower/include/pqueue.hh
flower/include/rational.hh
flower/include/scalar.hh
flower/include/string-data.hh
flower/include/string-data.icc
flower/include/string.hh
flower/include/varray.hh
flower/include/vector.hh
flower/lgetopt.cc
flower/matrix-storage.cc
flower/matrix.cc
flower/nscalar.cc [new file with mode: 0644]
flower/path.cc
flower/scalar.cc
flower/string-convert.cc
flower/string.cc
flower/stringtest.cc
init/engraver.ly
init/midi.ly
init/paper16.ly
init/paper20.ly
init/performer.ly
init/symbol.ly
init/table16.ly
input/Makefile
input/abbrev.ly
input/beams.ly
input/cadenza.ly
input/collisions.ly
input/coriolan-alto.ly
input/fugue1.ly [deleted file]
input/gallina.ly
input/keys.ly
input/kortjakje.ly
input/multi.ly
input/pedal.ly
input/prelude1.ly [deleted file]
input/rhythm.ly
input/scales.ly
input/scripts.ly
input/scsii-menuetto.ly
input/slurs.ly
input/standchen-16.tex
input/standchen.ly
input/toccata-fuga-E.ly
input/twinkle-pop.ly
input/twinkle.ly
input/wohltemperirt.ly [deleted file]
input/wtk1-fugue1.ly [new file with mode: 0644]
input/wtk1-fugue2.ly [new file with mode: 0644]
input/wtk1-prelude1.ly [new file with mode: 0644]
input/wtk1-prelude2.ly.m4 [new file with mode: 0644]
lib/duration-convert.cc
lib/includable-lexer.cc
lib/include/binary-source-file.hh
lib/include/duration-convert.hh
lib/include/duration.hh
lib/include/input.hh
lib/include/source-file.hh
lib/include/source.hh
lib/include/warn.hh
lib/simple-file-storage.cc
lib/source-file.cc
lily/VERSION
lily/abbreviation-beam-engraver.cc
lily/atom.cc
lily/audio-column.cc
lily/audio-element.cc
lily/audio-item.cc
lily/axis-group.cc
lily/bar-column-grav.cc
lily/bar-column.cc
lily/bar-grav.cc
lily/bar-number-grav.cc
lily/bar.cc
lily/beam-grav.cc
lily/beam.cc
lily/chord-iterator.cc
lily/clef-grav.cc
lily/collision-grav.cc
lily/collision.cc
lily/command-request.cc
lily/dot-column-grav.cc [new file with mode: 0644]
lily/dot-column.cc [new file with mode: 0644]
lily/dots.cc [new file with mode: 0644]
lily/dynamic-grav.cc
lily/engraver-group.cc
lily/engraver.cc
lily/global-gravs.cc [deleted file]
lily/global-performers.cc [deleted file]
lily/global-translator.cc
lily/head-column.cc [deleted file]
lily/head-grav.cc
lily/header.cc
lily/identifier.cc
lily/include/abbreviation-beam-engraver.hh
lily/include/audio-column.hh
lily/include/audio-element.hh
lily/include/audio-item.hh
lily/include/axes.hh
lily/include/axis-group-administration.hh [new file with mode: 0644]
lily/include/axis-group-element.hh [new file with mode: 0644]
lily/include/axis-group-item.hh
lily/include/axis-group-spanner.hh
lily/include/axis-group.hh
lily/include/bar-column-grav.hh
lily/include/bar-grav.hh
lily/include/bar-number-grav.hh
lily/include/beam-grav.hh
lily/include/clef-grav.hh
lily/include/collision-grav.hh
lily/include/command-request.hh
lily/include/dot-column-grav.hh [new file with mode: 0644]
lily/include/dot-column.hh [new file with mode: 0644]
lily/include/dots.hh [new file with mode: 0644]
lily/include/dynamic-grav.hh
lily/include/elem-group.hh
lily/include/engraver-group.hh
lily/include/engraver.hh
lily/include/global-performers.hh [deleted file]
lily/include/global-translator.hh
lily/include/head-column.hh [deleted file]
lily/include/head-grav.hh
lily/include/header.hh
lily/include/identifier.hh
lily/include/input-translator.hh
lily/include/key-grav.hh
lily/include/key-performer.hh
lily/include/lily-proto.hh
lily/include/line-group-grav.hh
lily/include/local-key-grav.hh
lily/include/lyric-engraver.hh
lily/include/lyric-performer.hh
lily/include/main.hh
lily/include/meter-grav.hh
lily/include/meter-performer.hh
lily/include/midi-def.hh
lily/include/molecule.hh
lily/include/music-iterator.hh
lily/include/music-output-def.hh
lily/include/music.hh
lily/include/my-lily-lexer.hh
lily/include/note-column-grav.hh [deleted file]
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/note-performer.hh
lily/include/notename-table.hh
lily/include/paper-def.hh
lily/include/parseconstruct.hh
lily/include/performer-group-performer.hh
lily/include/performer.hh
lily/include/property-iterator.hh [new file with mode: 0644]
lily/include/rest-collision-grav.hh
lily/include/rest-collision.hh
lily/include/rest-column.hh [deleted file]
lily/include/rest-grav.hh [new file with mode: 0644]
lily/include/rest.hh [new file with mode: 0644]
lily/include/rhythmic-column-grav.hh [new file with mode: 0644]
lily/include/rhythmic-head.hh [new file with mode: 0644]
lily/include/score-align-grav.hh
lily/include/score-elem-info.hh
lily/include/score-grav.hh
lily/include/score-halign-grav.hh
lily/include/score-performer.hh
lily/include/script-grav.hh
lily/include/slur-grav.hh
lily/include/span-bar-grav.hh
lily/include/span-score-bar-grav.hh
lily/include/staff-info.hh
lily/include/staff-performer.hh
lily/include/staff-sym-grav.hh
lily/include/stem-grav.hh
lily/include/stem.hh
lily/include/swallow-grav.hh
lily/include/swallow-perf.hh
lily/include/symtable.hh
lily/include/text-grav.hh [deleted file]
lily/include/tie-grav.hh
lily/include/timing-grav.hh
lily/include/timing-translator.hh [new file with mode: 0644]
lily/include/translation-property.hh [new file with mode: 0644]
lily/include/translator-change.hh [new file with mode: 0644]
lily/include/translator-group.hh [new file with mode: 0644]
lily/include/translator.hh
lily/include/type-swallow-trans.hh [new file with mode: 0644]
lily/include/vertical-align-grav.hh
lily/include/voice-group-gravs.hh [deleted file]
lily/ineq-constrained-qp.cc
lily/input-translator.cc [deleted file]
lily/key-grav.cc
lily/key-item.cc
lily/key-performer.cc
lily/line-group-grav.cc
lily/local-key-grav.cc
lily/local-key-item.cc
lily/lyric-grav.cc
lily/lyric-performer.cc
lily/main.cc
lily/meter-grav.cc
lily/meter-performer.cc
lily/midi-def.cc
lily/midi-stream.cc
lily/molecule.cc
lily/music-iterator.cc
lily/music-output-def.cc
lily/music.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/note-column-grav.cc [deleted file]
lily/note-column.cc
lily/note-performer.cc
lily/note.cc
lily/notehead.cc
lily/p-score.cc
lily/paper-def.cc
lily/parser.y
lily/performer-group-performer.cc
lily/performer.cc
lily/property-iterator.cc [new file with mode: 0644]
lily/qlp.cc
lily/qlpsolve.cc
lily/request-iterator.cc
lily/rest-collision-grav.cc
lily/rest-collision.cc
lily/rest-column.cc [deleted file]
lily/rest-grav.cc [new file with mode: 0644]
lily/rest.cc [new file with mode: 0644]
lily/rhythmic-column-grav.cc [new file with mode: 0644]
lily/rhythmic-head.cc [new file with mode: 0644]
lily/score-align-grav.cc
lily/score-align-gravs.cc
lily/score-elem.cc
lily/score-grav.cc
lily/score-halign-grav.cc
lily/score-performer.cc
lily/score.cc
lily/scores.cc
lily/script-grav.cc
lily/slur-grav.cc
lily/span-bar-grav.cc
lily/span-bar.cc
lily/span-score-bar-grav.cc
lily/spanner.cc
lily/staff-info.cc
lily/staff-performer.cc
lily/staff-sym-grav.cc
lily/stem-grav.cc
lily/stem.cc
lily/swallow-grav.cc
lily/swallow-perf.cc
lily/symtable.cc
lily/template3.cc
lily/template4.cc
lily/template6.cc
lily/tex-slur.cc
lily/tie-grav.cc
lily/tie.cc
lily/timing-grav.cc
lily/timing-translator.cc [new file with mode: 0644]
lily/translation-property.cc [new file with mode: 0644]
lily/translator-ctors.cc [new file with mode: 0644]
lily/translator-group.cc [new file with mode: 0644]
lily/translator.cc
lily/type-swallow-trans.cc [new file with mode: 0644]
lily/vertical-align-grav.cc
lily/voice-group-gravs.cc [deleted file]
lily/voice-iterator.cc
make/lilypond.lsm
make/lilypond.spec
mf/Makefile
mf/TODO [new file with mode: 0644]
mf/dimen.tex [new file with mode: 0644]
mf/dyn.tex
mf/dyn10.mf
mf/ital-f.mf
mf/ital-m.mf
mf/ital-p.mf
mf/ital-s.mf
mf/ital-z.mf
tex/dimen.tex [deleted file]
tex/dyndefs.tex [deleted file]
tex/lilyponddefs.tex
tex/taupindefs.tex

index 6e401c89cf084cb81610858feccbd9419f9aa08d..dd4016464d4cae38ddf58241c291b736e0a377b8 100644 (file)
@@ -11,12 +11,14 @@ Declarations                1
 # FlexLexer debug
 InitLexer              1
 Lexer                  1
-Matrix                 1
 
 
 # flower lib
 File_path              1
+Matrix                 0
+Vector                 1
 
+# lily
 Atom                   0
 Bar                    0
 Beam                   0
@@ -33,7 +35,7 @@ Engraver_group_engraver 0
 Group_change_req       0
 Head_column            0
 Idealspacing           0
-Ineq_constrained_qp    0
+Ineq_constrained_qp    1
 Input_translator       0
 Item                   0
 Key_item               0
@@ -41,6 +43,7 @@ Lookup                        1
 Line_spacer            0
 Melodic_req            0
 Midi_def               0
+Midistrings            1
 Mixed_qp               0
 Music                  0
 Music_iterator         0
@@ -48,8 +51,8 @@ My_lily_lexer         1
 Note_head              0
 Note_performer         0
 Note_req               0
-PCol                   0
-PScore                 0
+Paper_col                      1
+Paper_score                    1
 Paper_def              0
 Paperdef               0
 Performer              0
@@ -84,8 +87,6 @@ Text_def              0
 Text_req               0
 Time_description       0
 Voice                  0
-Voice_element          0
-Voice_element_iterator  0
 Voice_iterator         0
 Word_wrap              0
 delete_identifiers     1
index ce11d2466346891d66ab006ecc15d31d2ac06d91..3c7e95d0a0c9e44ad697adf2a05fd73dde1ce47f 100644 (file)
@@ -24,15 +24,15 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
            make/*.make, */Makefile parts of
            Documentation/mudela.pod, lib/*source-file*,
            lib/duration.cc, lib/source*, flower/*{list,cursor}*,
-           lily/rest-collision*, conflily, cygnus w32 stuff,
-           lily/*perf*, some input files
+           lily/rest-collision*, lily/*abbreviation*, conflily,
+           cygnus w32 stuff, lily/*perf*, some input files
 
            and corresponding header files.
 
 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\bS\bS
        +\bo   Mats Bengtsson <matsb@s3.kth.se>, parts of clef-
            reg.cc, clef-item.cc swedish notenames, testing,
-           general comments.
+           general comments, duration logs/longa/brevis etc
 
        +\bo   Werner Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc
            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
 
 
 
-30/Aug/97                LilyPond 0.1.11                        1
+11/Sep/97                LilyPond 0.1.13                        1
 
 
diff --git a/BUGS b/BUGS
index 31bb2b7211621ade80f619fcd35076a586234a68..5977e0d3ceca756e41050cda55e910a55a03d791 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1,54 +1,42 @@
-Document reintroduced deficiencies.
-
-* placement of bar-numbers
-
-**************** 
-vi1=\melodic{
-  \meter 4/4;
-  \octave c'';
-
-  B8 G G G16 A B8 G G G16 A | 
-       
-}
-
-vi2=\melodic{
-  \meter 4/4;
-  \octave c'';
-
- r16
-}
-
-%{
-bc=\melodic{
-  \clef "bass";
-  \meter 4/4;
-  \octave c;
-
-  G1 |
-}
-%}
-
-\score{
-  < \multi 3;
-    \vi1
-    \vi2
-
-  >
-
-  \paper{
-    geometric=1.2;
-    unitspace=8.\mm;
-    linewidth=18.\cm;
-    gourlay_maxmeasures=4.;
-    gourlay_energybound = 70000.;
-       basicspace = 2.8\pt;
-  }
-}
-***************************
-
-       \score { < 
-               \melodic { \id "Staff" ""; c'4 g'4 }
-               \lyric {   \id "Lyric" ""; hello4 bye4 < a chord > }
-               \lyric {   \id "Lyric" ""; bye4 hello4 }
-               \melodic { \id "Staff" ""; c'4 g'4 }
-       > }
+Document Really Ugly Bugs (coredumps assert fails, etc)
+
+[Solaris]
+
+Stack frame overwrite on Solaris 2.x (this will produce a seg
+fault, signal 11).  Stacktrace
+
+       Engraver_group_engraver::Engraver_group_engraver(int)
+       Score_engraver::Score_engraver( )
+       get_group_engraver_p()
+
+We don't know a fix or workaround, but compiling without optimisation
+might help (Without -O2 optimisation, my execs run fine on Solaris;
+without -O2, but with purify, it dumps core)
+
+
+[Linux Intel]
+
+LilyPond occasionally crashes while parsing the initialisation files.
+This is a very obscure bug, and usually entering the commandline
+differently "fixes" it.
+
+       lilypond input.ly 
+
+and
+
+       lilypond -I. ./input.ly 
+
+makes a difference
+
+Typical stacktrace:
+
+       SIGSEGV
+       __libc_malloc (bytes=16384)
+       ?? ()
+       yyFlexLexer::yy_create_buffer ()
+       Includable_lexer::new_input (this=0x8209a00, s={strh_ = {
+               :
+
+
+I get bitten by this every once in a while, and I am very interested
+in hints what might be wrong.
diff --git a/COPYING b/COPYING
index 792d014757275d2da7335387ff36a790cc2e06f7..77b1b7108a5c29cc66f3f05db90533b89357a2b0 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -11,7 +11,7 @@ input files (which are in the subdirectory input/ )
                       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          675 Mass Ave, Cambridge, MA 02139, USA
+     59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -313,8 +313,8 @@ the "copyright" line and a pointer to where the full notice is found.
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with this program; if not, write to the Free Software Foundation,
+    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 Also add information on how to contact you by electronic and paper mail.
 
index 2d40fefc7f7613300815a3ceb075ec4fe588b921..c910644bfa3be863863fac4c3f691c6e65b98db7 100644 (file)
@@ -22,8 +22,9 @@ Jan Nieuwenhuizen <jan@digicash.com>, http://www.digicash.com/~jan
 
 lily/midi-*, mi2mu/*, parts flower/string*.cc, make/*.make, */Makefile
 parts of Documentation/mudela.pod, lib/*source-file*, lib/duration.cc,
-lib/source*, flower/*{list,cursor}*,  lily/rest-collision*, conflily,
-cygnus w32 stuff, lily/*perf*, some input files
+lib/source*, flower/*{list,cursor}*, lily/rest-collision*,
+lily/*abbreviation*, conflily, cygnus w32 stuff, lily/*perf*, some
+input files
 
 and corresponding header files.
 
@@ -36,7 +37,8 @@ and corresponding header files.
 =item *
 
 Mats Bengtsson <matsb@s3.kth.se>, parts of clef-reg.cc, clef-item.cc
-swedish notenames, testing, general comments.
+swedish notenames, testing, general comments, duration
+logs/longa/brevis etc
 
 =item *
 
index 5e0048a36475082c29cec15f2783d6a398ec4043..07dad8dfa3890c17e3a0bf06dfe81895d2689846 100644 (file)
@@ -4,7 +4,9 @@ CodingStyle - standards while programming for GNU LilyPond
 
 =head1 DESCRIPTION
 
-We use these standards while doing programming for GNU LilyPond
+We use these standards while doing programming for GNU LilyPond.  If
+you do some hacking, we appreciate it if you would follow this rules,
+but if you don't, we still like you.
 
 Functions and methods do not return errorcodes, but use assert for
 checking status. 
@@ -297,6 +299,12 @@ use no, or pick less silly, abbrvs.
 
 use non-ambiguous postfixes C<identifier_name_type_modifier[_modifier]>
 
+=item *
+
+There is no need for Hungarian if the scope of the variable is small,
+ie. local variables, arguments in function definitions (not
+declarations).
+
 =back
 
 Macros, C<enum>s and C<const>s are all uppercase,
@@ -396,6 +404,16 @@ reference
 
 =over 5
 
+=head2 Adjective
+
+Adjectives such as global and static should be spelled out in full.
+They come before the noun that they refer to, just as in normal english.
+
+foo_global_i: a global variable of type int commonly called "foo".
+
+static class members do not need the static_ prefix in the name (the
+Class::var notation usually makes it clear that it is static)
+
 =item C<loop_i>
 
 Variable loop: an integer
@@ -428,6 +446,18 @@ Variable bar: an C<Int*> that you must not delete
 
 Generally default arguments are taboo, except for nil pointers.
 
+The naming convention can be quite conveniently memorised, by
+expressing the type in english, and abbreviating it
+
+       static Array<int*> foo
+
+C<foo> can be described as "the static int-pointer user-array", so you get
+
+       foo_static_l_arr
+       
+
+
+
 =head1 MISCELLANEOUS
 
 For some tasks, some scripts are supplied, notably creating patches, a
index 2a505782f0eb12ad2edf7badddb5430f5666794d..db80b409cf239b3147324a4643cdb497b8339d01 100644 (file)
@@ -202,6 +202,21 @@ saves us a I<lot> of trouble.
 
 =head2 Running
 
+Q: I don't get midi-output, even if I use B<-M>
+
+A: Your \score should include a \midi block, eg.
+
+       \score {
+               \melodic { c c g g }
+               \paper {}       
+               \midi {
+                       \output "myfile.mid";
+                       \tempo 4=70;
+               }
+
+The B<-M> option was added to LilyPond because processing the \paper
+block is so slow.
+
 Q: I get 
 
        can't load library 'libflower.so'
index f1b1603b7e903cffcf849871c058a5245ba8118b..9a36c9f3fb51626a1c35959d2b43a312dd580995 100644 (file)
@@ -9,7 +9,11 @@ visual or auditive output: it can typeset formatted sheet music to a
 TeX file and and (mechanical) performances to MIDI files.
 
 This is not a Fanmail/Hype page. These pages were entirely created from
-the LilyPond package-sources
+the LilyPond package-sources. 
+
+B<These pages are created from the latest development
+snapshots of LilyPond>.  You can look at the bottom if you want to
+know which version this was.
 
 =head2 Examples
 
index 1142476eb95fc8261a3fb9998170d91464d29be3..1b59db999720ead43a0e12eb80facdce09b4a905 100644 (file)
@@ -22,7 +22,8 @@ add F<FILE> to the search path for input files.
 
 =item B<-M,--midi>
 
-do midi output only.
+This disables TeX output. If you have a \midi definition, it will do
+the midi output only.
 
 =item B<-d,--debug>,
 
index da2be2526b09129be4f479ce5e1356c0aed2ed2e..196ea9d1b0b4019bfddc3b6e639da52af2db8156 100644 (file)
@@ -7,6 +7,7 @@
 \usepackage{a4wide}
 \title{Mudela and LilyPond crash course}
 \author{Han-Wen Nienhuys}
+\def\file#1{{\texttt{#1}}}
 
 \begin{document}
 \maketitle
 \emph{This document is not complete yet. It's just a brief blurb which
   skimps some features of Mudela}
 
+\section{Who is who}
+
+This document describes two different things
+\begin{description}
+\item[Mudela] A language for defining music.
+  
+\item[LilyPond] A package (the only one existing :-) which can 
+  read a mudela file and interpret it. 
+  
+  The name ``LilyPond'' does not have much to do with the purpose of
+  the package, but we have a special emotional attachment with the
+  name.  (Of course we are not telling why we chose it; this is an
+  excercise for the reader, most of the vital clues are contained in
+  the documentation and the source code.  If you have guess, then let
+  me know)
+\end{description}
 
 \section{Overview}
 
-Mudela is a language for specifying music. LilyPond is a
-program which converts such a specification into formatted sheet
-music, or MIDI output.
 
-Please note that some examples not only demonstrate features but also
-some lurking bugs. If can't understand what is happening, it might
-just be my (lack of) programming skills.
+Let's start with a very simple example, we will enter ``twinkle twinkle
+little star.''  We start with the most important part: the notes.
 
+Imagine being in a music-lesson, and that you made an error playing
+``twinkle twinkle''.  Your teacher asks you to read out loud the
+melody of the song, just to verify your eyesight.  You would probably
+say something like
+\begin{quote}
+  A quarter note C, Another quarter note C, a quarter G, another one, etc.
+\end{quote}
 
-\begin[fragment,verbatim]{mudela}
-  { c4 e4 g4 }
+Mudela tries to capture this verbal presentation of sheet music, in
+the following way.  The first line of twinkle twinkle is written in
+as follows
+\begin{verbatim}
+c4 c4 g4 g4 a4 a4 g2
+f4 f4 e4 e4 d4 d4 c2
+\end{verbatim}
+
+The notes are entered with names (a, b, c) combined with numbers
+(2,4).  The names designate the pitches, the numbers the durations: 4
+is a quarter note, 2 a half note, etc.
+
+Now all we have to specify what should be done with the music.  We
+want a paper version, so we combine the music with a ``output this on
+paper'' statement.  These two are combined in ``score'' block.  This
+is the final result with its output.   We add a comment (the line
+starting with \verb+%+).
+Put this into a file
+called \file{twinkle.ly}
+
+\begin{verbatim}
+
+% twinkle, v1
+\score {
+        \melodic { 
+                c4 c4 g4 g4 a4 a4 g2
+                f4 f4 e4 e4 d4 d4 c2
+        }
+        \paper {}
+} 
+\end{verbatim}
+
+there are a few things to note about this example:
+
+The braces are grouping characters. In general, in mudela data entry
+for a data section called ``foobar'' looks like this:
+
+\begin{verbatim}
+\foobar { ...... }
+\end{verbatim}
+
+To see if it actually works, we run it through LilyPond.  Invoke the
+command 
+\begin{verbatim}
+        lilypond twinkle.ly
+\end{verbatim}
+When LilyPond starts working it will produce various ``operator
+pacification'' messages, which you can safely ignore for now.  The run
+should have left a file called \file{lelie.tex} in your working
+directory.  You can process that file with TeX, and it will look like
+this:
+
+\begin{mudela}
+\score {
+        \melodic { 
+                c4 c4 g4 g4 a4 a4 g2
+                f4 f4 e4 e4 d4 d4 c2
+        }
+        \paper {}
+} 
 \end{mudela}
 
+As you can see, this is the song that we wanted, albeit a little
+low-pitched.  You would probably want a version of the song which has
+all notes an octave higher.  This can be done by adding a
+\verb+\octave+ command to the source.  This sets the default octave
+for all notes.  Another convenience is the default duration: if you do
+not specify a duration with the notename, the last explicitly entered
+is used.  The improved version reads thus
 
-Basics: the \verb+%+ introduces a comment. All music is inside a
-\verb+\score+ block which represents one movement, ie one contiguous
-block of music.  Voices are grouped by \verb+{+ and \verb+}+ and
-chords by \verb+<+ and \verb+>+.
 
 \begin[verbatim]{mudela}
+  % twinkle v2
 \score {
+        \melodic { 
+                \octave c';
+                c4 c g g a a g2
+                f4 f e e d d c2
+        }
+        \paper {}
+} 
+\end{mudela}
+
+
+\begin[verbatim]{mudela}
+  \score {
         \melodic {      % {...} is a voice
         c'4 g'4         % c and g are pitches, 4 is the duration
                         % (crotchet/quarter note)
@@ -50,6 +145,17 @@ chords by \verb+<+ and \verb+>+.
 } 
 \end{mudela}
 
+
+\begin[fragment,verbatim]{mudela}
+  { c4 e4 g4 }
+\end{mudela} 
+
+Basics: the \verb+%+ introduces a comment. All music is inside a
+\verb+\score+ block which represents one movement, ie one contiguous
+block of music.  Voices are grouped by \verb+{+ and \verb+}+ and
+chords by \verb+<+ and \verb+>+.
+
+
 The \verb+\octave+ command controls the default pitch (octave). If you
 do not specify duration, the last one entered is used.  The
 \verb+\paper+ block contains parameters for spacing and dimensions.
index 7c28d71e341eb9be39168b14f3746a5777c9d36f..185823924a260ebc4c4e66009cf0e3ef8bf32bbb 100644 (file)
@@ -41,7 +41,8 @@ and up-to-date definition, see \file{lily/parser.y} and
 
 As a related note, you should take a look at the examples and the init
 files, as this document does not cover every aspect of mudela yet, and
-may be out of date.
+may be out of date.\footnote{Ok, I am being pessimistic here.  This
+  just is a disclaimer.  Docs usually are written after the program itself.}
 
 
 \section{Basic elements}
@@ -49,7 +50,7 @@ may be out of date.
 \subsection{Files}
 
 The de-facto extension of Mudela is \file{.ly}. Files may be included by
-entering \verb+include+ at the start of a line:
+entering \verb+\include+ at the start of a line:
 
 \begin{verbatim}
 \include "a_file.ly"
@@ -88,8 +89,7 @@ alphabetic characters only.
 Identifiers in their normal form consist start with a backslash, a
 alpha character, followed by alpha-numerics. Identifiers can contain
 any characters (except whitespace, 
-\verb+$+ and \verb+%+), if you use this
-construct:
+ and \verb+%+), if you use this construct:
 
 \begin{verbatim}
 \$i'm_a_weird!!!identifier
index 7850eb4316d88b9b51172e744b35a9f49a673449..26b645fe06fe2f5bc48bfe597d0cf745e6080543 100644 (file)
@@ -9,6 +9,8 @@ packages. Feel free to add info (and mail it to me).
 
 =head2 Free packages (with source)
 
+=over 4
+
 =item Rosegarden, http://www.bath.ac.uk/~masjpf/rose.html
 
 A Notation editor/Sequencer for X (windows95 port underway). Outputs musictex.
@@ -43,18 +45,20 @@ A Preprocessor for MusiXTeX by Don Simons
 =item Musictex, http://www.gmd.de/Misc/Music/
 
 MusicTeX is a macro package for TeX to typeset polyphonic or
-instrumental music.  It is originally written by Daniel Taupin, Ross
-Mitchell and Andreas Egler. 
+instrumental music.  It was written by Daniel Taupin.  Now obsoleted
+by MusiXTeX and OpusTeX.
 
 It includes a full-featured set of fonts.
 
 =item MusiXTeX, http://www.gmd.de/Misc/Music/
 
-Daniel Taupin's branch of MusicTeX.
+Newer version of MusicTeX.  It also contains contributions by Ross
+Mitchell and Andreas Egler.  Daniel Taupin's branch still carries this
+name.
 
-=item OpusTeX, http://www.inf.ethz.ch/department/Department.html/achermann/opustex
+=item OpusTeX, http://www.inf.ethz.ch/people/achermann/opustex
 
-Andreas Egler's branch of MusicTeX.
+Andreas Egler's branch of MusiXTeX.
 
 =item ABC2MTeX, http://www.gre.ac.uk/~c.walshaw/abc
 
@@ -71,15 +75,23 @@ available on request. (?)
 A TeX macro package for typesetting single-staff music by Angelika
 Schofer & Andrea Steinbach. With some fonts
 
+=back
 
 =head2 Free (zero cents)
 
+=over 4
+
 =item Calliope, http://www.cl.cam.ac.uk/users/wfc/
 
 A NeXT package by William F. Clocksin. Requires Adobe fonts.
 
+
+=back
+
 =head2 Proprietary
 
+=over 4
+
 =item Scribe, http://adu1.adu.lattrobe.edu.au/Music/Scribe.html
 
 A formatter for medieval scores.
@@ -99,7 +111,8 @@ Notation editor for W95 and Mac
 
 =item Sibelius, http://www.acorn.co.uk/developers/sibelius/Home
 
-Notation/engraving on Acorn machines. 
+Notation editor on Acorn machines.  Their developers call it ``best
+notation program available''.
 
 =item Finale
 
@@ -117,6 +130,20 @@ A shareware windows package
 
 =item Musicator
 
+=item WolfGang, http://www.unige.ch/lettres/armus/music/wolfgang.html
+
+=item Amadeus, Jerker.Elsgard@abc.se
+
+Professional and expensive (DM 4000,--) engraving.  Designed as a
+batch program (like LilyPond).  It is aimed at publishers. Its history
+is more than fifteen years and Amadeus has been running under
+different Unix clones.  It uses MIDI-keyboard input
+
+
+
+=back
+
+
 =head2 Unknown
 
 =item MusE
index c2ed3f098f950433e0a19fbea1eb1332380e04ac..4f11d9d8f682428f683a0d493aea566eafef600b 100644 (file)
@@ -31,6 +31,7 @@ b
 cadence:cadence::::
 cadence harmonique:harmonic cadence::::
 cadence mélodique:melodic cadence::::
+:cue-notes:Stichnoten::stichnoten:
 caractère:character::::
 chaîne de trilles:chain of trills::::
 chevron:chevron::::
@@ -45,7 +46,7 @@ cl
 comma:comma::::
 comma enharmonique::::
 comma pythagoricien::::
-comma syntonique::::
+comma syntonique: : : : : 
 consonance:consonant interval; consonance:::consonant:
 contralto:contralto::::
 contre-temps:contro-time::::
@@ -53,28 +54,28 @@ contre-temps irr
 contre-temps régulier:regular contro-time::::
 coulé:slur:::binding, bindingsboog:
 courbe rythmique:rythmic curve::::
-cresendo:opening angular bracket::::
+:opening angular bracket::::cresendo
 croche:eighth note::::
-decrescendo:closing angular bracket::::
+:closing angular bracket::::decrescendo
 degré [de la gamme]:degree [of the scale]::::
 demi-pause:half rest::::
-demi-soupir:eighth rest::::
-demi-ton:semitone::::
+demi-soupir:eighth rest:::achtste rust:
+demi-ton:semitone:::halve toon:
 demi-ton chromatique:chromatic semitone::::
 demi-ton diatonique:diatonic semitone::::
-diapason:pitch pipe; tuning fork::::
+diapason:pitch pipe; tuning fork:::stemfluitje; stemvork:
 diminué (intervalle):diminished (interval)::::
 dissonance:dissonant interval; dissonance::::
-dièse:sharp::::
+dièse:sharp:::kruis:
 do:C::::
 do central:middle C:::::
 doigté:::::
 doigté de pédale:::::
-dominante:dominant::::
+dominante:dominant:::dominant:
 double barre:double bar line::::
-double bémol:double flat::::
+double bémol:double flat:::dubbelmol:
 double croche:sixteenth note::::
-double dièse:double sharp::::
+double dièse:double sharp:::dubbelkruis:
 double triolet:double triplet::::
 duolet:duplet::::
 durée:duration::::
@@ -86,13 +87,13 @@ extension d'intervalle:extension of interval::::
 fa:F::::
 figure de note:kind of note::::
 figure de silence:kind of rest::::
-fioriture:cadenza::::
+fioriture::::cadens:cadenza
 forme du mode mineur ancien:ancient form (diatonic minor scale)::::
 forme harmonique:harmonic form (diatonic minor scale)::::
 forme mélodique:melodic form (diatonic minor scale)::::
-gamme:scale::::
-gamme chromatique:chromatic scale::::
-gamme diatonique majeure:diatonic major scale::::
+gamme:scale:::toonladder:
+gamme chromatique:chromatic scale:::chromatische toonladder:
+gamme diatonique majeure:diatonic major scale:::diatonische majeur toonladder:
 gamme diatonique mineure:diatonic minor scale::::
 gammes enharmoniques:enharmonic scales::::
 gammes relatives:relative scales::::
@@ -100,7 +101,7 @@ genre chromatique:chromatic type::::
 genre diatonique:diatonic type::::
 genre enharmonique:enharmonic type::::
 groupe irrégulier:irregular group::::
-grupetto:turn; gruppetto::::
+grupetto:turn; gruppetto:::dubbelslag:
 hauteur:pitch::::
 huitième de soupir:thirty-second rest::::
 incise:motive::::
@@ -136,7 +137,8 @@ mode majeur:major mode::::
 mode mineur:minor mode::::
 modulation:modulation::::
 mordant:mordent::::
-mouvement:tempo; movement::::
+:::::
+mouvement:tempo; movement:::deel:
 mouvement conjoint:conjunct movement::::
 mouvement disjoint:disjunct movement::::
 mouvement lent:slow tempo::::
@@ -154,17 +156,18 @@ notes enharmoniques:enharmonic notes::::
 nuance:shading::::
 octave:octave::::
 ornement:embellishment; accessory::::
-partition:score::::
+:part:::partij:
+partition:score:::partituur:
 pause:whole rest::::
 phrase:phrase::::
 phrasé:phrasing::::
 pizzicato:dash over/below::::
-point:dot::::
+point:dot:::punt:
 point d'orgue:pause::::
 point et liaison combinés:dot and curved line combined::::
 pointillés::::
 portamento:underline over/below::::
-portée:staff::::
+portée:staff:::(noten)balk; partij:
 portées:staves::::
 quadruple croche:sixty-fourth note::::
 quart de soupir:sixteenth rest::::
@@ -176,13 +179,13 @@ renversement d'intervalle:inversion of interval::::
 renvoi:return sign::::
 respiration:artificial rest::::
 :double whole note::breve:brevis:breve
-ronde:whole note::::
-rythme:rythm::::
+ronde:whole note:::hele noot:
+rythme:rythm:::ritme:
 ré:D::::
-seconde:second::::
+seconde:second::::secunde
 seizième de soupir:sixty-fourth rest::::
 sensible:leading note::::
-septième:seventh::::
+septième:seventh:::septiem:septime
 sextolet:sextuplet::::
 si:B::::
 signes indicateurs de nuance:shading signs::::
@@ -190,17 +193,17 @@ silence:rest::::
 sixain:sextuplet::::
 sixte:sixth::::
 sol:G::::
-soprano:soprano::::
+soprano:soprano:::sopraan:
 soupir:quarter rest::::
 sous-dominante:subdominant::::
 sous-tonique:subtonic::::
-staccato:dot over/below::::
+:dot over/below::::staccato
 sus-dominante:superdominant::::
 sus-tonique:supertonic::::
-syncope:syncopation; upbeat::::
+syncope:syncopation; upbeat:::syncope:
 syncope irrégulière:irregular syncopation::::
 syncope régulière:regular syncopation::::
-temps:beat::::
+temps:beat:::tel:
 temps binaire:binary beat::::
 temps faible:weak beat::::
 temps fort:strong beat::::
index 5329182265b491586fc94980f0ad6fbbbb259a80..2a831c996609a6edfd12f165fca8cd1c74af6ec0 100644 (file)
@@ -61,7 +61,7 @@ R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 
 
 
-8/Aug/97                 LilyPond 0.1.11                        1
+8/Aug/97                 LilyPond 0.1.13                        1
 
 
 
@@ -127,7 +127,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
 
 
 
-8/Aug/97                 LilyPond 0.1.11                        2
+8/Aug/97                 LilyPond 0.1.13                        2
 
 
 
@@ -193,7 +193,7 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
 
-8/Aug/97                 LilyPond 0.1.11                        3
+8/Aug/97                 LilyPond 0.1.13                        3
 
 
 
@@ -259,7 +259,7 @@ I\bI\bI\bIN\bN\bN\bNS\bS\bS\bST\bT\bT\bTA\bA\bA\bAL\bL\bL\bLL\bL\bL\bLI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 
 
 
-8/Aug/97                 LilyPond 0.1.11                        4
+8/Aug/97                 LilyPond 0.1.13                        4
 
 
 
@@ -325,7 +325,7 @@ R\bR\bR\bRE\bE\bE\bED\bD\bD\bDH\bH\bH\bHA\bA\bA\bAT\bT\bT\bT L\bL\bL\bLI\bI\bI\bIN\bN\bN\bNU\bU\bU\bUX\bX\bX\bX
 
 
 
-8/Aug/97                 LilyPond 0.1.11                        5
+8/Aug/97                 LilyPond 0.1.13                        5
 
 
 
@@ -391,6 +391,6 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 
 
-8/Aug/97                 LilyPond 0.1.11                        6
+8/Aug/97                 LilyPond 0.1.13                        6
 
 
diff --git a/NEWS b/NEWS
index 8100d47a2ebb35b464e81a30a32c446b10d33934..6724d8e86011befefc86d0ae9be638e48450a15f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,16 +1,49 @@
-pl 12.jcn4
-       - fixed dynamic f, magstep bug
+
+pl 13
+       - big Rest/notehead rewrite:
+         * separated Rest, Note_head and Dots
+         * Dot_column: dots are now chord-wise aligned 
+         * Rhythmic_head is base for Rest, Note_head
+         * Merged Note_column and Rest_column
+         * Rest_engraver
+       - grand Engraver/Translator/Performer rewrite.
+         * properties:  \property voice.dir = -1 (mudela 0.1.3)
+         * Input_translator junked, now Translators are generated
+by the parser (mudela 0.1.4)
+         * Translator changing: \translator Staff=oboesolo
+         * Translator preselect: \type Staff=bla < c4 >. (mudela 0.1.5)
+         * Engraver/Performer now derived of Translator.
+         * Engraver_group_engraver/ Performer_group_performer derived of
+       Translator_group
+         * renamed: Voice -> Thread, Voice_group -> Voice
+       - renamed Audio_score to Performance
+       - junked mididef statics
+       - Audio debug output
+       - bf: excess [] in scsi
+       - bf: swallow \skips
+       - bf: don't crash on infinite dims
+       - renamed wohltemperirt to wtk1-fugue2
+       - bf: address in GPL
+       - bf: errors in stdin
+       - bf: stop if errors in init files
+       - bf: move stem too when doing collisions
+       - Molecule::add_XXXX -> Molecule::add_at_edge ()
+       - doco updeet: why no midi FAQ, index, CodingStyle hungarian
 
 pl 12.jcn3
        - try at better dynamic font, copied from cmbxti10: mf/*
-
-pl 12.jcn2
        - typesetting abbreviation beams; abbreviation-*
        - some simple abbrev fixes + code cleanup (dank je, lieverd)
-
-pl 12.jcn1
        - typesetting simple abbreviations: c4:16 === [c16 c c c]
 
+pl 11mb
+       - Support also for \longa in duration-convert.cc, init/ and tex/
+         files. (MB)
+
+********
+sep 3
+
+
 pl 12
        - bf: don't redefine tex primitives like \textfont and  \mathfont
        - nicer broken slurs (?)
@@ -18,6 +51,7 @@ pl 12
        - robustness in Lookup::*slur
        - bf: mi2mu: warn if 0-length string in midi-file
        - output id-footer
+
 ********
 sep 1
 
diff --git a/README b/README
index d6881435f339a6780a612ee7ca3943f67cbbd072..331108b90f6f7332abea2278562b35c2717de51f 100644 (file)
--- a/README
+++ b/README
@@ -19,9 +19,9 @@ version, then this is version is *not* meant for producing nice output
 2. REQUIREMENTS
 
 For the compilation and running of LilyPond you need some additional
-packages. The most unusual one of this are the mf sources to
-MusixTeX. Please refer to the installation instructions on how to
-obtain and install them.
+packages. The most unusual one of this are the metafont sources to
+MusixTeX-fonts. Please refer to the installation instructions on how
+to obtain and install them.
 
 
 3. INSTALLATINON
@@ -32,7 +32,7 @@ in the toplevel directory, as INSTALL.text
 
 4. DOCUMENTATION
 
-Please refer to the directory Documentation/ for the real doco.
+The real documentation is the directory Documentation/
 
 To generate the pretty-printed docs, you have to run configure first,
 and then do this:
@@ -45,9 +45,9 @@ You can also simply read the .pod sources. They are ASCII text.
 
 5. COMMENTS
 
-LilyPond is a long way from finished and polished. I do appreciate
-criticism, comments, bugreports, patches, etc. Please send e-mail to
-the mailing lists. See Documentation/links.pod for more info 
+LilyPond is a long way from finished and polished.  I do appreciate
+criticism, comments, bugreports, patches, etc.  Please send e-mail to
+the mailing lists.  See Documentation/links.pod for more info
 
 
 6. DOZE
@@ -64,46 +64,7 @@ The website also contains the complete documentation
        http://www.stack.nl/~hanwen/lilypond/index.html
 
 
-
 7. CAVEATS
 
-Solaris
-
-Stack frame overwrite on Solaris 2.x (this will produce a seg
-fault, signal 11).  Stacktrace
-
-       Engraver_group_engraver::Engraver_group_engraver(int)
-       Score_engraver::Score_engraver( )
-       get_group_engraver_p()
-
-We don't know a fix or workaround, but compiling without optimisation
-might help (Without -O2 optimisation, my execs run fine on Solaris;
-without -O2, but with purify, it dumps core)
-
-
-Linux (intel)
-
-LilyPond occasionally crashes while parsing the initialisation files.
-This is a very obscure bug, and usually entering the commandline
-differently "fixes" it.
-
-       lilypond input.ly 
-
-and
-
-       lilypond -I. ./input.ly 
-
-makes a difference
-
-Typical stacktrace:
-
-       SIGSEGV
-       __libc_malloc (bytes=16384)
-       ?? ()
-       yyFlexLexer::yy_create_buffer ()
-       Includable_lexer::new_input (this=0x8209a00, s={strh_ = {
-               :
-
-
-I get bitten by this every once in a while, and I am very interested
-in hints what might be wrong.
+Please read the file BUGS for some ugly bugs.  This especially 
+applies to Solaris 2.x and Linux-Intel unix users.
diff --git a/TODO b/TODO
index 12aee1d8b043efd8601b9aba7ee7f656ee5196cd..ac8a74e7d6c0ce1ae0ded41556921645f5a9e2f2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,9 +6,20 @@ 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
 
-
-       * move to OpusTeX fonts
-
+       * use properties for:
+       - Text_style
+       - default_octave
+       - plet?
+       - default_duration?
+       - default abbreviation
+       - Staff_sym size
+       - default tempo.
+       - font size
+       - bartypes (get rid of derived Span_bar_engravers)
+       - cadenza mode? 
+       - MIDI instrument
+       - staff title
+       
        * check out egcs
        
        * give Items/Spanners access to unbroken originals      
@@ -33,7 +44,7 @@ PROJECTS
        * Spring_spacer:
        - write a faster Spring_spacer ( without matrices if possible )
        - relate energybound to linelen unitspace fontsize etc.
-       -used fixed fp
+       - used fixed point fp
 
        * \header
        - revise lexer mode
@@ -79,6 +90,24 @@ languages:
        - ABC? 
        - SMDL?
 
+       * robustification
+       - check write errors
+       - check read errors
+       
+
+       * placement of bar-numbers
+
+******************
+
+       \score { < 
+               \melodic { \id "Staff" ""; c'4 g'4 }
+               \lyric {   \id "Lyric" ""; hello4 bye4 < a chord > }
+               \lyric {   \id "Lyric" ""; bye4 hello4 }
+               \melodic { \id "Staff" ""; c'4 g'4 }
+       > }
+
+******************
+
        * add to MIDI output:
        - tempo change
        - repeat
@@ -86,11 +115,12 @@ languages:
        - dynamics etc.
 
        * grace notes
-       - adapt for multiple font sizes.
        - make separate class for Grace_*_engravers 
        (which is at Voice_gravs level)
        - make encapsulated spacing problems.
 
+       * On-demand loading of simple-engravers
+
        * accidentals per Voice_group
 
        * Convert all ref/bib stuff into BibTeX.
@@ -127,10 +157,6 @@ languages:
        - Doc (C) stuff of sheet music
        - a tutorial
 
-       * separate Score_elem settings in user-settable (properties
-       .. ) and non-user-settable part. Maybe use something like X-resources:
-       "Staff=oboe*dir: 0", "Staff=*.Voice_group=solo*dir: 1"
-
        * TeX spanners , use texbeam.cc as an example (smallish)
        - Glissando
        - trill
@@ -138,22 +164,16 @@ languages:
 
        * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
        - [c8. c32 c32]
-       - interbeam height
-       - doc on Rhythmic_grouping
+       - doc on Rhythmic_grouping
        - general shaving on Beam and Stem
        - use plet grouping
-       - abbreviations [c2 c2]1/2
        - separate visual from rhythmic info even more
        - beams over bars
 
-
-       * Redo font  
-       - rename mf fonts to avoid conflicts with musixtex
-       - use own fonts/update musixtex fonts/find older (c)-less fonts
+       * Redo fonts
+       - adapt for multiple font sizes.
        - hack up mf sources for decent spacing info (and then 
        read AFM/TFM directly, for text too)
-       - use MF to generate rules.
-       - rewrite : make a metafont iso font
 
        * Font support:
        - mixed fontsizes
@@ -165,7 +185,6 @@ languages:
        - beam stem showthrough, inter beam sizes (french vs german style)
 
        * Collisions
-       - bring Collision::do_pre_processing to haircutter
        - left/right note balls should be handled by Collision:
        < \multi 2; { \stem 1; <b c> } { <f as b> } >
 
@@ -204,7 +223,6 @@ SEVERELY LACKING:
 
        * markers
 
-       * abbreviations c4=16
 
 INPUTLANGUAGE
 
@@ -229,15 +247,12 @@ INPUTLANGUAGE
 
        * bracket (bracketplets)
 
-       * \duration 8; e*2/3
-
        * configure pitch_byte
 
        * rest name configurable
 
        * Raw request syntax
 
-
 SMALLISH PROJECTS
 
        * progress when creating MIDI elts.
@@ -250,9 +265,7 @@ SMALLISH PROJECTS
 
        * write Dynamic_line (to group dynamics horizontally)
 
-       * write Rest_collision
-
-       * use Real for y positions.
+       * use Real for all y positions.
 
        * half-sharps, half-flats
 
@@ -302,7 +315,7 @@ SMALLISH PROJECTS
            < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
        - script-spacing
        - slur parts as a script
-       - stackparameterised scripts for fingering and footing:
+       - stack parameterised scripts for fingering and footing:
 
             % toe to bheel   four to five
            %   ^_u            4_5  
@@ -322,11 +335,6 @@ SMALLISH PROJECTS
 
        * volta
 
-DOC
-       * all errors
-       
-       * hacking-HOWTO
-
 IDEAS
 
        * scoping in Lexer: do general id- assignments in mudela.
@@ -389,9 +397,11 @@ IDEAS
 
        *
        - rewire acknowledge_element() logic with a process_acknowledged()
-       - construct Stem upon receiving Notehead. Junk Stem_req
 
        * pushgroup/popgroup
 
        * whole head on ledger line
 
+       * multi threading?
+         - 1 thread per element/ 1 thread per line
+         - 1 thread per Translator
diff --git a/VERSION b/VERSION
index 01eefc1f38e57b9fa535359edb7bb7647658a1f2..df34f2a4ae111f48a2f56b3c2a613c08acb89997 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 12
+TOPLEVEL_PATCH_LEVEL = 13
 
 # use to send patches, always empty for released version:
-TOPLEVEL_MY_PATCH_LEVEL = .jcn4
+TOPLEVEL_MY_PATCH_LEVEL = 
index 98d858a308804007ef54f1920390c006c1df41d9..530e7818f20b54bffe87c46736b3861046c42a65 100644 (file)
@@ -111,6 +111,20 @@ sub convert_0_1_0_to_0_1_1
     s/\\tempo (.*):(.*);/\\tempo $1 = $2;/g
 }
 
+sub convert_0_1_2_to_0_1_3
+{
+    s/\\stem *(\\up|1) *;/\\stemup/g;
+    s/\\stem *(\\down|-1) *;/\\stemdown/g;
+    s/\\stem *0 *;/\\stemboth/g;
+    s/\\hshift ([^;]+) *;/\\property Voice.hshift = $1/g;
+}
+
+sub convert_0_1_4_to_0_1_5
+{
+    s/([<{]) *\\id "Piano" (.+);/\\type Grandstaff = $3 $1/;    
+    s/([<{]) *\\id (.+) (.+);/\\type $2 = $3 $1/;
+}
+
 ###############################################################
 
 sub    last_conversion
@@ -152,7 +166,10 @@ my %minor_conversions = ("0.0.50" => \&no_conv,
                         "0.0.60" => \&convert_0_0_59_to_0_0_60,
                         "0.0.61" => \&convert_0_0_60_to_0_0_61,
                         "0.1.1" => \&convert_0_1_0_to_0_1_1,
-                        "0.1.2" => \&no_conv
+                        "0.1.2" => \&no_conv,
+                        "0.1.3" => \&convert_0_1_2_to_0_1_3,
+                        "0.1.4" => \&no_conv,
+                        "0.1.5" => \&convert_0_1_4_to_0_1_5
                         );
  
 
index 75fba55de0e342728df760069814b0c261d3d876..aa1eda0b1d6c2ae76a0625ba0b8d58e5c2353004 100644 (file)
@@ -3,11 +3,11 @@
 
 use FileHandle;
 use Getopt::Long;
+
 my $lily_version;
 my $footstr;
 my $mw_id = "<!make_website!>";
 my $id_str = "make-website 0.4";
-
 my $TAR="tar";
 my $MAKE="make";
 
@@ -77,16 +77,16 @@ sub my_system
 
 local $base="lilypond/";
 
-local @examples=("twinkle-pop", "twinkle", "multi", "wohltemperirt",
+local @examples=("twinkle-pop", "twinkle", "multi", "wtk1-fugue2",
                 #"standchen-16", 
                 #"standchen-20", 
-                "toccata-fuga-E", "scsii-menuetto",
+                "wtk1-prelude1",
+                "toccata-fuga-E", 
+                "scsii-menuetto",
                 "cadenza", "scales", 
                #"rhythm", 
                 "gallina");
 
-# rhythm, scales, 
-
 
 sub gen_html
 {
@@ -131,14 +131,19 @@ sub gen_list
 {
     print "generating HTML list\n";
     open HTMLLIST, ">example_output.html";
+
     print HTMLLIST "<html><body><TITLE>Rendered Examples</TITLE>\n
-These example files are taken from the LilyPond distribution.\n
-LilyPond currently only outputs TeX and MIDI. The pictures and\n
- PostScript files were generated using TeX, Ghostscript and some graphics tools. \n
-The GIF files have been scaled to eliminate aliasing.";
-    foreach $a (@examples) {
-       $name=$a;
-       print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
+These example files are taken from the LilyPond distribution.
+LilyPond currently only outputs TeX and MIDI. The pictures and
+PostScript files were generated using TeX, Ghostscript and some
+graphics tools.  The papersize used for these examples is A4.  The GIF
+files have been scaled to eliminate aliasing."; 
+
+
+
+    foreach $a (@examples)
+    {
+       $name=$a; print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
 
        open IF, "$depth/input/$a.ly";
        input_record_separator IF "%}";
index 803bfd6dbe594d96b9bbfe6550c1d04ea80219a6..a53c1a47516b0eb44483c312c1e8f421d149b5a9 100644 (file)
@@ -1,3 +1,6 @@
+pl 29 
+       - Dictionary_iter, Dictionary
+
 pl 28
        - String::bool ()
        - GNU indentation.
index 5932f10f973818de7fe60fc122c54a3664b5760d..187fb26901c61ee0865144b5c3d94704c37cf0e5 100644 (file)
@@ -146,7 +146,7 @@ Choleski_decomposition::band_matrix_decompose (Matrix const &P)
        D(i) = d;
     }
   L.try_set_band();
-  assert ( L.band_i() == P.band_i ());
+  assert (L.band_i() == P.band_i ());
 }
 
 
index 695819171acbdb4beec61bb270a1a65e5e2bcb83..090f308635db8cb261110fb5d7f4328011394836 100644 (file)
@@ -54,9 +54,9 @@ Diagonal_storage::set_band_size (int s)
   for (int i=0; i < dim(); i++) 
     {
        int k=-s;
-       for ( ;  k < -band_size_i(); k++)
+       for (;  k < -band_size_i(); k++)
            f.elem (i,k + s) = 0.0;
-       for ( ; k <=  band_size_i()&& k<=s ; k++)
+       for (; k <=  band_size_i()&& k<=s ; k++)
            f.elem (i, k + s) = band_.elem (i,k+ band_size_i());
        for (; k <= s; k++)
            f.elem (i, k + s) =0.0;
@@ -123,7 +123,7 @@ Diagonal_storage::resize_dim (int d)
   Full_storage f (d, 2*band_size_i()+1);
   for (int i=0; i < d && i < dim(); i++) 
     {
-       for ( int k=0;  k < 2*band_size_i(); k++)
+       for (int k=0;  k < 2*band_size_i(); k++)
            f.elem (i,k) = elem (i,k);
     }
 
@@ -142,9 +142,9 @@ void
 Diagonal_storage::mult_next (int &i, int &j) const
 {
   j++;
-  if ( j < i - band_size_i()) 
+  if (j < i - band_size_i()) 
        j = i- band_size_i();
-  if ( j > i + band_size_i() || j >= dim ()) 
+  if (j > i + band_size_i() || j >= dim ()) 
     {
        i++;
        j = 0 >? i - band_size_i(); 
@@ -161,10 +161,10 @@ void
 Diagonal_storage::trans_next (int &i, int& j) const
 {
   i++;
-  if ( i < j - band_size_i())
+  if (i < j - band_size_i())
        i = j-band_size_i();
   
-  if ( i >= dim() || i > j + band_size_i ()) 
+  if (i >= dim() || i > j + band_size_i ()) 
     {
        j++;
        i = 0 >? j - band_size_i(); 
@@ -176,7 +176,7 @@ static Real nul_entry=0.0;
 Real 
 Diagonal_storage::elem (int i, int j) const
 {
-  if (abs ( i-j) > band_size_i())
+  if (abs (i-j) > band_size_i())
        return 0;
   else
        return band_.elem (i, j - i +band_size_i());
@@ -190,7 +190,7 @@ Diagonal_storage::elem (int i, int j)
     */
   assert (!nul_entry);
 
-  if (abs ( i-j) > band_size_i())  
+  if (abs (i-j) > band_size_i())  
        return nul_entry;
   else
        return band_.elem (i, j - i + band_size_i());
@@ -204,7 +204,7 @@ bool
 Diagonal_storage::try_right_multiply (Matrix_storage*dest,
                                     const Matrix_storage*right) const
 {
-  if ( right->name() != Diagonal_storage::static_name ()) 
+  if (right->name() != Diagonal_storage::static_name ()) 
        return false;
   
   const Diagonal_storage*  right_diag = (Diagonal_storage const*)right;
@@ -221,7 +221,7 @@ Diagonal_storage::try_right_multiply (Matrix_storage*dest,
            int stopk = i + band_size_i() <? n-1 <? j  + band2;
            int relk =  startk + band_size_i() -i;
            Real sum =0.0;
-           for ( int k = startk; k <= stopk; k++)
+           for (int k = startk; k <= stopk; k++)
                sum += band_.elem (i, relk++) * right_diag->elem (k, j);
            dest->elem (i, j) = sum;
            
@@ -238,7 +238,7 @@ Diagonal_storage::Diagonal_storage (Matrix_storage*stor_l, int band_i)
   set_band_size (band_i);
   resize_dim (stor_l->dim());
 
-  for ( int i=0,j=0; mult_ok (i,j); mult_next (i,j))
+  for (int i=0,j=0; mult_ok (i,j); mult_next (i,j))
        band_.elem (i, j + band_i -i) = stor_l->elem (i,j);
 }
 
index 9a07629dab71644c7d6d78372f1b8ffd5372acf3..b13203e4fa19ca307eb39f7e9c2afd6bb9c3f592 100644 (file)
@@ -118,7 +118,7 @@ Directed_graph_node::unlink()
        t.concat (edge_in_l_arr_);
 #endif
 
-       while ( edge_out_l_arr_.size())
+       while (edge_out_l_arr_.size())
            remove_edge_out_idx (0);
        
        while (edge_in_l_arr_.size())
index f11576d5900e1fafc0575e5737653f66d54e3119..16d83d6890245c929f90c506ca3cb225abeb52d6 100644 (file)
@@ -25,11 +25,11 @@ strip_pretty (String pretty_str)
 {
   int i = pretty_str.index_i ('(');
   if (i>=0)
-       pretty_str = pretty_str.left_str (i);
+    pretty_str = pretty_str.left_str (i);
   
   int l = pretty_str.index_last_i (' '); // strip until last ' '
   if (l>=0)
-       pretty_str = pretty_str.nomid_str (0,l+1);
+    pretty_str = pretty_str.nomid_str (0,l+1);
   return pretty_str;
 }
 
@@ -38,7 +38,7 @@ strip_member (String pret)
 {
   int l=pret.index_last_i (':')-1;
   if (l>=0)
-       pret = pret.left_str (l);
+    pret = pret.left_str (l);
   return pret;
 }
 
@@ -46,26 +46,26 @@ Dstream&
 Dstream::identify_as (String name)
 {
   if (!os_l_)
-       return *this;
+    return *this;
   
   String mem (strip_pretty (name));
   String cl (strip_member (mem));
   String idx = cl;
   
   if (silent_assoc_p_->elt_b (mem))
-       idx  = mem;
+    idx  = mem;
   else if (silent_assoc_p_->elt_b (cl))
-       idx = cl;
+    idx = cl;
   else 
     {
-       (*silent_assoc_p_)[idx] = false;
+      (*silent_assoc_p_)[idx] = false;
     }
   local_silence_b_ = (*silent_assoc_p_)[idx];
   if (current_classname_str_ != idx && !local_silence_b_) 
     {
-       current_classname_str_=idx;
-       if (!(*silent_assoc_p_)["Dstream"])
-           *os_l_ << "[" << current_classname_str_ << ":]"; // messy.
+      current_classname_str_=idx;
+      if (!(*silent_assoc_p_)["Dstream"])
+       *os_l_ << "[" << current_classname_str_ << ":]"; // messy.
     }
   return *this;
 }
@@ -74,7 +74,7 @@ bool
 Dstream::silence (String s)
 {
   if (!silent_assoc_p_->elt_b (s))
-       return false;
+    return false;
   return (*silent_assoc_p_)[s];
 }
 
@@ -103,33 +103,33 @@ void
 Dstream::output (String s)
 {
   if (local_silence_b_|| !os_l_)
-       return ;
+    return ;
   
   for (char const *cp = s  ; *cp; cp++)
-       switch (*cp) 
-         {
-           case '{':
-           case '[':
-           case '(': indent_level_i_ += INDTAB;
-               *os_l_ << *cp;          
-               break;
+    switch (*cp) 
+      {
+      case '{':
+      case '[':
+      case '(': indent_level_i_ += INDTAB;
+       *os_l_ << *cp;          
+       break;
                
-           case ')':
-           case ']':
-           case '}':
-               indent_level_i_ -= INDTAB;
-               *os_l_ << *cp           ;
+      case ')':
+      case ']':
+      case '}':
+       indent_level_i_ -= INDTAB;
+       *os_l_ << *cp           ;
                
-               assert  (indent_level_i_>=0) ;
-               break;
+       assert  (indent_level_i_>=0) ;
+       break;
                
-           case '\n':
-               *os_l_ << '\n' << String (' ', indent_level_i_) << flush;
-               break;        
-           default:
-               *os_l_ << *cp;
-               break;
-             }
+      case '\n':
+       *os_l_ << '\n' << String (' ', indent_level_i_) << flush;
+       break;        
+      default:
+       *os_l_ << *cp;
+       break;
+      }
   return ;    
 }
 
@@ -140,25 +140,25 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
   silent_assoc_p_ = new Assoc<String,bool>;
   indent_level_i_ = 0;
   if (!os_l_)
-       return;
+    return;
   
   char const * fn =cfg_nm ? cfg_nm : ".dstreamrc";
   {
-       ifstream ifs (fn);      // can't open
-       if (!ifs)
-           return;
-    }
+    ifstream ifs (fn); // can't open
+    if (!ifs)
+      return;
+  }
 
   Text_db cfg (fn);
   while (! cfg.eof()){      
-        Text_record  r (cfg++);
-        if (r.size() != 2) 
-          {
-            r.message ("not enough fields in Dstream init.");
-            continue;
-          }
-        (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
-    }
+    Text_record  r (cfg++);
+    if (r.size() != 2) 
+      {
+       r.message ("not enough fields in Dstream init.");
+       continue;
+      }
+    (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
+  }
 
 }
 
@@ -174,6 +174,6 @@ Dstream::clear_silence()
 {
   for (Assoc_iter<String, bool> i (*silent_assoc_p_); i.ok(); i++) 
     {
-       i.val() = 0;
+      i.val() = false;
     }
 }
index 52156f983a86f0da23d94caa82cd3f7b8b36f45d..86a9abb9f069f0a8fbbdde56e1290f3515358638 100644 (file)
@@ -3,7 +3,7 @@
 #include "dstream.hh"
 
 bool flower_check_debug=false;
-ofstream null_device ( "/dev/null");
+ofstream null_device ("/dev/null");
 Dstream default_flower_stream (&null_device ,"/dev/null");
 Dstream *flower_dstream  = &default_flower_stream;
 
index 71aa74c10c6f0aa1cb7b582fb20c8d296dbe3ed4..2b1ff48a54218fc6ad288ca125be07da583187b6 100644 (file)
@@ -179,7 +179,7 @@ Full_storage::resize_cols (int newh)
 Full_storage::Full_storage (Matrix_storage*m)
 {
   set_size (m->rows(), m->cols ());
-  if ( !m->is_type_b ( Full_storage::static_name()))
+  if (!m->is_type_b (Full_storage::static_name()))
        for (int i=0; i<height_i_; i++)
            for (int j=0; j<width_i_; j++)
                els_p_p_[i][j]=0.0;
index 2ca31125cf7cd96b526dc88b90c99a73775803cb..86d28b0fd3081cc8cec96b71e1e7b65d1c9962cb 100644 (file)
@@ -63,8 +63,7 @@ public:
     int i= find (key);
     arr[i].free = true;
   }
-  void
-  add (K key, V val) {
+  void add (K key, V val) {
     int i = find_creat (key);
     arr[i].val = val;
   }
index f19f3ac62b723810dfe9db3cd0924648e8ebaa04..7aea72d3347fabffb3d36b5b6c9f82d0a6b86ac7 100644 (file)
@@ -32,13 +32,13 @@ public:
   /// return current T
   T& operator *() { return thing(); }
   operator T() { return thing(); }
-  Cursor<T> operator =( const Cursor<T>& c);
+  Cursor<T> operator =(const Cursor<T>& c);
 
   /// make cursor with #no# items back
-  Cursor<T> operator -( int no) const;
+  Cursor<T> operator -(int no) const;
 
   /// make cursor with #no# items further
-  Cursor<T> operator +( int no) const;
+  Cursor<T> operator +(int no) const;
   int operator -(Cursor<T> op) const;
   Cursor<T> operator -=(int);
   Cursor<T> operator +=(int);
@@ -47,10 +47,10 @@ public:
   /// move one up.
   void previous();
   /// return current and move one down
-  Cursor<T> operator ++( int);
+  Cursor<T> operator ++(int);
     
   /// return current and move one up
-  Cursor<T> operator --( int); 
+  Cursor<T> operator --(int); 
 
   /// point to link?
   bool ok() const;
index b1004b600aa5028f79e6efd4f2e5f63f8f17ac9e..15549fb737cf7de74ad2bc256aae8e3def964600 100644 (file)
@@ -29,7 +29,7 @@ inline
 Cursor<T>::Cursor (const List<T>& list, Link<T>* pointer) : 
   list_((List<T>&) list)
 {
-  if ( list.size())
+  if (list.size())
       pointer_ = pointer ? pointer : list.top_;
   else
       pointer_ = pointer;
@@ -38,7 +38,7 @@ Cursor<T>::Cursor (const List<T>& list, Link<T>* pointer) :
 template<class T>
 inline
 Cursor<T>::Cursor (const Cursor<T>& cursor) :
-  list_( cursor.list_)
+  list_(cursor.list_)
 {
   pointer_ = cursor.pointer_;
 }
@@ -53,7 +53,7 @@ Cursor<T>::thing()
 
 template<class T>
 Cursor<T>
-Cursor<T>::operator =( const Cursor<T>& c)
+Cursor<T>::operator =(const Cursor<T>& c)
 {   
   assert (&list_ == &c.list_);
   pointer_ = c.pointer_;
@@ -92,21 +92,21 @@ template<class T>
 inline bool
 Cursor<T>::backward() const
 {
-  return ( pointer_ != 0);
+  return (pointer_ != 0);
 }
 
 template<class T>
 inline bool
 Cursor<T>::forward() const
 {
-  return ( pointer_ != 0);
+  return (pointer_ != 0);
 }
 
 template<class T>
 inline bool
 Cursor<T>::ok() const
 {
-  return ( pointer_ != 0);
+  return (pointer_ != 0);
 }
 template<class T>
 inline void
@@ -118,7 +118,7 @@ Cursor<T>::next()
 
 template<class T>
 inline Cursor<T> 
-Cursor<T>::operator ++( int)    
+Cursor<T>::operator ++(int)    
 {
   Cursor<T> r (*this);
   next();
@@ -135,7 +135,7 @@ Cursor<T>::previous()
 
 template<class T>
 inline Cursor<T>
-Cursor<T>::operator --( int)
+Cursor<T>::operator --(int)
 {
   Cursor<T> r (*this);
   previous();
index 4bf6347a1d04d775f4e5f4b33be003b14b259f6a..84c60d836a0a7a9308cbb4a9c341eaf2fc503193 100644 (file)
@@ -9,7 +9,7 @@ template<class T>
 Cursor<T>::backspace()
 {
   Cursor<T> c (*this);
-  if ( c.ok())
+  if (c.ok())
        c--;        
   list_.remove (*this);
 }
@@ -19,7 +19,7 @@ template<class T>
 Cursor<T>::del()
 {
   Cursor<T> c (*this);
-  if ( c.ok())
+  if (c.ok())
        c++;
   list_.remove (*this);    
   *this = c;
@@ -28,7 +28,7 @@ Cursor<T>::del()
 
 template<class T>
 Cursor<T> 
-Cursor<T>::operator -=( int j)    
+Cursor<T>::operator -=(int j)    
 {
   while (j--)
        (*this)--;
@@ -36,7 +36,7 @@ Cursor<T>::operator -=( int j)
 }
 template<class T>
 Cursor<T> 
-Cursor<T>::operator +=( int j)    
+Cursor<T>::operator +=(int j)    
 {
   while (j++)
        (*this)++;
@@ -45,7 +45,7 @@ Cursor<T>::operator +=( int j)
 
 template<class T>
 Cursor<T> 
-Cursor<T>::operator +( int i) const    
+Cursor<T>::operator +(int i) const    
 {
   Cursor<T> r = *this;
 
@@ -60,7 +60,7 @@ Cursor<T>::operator +( int i) const
 
 template<class T>
 Cursor<T>
-Cursor<T>::operator -( int i) const
+Cursor<T>::operator -(int i) const
 {
   Cursor<T> r = *this;
   if (i<0)
diff --git a/flower/include/dictionary-iter.hh b/flower/include/dictionary-iter.hh
new file mode 100644 (file)
index 0000000..b80bb14
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  dictionary-iter.hh -- declare 
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef DICTIONARY_ITER_HH
+#define DICTIONARY_ITER_HH
+
+#include "string.hh"
+#include "assoc-iter.hh"
+#include "dictionary.hh"
+
+template<class V>
+class Dictionary_iter : public Assoc_iter<String, V>
+{
+public:
+  Dictionary_iter (Dictionary<V> const &d)
+    : Assoc_iter<String, V> (d)
+  {
+  }
+};
+
+#endif // DICTIONARY_ITER_HH
diff --git a/flower/include/dictionary.hh b/flower/include/dictionary.hh
new file mode 100644 (file)
index 0000000..11bb273
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+  dictionary.hh -- declare Dictionary
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef DICTIONARY_HH
+#define DICTIONARY_HH
+
+#include "string.hh"
+#include "assoc.hh"
+
+template<class T>
+class Dictionary : public Assoc<String, T>
+{
+public:
+  
+};
+
+#endif // DICTIONARY_HH
index de19d3063024900d980d9ea76162e370265a001a..b3855d15666d16262fe1fcb1ac5672411e7ec7fc 100644 (file)
@@ -15,7 +15,7 @@
 extern Dstream *flower_dstream;
 extern bool flower_check_debug;
 #ifdef NPRINT
-#define        fdebug if ( 0) *flower_dstream
+#define        fdebug if (0) *flower_dstream
 #else
 #define fdebug if (flower_check_debug) \
        flower_dstream->identify_as (__PRETTY_FUNCTION__)
index 740c38a7feb6fe3830dea0ae161e7823e7922ad0..e09f03e3c1411a925f91924199c28e720d41320f 100644 (file)
@@ -11,7 +11,7 @@
 char const * flower_version_sz();
 
 // what the F*** is "int" ?
-// depreciate int, long, etc., use i32, i64, remember: linux-16/linux-64 ?
+// deprecate int, long, etc., use i32, i64, remember: linux-16/linux-64 ?
 /// (i32)
 typedef int i32;
 /// (i64)
@@ -20,6 +20,8 @@ typedef long long I64;
 template<class T> struct Array;
 template<class T> struct sstack;
 template<class T,class K> struct Assoc;
+template<class T> struct Dictionary;
+template<class T> struct Dictionary_iter;
 template<class T> struct List;
 template<class T> struct Link_list;
 template<class T> struct Pointer_list;
index 7699f1dfbc8f28aa47a674157ac100bba086c94f..df560285f2958bfb802a236a6d88c5e54e44dfd1 100644 (file)
@@ -22,7 +22,7 @@ Link<T>::OK() const
 template<class T>
 inline
 Link<T>::Link (const T& thing) : 
-  thing_( thing)
+  thing_(thing)
 {
   previous_ = next_ = 0;
 }
@@ -30,7 +30,7 @@ Link<T>::Link (const T& thing) :
 template<class T>
 inline
 Link<T>::Link (Link<T>* previous, Link<T>* next, const T& thing) : 
-  thing_( thing)
+  thing_(thing)
 {
   previous_ = previous;
   next_ = next;
@@ -58,8 +58,8 @@ void
 Link<T>::add (const T& thing)
 {
   
-  Link<T>* l = new Link<T>( this, next_, thing);
-  if ( next_)
+  Link<T>* l = new Link<T>(this, next_, thing);
+  if (next_)
       next_->previous_ = l;
   next_ = l;
 }
@@ -68,10 +68,10 @@ template<class T>
 inline void
 Link<T>::insert (const T& thing)
 {
-  //    Link<T>* l = new Link<T>( next_, this, thing);
+  //    Link<T>* l = new Link<T>(next_, this, thing);
                                // bugfix hwn 16/9/96
-  Link<T>* l = new Link<T>( previous_, this, thing);
-  if ( previous_)
+  Link<T>* l = new Link<T>(previous_, this, thing);
+  if (previous_)
       previous_->next_ = l;
   previous_ = l;
 }
@@ -83,12 +83,12 @@ template<class T>
 inline void
 Link<T>::remove (List<T> &l)
 {
-  if ( previous_) 
+  if (previous_) 
       previous_->next_ = next_;
   else 
        l.top_ = next_;
 
-  if ( next_)
+  if (next_)
       next_->previous_ = previous_;
   else
        l.bottom_ = previous_;
index 0f6ae90ca2b3206e77f3d8fdaef680dc5188017e..9be31601a65f2bd4d8f6d56323eb881937238e42 100644 (file)
@@ -20,7 +20,7 @@ template<class T> class Link;
    {\bf note:} 
    retrieving "invalid" cursors, i.e. 
    #top()/bottom ()# from empty list, #find ()# without success,
-    results in a nonvalid Cursor ( #!ok()#)
+    results in a nonvalid Cursor (#!ok()#)
 
 
     INVARIANTEN!
index 7612137e202198c2e2cc4aa5e2b42be17751cee5..3f930f02b9f85230cab5fb82e3d6ef2917e8f0d8 100644 (file)
@@ -1,7 +1,16 @@
-// -*-c++-*-
+/*
+  list.icc -- implement List inline functions
 
-#ifndef LIST_INL
-#define LIST_INL
+  source file of the Flower Library
+
+  (c) 1996,1997
+  Jan Nieuwenhuizen <jan@digicash.com>
+  Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef LIST_ICC
+#define LIST_ICC
 
 template<class T>
 inline
@@ -22,7 +31,7 @@ template<class T>
 inline void
 List<T>::remove (Cursor<T> me)
 {
-  if ( me.ok())
+  if (me.ok())
     {
       Link<T> *lp = me.pointer();      
       lp->remove (*this);
@@ -42,7 +51,7 @@ template<class T>
 inline Cursor<T>
 List<T>::top() const
 {
-  return Cursor<T>( *this, top_);
+  return Cursor<T>(*this, top_);
 }
 
 
@@ -50,8 +59,9 @@ template<class T>
 inline Cursor<T>
 List<T>::bottom() const
 {
-  return Cursor<T>( *this, bottom_);
+  return Cursor<T>(*this, bottom_);
 }
 
 
 #endif
+
index 06aa312bc30a4517f59b0ff28d7fde2dfb275438..db4f0fc964e918a61aea48f2fbc3989b9b27cf11 100644 (file)
@@ -80,7 +80,7 @@ void
 List<T>::add (T const & thing, Cursor<T> &after_me)
 {
   if (!size_) {                // not much choice if list is empty
-      bottom_ = top_ = new Link<T>( thing);
+      bottom_ = top_ = new Link<T>(thing);
        if (!after_me.ok())
            after_me = bottom();
     }
@@ -102,7 +102,7 @@ List<T>::insert (T const & thing, Cursor<T> &before_me)
 {
   if (!size_) 
     {
-       bottom_ = top_ = new Link<T>( thing);
+       bottom_ = top_ = new Link<T>(thing);
        if (!before_me.ok())
            before_me = top();
        
diff --git a/flower/include/nscalar.hh b/flower/include/nscalar.hh
new file mode 100644 (file)
index 0000000..d1b361b
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+  scalar.hh -- declare 
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef SCALAR_HH
+#define SCALAR_HH
+
+struct Scalar {
+  String str_;
+  // Real real_;
+  int int_;
+  //  Rational rational_;
+
+
+  struct typebits {
+    string_bit: 1;
+    int_bit:1;
+  };
+private:
+
+  
+  //  operator Real();
+  operator int();
+  
+  /**   perl -like string to bool conversion.
+   */
+  //  operator bool() const;
+   
+  //Scalar (Real r) : String (r) {}
+  Scalar (int i) : String (i) {}
+  //  Scalar (char c) : String (c) {}
+  Scalar (char const *c) : String (c) {}    
+  Scalar (String s):String (s) {}
+  //Scalar (Rational);
+  static Scalar undefined ();
+};
+
+#endif // SCALAR_HH
index e338a0935356ff4b6b589c360540eefa3f44b27b..981b43a10f0a577517f1b32fd83152618d783f18 100644 (file)
@@ -46,7 +46,7 @@ public:
   PCursor<T> operator-=(int i) { return Cursor<void*>::operator-=(i); }    
   PCursor<T> operator -(int no) const { return Cursor<void*>::operator-(no);}
   int operator -(PCursor<T> op) const { return Cursor<void*>::operator-(op);}
-  PCursor<T> operator +( int no) const {return Cursor<void*>::operator+(no);}    PCursor (const Link_list<T> & l) : Cursor<void*> (l) {}
+  PCursor<T> operator +(int no) const {return Cursor<void*>::operator+(no);}    PCursor (const Link_list<T> & l) : Cursor<void*> (l) {}
   PCursor() : Cursor<void*> () {}
   PCursor (const Cursor<void*>& cursor) : Cursor<void*>(cursor) { }
   void* vptr() const { return *((Cursor<void*> &) *this); }
index 5f4a97fb4792c1d8bd660fbc822cfa310c403272..cc352cb2da78ea7f4922dd657faed75c174e8cec 100644 (file)
@@ -85,7 +85,7 @@ public:
        int mini=2;
        int lasti=1;
 
-       while ( mini < size()) {
+       while (mini < size()) {
            if (compare (elt (mini + 1), elt (mini)) <0)
                mini++;
            if (compare (last,elt (mini)) < 0)
index 51426dd063588be8cb74f33f15813f345928f3b3..fb75268d92b1788cdb25dbb5ef8572ee60af3f27 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  rational.hh -- declare 
+  rational.hh -- declare rational helpers
 
   source file of the Flower Library
 
index d081b56fe68a4d9107a48d53f3bd5bb06d869122..b00e25fc20292c756acab960b38ef97007137901 100644 (file)
@@ -1,33 +1,36 @@
 /*
-  scalar.hh -- part of LilyPond
+  scalar.hh -- declare Scalar
 
-  (c) 1996 Han-Wen Nienhuys
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
+
 #ifndef SCALAR_HH
 #define SCALAR_HH
+
 #include "string.hh"
 #include "real.hh"
 
 /// Perl -like scalar type.
 struct Scalar : public String {
     
-    Scalar (Real r) : String (r) {}
-    Scalar (int i) : String (i) {}
-    Scalar (char c) : String (c) {}
-    Scalar (char const *c) : String (c) {}    
-    Scalar (String s):String (s) {}
-    Scalar (Rational);
-    operator Rational();
-    Scalar() {}
-    bool isnum();
-    operator Real();
-    operator int();
-
-    /**   perl -like string to bool conversion.
-     */
-    operator bool() const;
+  Scalar (Real r) : String (r) {}
+  Scalar (int i) : String (i) {}
+  Scalar (char c) : String (c) {}
+  Scalar (char const *c) : String (c) {}    
+  Scalar (String s):String (s) {}
+  Scalar (Rational);
+  operator Rational();
+  Scalar() {}
+  bool isnum();
+  operator Real();
+  operator int();
 
+  /**   perl -like string to bool conversion.
+   */
+  operator bool() const;
 };
 
 #endif // SCALAR_HH
index 4dfe5544b95371f5e6dbd599044219bf2192d16a..0b71643e98aa11e6cb60699f89131b0b012080ca 100644 (file)
@@ -61,7 +61,7 @@ friend class String_handle;
     /// concatenation.
     void append (Byte const* byte_C, int length_i);
 
-    void operator += ( char const* ch_C);
+    void operator += (char const* ch_C);
 
     char const* ch_C() const; 
 
index 599d25312d6049dbc28d7df38453bbabb3d1bea9..7d62f1ffcbd179642966095c0b9f68252252ff13 100644 (file)
@@ -89,7 +89,7 @@ String_data::remax (int j)
   if (j > maxlen) 
     {
       Byte *p = new Byte[j + 1];       
-      memcpy (p, data_byte_p_, ( maxlen <? length_i_) + 1 );       
+      memcpy (p, data_byte_p_, (maxlen <? length_i_) + 1 );        
       maxlen = j;
       delete[] data_byte_p_;
       data_byte_p_ = p;
@@ -143,7 +143,7 @@ String_data::append (Byte const* byte_C, int length_i)
 
 INLINE
 void 
-String_data::operator += ( char const* ch_C) 
+String_data::operator += (char const* ch_C) 
 {
   append ((Byte const*)ch_C, strlen (ch_C) );
 }
@@ -189,7 +189,7 @@ INLINE bool
 String_data::is_binary_bo() const
 {
   //    return !memchr (data_byte_p_, length_i_, 0);
-  return ( (int)strlen ((char const*)data_byte_p_) != length_i_ );
+  return ((int)strlen ((char const*)data_byte_p_) != length_i_ );
 }
 
 INLINE Byte&
index 7682fa0bfbd7b2403db41c87c4ca6e7cb65b6569..b749b7ee06a9ff75910593abd53d09d803e5bc9b 100644 (file)
@@ -72,7 +72,7 @@ public:
   String (char c, int n = 1);
 
   String (int i , char const *fmt=0);
-  String ( double f , char const* fmt =0);
+  String (double f , char const* fmt =0);
   /// 'true' or 'false'
   String (bool);
 
@@ -87,20 +87,21 @@ public:
   /// deprecated; use ch_C()
   operator char const*() const { return ch_C(); }
     
-  String &operator =( String const & source);
+  String &operator =(String const & source);
 
   /// concatenate s
   void operator += (char const* s) { strh_ += s; }
   void operator += (String s);
 
-  operator bool () 
+  /// is the string empty?
+  operator bool () const
   {
     return length_i (); 
   }
   void append (String);
   void prepend (String);
 
-  char operator []( int n) const { return strh_[n]; }
+  char operator [](int n) const { return strh_[n]; }
 
   /// return n leftmost chars
   String left_str (int n) const;
@@ -185,7 +186,7 @@ operator  + (String s1, String  s2)
 }
 
 inline ostream &
-operator << ( ostream& os, String d)
+operator << (ostream& os, String d)
 {
   d.print_on (os);
   return os;
index 60b72d299a2c5527666c081d29873a282f5b65f1..191b9ca0b652e288d11583d5acefd9874243577d 100644 (file)
@@ -175,7 +175,7 @@ public:
        size_--;
     }
     // quicksort.
-    void sort (int (*compare)( T const&,T const&),
+    void sort (int (*compare)(T const&,T const&),
               int lower = -1, int upper = -1) {
        if (lower < 0) {
            lower = 0 ;
index 2d2772336b10eb7d25e24e6a45be2cca4ce81800..7ad3f655c168ed1a553429655b38714dda3a7016 100644 (file)
@@ -101,7 +101,7 @@ operator*(Vector v, Real a) {
 }
 
 inline Vector
-operator*( Real a,Vector v) {
+operator*(Real a,Vector v) {
     v *= a;
     return v;
 }
index f0a49ab3602c4bd5af1a52a3199b857ae2bcf581..d8f18fd5ab6ceec59853425a45bd52726fe705e1 100644 (file)
@@ -184,7 +184,7 @@ Getopt_long::operator()()
        return 0;
 
   if (argument_C[1] == '-') {// what to do with "command  --  bla"
-       if ( argument_C[2])
+       if (argument_C[2])
            return parselong();
        else
            return 0;
index 7556a2cdd5c3b3a0acf899169b8c43155faf36bf..7d2c8fbcadfcbec6f291f71ff9b1fc4db1274c06 100644 (file)
@@ -18,7 +18,7 @@ Matrix_storage::set_addition_result (Matrix_storage *&dat, Matrix_storage *right
        Diagonal_storage *L = (Diagonal_storage*)dat;
        Diagonal_storage* R = (Diagonal_storage*) right;
 
-       if ( R->band_size_i() > L->band_size_i ()) 
+       if (R->band_size_i() > L->band_size_i ()) 
          {
            L->set_band_size (R->band_size_i());
          }
@@ -50,7 +50,7 @@ void
 Matrix_storage::set_product_result (Matrix_storage*&dest, 
                           Matrix_storage*left, Matrix_storage*right)
 {
-  if ( left->name() == Diagonal_storage::static_name () 
+  if (left->name() == Diagonal_storage::static_name () 
         && right->name() == Diagonal_storage::static_name ()) 
           {
        Diagonal_storage *L = (Diagonal_storage*)left;
@@ -69,7 +69,7 @@ Matrix_storage::set_product_result (Matrix_storage*&dest,
          }
     }
 
-  if ( dest && dest->name() == Full_storage::static_name ()) 
+  if (dest && dest->name() == Full_storage::static_name ()) 
     {
        dest->set_size (left->rows(), right->cols ());
     }
index 0641d8032f649582810780340fb2cf344b9dda47..f7cb37585d973a0a8e7fd36d6465004c62d0ee61 100644 (file)
@@ -19,7 +19,7 @@ Matrix::band_b() const
 void
 Matrix::set_full() const
 {
-  if ( dat->name() != Full_storage::static_name ()) 
+  if (dat->name() != Full_storage::static_name ()) 
     {
        Matrix_storage::set_full (((Matrix*)this)->dat);
     }
@@ -32,7 +32,7 @@ Matrix::try_set_band() const
        return;
   
   int b = band_i();
-  if (  b > dim()/2)
+  if (b > dim()/2)
        return;
   // it only looks constant
   Matrix*self  = (Matrix*)this;
@@ -109,7 +109,7 @@ Matrix::operator=(Matrix const &m)
 int
 Matrix::band_i() const
 {
-  if ( band_b()) 
+  if (band_b()) 
     {
        Diagonal_storage const * diag = (Diagonal_storage*) dat;
        return diag->band_size_i();
@@ -117,10 +117,10 @@ Matrix::band_i() const
   int starty = dim();
   while (starty >= 0) 
     {
-       for ( int i = starty, j = 0; i < dim(); i++, j++)
+       for (int i = starty, j = 0; i < dim(); i++, j++)
            if (dat->elem (i,j))
                goto gotcha;
-       for ( int i=0, j = starty; j < dim(); i++,j++)
+       for (int i=0, j = starty; j < dim(); i++,j++)
            if (dat->elem (i,j))
                goto gotcha;
        starty --;
diff --git a/flower/nscalar.cc b/flower/nscalar.cc
new file mode 100644 (file)
index 0000000..c8b829d
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+  scalar.cc -- implement 
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
index bdfaf80b633a4deebc824d65e1be3c8ee1fc7a0d..6625864f6e0fa971da65e2061c32273d38e7dc34 100644 (file)
@@ -58,13 +58,13 @@ File_path::find (String nm) const
 
 {
   fdebug << "looking for " << nm << ": ";
-  if ( !nm.length_i() || ( nm == "-") )
+  if (!nm.length_i() || (nm == "-") )
        return nm;
   for (int i=0; i < size(); i++) 
     {
 
         String path  = elem(i);
-        if ( path.length_i() )
+        if (path.length_i() )
             path += "/";
         
         path += nm;
index db0b9ddb8c15d546089e613fb5a35146c17a45a5..fdffabd360c7adb9de52ffd3917599afaa69bf78 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  scalar.cc -- implement 
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include <assert.h>
 #include <stdio.h>
 #include "scalar.hh"
@@ -12,7 +20,7 @@ Scalar::operator Rational()
 {
   int p = index_i ('/');
   if (p == -1)
-       return int (*this);
+    return int (*this);
   
   String s2 = right_str (len()-p-1);
   String s1 = left_str (p);
@@ -26,8 +34,8 @@ Scalar::isnum()
   int conv = false;
   if (len()) 
     {
-       long l =0;
-       conv = sscanf (strh_.ch_C(), "%ld", &l);
+      long l =0;
+      conv = sscanf (strh_.ch_C(), "%ld", &l);
     }
   return len() && conv;
 }
@@ -40,6 +48,9 @@ Scalar::operator Real()
 
 Scalar::operator int()
 {
+  if (!length_i ())
+    return 0;                  // ugh
+  
   assert (isnum());
   return value_i();
 }
@@ -48,11 +59,11 @@ Scalar::operator int()
 Scalar::operator bool() const
 {
   if (!len())
-       return false;
+    return false;
   if (*this == "0")
-       return false;
+    return false;
   String u (*this);
-  if ( u.upper_str() == "FALSE")
-       return false;
+  if (u.upper_str() == "FALSE")
+    return false;
   return true;
 }
index 5acdb4c88f55003a16702b66771773275df37b36..ab7c6ab3e666bcdfb3ef2e95dbf244689e392e5e 100644 (file)
@@ -29,7 +29,7 @@ String_convert::bin2hex_str (String bin_str)
 {
   String str;
   Byte const* byte_C = bin_str.byte_C();
-  for ( int i = 0; i < bin_str.length_i(); i++) 
+  for (int i = 0; i < bin_str.length_i(); i++) 
     {
        str += (char)nibble2hex_byte (*byte_C >> 4);
        str += (char)nibble2hex_byte (*byte_C++);
@@ -49,7 +49,7 @@ String_convert::bin2_u (String bin_str)
   assert (bin_str.length_i() <= (int)sizeof(unsigned));
 
   unsigned result_u = 0;
-  for ( int i = 0; i < bin_str.length_i(); i++) 
+  for (int i = 0; i < bin_str.length_i(); i++) 
     {
        result_u <<= 8;
        result_u += (Byte)bin_str[ i ];
@@ -61,7 +61,7 @@ String_convert::bin2_u (String bin_str)
 int
 String_convert::dec2_i (String dec_str)
 {
-  if ( !dec_str.length_i())
+  if (!dec_str.length_i())
        return 0;
 
   long l = 0;
@@ -84,7 +84,7 @@ String_convert::i64_str (I64 i64, char const* fmt)
 double
 String_convert::dec2_f (String dec_str)
 {
-  if ( !dec_str.length_i())
+  if (!dec_str.length_i())
        return 0;
   double d = 0;
   int conv = sscanf (dec_str.ch_C(), "%lf", &d);
@@ -95,19 +95,19 @@ String_convert::dec2_f (String dec_str)
 int
 String_convert::hex2bin_i (String hex_str, String& bin_str_r)
 {
-  if ( hex_str.length_i() % 2)
+  if (hex_str.length_i() % 2)
       hex_str = "0" + hex_str;
 
   bin_str_r = "";
   Byte const* byte_C= hex_str.byte_C();
   int i = 0;
-  while ( i < hex_str.length_i()) 
+  while (i < hex_str.length_i()) 
     {
       int high_i = hex2nibble_i (*byte_C++);
       int low_i = hex2nibble_i (*byte_C++);
-      if ( high_i < 0 || low_i < 0)
+      if (high_i < 0 || low_i < 0)
           return 1; // illegal char
-      bin_str_r += String ((char)( high_i << 4 | low_i), 1 );
+      bin_str_r += String ((char)(high_i << 4 | low_i), 1 );
       i += 2;
     }
   return 0;
@@ -127,11 +127,11 @@ String_convert::hex2bin_str (String hex_str)
 int 
 String_convert::hex2nibble_i (Byte byte)
 {
-  if ( byte >= '0' && byte <= '9')
+  if (byte >= '0' && byte <= '9')
       return byte - '0';
-  if ( byte >= 'A' && byte <= 'F')
+  if (byte >= 'A' && byte <= 'F')
       return byte - 'A' + 10;
-  if ( byte >= 'a' && byte <= 'f')
+  if (byte >= 'a' && byte <= 'f')
       return byte - 'a' + 10;
   return -1;
 }
@@ -141,7 +141,7 @@ String
 String_convert::i2dec_str (int i, int length_i, char ch)
 {
   char fill_ch = ch;
-  if ( fill_ch)
+  if (fill_ch)
       fill_ch = '0';
 
   // ugh
@@ -157,13 +157,13 @@ String
 String_convert::u2hex_str (unsigned u, int length_i, char fill_ch)
 {
   String str;
-  if ( !u)
+  if (!u)
        str = "0";
 
 #if 1 // both go...
-  while ( u) 
+  while (u) 
     {
-       str = String ((char)( ( u % 16)["0123456789abcdef"] ) ) + str;
+       str = String ((char)((u % 16)["0123456789abcdef"] ) ) + str;
        u /= 16;
     }
 #else
@@ -171,7 +171,7 @@ String_convert::u2hex_str (unsigned u, int length_i, char fill_ch)
 #endif
 
   str = String (fill_ch, length_i - str.length_i()) + str;
-  while ( ( str.length_i() > length_i) &&  ( str[ 0 ] == 'f' ) )
+  while ((str.length_i() > length_i) &&  (str[ 0 ] == 'f' ) )
        str = str.mid_str (2, INT_MAX);
 
   return str;
@@ -186,10 +186,10 @@ String_convert::i2hex_str (int i, int length_i, char fill_ch)
 Byte
 String_convert::nibble2hex_byte (Byte byte)
 {
-  if ( ( byte & 0x0f) <= 9 )
-       return ( byte & 0x0f) + '0';
+  if ((byte & 0x0f) <= 9 )
+       return (byte & 0x0f) + '0';
   else
-       return ( byte & 0x0f) - 10 + 'a';
+       return (byte & 0x0f) - 10 + 'a';
 }
 /**
   Convert an integer to a string
index 6651475b37f3d9890f9adbe995ecc9f834c3488c..a68afb58873a40744592b9ca6d1f44565351fe28 100644 (file)
@@ -36,7 +36,7 @@ String::print_on (ostream& os) const
   if (!strh_.is_binary_bo())
       os << ch_C();
   else
-       for ( int i = 0; i < length_i(); i++)
+       for (int i = 0; i < length_i(); i++)
            os << (Byte)(*this)[ i ];
 }
 \f
@@ -147,7 +147,7 @@ String::compare_i (String const& s1, String const& s2)
 {
   Byte const* p1 = s1.byte_C();
   Byte const* p2 = s2.byte_C();
-  if ( p1 == p2)
+  if (p1 == p2)
        return 0;
 
   int i1 = s1.length_i();
@@ -161,12 +161,12 @@ String::compare_i (String const& s1, String const& s2)
 int
 String::index_last_i (char const c) const
 {
-  if ( !length_i()) 
+  if (!length_i()) 
        return -1;
 
   char const* me = strh_.ch_C();
   char const* p = memrchr (me, length_i(), c);
-  if ( p)
+  if (p)
        return p - me;
   return -1;
 }
@@ -176,11 +176,11 @@ String::index_last_i (char const* string) const // UGK!
 {
   assert (false);              // broken
   int length = strlen (string); // ugrh
-  if ( !length_i() || !length) 
+  if (!length_i() || !length) 
        return -1;
   
   int next_i = index_i (string);
-  if ( next_i == -1)
+  if (next_i == -1)
        return -1;
   
   int index_i = 0;
@@ -205,7 +205,7 @@ String::index_i (char c) const
 {
   char const* me = strh_.ch_C();
   char const* p = (char const *) memchr (me,c,  length_i());
-  if ( p)
+  if (p)
        return p - me;
   return -1;
 }
@@ -223,7 +223,7 @@ String::index_i (String searchfor) const
   char const* p = (char const *) memmem (
        me, length_i(), searchfor.ch_C(), searchfor.length_i ());
   
-  if ( p)
+  if (p)
        return p - me;
   else
        return -1;
@@ -238,7 +238,7 @@ int
 String::index_any_i (String set) const
 {
   int n = length_i();
-  if ( !n)
+  if (!n)
        return -1;
 
   void const * me_l = (void const *) strh_.ch_C();
@@ -274,7 +274,7 @@ String::right_str (int n) const
   if (n > length_i())
        return *this;
   
-  if ( n < 1)
+  if (n < 1)
       return "";
   
   return String (strh_.byte_C() + length_i() - n, n); 
@@ -284,12 +284,12 @@ String::right_str (int n) const
 String
 String::nomid_str (int index_i, int n) const
 {
-  if ( index_i < 0) 
+  if (index_i < 0) 
     {
        n += index_i;
        index_i = 0;
     }
-  if ( n <= 0)
+  if (n <= 0)
        return *this;
   
   return
@@ -309,10 +309,10 @@ String::mid_str (int index_i, int n) const
        index_i=0;
     }
   
-  if ( !length_i() || ( index_i < 0) || ( index_i >= length_i () ) || ( n < 1 ) )
+  if (!length_i() || (index_i < 0) || (index_i >= length_i () ) || (n < 1 ) )
        return String();
 
-  if ( ( n > length_i()) ||  ( index_i + n > length_i () ) )
+  if ((n > length_i()) ||  (index_i + n > length_i () ) )
        n = length_i() - index_i;
 
   return String (byte_C() + index_i, n);
index bc431567b929aa66e8ee04256d8f7e2c28731eb3..a5bc0c603600454da163d8a010e9242bd0629ad1 100644 (file)
@@ -95,14 +95,14 @@ main()
 
   cout << "up: " << str.upper_str() << " down: " << str.lower_str ()<<endl;
   
-  if ( str == String ("") )
+  if (str == String ("") )
       cout << str << " is empty" << endl;
   else
        cout << str << " is not empty"<<endl;
 
   
   String fn = "";
-  if ( fn == "")
+  if (fn == "")
       cout << fn << " is empty" << endl;
   else
        assert (false);
index 3c291a9113c6f570348490eb6bef1121d254f12c..ffb57a5dc5c05851ccc9681381563216a92ebd3f 100644 (file)
@@ -2,81 +2,86 @@
 % setup for Request->Element conversion. Guru-only
 %
 
-staff_engraver = \requesttranslator {
-                 Engraver "Engraver_group_engraver"
-                 \alias "Staff";
-                 \consists "Bar_engraver";
-                 \consists "Clef_engraver";
-                 \consists "Key_engraver";
-                 \consists "Meter_engraver";
-                 \consists "Local_key_engraver";
-                 \consists "Staff_sym_engraver";
-                 \consists "Collision_engraver";
-                 \consists "Rest_collision_engraver";
-
-                 \consists "Line_group_engraver";
-                 \contains \requesttranslator {
-                         Engraver  "Voice_group_engravers"
-                         \alias "Voice_group";
-                         \consists "Dynamic_engraver";
-                         \consists "Stem_engraver";
-                         \consists "Beam_engraver";
-                         \consists "Abbreviation_beam_engraver";
-                         \consists "Script_engraver";
-                         \consists "Note_column_engraver";
-                         \consists "Slur_engraver";
-                         \contains \requesttranslator {
-                                 Engraver "Engraver_group_engraver"
-                                 \alias "Voice";
-                                 \consists "Note_head_engraver" ;
-                                 \consists "Tie_engraver";
-                         }
-               }
-            }
-
-piano_staff_engraver = \requesttranslator {
-       Engraver "Engraver_group_engraver"
-       \alias "Piano";
-       \alias "Hoenoemjedat";
+Staff = \translator {
+         \type "Engraver_group_engraver";
+       defaultclef = violin;
+
+         \consists "Bar_engraver";
+         \consists "Clef_engraver";
+         \consists "Key_engraver";
+         \consists "Meter_engraver";
+         \consists "Local_key_engraver";
+         \consists "Staff_sym_engraver";
+         \consists "Collision_engraver";
+         \consists "Rest_collision_engraver";
+
+         \consists "Line_group_engraver";
+         \accepts "Voice";
+}
+
+Voice = \translator {
+       \type "Engraver_group_engraver";
+       \consists "Dynamic_engraver";
+       \consists "Rest_engraver";
+       \consists "Stem_engraver";
+       \consists "Beam_engraver";
+       \consists "Abbreviation_beam_engraver";
+       \consists "Script_engraver";
+       \consists "Rhythmic_column_engraver";
+       \consists "Slur_engraver";
+       \accepts "Thread";
+}
+
+Thread = \translator {
+       \type "Engraver_group_engraver";
+       \consists "Skip_req_swallow_translator";
+       \consists "Note_head_engraver" ;
+       \consists "Tie_engraver";
+}
+
+Grandstaff = \translator {
+       \type "Engraver_group_engraver";
+
        \consists "Span_bar_engraver";
        \consists "Vertical_align_engraver";
        \consists "Piano_bar_engraver";
 
        % This should come last
        \consists "Line_group_engraver";
-       \contains\requesttranslator { \staff_engraver }
+       \accepts "Staff";
 }
 
-staff_group_engraver = \requesttranslator {
-       Engraver "Engraver_group_engraver"
-       \alias "Staff_group";
+Staff_group = \translator {
+       \type "Engraver_group_engraver";
        \consists "Span_bar_engraver";
        \consists "Vertical_align_engraver";
        \consists "Line_group_engraver";
-       \contains\requesttranslator { \staff_engraver }
+       \accepts "Staff";
+       \accepts "Grandstaff";
 }
 
-lyric_engraver = \requesttranslator {
-       Engraver "Engraver_group_engraver"
-       \alias "Lyric";
+Lyric_voice = 
+\translator{
+       \type "Engraver_group_engraver";
+
+       \consists "Lyric_engraver";
+       \consists "Line_group_engraver";
+       \consists "Swallow_engraver";
+}
 
-       \contains\requesttranslator{
-               Engraver "Engraver_group_engraver"
-               \consists "Lyric_engraver";
-               \consists "Line_group_engraver";
-               \consists "Swallow_engraver";
-       }
+Lyrics = \translator {
+       \type "Engraver_group_engraver";
        \consists "Vertical_align_engraver";
        \consists "Line_group_engraver";
+       \accepts "Lyric_voice";
 }
 
-orchestral_score_translator = \requesttranslator {
-       Engraver Score_engraver
-       \alias "Score";
+Score = \translator {
+       \type Score_engraver;
 
        \consists "Timing_engraver";
        \consists "Bar_column_engraver";
-       \consists "Bar_number_grav";
+       \consists "Bar_number_engraver";
 
        \consists "Bar_align_engraver";
        \consists "Clef_align_engraver";
@@ -87,13 +92,14 @@ orchestral_score_translator = \requesttranslator {
        \consists "Span_score_bar_engraver";
 
 
-       \contains \requesttranslator { \staff_group_engraver }
-       \contains \requesttranslator { \lyric_engraver }
-       \contains \requesttranslator { \piano_staff_engraver }
+       \accepts "Staff_group";
+       \accepts "Staff";
+       \accepts "Lyrics";
+       \accepts "Grandstaff";
 }
 
-stupid_engraver = \requesttranslator {
-       Engraver Score_engraver
+Stupid_score = \translator {
+       \type Score_engraver;
        \consists "Staff_sym_engraver";
 }
 
index 95602c32357c2060ea402cf29472900568022472..103028cf20dd056f8b90e5522eef36831132dad0 100644 (file)
@@ -1,6 +1,5 @@
 
-\include "performer.ly"
 default_midi = \midi {
         \tempo 4=60;
-       \requesttranslator{ \default_midi_perf }
+       \include "performer.ly"
 }
index a69105a29a59cedb398936a762f06497fbe03c35..51aff437e8c357594dc22050aef7e0992210e5a0 100644 (file)
@@ -3,8 +3,16 @@
 \include "table16.ly"
 
 
+%{
+
+TODO make this somehow parametric. for example the linewidth was
+chosen to look good on A4 paper.  This probably looks less good on US
+paper sizes.
+
+
+%}
 paper_sixteen = \paper {
-       linewidth = 15.0 \cm;
+       linewidth = 15.5 \cm;
        rule_thickness = 0.4\pt;
        bar_size = 16.0 \pt;
        interline = 4.\pt;
@@ -25,5 +33,5 @@ paper_sixteen = \paper {
        gourlay_maxmeasures = 14.;
        castingalgorithm = \Gourlay;
        \symboltables { \table_sixteen }
-       \requesttranslator { \orchestral_score_translator }
+       \include "engraver.ly"
 }
index 159628e57030b1ad6181adce1c50a2ffc56a243f..ff27bac5a8104b72ba0ffb56304a94afd6a075d4 100644 (file)
@@ -25,6 +25,6 @@ paper_twenty = \paper {
        
        castingalgorithm = \Gourlay;
        \symboltables { \table_twenty }
-       \requesttranslator { \orchestral_score_translator }
+\include "engraver.ly"
 }
 
index 27fbcea67e77e482e8e570d0920b2a1a72a381cd..a45e0ce2716b585597303a18cf4ad4cde76a55fe 100644 (file)
@@ -1,46 +1,51 @@
 %
 % setup for Request->Element conversion. Guru-only
 %
-staff_perf =   \requesttranslator {
-               Performer "Staff_performer"
-               \alias "Staff";
-
-               \contains\requesttranslator{
-                       Performer "Performer_group_performer"
-                       \alias "Voice_group";
-                       \contains\requesttranslator{
-                               Performer "Performer_group_performer"
-                               \consists "Note_performer";
-                       }
-               }
-               \consists "Key_performer";
-               \consists "Meter_performer";
-       }
-
-default_midi_perf = \requesttranslator {
-       Performer "Score_performer"
-       \alias "Score";
-
-%      \consists "Tempo_performer";
-
-       \contains \requesttranslator{ \staff_perf }
-       \contains\requesttranslator{
-               Performer "Performer_group_performer"
-               \alias "Piano";
-               \contains\requesttranslator{\staff_perf}
-       }
-       \contains\requesttranslator{
-               Performer "Staff_performer"
-               \alias "Lyric";
-               \contains\requesttranslator {
-                       Performer "Performer_group_performer"
-                       \contains\requesttranslator{
-                               Performer "Performer_group_performer"
-                               \consists "Lyric_performer";
-                       }
-               }
-               \consists "Meter_performer";
-       }
+
+Staff =        \translator {
+       \type "Staff_performer";
+       \accepts Voice;
+       \consists "Key_performer";
+       \consists "Meter_performer";
+}
+
+
+Thread =\translator
+{
+       \type "Performer_group_performer";
+       \consists "Note_performer";
+}
+
+Voice = \translator
+{
+       \type "Performer_group_performer";
+       \accepts Thread;
+}
+
+Grandstaff = \translator
+{
+       \type "Performer_group_performer";
+       \accepts Staff;
+}
+
+Lyric_voice = \translator {
+       \type "Performer_group_performer";
+       \consists "Lyric_performer";
+}
+
+
+Lyrics = \translator { 
+       \type "Staff_performer";
+       \accepts Lyric_voice;
+       \consists "Meter_performer";
+}
+
+Score = \translator {
+       \type "Score_performer";
+       instrument = piano;
+       \accepts Staff;
+       \accepts Grandstaff;
+       \accepts Lyrics; 
        \consists "Swallow_performer";
 }
 
index 3062d2d961bf906478011c77eebae52222b9e1ba..445a8a7a6440de8f7b87131eb623834ebda3cfda 100644 (file)
@@ -1,6 +1,6 @@
 % symbol.ly
   
-\version "0.1.2";
+\version "0.1.5";
   
 breve = \duration { -1 0 }
 longa = \duration { -2 0 }
@@ -8,7 +8,7 @@ longa = \duration { -2 0 }
 \include "dynamic.ly"
 \include "dutch.ly" 
 \include "script.ly"
-\include "engraver.ly"
+
 
 Gourlay = 1.0
 Wordwrap = 0.0
@@ -29,6 +29,24 @@ left = -1
 right = 1
 up = 1
 down = -1
-
+center=0
+
+
+stemup = {
+       \skip 1*0;
+       % Stupid hack to make < { \stemup } > work
+%      \property Thread.cocktailbar = 1
+       \property Voice.ydirection = \up 
+       }
+stemboth= {
+       \skip 1*0;
+       % \property Thread.cocktailbar = 0
+       \property Voice.ydirection = \center
+}
+stemdown = {   
+       \skip 1*0;
+       %\property Thread.cocktailbar = -1
+       \property Voice.ydirection = \down
+}
 
 
index 290318e7cd442180d4d2c40b700c8102a9496491..0642176070886ee3097c572107854d5e5dc78077 100644 (file)
@@ -75,6 +75,7 @@ table_sixteen=
      }
 
      "balls" = \table {
+       "-2"    "\longaball"    0.0\pt  6.0\pt  -2.0\pt 2.0\pt
        "-1"    "\breveball"    0.0\pt  6.0\pt  -2.0\pt 2.0\pt
        "0"     "\wholeball"    0.0\pt  6.0\pt  -2.0\pt 2.0\pt
        "1"     "\halfball"     0.0\pt  5.0\pt  -2.0\pt 2.0\pt
@@ -112,6 +113,8 @@ table_sixteen=
      }
 
      "rests" = \table {
+       "-2o"   "\longarest"            0.0\pt  6.0\pt  0.0\pt  4.0\pt
+       "-2"    "\longarest"            0.0\pt  6.0\pt  0.0\pt  4.0\pt
        "-1o"   "\breverest"            0.0\pt  6.0\pt  0.0\pt  4.0\pt
        "-1"    "\breverest"            0.0\pt  6.0\pt  0.0\pt  4.0\pt
        "0o"    "\outsidewholerest"     0.0\pt  6.0\pt  0.0\pt  2.0\pt
index 94a5042a3f7ac7e4f21d66afd3fd7ea2c9769981..76a5363cbb33b8618e38ccd39531006d3d97c90f 100644 (file)
@@ -16,6 +16,6 @@ include ./$(depth)/make/Include.make
 # 
 LYFILES = $(wildcard *.ly)
 TEXFILES = $(wildcard *.tex)
-DISTFILES = Makefile $(LYFILES) $(TEXFILES)
+DISTFILES = Makefile $(LYFILES) $(TEXFILES) $(wildcard *.m4)
 #
 
index d4172672059db3c4ced87821d093b4b32df563c5..b25a386f0349315d351b65d5a18bb2f4254263a5 100644 (file)
@@ -11,7 +11,7 @@
 EndMudelaHeader
 %}
 
-\version "0.1.2";
+\version "0.1.5";
 
 \score{
        \melodic{ 
index 7b18bfbf52c00404d6e61bb3e62ce199ff70321f..2b815e3b47bba7409b0502edd4bfc6927fe16d5f 100644 (file)
  Tested Features: beams and beamflags
 EndMudelaHeader
 %}
+\version "0.1.5"
 
 \score{
        \melodic <\multi 3; 
                { \octave c'; 
                        \meter 8/4;
                        \duration8;
-                       \stem \up; [c c'' a' f']
+                       \stemup [c c'' a' f']
                        \duration16;
-                       \stem \up; [c c'' a' f']
+                       \stemup [c c'' a' f']
                        \duration32;
-                       \stem \up; [c c'' a' f']
+                       \stemup [c c'' a' f']
                        \duration64;
-                       \stem \up; [c c'' a' f']
+                       \stemup [c c'' a' f']
                        \duration128;
-                       \stem \up; [c c'' a' f']
+                       \stemup [c c'' a' f']
 
                        \duration 8;
-                       \stem \up; ['g 'g 'g 'g]
+                       \stemup ['g 'g 'g 'g]
                        \duration 16;
-                       \stem \up; ['g 'g 'g 'g]
+                       \stemup ['g 'g 'g 'g]
                        \duration 32;
-                       \stem \up; ['g 'g 'g 'g]
+                       \stemup ['g 'g 'g 'g]
                        \duration 64;
-                       \stem \up; ['g 'g 'g 'g]
+                       \stemup ['g 'g 'g 'g]
                        \duration 128;
-                       \stem \up; ['g 'g 'g 'g]
+                       \stemup ['g 'g 'g 'g]
                }
        
        { \octave c'; 
                        \meter 8/4;
                        \duration8;
-                       \stem \down; [a' 'a c e]
+                       \stemdown [a' 'a c e]
                        \duration16;
-                       \stem \down; [a' 'a c e]
+                       \stemdown [a' 'a c e]
                        \duration32;
-                       \stem \down; [a' 'a c e]
+                       \stemdown [a' 'a c e]
                        \duration64;
-                       \stem \down; [a' 'a c e]
+                       \stemdown [a' 'a c e]
                        \duration128;
-                       \stem \down; [a' 'a c e]
+                       \stemdown [a' 'a c e]
 
                        \octave c;
                        \duration 8;
-                       \stem \down; [d'' d'' d'' d'']
+                       \stemdown [d'' d'' d'' d'']
                        \duration 16;
-                       \stem \down; [d'' d'' d'' d'']
+                       \stemdown [d'' d'' d'' d'']
                        \duration 32;
-                       \stem \down; [d'' d'' d'' d'']
+                       \stemdown [d'' d'' d'' d'']
                        \duration 64;
-                       \stem \down; [d'' d'' d'' d'']
+                       \stemdown [d'' d'' d'' d'']
                        \duration 128;
-                       \stem \down; [d'' d'' d'' d'']
+                       \stemdown [d'' d'' d'' d'']
                }
        >}
 
index d817aea062cb20610303790e4753274677060395..fc143d0287d01d2fe9b06120611a4c20b3251559 100644 (file)
@@ -11,12 +11,16 @@ copyright   public domain
 Tested Features: cadenza mode
 %}
 
-\version "0.1.2";
+\version "0.1.5";
 
 
-cad = \melodic  {\id "Staff" "french horn";
-               \cadenza 1;
-               \grouping 1*4;\duration  8;\octave c';
+cad = \melodic  {
+       \property Score.instrument = "french horn"
+       \type Staff {
+       \cadenza 1;
+       \grouping 1*4;
+       \duration  8;
+       \octave c';
 
        \clef "violin";
        c'4.\mf g8
@@ -54,10 +58,10 @@ cad = \melodic  {\id "Staff" "french horn";
        a4. g8 [f8 e8 d8 c8]
        'g2 d2^"\tr"
        c4
-       }
+       }}
 \score {
        \melodic { \cad }
+       \midi { \tempo 4 = 90; }
        \paper {
        }
-       \midi { \tempo 4 = 90; }
 }
index 4bf20ce8c8526a3949c769f4d59feb73571afd4b..c65800b9618393b1e4dee2395ae401e5e8908c1c 100644 (file)
  Tested Features:test the Collision resolution 
 EndMudelaHeader
 %}
-\version "0.1.2";
+\version "0.1.5";
 
 
 
 two_voice = \melodic 
        < \multi 2; 
-         {     \octave c'; \stem \down;
+         { \stemdown \octave c'; 
                c4 d e f g2~  g4 a [c8 d e f] c2| }
-         { \stem \up;
+         { \stemup
                g4 f e g ~ g2 g2  c4 g4 g2 } 
 
        >
 
 two_voice_steminvert = \melodic 
        < \multi 2;  
-         {     \octave c'; \stem \up;
+         { 
+               \octave c'; \stemup
 % the f and g on 4th beat are exceptionally ugh.
                c4 d e f g2 g4 a | }
-         { \stem \down;
+         { \stemdown
                g4 f e g  g2 g2 } 
 
        >
 
 three_voice = \melodic 
        < \multi 2;
-       { \stem \up; 
+       { \stemup 
                g4 f e f g a g2 }
-       { \hshift 1; \stem \up; 
+       { \stemup \property Voice.hshift = 1 
                e2  e2  e2  e2 }
-       { \stem \down;
+       { \stemdown
                c4 d e d c d es }
        >
 
 
 rests = \melodic  
        < \multi 2;
-       { \stem \up;
+       { \stemup
                | r8 r r r  r r r r 
                [c' b a g] [f e d c]
        } 
-       { \stem \down;
+       { \stemdown
                [c8 d e f] [g a b c']
                r r r r r r r r 
        }
@@ -59,12 +60,12 @@ rests = \melodic
 restsII = \melodic {
        \octave c'; 
                        < \multi2;  
-                               { \stem \up;  g' f' e' d' c' b a g f e d c }
-                               { \stem \down; r  r  r  r  r  r r r r r r r }
+                               { \stemup  g' f' e' d' c' b a g f e d c }
+                               { \stemdown r  r  r  r  r  r r r r r r r }
                        >
                        < \multi2;  
-                               { \stem \up;  r r r r r r r r  r  r  r  r }
-                               { \stem \down; c d e f g a b c' d' e' f' g' }
+                               { \stemup  r r r r r r r r  r  r  r  r }
+                               { \stemdown c d e f g a b c' d' e' f' g' }
                        >
                        r8 r4
                        < \multi2;  r8 r8 >
@@ -72,17 +73,17 @@ restsII = \melodic {
                        < \multi2;  r8 r8 r8 r8 >
                        < \multi2;  r r >
                        < \multi2;  r r r >
-                       \stem \up;
+                       \stemup
                        [c''8 r8 c''8 c''8]
                        [c8 r8 c8 c8]
-                       \stem \down;
+                       \stemdown
                        [c8 r8 c8 c8]
                        [c''8 r8 c''8 c''8]
 }
 
 \score{
-       \melodic {  \$two_voice  \$two_voice_steminvert 
-                       \$three_voice  \rests \restsII }
+       {  \two_voice  \two_voice_steminvert 
+                       \three_voice  \rests \restsII }
        
 
        
index ffee788c298e3a6a6a6e9d6bd95798bb1476259a..62d21690bafc054d72357fd07e8bf2a085cdcc58 100644 (file)
@@ -17,7 +17,7 @@ EndMudelaHeader
 % (maybe even sooner :-)
 %
 
-\version "0.1.2";
+\version "0.1.5";
 
 alto = \melodic{ 
        
@@ -39,7 +39,7 @@ alto = \melodic{
 %33
                        [ ) c8 c-. ] c4. c-. c4 
                \group "+bla";
-                \stem  1 ;[ c16^"div." c16 c16 c16 ] c4 c2 
+                \stemup[ c16^"div." c16 c16 c16 ] c4 c2 
                \group "-";
                }
 %30:2
@@ -68,7 +68,7 @@ alto = \melodic{
        % 
                        \octave  'c ;
                        \textstyle "italic";
-                       \stem  -1 ;
+                       \stemdown
                        [ as16 \ff as16 as16 as16 ] as4_"simile" as2
                        \textstyle "roman";
                        \group "-";
diff --git a/input/fugue1.ly b/input/fugue1.ly
deleted file mode 100644 (file)
index bc1ac70..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-\header{
-filename               fugue1.ly
-title          Fuga a 4
-description            Das Wohltemperierte Clavier I, Fuga I (c-major)
-opus           BWV 846
-composer               Johann Sebastian Bach (1685-1750)
-enteredby              Shay Rojansky
-copyright              Public Domain
-}
-
-%{
-       
-%}
-\version "0.1.2";
-
-
-global = 
-    \melodic {
-         \meter 4/4;                % should be \meter C
-    }
-  
-tenor =
-    \melodic {
-        \clef "violin";
-        \octave c';
-
-        \stem \down;
-        r8 [c8 d e] [f. g32 f] [e8 a] |
-        [d g] ~ [g16 a g f] [e f e d] [c d c 'b] |
-        ['a8 fis] g4 ~ [g8 fis16 e] [f8 d] |
-        [g f! e d] c r r g ~ |
-%% 5
-        [g f16 e] f4 ~ [f16 f e8] d4 |
-        [c8 f] r16 [g f e] [f8 d] g4 ~ |
-       g4 r4 r2 |
-       r1 |
-       r8 [g8 a b] [c'. d'32 c'] [b8 e']
-%% 10
-       [a d'] ~ [d'16 e' d' c'] b8 r8 r d |
-       [e fis] [g. a32 g] [fis8 b e a] ~ |
-       [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] |
-       [a gis a b] [gis fis gis a] b8 r8 r4 |
-       r8 [c8 d e] \stem 1; [f. g32 f] [e8 a] |
-%% 15
-       [d g] ~ [g16 a g f] e8 \stem -1; [e fis g] ~ |
-       [g8 fis] [gis8 a] ~ [a g! a b] |
-       \stem 0;
-       [c'. d'32 c'] [b8 e'] [a d'] ~ [d'16 e' d' c'] |
-       [b8 g' cis' d'] [e' cis' d' e' ] |
-       \stem -1; a8 r8 r e [fis g] \stem 0; [a. b32 a] |
-%% 20
-       [g8 c' fis b] ~ [b16 c' b a] \stem -1; [g fis e d] \stem 0; |
-       e4 \stem -1; d ~ [d16 a g f!] [e g f! a] |
-       g4 ~ [g16 a bes8] c'4 [d'8 g] |
-       \stem 0; g4. f8 ~ [f e] d4 |
-       \stem -1; e8 a4 g8 ~ [g8 f g a] |
-%% 25
-       [bes8. c'32 b] [a8 d'] [g c'] ~ [c'16 d' c' bes] |
-       [a bes a g] [f g f e] d4 ~ [d8. g16] |
-       a4 r16 [f'16 d'8] e'2 |
-    }
-
-
-soprane =
-    \melodic {
-        \octave c';
-        \stem \up;
-        r1 |
-        r2 r8 [g8 a b] |
-        [c'. d'32 c'] [b8 e'] [a d'] ~ [d'16 e' d' c'] |
-        [b g a b] [c' b c' d'] [e' d' e' fis'] [g'8 b] |
-%% 5
-       [c' a] [d'16 c' b a] [g8. g16] [f e f g] |
-       [a g a b] c'2 b4 |
-       \octave c'';
-       r8 [c8 d e] [f. g32 f] [e8 a] |
-       [d g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] |
-       f2 [e8. fis16] g4 ~
-%% 10
-       g4 fis [g16 f! e d] [c d c 'b] |
-       ['a16 c 'b 'a] 'g8 r8 r16 [c16 'b 'a] ['gis8 e] |
-       [d c16 'b16] ['a 'gis 'a 'b] [c 'fis 'a 'gis] ['b8 'a16 'b]
-       [c8 f e d] ~ [d c16 'b] ['b8. 'a16] |
-       'a4 r4 r2 |
-%% 15
-       r2 r8 ['g8 'a 'b] |
-       [c8. d32 c] ['b8 c] [d e] [f!. g32 f!] |
-       [e8 a d g] ~ [g16 a g f] [e8 a] |
-       [d8 bes] [a g16 f] [g f g e] [f g g f32 g] |
-       [a16 cis d g] [e8. d16] d8 r8 r4 |
-%% 20
-       r2 r4 r8 'g |
-       ['a 'b] [c. d32 c] ['b8 e 'a d] ~ |
-       [e16 e d c] ['b c d e] [f g a g] [f e d c] |
-       'b4 [c8 d] 'g c4 'b8 |
-       c4 ['b8 'bes8] 'a d4 c8 |
-%% 25
-       [d8 e] f4 ~ [f16 a g f] [e f e d] |
-       c2 r16 ['g32 'a 'b!16 c] [d e f8] ~ |
-       [f32 c d e f16 g] [a8. b16] <g2 c'2> |
-    }
-
-alt =
-    \melodic {
-        \clef "bass";
-        \octave c;
-       
-       \stem 1;
-       r1 |
-       r |
-       r |
-       r8 [g8 a b] [c'. d'32 c'] [b8 e'] |
-%% 5
-       [a d'] ~ [d'16 e' d' c'] [b8 c' ~ c' bes8] |
-       [a d' g c'] r16 [a16 b c'] d'4 |
-       g4 r8 g8 [a b] [c'. d'32 c'] |
-       [b8 e' a d'] ~ [d'16 e' d' c'!] [b!8 e'] ~ |
-       e'4 d'4 [c'16 b c' a] [e' d' c' b] |
-%% 10
-       [c'16 a b c'] [d' c' b a] g4 r4 |
-       r1 |
-       r8 [e8 fis gis] [a. b32 a] [gis8 c'] |
-       [fis b] ~ [b16 c' b a] gis8 a4 gis8 |
-       a4 r8 g8 [a b] c'. [d'32 c'] |
-%% 15
-       [b8 e' a d'] ~ [d' g] d'4 |
-       [c'8 a] e'4 d'8 r8 r4 |
-       r8 [a8 b cis'] [d'. e'32 d'] [c'!8 f'] |
-       [b8 e'] ~ [e'16 f' e' d'] cis'8 r8 r4 |
-       r8 [a8 b cis'] [d'. e'32 d'] [c'!8 fis'] |
-%% 20
-       [b e'] ~ [e'16 fis' e' d'] c'2 ~ |
-       [c'16 d' c' b] [a g a fis] [g8 b c' d'] |
-       [e'. f'32 e'] [d'8 g'] [c' f'] ~ [f'16 g' f' e'] |
-       d'4 [e'8 d'] ~ [d' g] g4 ~
-       [g8 c d e] [f. g32 f] [e8 a] |
-%% 25
-       [d g] ~ [g16 a g f] [e d e f] [g a bes g] |
-       [a e f g] [a b c' a] b2 |
-       c'1 |
-    }
-
-bass =
-    \melodic {
-        \clef "bass";
-        \octave c;
-
-       \stem -1;
-        r1 |
-       r |
-       r |
-       r |
-%% 5
-       r2 r8 [c8 d e] |
-       [f. g32 f] [e8 a] [d g] ~ [g16 a g f] |
-       [e f e d] [c d c 'b] ['a8 d a fis] |
-       [g16 a bes g] [cis8 d] a4 e4 |
-       [a16 b c' d'] [c' b a g] c'8 r8 r4 |
-%% 10
-       r2 r8 ['g8 'a 'b] |
-       [c. d32 c] ['b8 e] ['a d] ~ [d16 e d c] |
-       'b8 e4 d8 c f!4 e8 ~ |
-       e d4 e8 [f! e16 d] e4 |
-       'a4 r4 r2 |
-%% 15
-       r8 ['g8 'a 'b] [c. d32 c] ['b8 e] |
-       ['a8 d] ~ [d16 e d c] ['b8 'bes 'a g'] |
-       ['a8 fis g e] d4 [e8 f!] |
-       [g8. a32 g] [f8 bes] [e a] ~ [a16 bes a g] |
-       [f e f d] [g8 a] d2 ~ |
-%% 20
-       [d16 e d c] ['b 'a 'g 'fis] ['e8 e fis g] ~ |
-       [g a16 g16] [fis8 d] g2 ~ |
-       g2 a4 [b8 c'] |
-       [f16 a g f] [e d c 'b] [c d e f] [g8 'g] |
-       c1 ~ |
-%% 25
-       c1 ~ |
-       c1 ~ |
-       c1 |
-    }
-
-        
-\score {
-    \melodic < \id "Piano" ""; 
-              \multi 1;
-                 < \multi 2;
-                       \global 
-                       \soprane
-                       \tenor
-                 >
-                 < \multi 2;
-                       \global
-                       \alt
-                      \bass
-                 >
-             >
-
-    \paper{
-       gourlay_maxmeasures =5.;
-%      castingalgorithme = \Wordwrap
-    }
-    \midi {
-        \tempo 4 = 84;
-    }
-}
-
-% EOF
index 6509c9cd06b3c276d07af9578ff6086f43d5696f..9c0498c412acd861186899e37a1fcc23f6cd89f6 100644 (file)
@@ -39,6 +39,8 @@ part of the basso continuo
  
 %}
 
+\version "0.1.5";
+
 vi1=\melodic{
   \meter 4/4;
   \octave c'';
@@ -198,11 +200,11 @@ bc=\melodic{
   \meter 3/2;
   g1. | c |
        % 30
-  f | d^"\sharp" |
+  f | d^"\textsharp" |
   g | c |
-  A | d^"\sharp" |
+  A | d^"\textsharp" |
   G | c |
-  d^"\sharp" | e |
+  d^"\textsharp" | e |
   f | g1 B2 |
   d1.^"3 4 3" |
   \meter 4/4;
@@ -211,7 +213,7 @@ bc=\melodic{
   g1^"3 4 3" | c |
   G^"3 4 3" | c2 G |
   d1^"3 4 3" | G^"3 4 3" |
-  c2 G | d1^"\sharp" ( |
+  c2 G | d1^"\textsharp" ( |
   ) d^"3 4 3" | 
   \cadenza 1;
   G\breve 
@@ -229,9 +231,9 @@ bc=\melodic{
      \output "gallina.out";
     gourlay_maxmeasures=7.;
   }
- \midi{ 
 \midi{ 
        \tempo 4=90;
-}
+  }
 }
 
 
index 1b82f12361326ab6e629acd55391f66c8813e3ab..1c3b99bd6d96a21dee461d077744b60e835a14f1 100644 (file)
@@ -10,7 +10,7 @@
  Tested Features: local key, key, forced accidentals
 EndMudelaHeader
 %}
-\version "0.1.2";
+\version "0.1.5";
 
 
 blah = \melodic{
index 236d53ad366e0f14eca71dda956c36e15c898ade..924c84a979e240291a32f8ca7e111dd54f294890 100644 (file)
@@ -11,7 +11,7 @@ copyright             public domain
 Tested Features: example file with comments
 
 %}
-\version "0.1.2";
+\version "0.1.5";
 
 
 % the % is a comment.
@@ -59,7 +59,7 @@ begeleiding = \melodic{
 }
 
 \score{
-       \melodic < \id "Piano" ""; \multi 3;
+       \melodic \type Grandstaff =  <
                \melodie
                \begeleiding 
        >
index de46690d5b58cda34205a7c02864318f8adbfb1a..8270bfd80931a3390360d2c9162c5a4fc14c3ad5 100644 (file)
@@ -10,13 +10,13 @@ Tested Features: \multi
 %}
 
 
-\version "0.1.2";
+\version "0.1.5";
 
 \score{
        \melodic 
                { \octave c'; c4 c4 
                        < \multi 1;  { c2 c2 } { c'2 c'2 } > 
-                       < \multi 2;  { \stem \down; c2 c2 } { \stem \up; c'2 c'2 } > 
+                       < \multi 2;  { \stemdown c2 c2 } { \stemup c'2 c'2 } > 
                        < \multi 3;  { \clef "bass"; c2 c2 } { \meter 2/4;\bar "||"; \key fis cis gis; c'2 c'2 } > 
                                c2 c1 
                        c1 c1
index 60ad7e12443e56a17e89f7346415d48ba4570286..2827ed2bedadc49edf01c28e0712aba7188f7ffc 100644 (file)
@@ -24,7 +24,7 @@
 % \lbheel \lbheel \lfheel \lftoe
 % \rbheel \rbtoe \rfheel \rftoe
 
-\version "0.1.2";
+\version "0.1.5";
 
 \score{
                \melodic {
diff --git a/input/prelude1.ly b/input/prelude1.ly
deleted file mode 100644 (file)
index a032b94..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-\header{
-filename               prelude1.ly
-title          Preludium
-description            Das Wohltemperierte Clavier I, Prelude I (c-major)
-opus           BWV 846
-source
-composer               Johann Sebastian Bach (1685-1750)
-enteredby              Shay Rojansky
-copyright              Public Domain"
-}
-
-\version "0.1.2";
-
-                                    % should add \need{dutch.ini} for
-                                    % correct parsing of note names
-
-global = 
-    \melodic {
-        \meter 4/4;                % should be \meter C
-    }
-  
-
-% should do programmable input.
-
-soprane =
-    \melodic {
-        \clef "violin";
-        \octave c';
-
-       <\multi 2;
-       % Real soprane
-       {\stem 1;
-       r8 [g16 c'] [e' g c' e'] r8 [g16 c'] [e' g c' e'] |
-       r8 [a16 d'] [f' a d' f'] r8 [a16 d'] [f' a d' f'] |
-       r8 [g16 d'] [f' g d' f'] r8 [g16 d'] [f' g d' f'] |
-       r8 [g16 c'] [e' g c' e'] r8 [g16 c'] [e' g c' e'] |
-       r8 [a16 e'] [a' a e' a'] r8 [a16 e'] [a' a e' a'] |
-       r8 [fis16 a] [d' fis a d'] r8 [fis16 a] [d' fis a d'] |
-       r8 [g16 d'] [g' g d' g'] r8 [g16 d'] [g' g d' g'] |
-       r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |
-       r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |}
-       % Tenor
-       {\stem -1;
-       r16 e8. ~ e4 r16 e8. ~ e4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 e8. ~ e4 r16 e8. ~ e4 |
-       r16 e8. ~ e4 r16 e8. ~ e4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 c8. ~ c4 r16 c8. ~ c4 |
-       r16 c8. ~ c4 r16 c8. ~ c4 |}>
-%% 10  
-       r8 [d16 fis] [c' d fis c'] r8 [d16 fis] [c' d fis c'] |
-       r8 [d16 g] [b d g b] r8 [d16 g] [b d g b] |
-       r8 [e16 g] [cis' e g cis'] r8 [e16 g] [cis' e g cis'] |
-       r8 [d16 a] [d' d a d'] r8 [d16 a] [d' d a d'] |
-       r8 [d16 f] [b d f b] r8 [d16 f] [b d f b] |
-       r8 [c16 g] [c' c g c'] r8 [c16 g] [c' c g c'] |
-       r8 ['a16 c] [f 'a c f] r8 ['a16 c] [f 'a c f] |
-       r8 ['a16 c] [f 'a c f] r8 ['a16 c] [f 'a c f] |
-       r8 ['g16 'b] [f 'g 'b f] r8 ['g16 'b] [f 'g 'b f] |
-       r8 ['g16 c] [e 'g c e] r8 ['g16 c] [e 'g c e] |
-%% 20
-       r8 ['bes16 c] [e 'bes c e] r8 ['bes16 c] [e 'bes c e] |
-       r8 ['a16 c] [e 'a c e] r8 ['a16 c] [e 'a c e] |
-       r8 ['a16 c] [ees 'a c ees] r8 ['a16 c] [ees 'a c ees] |
-       r8 ['b16 c] [d 'b c d] r8 ['b16 c] [d 'b c d] |
-       r8 ['g16 'b] [d 'g 'b d] r8 ['g16 'b] [d 'g 'b d] |
-       r8 ['g16 c] [e 'g c e] r8 ['g16 c] [e 'g c e] |
-       r8 ['g16 c] [f 'g c f] r8 ['g16 c] [f 'g c f] |
-       r8 ['g16 'b] [f 'g 'b f] r8 ['g16 'b] [f 'g 'b f] |
-       r8 ['a16 c] [fis 'a c fis] r8 ['a16 c] [fis 'a c fis] |
-       r8 ['g16 c] [g 'g c g] r8 ['g16 c] [g 'g c g] |
-%% 30
-       r8 ['g16 c] [f 'g c f] r8 ['g16 c] [f 'g c f] |
-       r8 ['g16 'b] [f 'g 'b f] r8 ['g16 'b] [f 'g 'b f] |
-       r8 ['g16 'bes] [e 'g 'bes e] r8 ['g16 'bes] [e 'g 'bes e] |
-
-       r8 ['f16 'a] [c f c 'a] [c 'a 'f 'a] ['f 'd 'f 'd] |
-       r8 [g16 b] [d' f' d' b] [d' b g b] [d f e d] |
-       <e1 g c'> ||
-    }
-
-bass =
-    \melodic {
-        \clef "bass";
-        \octave c;
-
-       \stem -1;
-       c'2 c' |
-       c' c' |
-       b b |
-       c' c' |
-       c' c' |
-       c' c' |
-       b b |
-       b b |
-       a a |   
-%% 10
-       <\multi 2;
-       % Alt
-       {\stem 1;
-       r16 a8. ~ a4 r16 a8. ~ a4 |
-       r16 b8. ~ b4 r16 b8. ~ b4 |
-       r16 bes8. ~ bes4 r16 bes8. ~ bes4 |
-       r16 a8. ~ a4 r16 a8. ~ a4 |
-       r16 aes8. ~ aes4 r16 aes8. ~ aes4 |
-       r16 g8. ~ g4 r16 g8. ~ g4 |
-       r16 f8. ~ f4 r16 f8. ~ f4 |
-       r16 f8. ~ f4 r16 f8. ~ f4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 e8. ~ e4 r16 e8. ~ e4 |
-%% 20
-       r16 g8. ~ g4 r16 g8. ~ g4 |
-       r16 f8. ~ f4 r16 f8. ~ f4 |
-       r16 c8. ~ c4 r16 c8. ~ c4 |
-       r16 f8. ~ f4 r16 f8. ~ f4 |
-       r16 f8. ~ f4 r16 f8. ~ f4 |
-       r16 e8. ~ e4 r16 e8. ~ e4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 ees8. ~ ees4 r16 ees8. ~ ees4 |
-       r16 e!8. ~ e4 r16 e8. ~ e4 |
-%% 30
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 d8. ~ d4 r16 d8. ~ d4 |
-       r16 c8. ~ c4 r16 c8. ~ c4 |
-
-       r16 c8. ~ c4 ~ c2 |
-       r16 'b8. ~ 'b4 ~ 'b2 |
-       c1 ||}
-
-       % Bass
-       {\stem -1;
-       d2 d |
-       g g |
-       g g |
-       f f |
-       f f |
-       e e |
-       e e |
-       d d |
-       'g 'g |
-       c c |
-%% 20
-       c c |
-       'f 'f |
-       'fis 'fis |
-       'aes 'aes |
-       'g 'g |
-       'g 'g |
-       'g 'g |
-       'g 'g |
-       'g 'g |
-       'g 'g |
-%% 30
-       'g 'g |
-       'g 'g |
-       'c 'c |
-       
-       'c 'c |
-       'c 'c |
-       'c1 }>
-    }
-
-        
-\score {
-    \melodic < \id "Piano" ""; 
-              \multi 1;
-                 < \multi 2;
-                       \global 
-                       \soprane
-                 >
-                 < \multi 2;
-                       \global
-                      \bass
-                 >
-             >
-
-    \paper{
-       gourlay_maxmeasures =5.;
-       
-    }
-    \midi {
-        \tempo 4 = 84;
-    }
-}
-
-% EOF
index 75c5f54e05c9c945ce8c96e8ec5bb7b213e0c489..ef4481d1f8b902cf8b77b31454b11ada6804b73b 100644 (file)
@@ -1,18 +1,13 @@
-
 \header{
- filename      rhythm.ly
- entered-by    HWN
- copyright     public domain
- Tested Features        multiple meters, beaming
-       unsynced bars
+filename       rhythm.ly
+enteredby      HWN
+copyright      public domain
+TestedFeatures  multiple meters, beaming, unsynced bars, userdefd engravers
 }
-%{
-has to be revised for 0.1.12
-%}
 
 
 
-\version "0.1.2";
+\version "0.1.5";
 
 ritme = \melodic{ %\octave ;
        \partial 8;
@@ -61,5 +56,42 @@ yanother =
        >
        
        \paper{
+
+       %% remove Timing_engraver and Bar_number_engraver
+       Score = \translator {
+       \type Score_engraver;
+
+       \consists "Bar_align_engraver";
+       \consists "Clef_align_engraver";
+       \consists "Key_align_engraver";
+       \consists "Meter_align_engraver";
+       \consists "Score_horizontal_align_engraver";
+       \consists "Vertical_align_engraver";
+       \consists "Span_score_bar_engraver";
+
+
+       \accepts "Staff_group";
+       \accepts "Staff";
+       \accepts "Lyrics";
+       \accepts "Grandstaff";
+       }
+
+       %% add Timing_engraver to the staff
+       Staff = \translator {
+         \type "Engraver_group_engraver";
+
+       \consists "Timing_engraver";
+         \consists "Bar_engraver";
+         \consists "Clef_engraver";
+         \consists "Key_engraver";
+         \consists "Meter_engraver";
+         \consists "Local_key_engraver";
+         \consists "Staff_sym_engraver";
+         \consists "Collision_engraver";
+         \consists "Rest_collision_engraver";
+
+         \consists "Line_group_engraver";
+         \accepts "Voice";
+       }
        }
 }
index 86a8721c39ce357388211fab0a2043cbb1b8351a..64acc42bea9576df14357a5f4a436e4e623a4949 100644 (file)
@@ -12,7 +12,7 @@ EndMudelaHeader
 % scales with accents.
 %
 
-\version "0.1.2";
+\version "0.1.5";
 blah =         \melodic {
                \meter 6/8;     
                \octave  'c ;
index 9e2cf7ab60bc05b301a5f51625923e619c6b39a6..b4e95203c4aaa3f304c9fea6eef64772595fa0e8 100644 (file)
@@ -10,7 +10,7 @@
  Tested Features: scripts, text.
 EndMudelaHeader
 %}
-\version "0.1.2";
+\version "0.1.5";
 
 
 blah =         \melodic {
index 36af5c2cb7f563acbcc2eadd1885511b525a51ca..247cf7901bb66e5fe73c211c842aaadcbdb70f6f 100644 (file)
@@ -13,7 +13,7 @@ copyright     public domain
  Tested Features:breaking algorithm, chords, multivoice, accents
 %}
 
-\version "0.1.2";
+\version "0.1.5";
 
 %% Stuff from MPP version
 % \lefttitle{Menuetto}
@@ -27,6 +27,7 @@ copyright     public domain
 
 IImenuetto = \melodic{
        \clef"alto";
+       \property Staff.instrument = cello
        \meter 3/4;
        \key bes;
        \octave c';
@@ -34,16 +35,16 @@ IImenuetto = \melodic{
        \duration 8;
                < a2 f2 d2 \f > bes4-.  |
 %%2
-       < [ bes8^"1" e c_"2"_"4" >
-               a bes-. g-. ] a4-.^"4" |
+       < [ bes8^"1" e8 c8_"2"_"4" >
+               a8 bes8-. g8-. ] a4-.^"4" |
 %%3
-       < d4 'bes4-. > g4-. [ f8-. e-. ] |
+       < d4 'bes4-. > g4-. [ f8-. e8-. ] |
 %%4
-       < [ f 'a > e d cis-. 'b-. 'a-. ]
+       < [ f8 'a > e8 d8 cis8-. 'b8-. 'a8-. ]
 %%5
        < a2 f2 d2 > bes!4-. |
 %%6
-       < [ bes8 e > a bes-. g-. ]
+       < [ bes8 e8 > a8 bes8-. g8-. ]
        c'!4-. |
 %%7
        < a4-. f4>
@@ -57,52 +58,50 @@ IImenuetto = \melodic{
        < e'2 a2 \f >
        [ d'8( e'16 )f'16 ] |
 %%10
-       < [ e'8 g > d' cis'_"2" e' a~  g ] |
+       < [ e'8 g8 > d' cis'_"2" e' a~  g8 ] |
 %%11
        < \multi 2;  
-               {\stem \up; a4~  d'4 cis'4-. }
-               { \stem \down; f2 e4 } > |
+               {\stemup a4~  d'4 cis'4-. }
+               { \stemdown f2 e4 } > |
 %%12
-       < [ g'8^"4" d > f' e' f' d'^"3"~   c' ] |
+       < [ g'8^"4" d8 > f' e' f' d'^"3"~   c' ] |
 %%13
        \clef "alto";
        < \multi 2;
-                { \stem \up; bes2 c'4 }
-                { \stem \down; g4~  f4 e4 }% ugh
+                { \stemup bes2 c'4 }
+                { \stemdown g4~  f4 e4 }% ugh
        > |
 %%14
-       < [ a8 f > g a f ] < d'4-\upbow e4 'bes4 > |
+       < [ a8 f8 > g8 a8 f8 ] < d'4-\upbow e4 'bes4 > |
 %%15
-       < c'4-\downbow f4 'a4 > [ bes8~  a g a ] |
+       < c'4-\downbow f4 'a4 > [ bes8~  a8 g8 a8 ] |
 %%16
-       [ f( e )f a-. g-. bes-. ] |
+       [ f( e8 )f a8-. g8-. bes8-. ] |
 %%17
        < a2^"0" fis2_"3" > bes4 |
 %%18
-       < { [ c'8~  bes c' a ] } { [ es ] } > fis4 |
+       < { [ c'8~  bes8 c' a8 ] } es8 > fis4 |
 %%19
-       < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d > a ] |
+       < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d8 > a8 ] |
 %%20
-       < { [ c'8 ( bes a )bes g~  bes ] } { [ d ] } { [ g ] } > |
+       < { [ c'8 ( bes8 a8 )bes g~  bes8 ] }  d8  g8  > |
 %%21
        < \multi 2;  
-               {\stem \up;  d'4 (\stem \up; ) cis'4 d'4 }  
-               { \stem \down; g2 f4 } 
+               {\stemup  d'4 (\stemup ) cis'4 d'4 }  
+               { \stemdown g2 f4 } 
        > |
 %%22
-       < { [ g8 ~  f g e ] } { [ cis ] } > < f4 d4 > |
+       < { [ g8 ~  f8 g8 e8 ] }  cis8  > < f4 d4 > |
 %%23
-       [ 'g8 g ] < e4. 'a4. > d-\upbow |
+       [ 'g8 g8 ] < e4. 'a4. > d8-\upbow |
 %%24
        < d2.^"fine" 'a2. 'd2._"3 mins."> 
        \bar ":|";
-%% \tighten            % use one line less
-       
 }
 
 \score{
        \melodic{ 
-               \id "Staff" "cello"; \IImenuetto 
+               \IImenuetto 
        }
        \paper{
                linewidth= 150.0\mm;
index 0113beffe2303dd7c323cb20e67b96b61cd278f2..4fe7e5418695c5c85a8fd70469e665cf2df88d90 100644 (file)
@@ -11,7 +11,7 @@
 EndMudelaHeader
 %}
 
-\version "0.1.2";
+\version "0.1.5";
 
 \score{
        \melodic{\octave c';
@@ -29,8 +29,8 @@ EndMudelaHeader
                  { e ~ f }
                >
        < \multi 2;
-       { \stem \up; c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
-       { \stem \down; c (e g )c'~( [b a g )d]          r2 } 
+       { \stemup c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
+       { \stemdown c (e g )c'~( [b a g )d]     r2 } 
        >
 
        }
index b30bb0031812fdf165c1e663bacb6d790943cc34..ae3ccc33baad12ebef7fd18af0448ceac35eff72 100644 (file)
@@ -1,12 +1,12 @@
 \documentclass{article}         %UGH
 \usepackage{a4}
-\oddsidemargin0mm
+\oddsidemargin-1in\advance\oddsidemargin7.5mm
 \evensidemargin\oddsidemargin
 \hsize210mm\vsize297mm % so what does a4 do, anyway?
-\textwidth160mm
-\topmargin0mm%\advance\topmargin10mm
-\textheight\vsize\advance\textheight-50mm
-%\pagestyle{empty}
+\textwidth\hsize\advance\textwidth-15mm
+\topmargin-1in\advance\topmargin10mm
+\textheight\vsize\advance\textheight-35mm
+\pagestyle{empty}
 \begin{document}
 \input lilyponddefs
 \input titledefs
index 53ad10aa95178ffd88988daeadd0f94dd5df4ec4..ba5f3d82415ff7370e3c36959b15a0c304947d08 100644 (file)
@@ -13,7 +13,7 @@ copyright     public domain
 multiple \paper{}s in one \score 
 %}
 
-\version "0.1.2";
+\version "0.1.5";
 
 commands = \melodic{
        \skip 2.*4;
@@ -154,8 +154,8 @@ melodie = \melodic{
        < 
        { fis2.~
        %\group "+1"; 
-               \stem \down; f2. }
-       { d'2. ~ \stem \up;
+               \stemdown f2. }
+       { d'2. ~ \stemup
                d'4 r4_"decresc." d'4 } 
        >
        \textstyle "roman"; |
@@ -202,71 +202,71 @@ begeleiding = \melodic{
        ''a r4 |
 %%5
 \duration 8;
-       < \multi 2; { \stem \up;        
+       < \multi 2; { \stemup   
                [ 'f 'a d 'a d 'a ] 
                [ 'd 'e 'g 'e 'g 'e ] 
                [ 'cis 'e 'g 'e 'g 'e ]
                [ 'd 'a d 'a d 'a ]
                }
-       { \stem \down; 
+       { \stemdown 
                'd2 r4 
                 ''bes2 r4 
                 ''a2 r4
                'd2 r4
        } >
 %%9
-       \stem 0;
+       \stemboth
        [ 'a e g e g e ] |
 %%10
        [ 'd 'a d 'a d 'a ] |
 %%11
        < \multi 2;     
-       { \stem \up;
+       { \stemup
                [ 'f 'a d 'a d 'a ]
                [ 'd 'e 'g 'e 'g 'e ] 
                [ 'e 'g 'bes 'g 'bes 'g ] 
                [ 'a c f c f c ]
-       } { \stem \down; 
+       } { \stemdown 
                'd2 r4 
                 ''bes2 r4
                 'c2 r4 
                 'f2 r4 } 
        >
 %%15
-       \stem 0;
+       \stemboth
        [ 'c 'g 'bes 'g 'bes 'g ] |
 %%16
        [ ''f 'c 'f 'c 'f 'c ] |
        < \multi 2;
-       { \stem \up; 
+       { \stemup 
                [ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ]
                [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] }
-       { \stem \down; 
+       { \stemdown 
                ''a2 r4
                'd2 r4 
                ''bes2 r4 
                ''f2 r4 
        } > 
 %%21
-       \stem 0;
+       \stemboth
        < [ 'e 'c > 'g c 'g c 'g ] |
 %%22
        [ 'f 'a c 'a 'f 'c ] |
        < \multi 2; {
-               \stem \up;
+               \stemup
                [ ''a 'e 'g 'e 'g 'e ] 
                [ 'd 'fis 'a 'fis 'a 'fis ] 
                [ ''g 'd 'b 'd 'b 'd ] 
                [ 'd 'a d 'a d 'a ] 
        }
-       {\stem \down;
+       {\stemdown
                ''a2 r4 
                'd2 r4 
                ''g2 r4 
                'd2 r4 
        }
        >
-       \stem 0;
+       \stemboth
        < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
 %%28
        [ 'd 'a d 'a d 'a ] |
@@ -305,17 +305,17 @@ begeleiding = \melodic{
 %%44
        < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
 %%45
-       < \multi 2; { \stem \up; 
+       < \multi 2; { \stemup 
                [ ''g 'd 'b 'd 'b 'd ] 
                [ 'd 'a d 'a d 'a ] 
        } {
-               \stem \down;
+               \stemdown
                ''g2 r4
                'd2 r4 
        } >
 
 %%47
-       \stem 0;
+       \stemboth
        < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
 %%48
        [ 'd 'fis 'a 'fis 'a 'fis ] |
@@ -474,11 +474,11 @@ tekstII = \lyric{
  
 themusic = 
        <       
-               <       \id "Lyric" "1";
+               \type Lyrics < 
                        \tekstI
                         \tekstII
                >
-               < \id "Piano" "";
+               \type Grandstaff   <
                        \multi 2;
                        \melodic < \melodie \commands >
                        \melodic < \begeleiding \commands >
@@ -488,6 +488,9 @@ themusic =
 
 \score{
        \themusic
+       \midi{
+               \tempo 4 = 54;
+       }
        \paper{
                \paper_twenty
                % 20pt music uses whole pagewidth
@@ -506,7 +509,4 @@ themusic =
                gourlay_maxmeasures = 9.;
                \output "standchen-16.out";
        }
-       \midi{
-               \tempo 4 = 54;
-       }
 }
index 15aa64a7c005ff2354ab3d7eee93d3562ae2a667..1702aef9d02df619ed5ac1d28ba63a09994adb07 100644 (file)
@@ -21,7 +21,7 @@ copyright     public domain
 %}
 
 
-\version "0.1.2";
+\version "0.1.5";
 
 toccata_commands = \melodic{
        \meter 4/4;
@@ -33,9 +33,9 @@ toccata_right = \melodic{
        % 13 -- how to type -- where to split -- this more neatly ?
        \octave c';
        <\multi 2;
-               { \stem \up; r4 dis'4 e'4.-. e'8( | \hshift 1; )e'4 [d'8 fis'8] \hshift 0; gis'4 [gis'8 fis'16 e'16] | fis'4~  [fis'8 e'16 dis'16] e'4 r8 e'8 }
-               { \stem \up; \hshift 1; r4 bis4 cis'4-. cis'4 | \hshift 0; a'4~  [a'16 gis'16 a'16 b'16] \hshift 1; dis'4 cis'4~  [cis'8 dis'16 a16] bis4 cis'4 r8 b8 }
-               { \stem \down; r4 < gis4 fis4 dis4 > gis4-. gis4 | a4. cis'8 gis2 | fis4 gis4 gis4 r8 e8 }
+               { \stemup r4 dis'4 e'4.-. e'8( | \property Voice.hshift = 1 )e'4 [d'8 fis'8] \property Voice.hshift = 0 gis'4 [gis'8 fis'16 e'16] | fis'4~  [fis'8 e'16 dis'16] e'4 r8 e'8 }
+               { \stemup \property Voice.hshift = 1 r4 bis4 cis'4-. cis'4 | \property Voice.hshift = 0 a'4~  [a'16 gis'16 a'16 b'16] \property Voice.hshift = 1 dis'4 cis'4~  [cis'8 dis'16 a16] bis4 cis'4 r8 b8 }
+               { \stemdown r4 < gis4 fis4 dis4 > gis4-. gis4 | a4. cis'8 gis2 | fis4 gis4 gis4 r8 e8 }
        > |
        % 16
 }
@@ -46,9 +46,9 @@ toccata_left = \melodic{
        \clef bass;
        % 13
        <\multi 2;
-               { \stem \up; bis2 cis'4-. cis'4~  [cis'8 a8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 }
-               { \stem \up; \hshift 1; r4 gis4. gis8~  gis4 | \stem \down; \hshift 0; a4. fis8 gis4. a8~  a4 gis4-. gis4 r8 gis8 }
-               { \stem \down; r4 < dis4 fis4 > < cis4 e4 > }
+               { \stemup bis2 cis'4-. cis'4~  [cis'8 a8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 }
+               { \stemup \property Voice.hshift = 1 r4 gis4. gis8~  gis4 | \stemdown \property Voice.hshift = 0 a4. fis8 gis4. a8~  a4 gis4-. gis4 r8 gis8 }
+               { \stemdown r4 < dis4 fis4 > < cis4 e4 > }
        > |
        % 16
 }
@@ -77,8 +77,8 @@ fuga2_right = \melodic{
        % 15
        \octave c';
        <\multi 2;
-               { \stem \up; [b8 fis8] b4 }
-               { \stem \down; fis2 }
+               { \stemup [b8 fis8] b4 }
+               { \stemdown fis2 }
        >
        %{ this chord is usually set like this:
             |
@@ -89,16 +89,16 @@ fuga2_right = \melodic{
            |
        %}
        < \multi 2;
-               { \stem \up; \hshift 0; e'4 }
-               { \stem \up; \hshift 1; cis'4 }
-               { \stem \up; \hshift 2; ais4 }
-               { \stem \down; fis4 }
+               { \stemup \property Voice.hshift = 0 e'4 }
+               { \stemup \property Voice.hshift = 1 cis'4 }
+               { \stemup \property Voice.hshift = 2 ais4 }
+               { \stemdown fis4 }
        > |
        % 16
        <\multi 2;
-               { \stem \up; dis'2 dis'4 | cis'2 cis'4 | b4~  [b8 cis'8 dis'8 e'8] }
-               { \stem \up; \hshift 1; [b8 fis8] b2~  [b8 a16 g16] a2 | a4 gis2 }
-               { \stem \down; fis2.~  fis2.~  fis4 e2 }
+               { \stemup dis'2 dis'4 | cis'2 cis'4 | b4~  [b8 cis'8 dis'8 e'8] }
+               { \stemup \property Voice.hshift = 1 [b8 fis8] b2~  [b8 a16 g16] a2 | a4 gis2 }
+               { \stemdown fis2.~  fis2.~  fis4 e2 }
        > |
        % 19
 }
@@ -110,8 +110,8 @@ fuga2_left = \melodic{
        % 15
        b2 
        <\multi 2; 
-               { \stem \up; ais4 | bes2. }
-               { \stem \down; e4  | fis2 fis4 }
+               { \stemup ais4 | bes2. }
+               { \stemdown e4  | fis2 fis4 }
        >
        % 17
        cis'2 e'4 |
@@ -140,16 +140,12 @@ break = \melodic{
 
 % these should be two separate scores...
 \score{
-       \melodic < \multi 1;
-
-                < \id Piano ""; \multi 3;
-                  {\$toccata_right     \break   \$fuga2_right }
-                  { \$toccata_left  \break   \$fuga2_left }
+       < \multi 1;
+                \type Grandstaff = ""  < \multi 3;
+                  {\toccata_right     \break   \fuga2_right }
+                  { \toccata_left  \break   \fuga2_left }
                > 
-       
-                {  \$toccata_pedal    \break   \$fuga2_pedal }
-               
-               
+               {  \toccata_pedal    \break   \fuga2_pedal }
        >
        \paper{}
        \midi{
index 0d2af26e6cd46a0d911cfe893c671a7ef93cce20..3f3fffccea3494893e769e627d10a6de1e012c3d 100644 (file)
@@ -12,7 +12,7 @@ copyright             public domain
 Tested Features                lyrics and chords
 %}
 
-\version "0.1.2";
+\version "0.1.5";
 
 melodie = \melodic {
         \clef"violin";
@@ -27,8 +27,7 @@ melodie = \melodic {
         f4^"F" f |      e^"C" e |       d^"G7" d |      c2^"C"   |
 }
 
-texte = \lyric{ 
-         
+text = \lyric{ 
         \textstyle "italic";
         Ah!4 vous dir- ai_- je ma man2
         Ce4 qui cau- se mon tour- ment2
@@ -40,8 +39,8 @@ texte = \lyric{
 }
 
 \score {
-        <  \melodic <  \id "Piano" "";  \melodie >
-           \lyric   < \id "Lyric" "";  \texte >
+        <  \melodic \type Staff \melodie
+           \lyric   \type Lyrics \text
         >
         \paper {  }
 }
index 0a77e1fcb48f037df4e94aae9768d8d2d6c7afa2..52625da9bce0e0f0cbc152cc4b57b78787a80797 100644 (file)
@@ -14,7 +14,7 @@ copyright     public domain
 Tested Features: lyrics
 
 %}
-\version "0.1.2";
+\version "0.1.5";
 
 melody = \melodic{
        \clef violin;
@@ -122,19 +122,19 @@ textiii = \lyric{
 \score{
        < 
                \melodic <
-                       \id "Piano" "";\multi 2;
-                       < \global 
+                       \type Grandstaff
+                       < \multi 2; \global 
                                \melody >
                        < \global 
                                \accompany >
                >
                
                % ugh
-               \lyric < \id "Lyric" "1"; 
+               \lyric \type Lyrics < 
                        \global \tekst >
-               \lyric < \id "Lyric" "2";  \global
+               \lyric \type Lyrics <  \global
                        \texte >
-               \lyric < \id "Lyric" "3"; \global
+               \lyric \type Lyrics < \global
                        \texti \textii \textiii >
                
        >
diff --git a/input/wohltemperirt.ly b/input/wohltemperirt.ly
deleted file mode 100644 (file)
index 9159ed9..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-\header{
-filename               wohltemperirt.ly
-title          Fuga a 3
-description            Das Wohltemperierte Clavier I, Fuga II (c-minor)
-opus           BWV 847-Fuga
-source         Henle's Urtext
-composer               Johann Sebastian Bach (1685-1750)
-enteredby              HWN and Werner Lemberg
-copyright              Public Domain
-}
-%{
- Tested Features: stem direction, multivoice, forced accidentals.
-%}
-
-\version "0.1.2";
-
-                                    % should add \need{dutch.ini} for
-                                    % correct parsing of note names
-
-global = 
-    \melodic {
-         \meter 4/4;                % should be \meter C
-         \keyCminor 
-    }
-  
-dux =
-    \melodic {
-        \clef "violin";
-        \octave c';
-
-        \stem \down;
-        r8 [c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
-        [g c'16 b] [c'8 d'] [f16 g] as4 [g16 f] |
-        [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!] |
-                                                    % 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   
-        as4 r8 a [bes bes16 a] [bes8 f] |
-        g4 r8 g [as as g f] |
-        \octave c; r8 [as bes c'] r8 [as16 g] [as8 f8] |
-        [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] |
-                                                    % 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] |
-%% 20
-        [c16 f es d] [c Bes! As G] [F8 as g f] |
-        [es d es f] [B c d B] |
-        c4 r8 e8 [f f16 e] [f8 c] |
-        d4 r8 d8 [es8 es16 d] [es8 Bes] |
-        c2 ~  [c8 d16 es][ f es f d] |
-%% 25
-        B8 r8 r B c r r es |
-        d r r f~ f r r f |
-        [es as g f] [es d es f] |
-        [B c d B] [B c] r c |
-        [f16 d es c]~ [c8 B] c4 r8 e |
-%% 30
-        f4 r8 f [f es16 d] [es8 <f as]> |
-        <B d> r <B d> r <G2 c> |
-    }
-
-
-comes =
-    \melodic {
-        \octave c'';
-        \stem \up;
-        r1 |
-        r1 |
-        r8 [g16 fis] [g8 c] [es g16 fis] [g8 a] |
-        [d8 g16 fis] [g8 a] [c16 d] es4 [d16 c] |
-%% 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] 
-        [es d es f] ['b c d 'b] |
-        [c g16 fis] [g8 d] es4 r8 e8 |
-%% 10 
-        [f f16 e] [f8 c8] d4 r8 d |
-        [es8 es16 d] [es8 'bes] [c es16 d] [es8 f] |
-        ['bes es16 d] [es8 f] ['as16 'bes] c4 ['bes16 'as] |
-        [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] |
-        [Bes A Bes c] [Fis! G A Fis] |
-                                                    % 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 |
-%% 20
-        r8 [c16 'b] [c8 'g] [As c16 'b] [c8 d] |
-        [G c16 B] [c8 d] [F16 G] As4 [G16 F] |
-        [Es8 c16 B] [c8 G] As4 r8 A |
-        [Bes8 Bes16 A] [Bes8 F8] 'g4 r8 G~ |
-        [G As16 Bes] [c B c As] F2~ |
-%% 25
-        [F8 d16 c] [d8 F] [Es es16 d] [es8 G] |
-        [F f16 es] [f8 As] [G16 f es d] [c B A G] |
-        [c8 f es d] r [As G F] |
-        [G F16 Es] [F8 D] [As G] r A |
-        [B c] [F16 Es D C] C8 [c16 B] [c8 G] |
-%% 30
-        [As c16 B] [c8 <d 'b! 'as!]> [G8 c16 B] [c8 d] |
-        [F16 G] As4 [G16 F] E2 |
-    }
-
-bassdux =
-    \melodic {
-        \clef "bass";
-        \octave c';
-        r1 |
-        r |
-        r |
-        r |
-%% 5
-        r |
-        r1 |
-        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] |
-                                                    % -> \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] |
-        [g8 f g as] [d es f d] |
-        [es as g f] [g es d c] |
-        [d bes as g] [as f es d!] |
-%% 15
-        es8 r8 r4 r8 [c Bes A] |
-        r [es d c] [d c16 Bes] [c8 d] |
-        [G8 bes16 a] [bes8 d] [es c'16 bes] [c'8 e] |
-        [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] |                     % -> \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] |
-        [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 |
-        [d c g G]
-%% 30
-        < \multi 2;
-        { \stem \up; c2~ | c1~ | c1 }
-        { \stem \down; C2~ | C1~ | C1 }
-        >
-    }
-
-        
-\score {
-    \melodic < \id "Piano" ""; 
-              \multi 1;
-                 < \multi 2; 
-                       \global 
-                       \dux
-                       \comes 
-                 >
-                 < \multi 2;
-                       \global
-                       \bassdux
-                 >
-             >
-
-    \paper{
-       gourlay_maxmeasures =5.;
-       
-    }
-    \midi {
-        \tempo 4 = 84;
-    }
-}
-
-% EOF
diff --git a/input/wtk1-fugue1.ly b/input/wtk1-fugue1.ly
new file mode 100644 (file)
index 0000000..d1c21d8
--- /dev/null
@@ -0,0 +1,208 @@
+\header{
+filename               fugue1.ly
+title          Fuga a 4
+description            Das Wohltemperierte Clavier I, Fuga I (c-major)
+opus           BWV 846
+composer               Johann Sebastian Bach (1685-1750)
+enteredby              Shay Rojansky
+copyright              Public Domain
+}
+
+%{
+       
+%}
+\version "0.1.5";
+
+
+global = 
+    \melodic {
+         \meter 4/4;                % should be \meter C
+    }
+  
+tenor =
+    \melodic {
+        \clef "violin";
+        \octave c';
+
+        \stemdown
+        r8 [c8 d e] [f. g32 f] [e8 a] |
+        [d g] ~ [g16 a g f] [e f e d] [c d c 'b] |
+        ['a8 fis] g4 ~ [g8 fis16 e] [f8 d] |
+        [g f! e d] c r r g ~ |
+%% 5
+        [g f16 e] f4 ~ [f16 f e8] d4 |
+        [c8 f] r16 [g f e] [f8 d] g4 ~ |
+       g4 r4 r2 |
+       r1 |
+       r8 [g8 a b] [c'. d'32 c'] [b8 e']
+%% 10
+       [a d'] ~ [d'16 e' d' c'] b8 r8 r d |
+       [e fis] [g. a32 g] [fis8 b e a] ~ |
+       [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] |
+       [a gis a b] [gis fis gis a] b8 r8 r4 |
+       r8 [c8 d e] \stemup [f. g32 f] [e8 a] |
+%% 15
+       [d g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ |
+       [g8 fis] [gis8 a] ~ [a g! a b] |
+       \stemboth
+       [c'. d'32 c'] [b8 e'] [a d'] ~ [d'16 e' d' c'] |
+       [b8 g' cis' d'] [e' cis' d' e' ] |
+       \stemdown a8 r8 r e [fis g] \stemboth[a. b32 a] |
+%% 20
+       [g8 c' fis b] ~ [b16 c' b a] \stemdown [g fis e d] \stemboth|
+       e4 \stemdown d ~ [d16 a g f!] [e g f! a] |
+       g4 ~ [g16 a bes8] c'4 [d'8 g] |
+       \stembothg4. f8 ~ [f e] d4 |
+       \stemdown e8 a4 g8 ~ [g8 f g a] |
+%% 25
+       [bes8. c'32 b] [a8 d'] [g c'] ~ [c'16 d' c' bes] |
+       [a bes a g] [f g f e] d4 ~ [d8. g16] |
+       a4 r16 [f'16 d'8] e'2 |
+    }
+
+
+soprane =
+    \melodic {
+        \octave c';
+        \stemup
+        r1 |
+        r2 r8 [g8 a b] |
+        [c'. d'32 c'] [b8 e'] [a d'] ~ [d'16 e' d' c'] |
+        [b g a b] [c' b c' d'] [e' d' e' fis'] [g'8 b] |
+%% 5
+       [c' a] [d'16 c' b a] [g8. g16] [f e f g] |
+       [a g a b] c'2 b4 |
+       \octave c'';
+       r8 [c8 d e] [f. g32 f] [e8 a] |
+       [d g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] |
+       f2 [e8. fis16] g4 ~
+%% 10
+       g4 fis [g16 f! e d] [c d c 'b] |
+       ['a16 c 'b 'a] 'g8 r8 r16 [c16 'b 'a] ['gis8 e] |
+       [d c16 'b16] ['a 'gis 'a 'b] [c 'fis 'a 'gis] ['b8 'a16 'b]
+       [c8 f e d] ~ [d c16 'b] ['b8. 'a16] |
+       'a4 r4 r2 |
+%% 15
+       r2 r8 ['g8 'a 'b] |
+       [c8. d32 c] ['b8 c] [d e] [f!. g32 f!] |
+       [e8 a d g] ~ [g16 a g f] [e8 a] |
+       [d8 bes] [a g16 f] [g f g e] [f g g f32 g] |
+       [a16 cis d g] [e8. d16] d8 r8 r4 |
+%% 20
+       r2 r4 r8 'g |
+       ['a 'b] [c. d32 c] ['b8 e 'a d] ~ |
+       [e16 e d c] ['b c d e] [f g a g] [f e d c] |
+       'b4 [c8 d] 'g c4 'b8 |
+       c4 ['b8 'bes8] 'a d4 c8 |
+%% 25
+       [d8 e] f4 ~ [f16 a g f] [e f e d] |
+       c2 r16 ['g32 'a 'b!16 c] [d e f8] ~ |
+       [f32 c d e f16 g] [a8. b16] <g2 c'2> |
+    }
+
+alt =
+    \melodic {
+        \clef "bass";
+        \octave c;
+       
+       \stemup
+       r1 |
+       r |
+       r |
+       r8 [g8 a b] [c'. d'32 c'] [b8 e'] |
+%% 5
+       [a d'] ~ [d'16 e' d' c'] [b8 c' ~ c' bes8] |
+       [a d' g c'] r16 [a16 b c'] d'4 |
+       g4 r8 g8 [a b] [c'. d'32 c'] |
+       [b8 e' a d'] ~ [d'16 e' d' c'!] [b!8 e'] ~ |
+       e'4 d'4 [c'16 b c' a] [e' d' c' b] |
+%% 10
+       [c'16 a b c'] [d' c' b a] g4 r4 |
+       r1 |
+       r8 [e8 fis gis] [a. b32 a] [gis8 c'] |
+       [fis b] ~ [b16 c' b a] gis8 a4 gis8 |
+       a4 r8 g8 [a b] c'. [d'32 c'] |
+%% 15
+       [b8 e' a d'] ~ [d' g] d'4 |
+       [c'8 a] e'4 d'8 r8 r4 |
+       r8 [a8 b cis'] [d'. e'32 d'] [c'!8 f'] |
+       [b8 e'] ~ [e'16 f' e' d'] cis'8 r8 r4 |
+       r8 [a8 b cis'] [d'. e'32 d'] [c'!8 fis'] |
+%% 20
+       [b e'] ~ [e'16 fis' e' d'] c'2 ~ |
+       [c'16 d' c' b] [a g a fis] [g8 b c' d'] |
+       [e'. f'32 e'] [d'8 g'] [c' f'] ~ [f'16 g' f' e'] |
+       d'4 [e'8 d'] ~ [d' g] g4 ~
+       [g8 c d e] [f. g32 f] [e8 a] |
+%% 25
+       [d g] ~ [g16 a g f] [e d e f] [g a bes g] |
+       [a e f g] [a b c' a] b2 |
+       c'1 |
+    }
+
+bass =
+    \melodic {
+        \clef "bass";
+        \octave c;
+
+       \stemdown
+        r1 |
+       r |
+       r |
+       r |
+%% 5
+       r2 r8 [c8 d e] |
+       [f. g32 f] [e8 a] [d g] ~ [g16 a g f] |
+       [e f e d] [c d c 'b] ['a8 d a fis] |
+       [g16 a bes g] [cis8 d] a4 e4 |
+       [a16 b c' d'] [c' b a g] c'8 r8 r4 |
+%% 10
+       r2 r8 ['g8 'a 'b] |
+       [c. d32 c] ['b8 e] ['a d] ~ [d16 e d c] |
+       'b8 e4 d8 c f!4 e8 ~ |
+       e d4 e8 [f! e16 d] e4 |
+       'a4 r4 r2 |
+%% 15
+       r8 ['g8 'a 'b] [c. d32 c] ['b8 e] |
+       ['a8 d] ~ [d16 e d c] ['b8 'bes 'a g'] |
+       ['a8 fis g e] d4 [e8 f!] |
+       [g8. a32 g] [f8 bes] [e a] ~ [a16 bes a g] |
+       [f e f d] [g8 a] d2 ~ |
+%% 20
+       [d16 e d c] ['b 'a 'g 'fis] ['e8 e fis g] ~ |
+       [g a16 g16] [fis8 d] g2 ~ |
+       g2 a4 [b8 c'] |
+       [f16 a g f] [e d c 'b] [c d e f] [g8 'g] |
+       c1 ~ |
+%% 25
+       c1 ~ |
+       c1 ~ |
+       c1 |
+    }
+
+        
+\score {
+    \melodic \type Grandstaff < 
+              \multi 1;
+                 < \multi 2;
+                       \global 
+                       \soprane
+                       \tenor
+                 >
+                 < \multi 2;
+                       \global
+                       \alt
+                      \bass
+                 >
+             >
+
+    \paper{
+       gourlay_maxmeasures =5.;
+%      castingalgorithme = \Wordwrap
+    }
+    \midi {
+        \tempo 4 = 84;
+    }
+}
+
+% EOF
diff --git a/input/wtk1-fugue2.ly b/input/wtk1-fugue2.ly
new file mode 100644 (file)
index 0000000..92ce1d3
--- /dev/null
@@ -0,0 +1,189 @@
+\header{
+filename               wohltemperirt.ly
+title          Fuga a 3
+description            Das Wohltemperierte Clavier I, Fuga II (c-minor)
+opus           BWV 847-Fuga
+source         Henle's Urtext
+composer               Johann Sebastian Bach (1685-1750)
+enteredby              HWN and Werner Lemberg
+copyright              Public Domain
+}
+%{
+ Tested Features: stem direction, multivoice, forced accidentals.
+%}
+
+\version "0.1.5";
+
+                                    % should add \need{dutch.ini} for
+                                    % correct parsing of note names
+
+global = 
+    \melodic {
+         \meter 4/4;                % should be \meter C
+         \keyCminor 
+    }
+  
+dux =
+    \melodic {
+        \clef "violin";
+        \octave c';
+
+        \stemdown
+        r8 [c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
+        [g c'16 b] [c'8 d'] [f16 g] as4 [g16 f] |
+        [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!] |
+                                                    % 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   
+        as4 r8 a [bes bes16 a] [bes8 f] |
+        g4 r8 g [as as g f] |
+       \translator Staff=bass \stemup
+        \octave c; r8 [as bes c'] r8 [as16 g] [as8 f8] |
+        [bes8 c' bes as] [bes g f es] |
+        [f des' c' bes] [c' as g f] |
+%% 15
+       \translator Staff=treble \stemdown
+        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] |
+%% 20
+        [c16 f es d] [c Bes! As G] [F8 as g f] |
+        [es d es f] [B c d B] |
+        c4 r8 e8 [f f16 e] [f8 c] |
+        d4 r8 d8 [es8 es16 d] [es8 Bes] |
+        c2 ~  [c8 d16 es][ f es f d] |
+%% 25
+        B8 r8 r B c r r es |
+        d r r f~ f r r f |
+        [es as g f] [es d es f] |
+        [B c d B] [B c] r c |
+        [f16 d es c]~ [c8 B] c4 r8 e |
+%% 30
+        f4 r8 f [f es16 d] [es8 <f as]> |
+        <B d> r <B d> r <G2 c> |
+    }
+
+
+comes =
+    \melodic {
+        \octave c'';
+        \stemup
+        r1 |
+        r1 |
+        r8 [g16 fis] [g8 c] [es g16 fis] [g8 a] |
+        [d8 g16 fis] [g8 a] [c16 d] es4 [d16 c] |
+%% 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] 
+        [es d es f] ['b c d 'b] |
+        [c g16 fis] [g8 d] es4 r8 e8 |
+%% 10 
+        [f f16 e] [f8 c8] d4 r8 d |
+        [es8 es16 d] [es8 'bes] [c es16 d] [es8 f] |
+        ['bes es16 d] [es8 f] ['as16 'bes] c4 ['bes16 'as] |
+        [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] |
+        [Bes A Bes c] [Fis! G A Fis] |
+                                                    % 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 |
+%% 20
+        r8 [c16 'b] [c8 'g] [As c16 'b] [c8 d] |
+        [G c16 B] [c8 d] [F16 G] As4 [G16 F] |
+        [Es8 c16 B] [c8 G] As4 r8 A |
+        [Bes8 Bes16 A] [Bes8 F8] 'g4 r8 G~ |
+        [G As16 Bes] [c B c As] F2~ |
+%% 25
+        [F8 d16 c] [d8 F] [Es es16 d] [es8 G] |
+        [F f16 es] [f8 As] [G16 f es d] [c B A G] |
+        [c8 f es d] r [As G F] |
+        [G F16 Es] [F8 D] [As G] r A |
+        [B c] [F16 Es D C] C8 [c16 B] [c8 G] |
+%% 30
+        [As c16 B] [c8 <d 'b! 'as!]> [G8 c16 B] [c8 d] |
+        [F16 G] As4 [G16 F] E2 |
+    }
+
+bassdux =
+    \melodic {
+        \clef "bass";
+        \octave c';
+        r1 |
+        r |
+        r |
+        r |
+%% 5
+        r |
+        r1 |
+        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] |
+                                                    % -> \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] |
+        [g8 f g as] [d es f d] |
+        [es as g f] [g es d c] |
+        [d bes as g] [as f es d!] |
+%% 15
+        es8 r8 r4 r8 [c Bes A] |
+        r [es d c] [d c16 Bes] [c8 d] |
+        [G8 bes16 a] [bes8 d] [es c'16 bes] [c'8 e] |
+        [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] |                     % -> \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] |
+        [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 |
+        [d c g G]
+%% 30
+        < \multi 2;
+        { \stemup c2~ | c1~ | c1 }
+        { \stemdown C2~ | C1~ | C1 }
+        >
+    }
+
+        
+\score {
+    \melodic \type Grandstaff < 
+       \type Staff=treble < \multi 2; 
+                       \global 
+                       \dux
+                       \comes 
+                 >
+       \type Staff=bass < \multi 2;
+                       \global
+                       \bassdux
+                 >
+    >
+
+    \paper{
+       gourlay_maxmeasures =5.;
+       
+    }
+    \midi {
+        \tempo 4 = 84;
+    }
+}
+
+% EOF
diff --git a/input/wtk1-prelude1.ly b/input/wtk1-prelude1.ly
new file mode 100644 (file)
index 0000000..49ae054
--- /dev/null
@@ -0,0 +1,185 @@
+\header{
+filename               prelude1.ly
+title                  Preludium
+description            Das Wohltemperierte Clavier I, Prelude I (c-major)
+opus                   BWV 846
+composer               Johann Sebastian Bach (1685-1750)
+enteredby              Shay Rojansky
+copyright              Public Domain
+}
+
+\version "0.1.5";
+
+global = 
+    \melodic {
+        \meter 4/4;                % should be \meter C
+    }
+  
+
+% should do programmable input.
+
+soprane =
+    \melodic {
+        \clef "violin";
+        \octave c';
+
+       <\multi 2;
+       % Real soprane
+       {\stemup
+       r8 [g16 c'] [e' g c' e'] r8 [g16 c'] [e' g c' e'] |
+       r8 [a16 d'] [f' a d' f'] r8 [a16 d'] [f' a d' f'] |
+       r8 [g16 d'] [f' g d' f'] r8 [g16 d'] [f' g d' f'] |
+       r8 [g16 c'] [e' g c' e'] r8 [g16 c'] [e' g c' e'] |
+       r8 [a16 e'] [a' a e' a'] r8 [a16 e'] [a' a e' a'] |
+       r8 [fis16 a] [d' fis a d'] r8 [fis16 a] [d' fis a d'] |
+       r8 [g16 d'] [g' g d' g'] r8 [g16 d'] [g' g d' g'] |
+       r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |
+       r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |}
+       % Tenor
+       {\stemdown
+       r16 e8. ~ e4 r16 e8. ~ e4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 e8. ~ e4 r16 e8. ~ e4 |
+       r16 e8. ~ e4 r16 e8. ~ e4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 c8. ~ c4 r16 c8. ~ c4 |
+       r16 c8. ~ c4 r16 c8. ~ c4 |}>
+%% 10  
+       r8 [d16 fis] [c' d fis c'] r8 [d16 fis] [c' d fis c'] |
+       r8 [d16 g] [b d g b] r8 [d16 g] [b d g b] |
+       r8 [e16 g] [cis' e g cis'] r8 [e16 g] [cis' e g cis'] |
+       r8 [d16 a] [d' d a d'] r8 [d16 a] [d' d a d'] |
+       r8 [d16 f] [b d f b] r8 [d16 f] [b d f b] |
+       r8 [c16 g] [c' c g c'] r8 [c16 g] [c' c g c'] |
+       r8 ['a16 c] [f 'a c f] r8 ['a16 c] [f 'a c f] |
+       r8 ['a16 c] [f 'a c f] r8 ['a16 c] [f 'a c f] |
+       r8 ['g16 'b] [f 'g 'b f] r8 ['g16 'b] [f 'g 'b f] |
+       r8 ['g16 c] [e 'g c e] r8 ['g16 c] [e 'g c e] |
+%% 20
+       r8 ['bes16 c] [e 'bes c e] r8 ['bes16 c] [e 'bes c e] |
+       r8 ['a16 c] [e 'a c e] r8 ['a16 c] [e 'a c e] |
+       r8 ['a16 c] [ees 'a c ees] r8 ['a16 c] [ees 'a c ees] |
+       r8 ['b16 c] [d 'b c d] r8 ['b16 c] [d 'b c d] |
+       r8 ['g16 'b] [d 'g 'b d] r8 ['g16 'b] [d 'g 'b d] |
+       r8 ['g16 c] [e 'g c e] r8 ['g16 c] [e 'g c e] |
+       r8 ['g16 c] [f 'g c f] r8 ['g16 c] [f 'g c f] |
+       r8 ['g16 'b] [f 'g 'b f] r8 ['g16 'b] [f 'g 'b f] |
+       r8 ['a16 c] [fis 'a c fis] r8 ['a16 c] [fis 'a c fis] |
+       r8 ['g16 c] [g 'g c g] r8 ['g16 c] [g 'g c g] |
+%% 30
+       r8 ['g16 c] [f 'g c f] r8 ['g16 c] [f 'g c f] |
+       r8 ['g16 'b] [f 'g 'b f] r8 ['g16 'b] [f 'g 'b f] |
+       r8 ['g16 'bes] [e 'g 'bes e] r8 ['g16 'bes] [e 'g 'bes e] |
+
+       r8 ['f16 'a] [c f c 'a] [c 'a 'f 'a] ['f 'd 'f 'd] |
+       r8 [g16 b] [d' f' d' b] [d' b g b] [d f e d] |
+       <e1 g c'> ||
+    }
+
+bass =
+    \melodic {
+        \clef "bass";
+        \octave c;
+
+       \stemdown
+       c'2 c' |
+       c' c' |
+       b b |
+       c' c' |
+       c' c' |
+       c' c' |
+       b b |
+       b b |
+       a a |   
+%% 10
+       <\multi 2;
+       % Alt
+       {\stemup
+       r16 a8. ~ a4 r16 a8. ~ a4 |
+       r16 b8. ~ b4 r16 b8. ~ b4 |
+       r16 bes8. ~ bes4 r16 bes8. ~ bes4 |
+       r16 a8. ~ a4 r16 a8. ~ a4 |
+       r16 aes8. ~ aes4 r16 aes8. ~ aes4 |
+       r16 g8. ~ g4 r16 g8. ~ g4 |
+       r16 f8. ~ f4 r16 f8. ~ f4 |
+       r16 f8. ~ f4 r16 f8. ~ f4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 e8. ~ e4 r16 e8. ~ e4 |
+%% 20
+       r16 g8. ~ g4 r16 g8. ~ g4 |
+       r16 f8. ~ f4 r16 f8. ~ f4 |
+       r16 c8. ~ c4 r16 c8. ~ c4 |
+       r16 f8. ~ f4 r16 f8. ~ f4 |
+       r16 f8. ~ f4 r16 f8. ~ f4 |
+       r16 e8. ~ e4 r16 e8. ~ e4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 ees8. ~ ees4 r16 ees8. ~ ees4 |
+       r16 e!8. ~ e4 r16 e8. ~ e4 |
+%% 30
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 d8. ~ d4 r16 d8. ~ d4 |
+       r16 c8. ~ c4 r16 c8. ~ c4 |
+
+       r16 c8. ~ c4 ~ c2 |
+       r16 'b8. ~ 'b4 ~ 'b2 |
+       c1 ||}
+
+       % Bass
+       {\stemdown
+       d2 d |
+       g g |
+       g g |
+       f f |
+       f f |
+       e e |
+       e e |
+       d d |
+       'g 'g |
+       c c |
+%% 20
+       c c |
+       'f 'f |
+       'fis 'fis |
+       'aes 'aes |
+       'g 'g |
+       'g 'g |
+       'g 'g |
+       'g 'g |
+       'g 'g |
+       'g 'g |
+%% 30
+       'g 'g |
+       'g 'g |
+       'c 'c |
+       
+       'c 'c |
+       'c 'c |
+       'c1 }>
+    }
+
+        
+\score {
+    \melodic \type Grandstaff < 
+              \multi 1;
+                 < \multi 2;
+                       \global 
+                       \soprane
+                 >
+                 < \multi 2;
+                       \global
+                      \bass
+                 >
+             >
+
+    \paper{
+       gourlay_maxmeasures =5.;        
+    }
+    \midi {
+        \tempo 4 = 84;
+    }
+}
+
+% EOF
diff --git a/input/wtk1-prelude2.ly.m4 b/input/wtk1-prelude2.ly.m4
new file mode 100644 (file)
index 0000000..98f6c8a
--- /dev/null
@@ -0,0 +1,88 @@
+%% under construction
+
+define(preludepattern, `[' $1 $2 $3 $2 `]')
+define(preludehalfmeasure, preludepattern($1, $2, $3) 
+       preludepattern($4, $2, $3))
+
+define(intromeasure,
+       preludehalfmeasure($1, $2, $3, $4)
+       preludehalfmeasure($1, $2, $3, $4)|     
+)
+define(handymeasure, `intromeasure(translit($*,` ', `,'))')
+
+
+
+trebleIntro=\melodic {
+\octave c';
+handymeasure(c' es d c)
+handymeasure(as f e c)
+handymeasure(b f es d)
+handymeasure(c g f es)
+handymeasure(es' as g es)
+handymeasure(d' fis e d)
+handymeasure(d' g fis d)
+handymeasure(c' e d c)
+handymeasure(c' f e c)
+handymeasure(bes f es d)
+handymeasure(bes g f es)
+handymeasure(as g f es)
+handymeasure(as d c Bes)
+handymeasure(g Bes As es)
+handymeasure(f c Bes A)
+handymeasure(f d c B)
+handymeasure(es c B G)
+handymeasure(F es d f)
+handymeasure(Fis c b es)
+handymeasure(es c B G)
+handymeasure(fis c B A)
+handymeasure(g c B d)
+handymeasure(as c B d)
+}
+
+bassIntro = \melodic {
+\octave c;
+handymeasure(c g f es)
+handymeasure(c as g f)
+handymeasure(c as g f)
+handymeasure(c es d g)
+handymeasure(c c' bes as)
+handymeasure(c a g fis)
+handymeasure(Bes bes a g)
+handymeasure(Bes g f e)
+handymeasure(As as g f)
+handymeasure(As d c f)
+handymeasure(G es d g)
+handymeasure(c es d As)
+handymeasure(d f es as)
+handymeasure(es g f as)
+handymeasure(es a g f)
+handymeasure(d f es as)
+handymeasure(c f e as)
+preludehalfmeasure(c, es, d, f)
+preludehalfmeasure(bes, es, d, f)|
+handymeasure(As c b d)
+handymeasure(A es d c)
+handymeasure(G es d f)
+handymeasure(G es d c)
+handymeasure(G es d f)
+handymeasure(G es d f)
+}
+
+
+middlepiece = \melodic
+{
+       \octave c;
+       \stemdown
+       [G B d] 
+       \stemup f [as f ef] [b f d' b'] [as f e f] |
+       \stemdown [G c es]]
+       \stemup g [c' g fis g ] [es' c' g' es'] [c' as g as]| 
+       \stemdown [G A fis] 
+       \translator Staff=treble
+       \stemsboth \octave c';
+       c [es c B c] [fis  c a fis] [es c B c] |
+}
+
+
+
+}
index 9969e76341bc5804230bfba31196989b732e0798..31ac07fa711a7b9126abfd20b72de65e98ceb87b 100644 (file)
@@ -23,12 +23,14 @@ Duration_convert::dur2_str(Duration dur)
 {
   if (dur.ticks_i_)
     return String("[") + String(dur.ticks_i_) + "]";
-       
+  
   String str;
-  if (dur.durlog_i_ <= 0)
-    str="\\breve";
-  else
-    str= String(type2_i(dur.durlog_i_));
+  if (dur.durlog_i_ >= 0)
+    str = String( type2_i(dur.durlog_i_) );
+  else if (dur.durlog_i_ == -1)
+    str = "\\breve";
+  else if (dur.durlog_i_ == -2)
+    str = "\\longa";
   str += String('.', dur.dots_i_);
   if (dur.plet_b())
     str += String("*") + String(dur.plet_.iso_i_)
index 4e154051642ee04402bc123bc7c97f42bc4291e7..05d9d9aa4255989744fa539489bd77a50baf9a25 100644 (file)
@@ -60,7 +60,8 @@ Includable_lexer::close_input()
   if (state_stack_.empty()) 
     {
       return false;
-    }else 
+    }
+  else 
       {
        yy_switch_to_buffer(state_stack_.pop());
        return true;
index 63127ea9ad03b8b43f8840346117fc8ca507cacb..9733c1b86b17834bdc629473ea32a47a6c11bd30 100644 (file)
 
 class Binary_source_file : public Source_file {
 public:
-       Binary_source_file( String& filename_str );
+       Binary_source_file(String& filename_str );
        virtual ~Binary_source_file();
 
-       virtual String error_str( char const* pos_ch_c_l ) const;
-       virtual int line_i( char const* pos_ch_c_l ) const;
+       virtual String error_str(char const* pos_ch_c_l ) const;
+       virtual int line_i(char const* pos_ch_c_l ) const;
 };
 
 #endif // BINARY_SOURCE_FILE_HH //
index d321c4598edd11edc388131db5ec2ac828240dae..3f8bda96a48e0f3cc59d4a9588c6c4422370e5d3 100644 (file)
@@ -45,10 +45,10 @@ struct Duration_convert {
 //     static int const division_1_c_i = 384;
 
 //     /// Return (integer, division) representation.
-//     static int dur2_i( Duration dur, int division_1_i = division_1_c_i );
+//     static int dur2_i(Duration dur, int division_1_i = division_1_c_i );
 
     /// Return number of ticks in (ticks, division_1) representation
-    static int dur2ticks_i( Duration dur );
+    static int dur2ticks_i(Duration dur );
        
     /// Return the type_i representation of note length i
     static int i2_type(int i);
@@ -58,38 +58,38 @@ struct Duration_convert {
     static int type2_i(int type);
 
     /// Return Moment representation (fraction of whole note).
-    static Moment dur2_mom( Duration dur );
+    static Moment dur2_mom(Duration dur );
 
     /// Return Mudela string representation.
-    static String dur2_str( Duration dur );
+    static String dur2_str(Duration dur );
 
 //     /// Return Moment from (integer, division) representation.
-//     static Moment i2_mom( int i, int division_1_i = division_1_c_i );
+//     static Moment i2_mom(int i, int division_1_i = division_1_c_i );
 
 //     /// Return Moment (fraction of whole) representation, best guess.
-//     static Duration mom2_dur( Moment mom );
+//     static Duration mom2_dur(Moment mom );
 
     /// Return duration from Moment (fraction of whole) representation.
-    static Duration mom2_dur( Moment mom );
+    static Duration mom2_dur(Moment mom );
 
     /// Return standardised duration, best guess if not exact.
-    static Duration mom2standardised_dur( Moment mom );
+    static Duration mom2standardised_dur(Moment mom );
   
     /// Return plet factor (not a Moment: should use Rational?).
-    static Moment plet_factor_mom( Duration dur );
+    static Moment plet_factor_mom(Duration dur );
 
     static void set_array();
 
     /** Return synchronisation factor for mom, so that
-      mom2_dur( mom / sync_f ) will return the duration dur.           
+      mom2_dur(mom / sync_f ) will return the duration dur.            
       */ 
-    static Real sync_f( Duration dur, Moment mom );
+    static Real sync_f(Duration dur, Moment mom );
 
     /// Return exact duration, in midi-ticks if not-exact.
-    static Duration ticks2_dur( int ticks_i );
+    static Duration ticks2_dur(int ticks_i );
 
     /// Return standardised duration, best guess if not exact.
-    static Duration ticks2standardised_dur( int ticks_i );
+    static Duration ticks2standardised_dur(int ticks_i );
 };
 
 /// (iter_dur)
index 293c9681fdc672a16cefee892cc79c2c0edc97ac..49d5819bd938a46c002fe94f39e3771933175bde 100644 (file)
@@ -35,7 +35,7 @@ struct Duration {
   void set_plet(int,int );
   void set_plet(Duration );
   static bool duration_type_b(int t);
-  void set_ticks( int ticks_i );
+  void set_ticks(int ticks_i );
   Moment length() const ;      // zo naai mij
   static int division_1_i_s;
 
index 2fdb97615a069204a31506a3d3a2a9647aa65c0f..579f829c14be6bcbe7924785a52ea0f4940068e2 100644 (file)
@@ -28,7 +28,7 @@ public:
     String location_str() const;
     Input(Source_file*, char const*);
     Input();
-    Input( Input const& );
+    Input(Input const& );
 };
 
 #endif // INPUT_HH
index 5991a2e8040f5ce167412c1ca131747d25071bd7..9b084a32806144c4ea7d9799be08117cfbf48e78 100644 (file)
@@ -18,17 +18,17 @@ class Source_file
 public:
     /** Ugh! filename gets changed! The path to the opened file may
        change, since it might be searched in multiple directories.  */
-    Source_file( String filename_str_r );
+    Source_file(String filename_str_r );
     virtual ~Source_file();
 
     char const* ch_C() const;
-    virtual String error_str( char const* pos_ch_c_l ) const;
+    virtual String error_str(char const* pos_ch_c_l ) const;
     istream * istream_l();
-    bool in_b( char const* pos_ch_c_l ) const;
+    bool in_b(char const* pos_ch_c_l ) const;
     int length_i() const;
-    virtual int line_i( char const* pos_ch_c_l ) const;
+    virtual int line_i(char const* pos_ch_c_l ) const;
     String name_str() const;
-    String file_line_no_str( char const* ch_c_l ) const;
+    String file_line_no_str(char const* ch_c_l ) const;
 
 private:
     String name_str_;
index fc0ca2728d196f89759f8abf826039489df54036..357647b9a10b7adc9523891848bdd46ce8ab7c0f 100644 (file)
@@ -14,14 +14,14 @@ class Sources
 public:
     Sources();
 
-    Source_file * get_file_l( String &filename );
-    Source_file* sourcefile_l( char const* ch_C );
+    Source_file * get_file_l(String &filename );
+    Source_file* sourcefile_l(char const* ch_C );
     void set_path(File_path*p_C);
     void set_binary(bool);
 
 private:
     const File_path * path_C_;
-    void add( Source_file* sourcefile_p );
+    void add(Source_file* sourcefile_p );
     Pointer_list<Source_file*> sourcefile_p_list_;
     bool binary_b_ ;
 };
index 6d64cc0d0703c2822f8e849ab2d63a234fec4333..61ab2e69724489deaa5110b5fdaf0fd006eafd2c 100644 (file)
@@ -12,6 +12,6 @@
 
 #include "string.hh"
 
-void warning( String message_str  );
-void error( String message_str);
+void warning(String message_str  );
+void error(String message_str);
 #endif // WARN_HH
index ed1784ba63963abdafee6ef40746eb0ac7eba55e..b618e11634220e91c0f0969ce883c71b01647854 100644 (file)
 Simple_file_storage::Simple_file_storage(String s)
 {
   data_p_ =0;
+
   /*
     let's hope that "b" opens anything binary, and does not apply 
     CR/LF translation
     */
-  FILE * f = fopen (s.ch_C(), "rb");
+  FILE * f =  (s) ?  fopen (s.ch_C(), "rb") : stdin;
+  
   if (!f) 
     {
-      warning("can't open file\n");
+      warning("can't open file `" + s + "'");
       return ;
     }
 
@@ -48,10 +50,12 @@ Simple_file_storage::Simple_file_storage(String s)
   ret = fread(data_p_, sizeof(char), len_i_, f);
 
      
-#if 1 // ugh, \r\n -> \n translation
-  assert (ret==len_i_);
-#endif
-  fclose(f);
+  if  (ret!=len_i_)
+    warning ("Huh? got " + String(ret) + ", expected " 
+            + String(len_i_) + " characters");
+
+  if (f != stdin)
+    fclose(f);
 }
 
 char const*
index 7d912edd6367a05890acabbaaeef50a100b11c1d..dc6c092519a66eaec827c602ebc3a3cd7d8dbf3c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  source-file.cc -- implement 
+  source-file.cc -- implement Source_file
 
   source file of the GNU LilyPond music typesetter
 
 
 Source_file::Source_file(String filename_str)
 {
-    name_str_ = filename_str;
-    istream_p_ = 0;
-    storage_p_ = new Simple_file_storage(filename_str);
+  name_str_ = filename_str;
+  istream_p_ = 0;
+  storage_p_ = new Simple_file_storage(filename_str);
 }
 
 istream*
 Source_file::istream_l()
 {
+  /*
     if (!name_str_.length_i())
-       return &cin;
-    
-    if (!istream_p_) 
-      {
-       if (length_i()) // can-t this be done without such a hack?
-           istream_p_ = new istrstream(ch_C(), length_i());
-        else 
-          {
-           istream_p_ = new istrstream("", 0);
-           istream_p_->set(ios::eofbit);
-         }
-      }
-    return istream_p_;
+      return &cin;
+    */
+  
+  if (!istream_p_) 
+    {
+      if (length_i()) // can-t this be done without such a hack?
+       istream_p_ = new istrstream(ch_C(), length_i());
+      else 
+       {
+         istream_p_ = new istrstream("", 0);
+         istream_p_->set(ios::eofbit);
+       }
+    }
+  return istream_p_;
 }
 
 String
@@ -52,99 +54,99 @@ Source_file::file_line_no_str(char const *context_ch_C) const
     return "(unknown)";
   else
     return name_str() + ": "
-       + String(line_i(context_ch_C));
+      + String(line_i(context_ch_C));
 }
 
 String
 Source_file::name_str() const
 {
-    return name_str_;
+  return name_str_;
 }
 
 Source_file::~Source_file()
 {
-    delete istream_p_;
-    istream_p_ = 0;
-    delete storage_p_;
+  delete istream_p_;
+  istream_p_ = 0;
+  delete storage_p_;
 }
 
 String
 Source_file::error_str(char const* pos_ch_C) const
 {
-    char const* data_ch_C = ch_C();
-    char const * eof_C_ = data_ch_C + length_i();
-    if (!in_b(pos_ch_C))
-       return "(position unknown)";
+  char const* data_ch_C = ch_C();
+  char const * eof_C_ = data_ch_C + length_i();
+  if (!in_b(pos_ch_C))
+    return "(position unknown)";
 
     
-    if (pos_ch_C == eof_C_)
-       pos_ch_C --;
-    char const* begin_ch_C = pos_ch_C;
-    while (begin_ch_C > data_ch_C)
-        if (*--begin_ch_C == '\n') 
-          {
-           begin_ch_C++;
-           break;
-         }
-
-    char const* end_ch_C = pos_ch_C;
-    while (end_ch_C < eof_C_)
-        if (*end_ch_C++ == '\n') 
-          {
-         end_ch_C--;
-         break;
-         }
+  if (pos_ch_C == eof_C_)
+    pos_ch_C --;
+  char const* begin_ch_C = pos_ch_C;
+  while (begin_ch_C > data_ch_C)
+    if (*--begin_ch_C == '\n') 
+      {
+       begin_ch_C++;
+       break;
+      }
+
+  char const* end_ch_C = pos_ch_C;
+  while (end_ch_C < eof_C_)
+    if (*end_ch_C++ == '\n') 
+      {
+       end_ch_C--;
+       break;
+      }
   
-       //    String(char const* p, int length) is missing!?
-    String line_str((Byte const*)begin_ch_C, end_ch_C - begin_ch_C);
-
-    int error_col_i = 0;
-    char const* scan_ch_C = begin_ch_C;
-    while (scan_ch_C < pos_ch_C)
-       if (*scan_ch_C++ == '\t')
-           error_col_i = (error_col_i / 8 + 1) * 8;
-       else
-           error_col_i++;
-
-    String str = line_str.left_str(pos_ch_C - begin_ch_C) 
-       + String('\n')
-       + String(' ', error_col_i) 
-       + line_str.mid_str(pos_ch_C - begin_ch_C, INT_MAX); // String::mid should take 0 arg..
-    return str;
+  //    String(char const* p, int length) is missing!?
+  String line_str((Byte const*)begin_ch_C, end_ch_C - begin_ch_C);
+
+  int error_col_i = 0;
+  char const* scan_ch_C = begin_ch_C;
+  while (scan_ch_C < pos_ch_C)
+    if (*scan_ch_C++ == '\t')
+      error_col_i = (error_col_i / 8 + 1) * 8;
+    else
+      error_col_i++;
+
+  String str = line_str.left_str(pos_ch_C - begin_ch_C) 
+    + String('\n')
+    + String(' ', error_col_i) 
+    + line_str.mid_str(pos_ch_C - begin_ch_C, INT_MAX); // String::mid should take 0 arg..
+  return str;
 }
 
 bool
 Source_file::in_b(char const* pos_ch_C) const
 {
-    return (pos_ch_C && (pos_ch_C >= ch_C()) && (pos_ch_C <= ch_C() + length_i()));
+  return (pos_ch_C && (pos_ch_C >= ch_C()) && (pos_ch_C <= ch_C() + length_i()));
 }
 
 
 int
 Source_file::line_i(char const* pos_ch_C) const
 {
-    if (!in_b(pos_ch_C))
-       return 0;
+  if (!in_b(pos_ch_C))
+    return 0;
 
-    int i = 1;
-    char const* scan_ch_C = ch_C();
-    if (!scan_ch_C)
-      return 0;
+  int i = 1;
+  char const* scan_ch_C = ch_C();
+  if (!scan_ch_C)
+    return 0;
     
-    while (scan_ch_C < pos_ch_C)
-       if (*scan_ch_C++ == '\n')
-               i++;
-    return i;
+  while (scan_ch_C < pos_ch_C)
+    if (*scan_ch_C++ == '\n')
+      i++;
+  return i;
 }
 
 int
 Source_file::length_i() const
 {
-    return storage_p_->length_i();
+  return storage_p_->length_i();
 }
 
 char const *
 Source_file::ch_C() const
 {
-    return storage_p_->ch_C();
+  return storage_p_->ch_C();
 }
index 4d5a2603a52ea8e648a08b54b0e0d47ba3d7674b..deb594da78b432f066b6ea9dada5a5d513b00327 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 12
+PATCH_LEVEL = 13
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 76d4e7e3eff622823e6bdaa21cace42c58d8f86b..89952d24fa4b51ea8d1ee5243fb759e09b38c67f 100644 (file)
@@ -15,8 +15,8 @@
 #include "musical-request.hh"
 #include "misc.hh"
 
-IMPLEMENT_IS_TYPE_B1 (Abbreviation_beam_engraver, Engraver);
-ADD_THIS_ENGRAVER (Abbreviation_beam_engraver);
+IMPLEMENT_IS_TYPE_B1(Abbreviation_beam_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Abbreviation_beam_engraver);
 
 Abbreviation_beam_engraver::Abbreviation_beam_engraver ()
 {
@@ -87,8 +87,7 @@ Abbreviation_beam_engraver::acknowledge_element (Score_elem_info i)
     return;
 
   Stem* s = (Stem*)i.elem_l_->item ();
-//  Rhythmic_req *rhythmic_req = i.req_l_->musical ()->rhythmic ();
-//  s->flag_i_ = Duration_convert::type2_i (rhythmic_req->duration_.durlog_i_);
+  
   int type_i = span_reqs_drul_[LEFT]->type_i_;
   s->flag_i_ = intlog2 (type_i) - 2;
   if (span_reqs_drul_[RIGHT])
index fbb6e973f830de43557dba8ec5524399082a4c94..00660aac555a6751a9918ae6299a23c231794a73 100644 (file)
@@ -38,15 +38,25 @@ Atom::Atom (Symbol s)
 String
 Atom::TeX_string() const
 {
+  String tex_str = sym_.tex;
+  Offset off = off_;
+
   /* infinity checks. */
-  assert (abs (off_.x()) < 100 CM);
-  assert (abs (off_.y()) < 100 CM);
-  
+  for (int a =X_AXIS; a < NO_AXES; a++)
+    {
+      Axis ax = (Axis)a;
+      if (abs (off[ax]) >= 100 CM)
+       {
+         warning ("ridiculous dimension " + axis_name_str (ax)  + ", " 
+                  +print_dimen(off[ax]));
+         off[ax] = 0.0;
+         tex_str += "\errormark"; 
+       }
+    }
   // whugh.. Hard coded...
-  String s ("\\placebox{%}{%}{%}");
-  Array<String> a;
-  a.push (print_dimen (off_.y()));
-  a.push (print_dimen (off_.x()));
-  a.push (sym_.tex);
-  return substitute_args (s, a);
+  String s ("\\placebox{");
+  s += print_dimen (off[Y_AXIS])+"}{";
+  s += print_dimen (off[X_AXIS]) + "}{";
+  s += tex_str + "}";
+  return s;
 }
index 1df586be6234d8564372d392d1c7ef22bb5b5c15..e0dbd2efffc26aafca0e1f895f5991f30714da30 100644 (file)
@@ -8,14 +8,14 @@
 
 #include "audio-column.hh"
 #include "audio-item.hh"
-#include "audio-score.hh"
+#include "performance.hh"
 
 #include "debug.hh"
 
 Audio_column::Audio_column (Moment at_mom)
 {
   at_mom_ = at_mom;
-  audio_score_l_ = 0;
+  performance_l_ = 0;
 }
 
 void
@@ -36,8 +36,10 @@ Audio_column::print() const
 {
 #ifndef NPRINT
   DOUT << "Audio_column {";
-  DOUT << "at: " << at_mom_ << "\n";
-  DOUT << "}\n";
+  DOUT << "at: " << at_mom_ << ". Contains:";
+  for (PCursor<Audio_item*> i (audio_item_l_list_.top ()); i.ok (); i++)
+    DOUT << i->name () << ", ";
+  DOUT << "\n}\n";
 #endif 
 }
 
index 6ab6c02d581629ea8d666de1854f216e006b9e72..77aaeb44f591ec0138f0e0f0688c63da2778a34c 100644 (file)
@@ -7,7 +7,25 @@
 */
 
 #include "audio-element.hh"
+#include "debug.hh"
+
 IMPLEMENT_IS_TYPE_B(Audio_element);
+
 Audio_element::~Audio_element()
-{}
+{
+}
+
+void
+Audio_element::print () const
+{
+#ifndef NPRINT
+  DOUT << name () << "{ ";
+  do_print ();
+  DOUT << "}";
+#endif
+}
+
+void
+Audio_element::do_print ()const
+{
+}
index 55367026fa56545c46452d976e8f27e465a80d51..60a6badc8dd6292065a6b965ebde17388eae73de 100644 (file)
@@ -5,12 +5,14 @@
 
   (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
 */
-
+#include "debug.hh"
 #include "audio-item.hh"
 #include "midi-item.hh"
+#include "request.hh"
+#include "audio-column.hh"
 
 Audio_instrument::Audio_instrument (String instrument_str)
-       : Audio_item (0)
+  : Audio_item (0)
 {
   str_ = instrument_str;
 }
@@ -20,7 +22,8 @@ Audio_instrument::midi_item_p()
 {
   return str_.length_i() ? new Midi_instrument(0, str_) : 0;
 }
-                                    
+IMPLEMENT_IS_TYPE_B1(Audio_instrument, Audio_item);
+
 Audio_item::Audio_item (Request* req_l)
 {
   audio_column_l_ = 0;
@@ -28,7 +31,7 @@ Audio_item::Audio_item (Request* req_l)
 }
 
 Audio_key::Audio_key (Request* req_l)
-       : Audio_item (req_l)
+  : Audio_item (req_l)
 {
 }
 
@@ -37,10 +40,10 @@ Audio_key::midi_item_p()
 {
   return new Midi_key (this);
 }
-
+IMPLEMENT_IS_TYPE_B1 (Audio_key, Audio_item);
 
 Audio_note::Audio_note (Request* req_l)
-       : Audio_item (req_l)
+  : Audio_item (req_l)
 {
 }
 
@@ -50,8 +53,10 @@ Audio_note::midi_item_p()
   return new Midi_note (this);
 }
 
+IMPLEMENT_IS_TYPE_B1(Audio_note, Audio_item);
+
 Audio_tempo::Audio_tempo (int per_minute_4_i)
-       : Audio_item (0)
+  : Audio_item (0)
 {
   per_minute_4_i_ = per_minute_4_i;
 }
@@ -62,8 +67,10 @@ Audio_tempo::midi_item_p()
   return new Midi_tempo (this);
 }
 
+IMPLEMENT_IS_TYPE_B1(Audio_tempo, Audio_item);
+
 Audio_meter::Audio_meter (Request* req_l)
-       : Audio_item (req_l)
+  : Audio_item (req_l)
 {
 }
 
@@ -72,12 +79,13 @@ Audio_meter::midi_item_p()
 {
   return new Midi_meter (this);
 }
+IMPLEMENT_IS_TYPE_B1(Audio_meter, Audio_item);
 
 Audio_text::Audio_text (Audio_text::Type type, String text_str)
-       : Audio_item (0)
+  : Audio_item (0)
 {
-       text_str_ = text_str;
-       type_ = type;
+  text_str_ = text_str;
+  type_ = type;
 }
 
 Midi_item*
@@ -86,5 +94,23 @@ Audio_text::midi_item_p()
   return text_str_.length_i() ? new Midi_text(this) : 0;
 }
 
+IMPLEMENT_IS_TYPE_B1(Audio_text, Audio_item);
 
 IMPLEMENT_IS_TYPE_B1(Audio_item, Audio_element);
+
+void
+Audio_item::do_print () const
+{
+#ifndef NPRINT
+  if (audio_column_l_)
+    {
+      DOUT << "at: "<< audio_column_l_->at_mom ();
+    }
+  if (req_l_)
+    {
+      DOUT << "from: ";
+      req_l_->print ();
+    }
+#endif
+}
+
index 74edd84529afb1dfcb4d3eb62f74975eaf548def..b0161fa2a45df6194182e44f8de7c76e29e64d60 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 #include "interval.hh"
-#include "axis-group.hh"
+#include "axis-group-administration.hh"
 #include "score-elem.hh"
 #include "debug.hh"
 
@@ -35,9 +35,13 @@ void
 Axis_group_administration::add_element (Score_elem*e,
                                        Axis_group_element*g, Axis a1, Axis a2)
 {
-  assert (! e->axis_group_l_a_[a1] && !e->axis_group_l_a_[a2]);
-  e->axis_group_l_a_[a1] = g;
-  e->axis_group_l_a_[a2] = g;    
+  Axis_group_element *& g1=e->axis_group_l_a_[a1];
+  Axis_group_element *& g2 = e->axis_group_l_a_[a2];
+  
+  assert (!g1 || g1 == g);
+  assert (!g2 || g2 == g);
+  g1 = g;
+  g2 = g;
   elem_l_arr_.push (e);
 }
 
index ac3e868a522f62d3af3bf9b895348f883c116668..e86a8cee627ae85e2a7a1cf4b4d11e2a6337a6fe 100644 (file)
@@ -73,4 +73,4 @@ Bar_column_engraver::do_post_move_processing()
 }
 
 IMPLEMENT_IS_TYPE_B1(Bar_column_engraver, Engraver);
-ADD_THIS_ENGRAVER(Bar_column_engraver);
+ADD_THIS_TRANSLATOR(Bar_column_engraver);
index c9a0025208fbb21fdb967d2584697702bc2e5036..05710d8706fadcc1ab3a8989d3b639b21b0989aa 100644 (file)
@@ -28,7 +28,7 @@ Bar_column::do_substitute_dependency (Score_elem*o,Score_elem*n)
   Script_column::do_substitute_dependency (o,n);
   if (o == bar_l_) 
     {
-       bar_l_ = n ? (Bar*)n->item() : 0;
+      bar_l_ = n ? (Bar*)n->item() : 0;
     }
 }
 
index c11a7debeefae3b31455c16f560465bd6e006f94..0e34557667f75a487e47ad924444b48bfba10960 100644 (file)
@@ -35,6 +35,9 @@ Bar_engraver::do_try_request (Request*r_l)
 void
 Bar_engraver::do_process_requests()
 {
+  if (bar_p_)
+    return ;
+  
   if (bar_req_l_) 
     {
       bar_p_ = new Bar;
@@ -54,7 +57,7 @@ Bar_engraver::do_process_requests()
   else 
     {
       Disallow_break_req r;
-      daddy_grav_l_->try_request (&r);
+      daddy_grav_l()->try_request (&r);
     }
 }
 
@@ -78,6 +81,6 @@ Bar_engraver::do_post_move_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Bar_engraver,Engraver);
-ADD_THIS_ENGRAVER(Bar_engraver);
+ADD_THIS_TRANSLATOR(Bar_engraver);
 
 
index 1414f7b7de6a7e7112dd315f927de0c7a34c4039..03e5fece81c04f64105b12218f1dee4300968efa 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  bar-number-grav.cc -- implement Bar_number_grav
+  bar-number-grav.cc -- implement Bar_number_engraver
 
   source file of the GNU LilyPond music typesetter
 
@@ -14,7 +14,7 @@
 #include "bar.hh"
 #include "time-description.hh"
 
-Bar_number_grav::Bar_number_grav()
+Bar_number_engraver::Bar_number_engraver()
 {
   script_p_ =0;
 }
@@ -22,7 +22,7 @@ Bar_number_grav::Bar_number_grav()
 static Command_script_req dummy;
 
 void
-Bar_number_grav::acknowledge_element (Score_elem_info i)
+Bar_number_engraver::acknowledge_element (Score_elem_info i)
 {
   if (i.origin_grav_l_arr_.size() == 1 &&
       i.elem_l_->is_type_b (Bar::static_name()) && !script_p_) 
@@ -44,7 +44,7 @@ Bar_number_grav::acknowledge_element (Score_elem_info i)
 }
 
 void
-Bar_number_grav::do_pre_move_processing()
+Bar_number_engraver::do_pre_move_processing()
 {
   if (script_p_) 
     {
@@ -53,5 +53,5 @@ Bar_number_grav::do_pre_move_processing()
     }
 }
 
-IMPLEMENT_IS_TYPE_B1(Bar_number_grav,Engraver);
-ADD_THIS_ENGRAVER(Bar_number_grav);
+IMPLEMENT_IS_TYPE_B1(Bar_number_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Bar_number_engraver);
index cbf84388695b42dd74c1f8ab4fc48b4e45a704d7..7ba3f2d77b953fea9b87b3709005d290857c3a56 100644 (file)
@@ -65,7 +65,7 @@ Bar::do_pre_processing()
   /*
     span_score_bar needs dims, so don't do
   
-    transparent_b_ = empty_b_ = (type_str_ == "");
+    transparent_b_ = empty_b_ = (!type_str_);
     
     */
 }
index d3fa191a6cb13137b3e113b6a94e5fbd3ad3af33..bfaf3e12ace8a6a1be9eb8368b8f446d88be99ea 100644 (file)
@@ -125,4 +125,4 @@ Beam_engraver::acknowledge_element (Score_elem_info i)
 } 
     
 IMPLEMENT_IS_TYPE_B1(Beam_engraver, Engraver);
-ADD_THIS_ENGRAVER(Beam_engraver);
+ADD_THIS_TRANSLATOR(Beam_engraver);
index b2b2bc4f4fd4f76e90031c588a601e9e944eb0ea..02dde804a058cd897e2d4691d0cb54bba6849484 100644 (file)
@@ -47,7 +47,8 @@ Beam::add (Stem*s)
 
   if (!spanned_drul_[LEFT])
     set_bounds(LEFT,s);
-  set_bounds(RIGHT,s);
+  else
+    set_bounds(RIGHT,s);
 }
 
 Molecule*
index 2bca2b16ed2be63f4cbc047296ef30e9f44da4ca..80db90709c23e2ee6997dee17865b5cdfc4a2e25 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#include "translator.hh"
+#include "translator-group.hh"
 #include "debug.hh"
 #include "chord-iterator.hh"
 
index a9bea179f0d4c6bc2c76e1605e67bba40ec19c36..ad4814202cdad50c9fdbd61e8ecb1e2f26f7a1c0 100644 (file)
@@ -18,8 +18,8 @@ Clef_engraver::Clef_engraver()
 {
   clef_p_ = 0;
   clef_req_l_ =0;
-  
-  set_type ("violin");
+  clef_type_str_ = 0;
+  c0_position_i_ =0;
 }
 
 bool
@@ -28,22 +28,22 @@ Clef_engraver::set_type (String s)
   clef_type_str_  = s;
   if (clef_type_str_ == "violin") 
     {
-       c0_position_i_= -2;
+      c0_position_i_= -2;
     }
   else if (clef_type_str_ == "alto") 
     {
-       c0_position_i_= 4;
+      c0_position_i_= 4;
     }
   else if (clef_type_str_ == "tenor") 
     {
-       c0_position_i_= 6;
+      c0_position_i_= 6;
     }
   else if (clef_type_str_ == "bass") 
     {
-       c0_position_i_= 10;
+      c0_position_i_= 10;
     }
   else 
-       return false;
+    return false;
   
   return true;
 }
@@ -58,23 +58,28 @@ void
 Clef_engraver::read_req (Clef_change_req*c_l)
 {
   if (!set_type (c_l->clef_str_))
-       c_l->error ("unknown clef type ");
+    c_l->error ("unknown clef type ");
 }
 void
 Clef_engraver::acknowledge_element (Score_elem_info info)
 {
   if (info.elem_l_->name() == Bar::static_name ()) 
     {
-       create_clef();
-       if (!clef_req_l_)
-           clef_p_->default_b_ = true;
+      create_clef();
+      if (!clef_req_l_)
+       clef_p_->default_b_ = true;
     }
 }
 
 void
 Clef_engraver::do_creation_processing()
 {
-  create_clef();
+   Scalar def = get_property ("defaultclef");
+  if (def)
+    set_type (def);
+  else
+    set_type ("violin");
+ create_clef();
   clef_p_->default_b_ = false;
 }
 
@@ -83,7 +88,7 @@ Clef_engraver::do_try_request (Request * r_l)
 {
   Command_req* creq_l= r_l->command();
   if (!creq_l || !creq_l->clefchange())
-       return false;
+    return false;
 
   clef_req_l_ = creq_l->clefchange();
   
@@ -96,7 +101,7 @@ Clef_engraver::create_clef()
 {
   if (!clef_p_) 
     {
-       clef_p_ = new Clef_item;
+      clef_p_ = new Clef_item;
       announce_element (Score_elem_info (clef_p_,clef_req_l_));
     }
   clef_p_->read (*this);
@@ -107,8 +112,8 @@ Clef_engraver::do_process_requests()
 {
   if (clef_req_l_) 
     {
-       create_clef();
-       clef_p_->default_b_ = false;
+      create_clef();
+      clef_p_->default_b_ = false;
     }
 }
 
@@ -116,7 +121,7 @@ void
 Clef_engraver::do_pre_move_processing()
 {
   if (!clef_p_)
-       return;
+    return;
   typeset_element (clef_p_);
   clef_p_ = 0;
 }
@@ -136,4 +141,4 @@ Clef_engraver::do_removal_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Clef_engraver,Engraver);
-ADD_THIS_ENGRAVER(Clef_engraver);
+ADD_THIS_TRANSLATOR(Clef_engraver);
index e25f24949388316b9db5f460c624072a96bfab7c..f1b71123904818c1b4d6cde9bd171bccdd7f5ac4 100644 (file)
 void
 Collision_engraver::acknowledge_element (Score_elem_info i)
 {
-  if (!(i.elem_l_->name() == Note_column::static_name ()))
-       return;
-
-  if (!col_p_) 
+  if (i.elem_l_->is_type_b (Note_column::static_name ()))
     {
-       col_p_ = new Collision;
-       announce_element (Score_elem_info (col_p_,0));
+      Note_column * c = (Note_column*) i.elem_l_->item ();
+      if (c->rest_b ())
+       return ;
+      if (!col_p_) 
+       {
+         col_p_ = new Collision;
+         announce_element (Score_elem_info (col_p_,0));
+       }
+      col_p_->add (c);
     }
-  col_p_->add ((Note_column*)i.elem_l_->item());
 }
-
 void
 Collision_engraver::do_pre_move_processing()
 {
   if (col_p_) 
     {
-       typeset_element (col_p_);
-       col_p_ =0;
+      typeset_element (col_p_);
+      col_p_ =0;
     }
 }
 Collision_engraver::Collision_engraver()
@@ -40,4 +42,4 @@ Collision_engraver::Collision_engraver()
 
 
 IMPLEMENT_IS_TYPE_B1(Collision_engraver,Engraver);
-ADD_THIS_ENGRAVER(Collision_engraver);
+ADD_THIS_TRANSLATOR(Collision_engraver);
index 881c561e9592601a9c796b48cc557300d8758a08..9d9cf84e5846d883132fb0559f610833c29da3b9 100644 (file)
@@ -51,40 +51,41 @@ Collision::do_pre_processing()
   
   /*
     [stem up, stem up shifted, stem down shifted, stem down]
-   */
+    */
   Array<Note_column*> clash_group_arr_a[4];
   
   for (int i=0; i < clash_l_arr_.size(); i++) 
     {
-       Note_column* c_l = clash_l_arr_[i];
-       if (! c_l->dir_) 
-         {
-           warning ("No stem direction set. Ignoring column in clash. ");
-           continue;
-         }
-       int d = (c_l->dir_);
+      Note_column* c_l = clash_l_arr_[i];
+      if (! c_l->dir_) 
+       {
+         warning ("No stem direction set. Ignoring column in clash. ");
+         continue;
+       }
+      int d = (c_l->dir_);
        
-       clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l);
+      clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l);
     }
   
   
   for (int j=0; j < 4; j++) 
     {
-       if (clash_group_arr_a[j].size() > 1) 
-         {
-           warning ("Too many clashing notecolumns. Ignoring them.");
-           return;
-         }
+      if (clash_group_arr_a[j].size() > 1) 
+       {
+         warning ("Too many clashing notecolumns. Ignoring them.");
+         return;
+       }
     }
   int d = 1;
   do 
     {
-       if (!clash_group_arr_a[idx (d, false)].size())
-         {
-           clash_group_arr_a[idx (d,  false)] = clash_group_arr_a[idx (d, true)];
-           clash_group_arr_a[idx (d, true)].clear();
-         }
-  } while ((d *= -1) != 1);
+      if (!clash_group_arr_a[idx (d, false)].size())
+       {
+         clash_group_arr_a[idx (d,  false)] = clash_group_arr_a[idx (d, true)];
+         clash_group_arr_a[idx (d, true)].clear();
+       }
+    }
+  while ((d *= -1) != 1);
                                  
 
   Interval_t<int> y_extent[4];
@@ -94,66 +95,67 @@ Collision::do_pre_processing()
   
   for (int j =0 ; j < 4; j++) 
     {
-       if (clash_group_arr_a[j].size()) 
-           col_l_a[j] = clash_group_arr_a[j][0];
-       else
-           col_l_a[j] = 0;
+      if (clash_group_arr_a[j].size()) 
+       col_l_a[j] = clash_group_arr_a[j][0];
+      else
+       col_l_a[j] = 0;
        
-       if (col_l_a[j]) 
-         {
-           y_extent[j] = col_l_a[j]->head_positions_interval();
-         }
+      if (col_l_a[j]) 
+       {
+         y_extent[j] = col_l_a[j]->head_positions_interval();
+       }
 
 
-       x_off [j] = 0.0;
-       y_off[j] = 0;
+      x_off [j] = 0.0;
+      y_off[j] = 0;
     }
   
   do 
     {
-       x_off[idx (d, true)] = d*0.5;
-  } while ((d *= -1) != 1);
+      x_off[idx (d, true)] = d*0.5;
+    }
+  while ((d *= -1) != 1);
 
   
   // y_extent: smallest y-pos noteball interval containing all balls
   // 4 (0..3) groups: stem up/down; shift on/off; 
   Interval_t<int> middle (y_extent[idx (-1,0)].max(),
-                           y_extent[idx (1,0)].min());
+                         y_extent[idx (1,0)].min());
   Interval_t<int> open_middle (y_extent[idx (-1,0)].max()+1, y_extent[idx (1,0)].min ()-1);
   do
     {
-       if (!open_middle.contains_b (y_extent[idx (d,true)]))
-           x_off[idx (d, true)] = d *1.0 ;
-  } while ((d *= -1) != 1);
+      if (!open_middle.contains_b (y_extent[idx (d,true)]))
+       x_off[idx (d, true)] = d *1.0 ;
+    } while ((d *= -1) != 1);
    
   if (!middle.empty_b() 
-       && middle.length() < 2 && col_l_a[idx (1,0)] && col_l_a[idx (-1,0)]) {  
-// reproduction of bugfix at 3am ?
-       Note_head * nu_l= col_l_a[idx (1,0)]->head_l_arr_[0];
-       Note_head * nd_l = col_l_a[idx (-1,0)]->head_l_arr_.top();
-       if (! (nu_l->balltype_i_ == nd_l->balltype_i_ 
-              && nu_l->dots_i_ == nd_l->dots_i_  && middle.length() == 0)) 
-                {
-           x_off[idx (1,0)] -= 0.5;
-           x_off[idx (1,1)] -= 0.5;
-           x_off[idx (-1,1)] += 0.5;
-           x_off[idx (-1,0)] += 0.5;
-         }
+      && middle.length() < 2 && col_l_a[idx (1,0)] && col_l_a[idx (-1,0)]) {   
+    // reproduction of bugfix at 3am ?
+    Note_head * nu_l= col_l_a[idx (1,0)]->head_l_arr_[0];
+    Note_head * nd_l = col_l_a[idx (-1,0)]->head_l_arr_.top();
+    if (! (nu_l->balltype_i_ == nd_l->balltype_i_ 
+          && nu_l->dots_i_ == nd_l->dots_i_  && middle.length() == 0)) 
+      {
+       x_off[idx (1,0)] -= 0.5;
+       x_off[idx (1,1)] -= 0.5;
+       x_off[idx (-1,1)] += 0.5;
+       x_off[idx (-1,0)] += 0.5;
+      }
        
-    }
+  }
   Real inter_f = paper()->internote_f ();
   Real wid_f = paper()->note_width ();
   for (int j=0; j < 4; j++) 
     {
-       if (col_l_a[j]) 
-         {
-           /* collision.cc:138: request for method `translate' is ambiguous 
+      if (col_l_a[j]) 
+       {
+         /* collision.cc:138: request for method `translate' is ambiguous 
               
-              (shaddup)
+            (shaddup)
             */
-           Offset o (x_off[j] * wid_f, y_off[j] * inter_f);
-           ((Score_elem*)col_l_a[j])->translate (o);
-         }
+         Offset o (x_off[j] * wid_f, y_off[j] * inter_f);
+         ((Score_elem*)col_l_a[j])->translate (o);
+       }
     }
 }
 
@@ -164,5 +166,5 @@ void
 Collision::do_substitute_dependency (Score_elem*o_l,Score_elem*n_l)
 {
   clash_l_arr_.substitute ((Note_column*)o_l->item(), 
-                           (Note_column*)(n_l?n_l->item():0));
+                          (Note_column*)(n_l?n_l->item():0));
 }
index 69e7f4b7dbbb23d91c831d95ffbd8779a81cc075..0a655351fbf509497215a89f99de1d1b379daadd 100644 (file)
@@ -123,17 +123,6 @@ Clef_change_req::Clef_change_req (String s)
 {
   clef_str_ = s;
 }
-/* *************** */
-
-IMPLEMENT_IS_TYPE_B1(Group_feature_req,Command_req);
-
-void
-Group_feature_req::do_print() const
-{
-#ifndef NPRINT
-  DOUT << type_str_ << "=" << value_str_;
-#endif
-}
 
 /* *************** */
 
diff --git a/lily/dot-column-grav.cc b/lily/dot-column-grav.cc
new file mode 100644 (file)
index 0000000..4383eb8
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+  dot-column-grav.cc -- implement 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
diff --git a/lily/dot-column.cc b/lily/dot-column.cc
new file mode 100644 (file)
index 0000000..6da5e0b
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+  dot-column.cc -- implement Dot_column
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "dots.hh"
+#include "dot-column.hh"
+#include "rhythmic-head.hh"
+
+void
+Dot_column::add (Dots *d)
+{
+  dot_l_arr_.push (d);
+  add_dependency (d);
+  add_element (d);
+}
+
+void
+Dot_column::add (Rhythmic_head *r)
+{
+  if (!r->dots_l_)
+    return ;
+  
+  head_l_arr_.push (r);
+  add_dependency (r);
+  add (r->dots_l_);
+}
+
+void
+Dot_column::do_substitute_dependency (Score_elem*o,Score_elem*n)
+{
+  Item *oi =o->item ();
+  Item *ni = n?n->item ():0;
+  
+  if (oi&&oi->is_type_b (Rhythmic_head::static_name ()))
+    head_l_arr_.substitute ((Rhythmic_head*)oi, (Rhythmic_head*)ni);
+  else if (oi && oi->is_type_b (Dots::static_name ()))
+    dot_l_arr_.substitute ((Dots*) oi, (Dots*) ni);
+}
+
+void
+Dot_column::do_pre_processing ()
+{
+  Interval w;
+  for (int i=0; i < head_l_arr_.size (); i++)
+    w.unite (head_l_arr_[i]->width ());
+  
+  if (!w.empty_b ())
+    translate (w[RIGHT] - width() [LEFT],X_AXIS);
+}
+
+IMPLEMENT_IS_TYPE_B1(Dot_column, Horizontal_group_item);
diff --git a/lily/dots.cc b/lily/dots.cc
new file mode 100644 (file)
index 0000000..0525aa1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  dots.cc -- implement Dots
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "dots.hh"
+#include "molecule.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+
+Dots::Dots ()
+{
+  no_dots_i_ =0;
+  position_i_ =0;
+}
+
+void
+Dots::do_post_processing ()
+{
+  if (!(position_i_ % 2))
+    position_i_ ++;
+}
+
+Molecule* 
+Dots::brew_molecule_p () const
+{
+  Symbol d = paper ()->lookup_l ()->dots (no_dots_i_);
+  Molecule *out = new Molecule (Atom (d));
+  Real inter_f = paper ()->internote_f ();
+  out->translate (inter_f * position_i_, Y_AXIS);
+  return out;
+}
+
+IMPLEMENT_IS_TYPE_B1(Dots, Item);
index 9da5b1386ca53657b63287e5e8b4e2d04737cceb..241737cf329b812e22ffc869331321b7592688a7 100644 (file)
@@ -18,8 +18,8 @@
 
 Dynamic_engraver::Dynamic_engraver()
 {
-  dir_ = CENTER;
   do_post_move_processing();
+  dir_ = CENTER;
   dynamic_p_ =0;
   to_end_cresc_p_ = cresc_p_ = 0;
   cresc_req_l_ = 0;
@@ -123,27 +123,31 @@ Dynamic_engraver::do_pre_move_processing()
     }
 }
 
-void
-Dynamic_engraver::set_feature (Feature i)
-{
-  if (i.type_ == "vdir")       
-    dir_ = (Direction) int(i.value_);
-}
-
 
 IMPLEMENT_IS_TYPE_B1(Dynamic_engraver,Engraver);
-ADD_THIS_ENGRAVER(Dynamic_engraver);
+ADD_THIS_TRANSLATOR(Dynamic_engraver);
 
-Dynamic_engraver::~Dynamic_engraver()
+void
+Dynamic_engraver::do_removal_processing ()
 {
-  delete dynamic_p_;
-  delete to_end_cresc_p_;
-  if (cresc_p_) 
+  if (cresc_p_)
     {
+      typeset_element (cresc_p_ );
+      cresc_p_ =0;
+    }
+  if (to_end_cresc_p_)
+    {
+      typeset_element (to_end_cresc_p_);
       cresc_req_l_->warning ("unended crescendo");
+      to_end_cresc_p_ =0;
+    }
+  if (dynamic_p_)
+    {
+      typeset_element (dynamic_p_);
+      dynamic_p_ =0;
     }
-  delete cresc_p_;
 }
+
 void
 Dynamic_engraver::acknowledge_element (Score_elem_info i)
 {
index 3c7e7ca86b5670959a4e2db110c29d9c7af71d06..a50b078062930c3038fd05122ef4ede5bcf3654f 100644 (file)
 #include "debug.hh"
 #include "p-score.hh"
 #include "score-elem.hh"
-#include "input-translator.hh"
 
-Engraver* get_engraver_p (String);
-
-void
-Engraver_group_engraver::print() const
-{ 
-  Engraver::print(); 
-}
-
-Engraver_group_engraver::~Engraver_group_engraver()
-{
-  assert (removable_b());
-}
-
-void
-Engraver_group_engraver::check_removal()
-{
-  for (int i =0; i < group_l_arr_.size();) 
-    {
-      group_l_arr_[i]->check_removal();
-      if (group_l_arr_[i]->removable_b())
-       terminate_engraver (group_l_arr_[i]);
-      else 
-       i++;
-    }
-}
-
-bool
-Engraver_group_engraver::removable_b() const
-{
-  return !iterator_count_&& !group_l_arr_.size() ;
-}
-
-Engraver_group_engraver::Engraver_group_engraver()
-{
-  itrans_l_ = 0;
-}
-
-void
-Engraver_group_engraver::set_feature (Feature d)
-{
-  PCursor<Engraver*> i (grav_list_.top());
-  // why the while construct?
-  while (i.ok()) 
-    {
-      // this construction to ensure clean deletion
-      Engraver *grav_l = i++; 
-      grav_l->set_feature (d);
-    }
-}
-
-void
-Engraver_group_engraver::sync_features()
-{
-  PCursor<Engraver*> i (grav_list_.top());
-  while (i.ok()) 
-    {
-      Engraver *grav_l = i++; 
-      grav_l->sync_features();
-    }
-}
-
-void
-Engraver_group_engraver::do_pre_move_processing()
-{
-  PCursor<Engraver*> i (grav_list_.top());
-  while (i.ok()) 
-    {
-      Engraver *grav_l = i++; 
-      grav_l->pre_move_processing();
-    }
-}
-
-void
-Engraver_group_engraver::do_process_requests()
-{
-  PCursor<Engraver*> i (grav_list_.top());
-  while (i.ok()) 
-    {
-      Engraver *grav_l = i++; 
-      grav_l->process_requests();
-    }
-}
-
-
-void
-Engraver_group_engraver::do_post_move_processing()
-{
-  PCursor<Engraver*> i (grav_list_.top());
-  while (i.ok()) 
-    {
-      // this construction to ensure clean deletion
-      Engraver *grav_l = i++; 
-      grav_l->post_move_processing();
-    }
-}
-
-
-bool
-Engraver_group_engraver::contains_b (Engraver* grav_l) const
-{
-  bool parent_b = Engraver::contains_b (grav_l);
-  
-  if (parent_b)
-    return true;
-  for (PCursor<Engraver*> i (grav_list_.top()); i.ok (); i++)
-    if (i->contains_b (grav_l))
-      return true;
-  return false;
-}
-       
-
-
-bool
-Engraver_group_engraver::do_try_request (Request*req_l)
-{
-  bool hebbes_b =false;
-  for (int i =0; !hebbes_b && i < nongroup_l_arr_.size() ; i++)
-    hebbes_b =nongroup_l_arr_[i]->try_request (req_l);
-  if (!hebbes_b && daddy_grav_l_)
-    hebbes_b = daddy_grav_l_->try_request (req_l);
-  return hebbes_b ;
-}
-
-bool
-Engraver_group_engraver::try_request (Request* r)
-{
-  return Engraver::try_request (r);
-}
-
-void
-Engraver_group_engraver::add (Engraver *grav_p)
-{
-  grav_list_.bottom().add (grav_p);
-  grav_p->daddy_grav_l_ = this;
-
-  if (grav_p->is_type_b (Engraver_group_engraver::static_name())) 
-    {
-      group_l_arr_.push ((Engraver_group_engraver*)grav_p);
-    }
-  else 
-    {
-      nongroup_l_arr_ .push (grav_p);
-    }
-}
-
-
-Engraver *
-Engraver_group_engraver::remove_engraver_p (Engraver*grav_l)
-{
-  group_l_arr_.substitute ((Engraver_group_engraver*)grav_l,0);
-  nongroup_l_arr_.substitute (grav_l,0);
-  PCursor<Engraver*> grav_cur (grav_list_.find (grav_l));
-  
-  return grav_cur.remove_p();
-}
-
-void
-Engraver_group_engraver::terminate_engraver (Engraver*r_l)
-{
-  DOUT << "Removing " << r_l->name() << " at " << get_staff_info ().when () << "\n";
-  r_l->removal_processing();
-  Engraver * grav_p =remove_engraver_p (r_l);
-  
-  delete grav_p;
-}
-
-IMPLEMENT_IS_TYPE_B2(Engraver_group_engraver,Engraver, Translator);
-
-ADD_THIS_ENGRAVER(Engraver_group_engraver);
-
-void
-Engraver_group_engraver::do_print() const
-{
-#ifndef NPRINT
-  if (!check_debug)
-    return ;
-  DOUT << "ID: " << id_str_ ;
-  DOUT << " iterators: " << iterator_count_<< "\n";
-  for (PCursor<Engraver*> i (grav_list_.top()); i.ok (); i++)
-    i->print();
-#endif
-}
-
-
-Engraver_group_engraver*
-Engraver_group_engraver::find_engraver_l (String n, String id)
-{
-  if (name() == n && id_str_ == id)
-    return this;
-  Engraver_group_engraver * r = 0;
-  for (int i =0; !r && i<  group_l_arr_.size(); i++) 
-    {
-      r = group_l_arr_[i]->find_engraver_l (n,id);
-    }
-  
-  return r;
-}
-
-Translator*
-Engraver_group_engraver::find_get_translator_l (String n,String id)
-{
-  Translator * ret=0;
-  Input_translator * itrans_l= itrans_l_-> recursive_find (n);
-  if (itrans_l) 
-    {
-      ret = find_engraver_l (n,id);
-      if (!ret) 
-       {
-         Engraver_group_engraver * group = 
-           itrans_l-> get_group_engraver_p();
-           
-         add (group);
-         ret = group;
-           
-         if (group->itrans_l_->is_name_b (n))
-           ret ->id_str_ = id;
-         else
-           return ret->find_get_translator_l (n,id);
-
-       }
-    }
-  else if (daddy_grav_l_)
-    ret =daddy_grav_l_->find_get_translator_l (n,id);
-  else 
-    {
-      warning ("Can't find or create `" + n + "' called `" + id + "'\n");
-      ret =0;
-    }
-  return ret;
-}
-
-int
-Engraver_group_engraver::depth_i() const
-{
-  return daddy_grav_l_->depth_i()  + 1;
-}
-
-Translator*
-Engraver_group_engraver::ancestor_l (int l)
-{
-  if (!l || !daddy_grav_l_)
-    return this;
-  
-  return daddy_grav_l_->ancestor_l (l-1);
-}
+IMPLEMENT_IS_TYPE_B2(Engraver_group_engraver,Engraver, Translator_group);
+ADD_THIS_TRANSLATOR(Engraver_group_engraver);
 
 void
 Engraver_group_engraver::announce_element (Score_elem_info info)
@@ -271,78 +27,59 @@ Engraver_group_engraver::announce_element (Score_elem_info info)
 void
 Engraver_group_engraver::do_announces()
 {
-  for (int i=0; i < group_l_arr_.size(); i++) 
+  Link_array<Translator_group> groups = group_l_arr ();
+  for (int i=0; i < groups.size(); i++) 
     {
-      group_l_arr_[i]->do_announces();
+      Engraver * eng = groups[i]->engraver_l ();
+      if (eng)
+       {
+         Engraver_group_engraver * group =
+           (Engraver_group_engraver*) eng;
+         group->do_announces();
+       }
     }
   
   Request dummy_req;
+
+  Link_array<Translator> nongroups = nongroup_l_arr ();
   for (int j =0; j < announce_info_arr_.size(); j++)
     {
       Score_elem_info info = announce_info_arr_[j];
-     
+
       if (!info.req_l_)
        info.req_l_ = &dummy_req;
-      for (int i=0; i < nongroup_l_arr_.size(); i++) { // Is this good enough?6
-       if (nongroup_l_arr_[i] != info.origin_grav_l_arr_[0])
-         nongroup_l_arr_[i]->acknowledge_element (info);
-      }
+      for (int i=0; i < nongroups.size(); i++) 
+       {       // Is this good enough?
+         Engraver * eng = nongroups[i]->engraver_l ();
+         if (eng && eng!= info.origin_grav_l_arr_[0])
+           eng->acknowledge_element (info);
+       }
     }
   announce_info_arr_.clear();
 }
 
 
-void
-Engraver_group_engraver::do_removal_processing()
-{
-  for (PCursor<Engraver*> i (grav_list_.top()); i.ok (); i++)
-    i->removal_processing();
-}
-
 Staff_info
 Engraver_group_engraver::get_staff_info() const
 {
   Staff_info inf = Engraver::get_staff_info();
 
-  for (int i=0; i < nongroup_l_arr_.size(); i++)
-    nongroup_l_arr_[i]->fill_staff_info (inf);
-  
+  Link_array<Translator> simple_translators = nongroup_l_arr (); 
+  for (int i=0; i < simple_translators.size(); i++)
+    {
+    Engraver * eng = simple_translators[i]->engraver_l ();
+    if (eng)
+      eng->fill_staff_info (inf);
+    }
   return inf;
 }
 
-Translator*
-Engraver_group_engraver::get_default_interpreter()
-{
-  // ? 
-  if (is_bottom_engraver_b())
-    return daddy_grav_l_->get_default_interpreter();
 
-  Engraver_group_engraver *grav_p= itrans_l_->
-    get_default_itrans_l()->get_group_engraver_p ();
-  add (grav_p);
-  if (grav_p->is_bottom_engraver_b())
-    return grav_p;
-  else
-    return grav_p->get_default_interpreter();
-}
 
-bool
-Engraver_group_engraver::is_bottom_engraver_b() const
+Engraver_group_engraver::~Engraver_group_engraver ()
 {
-  return !itrans_l_->get_default_itrans_l();
 }
 
-Engraver*
-Engraver_group_engraver::get_simple_engraver (char const *type) const
+Engraver_group_engraver::Engraver_group_engraver ()
 {
-  for (int i=0; i < nongroup_l_arr_.size(); i++) 
-    {
-      if (nongroup_l_arr_[i]->name() == type)
-       return nongroup_l_arr_[i];
-    }
-  if (daddy_grav_l_)
-    return daddy_grav_l_->get_simple_engraver (type);
-  return 0;
 }
-
index 11ac18d61e62230e57f1842ca16a6e0df1a428ec..57bd126d6c0f8e2898674f8c2f8f108eabf09e4f 100644 (file)
 #include "engraver-group.hh"
 #include "debug.hh"
 
-void
-Engraver::post_move_processing()
-{
-  if (status < CREATION_INITED) 
-    {
-       do_creation_processing();
-       status = CREATION_INITED;
-    }
-  if (status >= MOVE_INITED)
-       return;
-
-  do_post_move_processing();
-  status = MOVE_INITED;
-}
-
-void
-Engraver::removal_processing()
-{
-  if (status < CREATION_INITED)
-       do_creation_processing();
-  
-  do_removal_processing();
-}
-
-bool
-Engraver::try_request (Request * r)
-{
-  if (status < MOVE_INITED)
-       post_move_processing();
-
-  return do_try_request (r);
-}
-
-void
-Engraver::process_requests()
-{
-  if (status < PROCESSED_REQS)
-       post_move_processing();
-  else if (status >= PROCESSED_REQS)
-       return; 
-  
-  status = PROCESSED_REQS;
-  do_process_requests();
-}
-
-void
-Engraver::pre_move_processing()
-{
-  do_pre_move_processing();
-  status = CREATION_INITED;
-}
-
 void
 Engraver::fill_staff_info (Staff_info&)
 {
   
 }
 
-Scalar
-Engraver::get_feature (String t)
-{
-  return daddy_grav_l_->get_feature (t);
-}
-
-bool
-Engraver::do_try_request (Request*)
-{
-  return false;
-}
-
-Engraver::Engraver()
-{
-  status = VIRGIN;
-  daddy_grav_l_ = 0;
-}
 
 void
 Engraver::announce_element (Score_elem_info i)
 {
   i.origin_grav_l_arr_.push (this);
-  daddy_grav_l_->announce_element (i);
+  daddy_grav_l()->announce_element (i);
 }
 
 void
 Engraver::typeset_element (Score_elem*p)
 {
-  daddy_grav_l_->typeset_element (p);
+  daddy_grav_l()->typeset_element (p);
 }
 
 Paper_def*
 Engraver::paper() const
 {
-  return daddy_grav_l_->paper();
+  return (Paper_def*)output_def_l_;
 }
 
-bool
-Engraver::contains_b (Engraver *grav_l) const
-{
-  return this == grav_l;
-}
 
 Staff_info
 Engraver::get_staff_info() const
 {
-  if (daddy_grav_l_)
-    return daddy_grav_l_->get_staff_info();
+  if (daddy_grav_l())
+    return daddy_grav_l()->get_staff_info();
   Staff_info info;
   return info;
 }
 
-void
-Engraver::print() const
-{
-#ifndef NPRINT
-  DOUT << "\n" << name() << " {";
-  do_print();
-  DOUT << "}";
-#endif
-}
 
+IMPLEMENT_IS_TYPE_B1(Engraver, Translator);
 
-IMPLEMENT_IS_TYPE_B(Engraver);
 
-void
-Engraver::do_print() const
+Engraver_group_engraver*
+Engraver::daddy_grav_l () const
 {
+  return (daddy_trans_l_ )
+       ? (Engraver_group_engraver*) daddy_trans_l_->engraver_l ()
+       : 0;
 }
-
diff --git a/lily/global-gravs.cc b/lily/global-gravs.cc
deleted file mode 100644 (file)
index 784c193..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-  global-gravs.cc -- implement Engraver,Performer ctors
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "proto.hh"
-#include "plist.hh"
-#include "input-translator.hh"
-#include "debug.hh"
-#include "engraver.hh"
-
-struct Engraver_table_entry {
-  String name_str_;
-  Grav_ctor ctor_l_;
-  Engraver_table_entry (String s, Grav_ctor f) 
-    {
-       name_str_ =s;
-       ctor_l_ = f;
-    }
-  Engraver_table_entry()
-  {
-       ctor_l_ =0;
-    }
-};
-
-static Array<Engraver_table_entry> *grav_table=0;
-
-void
-add_engraver (String s, Grav_ctor f)
-{
-  if (!grav_table)
-       grav_table = new Array<Engraver_table_entry>;
-  
-  grav_table->push (Engraver_table_entry (s, f));
-}
-
-
-Engraver*
-get_engraver_p (String s)
-{
-  for (int i=0; i < grav_table->size(); i++) 
-    {
-       if ((*grav_table)[i].name_str_ == s)
-           return (*(*grav_table)[i].ctor_l_)();
-    }
-  error ("Unknown engraver `" + s +"\'");
-  return 0;
-}
-
-#if 0
-
-struct Performer_table_entry
-{
-  String name_str_;
-  Perf_ctor ctor_l_;
-  Performer_table_entry (String s, Perf_ctor f) 
-    {
-       name_str_ =s;
-       ctor_l_ = f;
-    }
-  Performer_table_entry()
-  {
-       ctor_l_ =0;
-    }
-}
-
-static Array<Performer_table_entry> *perf_table=0;
-
-void
-add_performer (String s, Perf_ctor f)
-{
-  if (!perf_table)
-       perf_table = new Array<Performer_table_entry>;
-  
-  perf_table->push (Performer_table_entry (s, f));
-}
-
-
-Performer*
-get_performer_p (String s)
-{
-  for (int i=0; i < perf_table->size(); i++) 
-    {
-       if ((*perf_table)[i].name_str_ == s)
-           return (*(*perf_table)[i].ctor_l_)();
-    }
-  error ("Unknown performer `" + s +"\'");
-  return 0;
-}
-#endif
diff --git a/lily/global-performers.cc b/lily/global-performers.cc
deleted file mode 100644 (file)
index 69102aa..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-  global-performers.cc -- implement 
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-         Jan Nieuwenhuizen <jan@digicash.com>
-*/
-
-#include "proto.hh"
-#include "plist.hh"
-#include "input-translator.hh"
-#include "debug.hh"
-#include "performer.hh"
-
-struct Performer_table_entry {
-  String name_str_;
-  Perf_ctor ctor_l_;
-  Performer_table_entry (String s, Perf_ctor f) 
-    {
-       name_str_ =s;
-       ctor_l_ = f;
-    }
-  Performer_table_entry()
-  {
-       ctor_l_ =0;
-    }
-};
-
-static Array<Performer_table_entry> *perf_table=0;
-
-void
-add_Performer (String s, Perf_ctor f)
-{
-  if (!perf_table)
-       perf_table = new Array<Performer_table_entry>;
-  
-  perf_table->push (Performer_table_entry (s, f));
-}
-
-
-Performer*
-get_performer_p (String s)
-{
-  for (int i=0; i < perf_table->size(); i++) 
-    {
-       if ((*perf_table)[i].name_str_ == s)
-           return (*(*perf_table)[i].ctor_l_)();
-    }
-  error ("Unknown performer `" + s +"\'");
-  return 0;
-}
index f4213dd6a6a8f4fb29d7420167798561e09757c5..33ff9f81a15e603c656c5e6f230ea65f5ffa907b 100644 (file)
@@ -13,37 +13,25 @@ Global_translator::Global_translator()
   last_mom_ = 0;
 }
 
-Translator*
-Global_translator::ancestor_l (int)
-{
-  return this;
-}
-
 void
 Global_translator::add_moment_to_process (Moment m)
 {
   if (m  > last_mom_)
-       return;
+    return;
   
   for (int i=0; i <  extra_mom_pq_.size(); i++)
-       if (extra_mom_pq_[i] == m)
-           return;
+    if (extra_mom_pq_[i] == m)
+      return;
   extra_mom_pq_.insert (m);
 }
 
-int
-Global_translator::depth_i() const
-{
-  return 0;
-}
-
 void
 Global_translator::modify_next (Moment &w)
 {
   while (extra_mom_pq_.size() && 
-       extra_mom_pq_.front() <= w)
+        extra_mom_pq_.front() <= w)
        
-       w =extra_mom_pq_.get();
+    w =extra_mom_pq_.get();
 }
 
 int
@@ -53,12 +41,18 @@ Global_translator::moments_left_i() const
 }
 
 void
-Global_translator::prepare (Moment)
+Global_translator::prepare (Moment m)
 {
+  now_mom_ = m;
 }
 
+Moment
+Global_translator::now_moment () const
+{
+  return now_mom_;
+}
 
-IMPLEMENT_IS_TYPE_B1(Global_translator, Translator);
+IMPLEMENT_IS_TYPE_B1(Global_translator, Translator_group);
 
 Music_output*
 Global_translator::get_output_p()
diff --git a/lily/head-column.cc b/lily/head-column.cc
deleted file mode 100644 (file)
index b870796..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-  head-column.cc -- implement Head_column
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "debug.hh"
-#include "head-column.hh"
-#include "note-head.hh"
-#include "stem.hh"
-#include "script.hh"
-
-Head_column::Head_column()
-{
-  stem_l_ = 0;
-  dir_ =CENTER;
-}
-
-void
-Head_column::do_substitute_dependency (Score_elem*o,
-                                      Score_elem*n)
-{
-  Script_column::do_substitute_dependency (o,n);
-  if (o->name() == Note_head::static_name ()) 
-    {
-      head_l_arr_.substitute ((Note_head*)o->item(), 
-                             (n)? (Note_head*)n->item() : 0);
-    }
-  if (stem_l_ == o) 
-    {
-      stem_l_ = n ? (Stem*)n->item():0;
-    }
-}
-
-
-void
-Head_column::set (Stem*stem_l)
-{
-  stem_l_ = stem_l;
-  Score_elem::add_dependency (stem_l);
-  for (int i=0; i < script_l_arr_.size(); i++)
-    script_l_arr_[i]->set_stem (stem_l);
-}
-
-void
-Head_column::add (Script *script_l)
-{
-  Script_column::add (script_l) ;
-  if  (stem_l_)
-    script_l->set_stem (stem_l_);
-}
-void
-Head_column::add (Note_head *n_l)
-{
-  add_support (n_l);
-  head_l_arr_.push (n_l);
-}
-
-
-
-IMPLEMENT_IS_TYPE_B1(Head_column,Script_column);
-
-void
-Head_column::do_print() const
-{
-#ifndef NPRINT
-  DOUT << "heads: " << head_l_arr_.size();
-#endif
-}
-
-void
-Head_column::do_pre_processing()
-{
-  if (!dir_)
-    {
-      if (stem_l_)
-       dir_ = stem_l_->dir_;
-    }
-  Script_column::do_pre_processing();
-}
index 29da2be66e18c979e0cc74d61e138767ee03537f..d564b58e6e6be1e29658bc1ceb55251d8ee33cff 100644 (file)
@@ -8,49 +8,52 @@
 #include "head-grav.hh"
 #include "paper-def.hh"
 #include "musical-request.hh"
+#include "dots.hh"
 
 Note_head_engraver::Note_head_engraver()
 {
+  dot_p_=0;
   note_p_ = 0;
-  do_post_move_processing();
+  note_req_l_ =0;
 }
 
 bool
 Note_head_engraver::do_try_request (Request *req_l) 
 {
   if (note_req_l_)
-       return false;
+    return false;
   
-  if (req_l->musical() && (req_l->musical ()->note () || req_l->musical ()->rest ()))
-       note_req_l_=req_l->musical()->rhythmic ();
-  else
-       return false;
+  if (!(req_l->musical() && req_l->musical ()->note ()))
 
+    return false;
+  
+  note_req_l_=req_l->musical()->rhythmic ();
   return true;
 }
 
 void
 Note_head_engraver::do_process_requests()
 {
-  if (!note_req_l_)
-       return;
+  if (!note_req_l_ || note_p_)
+    return;
   
-  Note_head*n_p = new Note_head (8);   // ugh
-  note_p_ = n_p;
-  n_p->set_rhythmic (note_req_l_->rhythmic());
-
-  if (note_req_l_->note()) 
+  note_p_  = new Note_head;
+  note_p_->balltype_i_ = note_req_l_->duration_.durlog_i_;
+  note_p_->dots_i_ = note_req_l_->duration_.dots_i_;
+  if (note_p_->dots_i_)
     {
-       n_p->position_i_ = note_req_l_->note()->height ();
-       Staff_info inf = get_staff_info();
-       if (inf.c0_position_i_l_)
-           n_p->position_i_ += *inf.c0_position_i_l_;
-    }
-  else if (note_req_l_->rest()) 
-    {
-       n_p->rest_b_ = true;
+      dot_p_ = new Dots;
+      note_p_->dots_l_ = dot_p_;
+      announce_element (Score_elem_info (dot_p_,0));
     }
   
+  note_p_->position_i_ = note_req_l_->note()->height ();
+
+  Staff_info inf = get_staff_info();
+  if (inf.c0_position_i_l_)
+    note_p_->position_i_ += *inf.c0_position_i_l_;
+
+  
   Score_elem_info itinf (note_p_,note_req_l_);
   announce_element (itinf);
 }
@@ -60,8 +63,13 @@ Note_head_engraver::do_pre_move_processing()
 {
   if (note_p_) 
     {
-       typeset_element (note_p_);
-       note_p_ = 0;
+      typeset_element (note_p_);
+      note_p_ = 0;
+    }
+  if (dot_p_)
+    {
+      typeset_element (dot_p_);
+      dot_p_ =0;
     }
 }
 void
@@ -72,4 +80,4 @@ Note_head_engraver::do_post_move_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Note_head_engraver,Engraver);
-ADD_THIS_ENGRAVER(Note_head_engraver);
+ADD_THIS_TRANSLATOR(Note_head_engraver);
index b64be42fee46848b951b6a52b1fb2898ec898210..fb1e02205b9766854c4f9ff8f1f03ed656be6ec4 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "string.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
 #include "header.hh"
 
 String
@@ -17,7 +17,7 @@ Header::TeX_string() const
 
   s+= "\\def\\LilyIdString{"  + lily_id_str_ + "}";
   
-  for (Assoc_iter<String, String> i(*this); i.ok(); i++) 
+  for (Dictionary_iter<String> i(*this); i.ok(); i++) 
     {
       s += "\\def\\mudela" + i.key() + "{" + i.val() + "}";
     }
index 035c93b2448334ec41fe3fb435c8c17efa3ea8ea..921f13d90e424bd0d9a8b1abf62794beb6934149 100644 (file)
@@ -17,7 +17,7 @@
 #include "lookup.hh"
 #include "script-def.hh"
 #include "request.hh"
-#include "input-translator.hh"
+#include "translator.hh"
 
 
 IMPLEMENT_IS_TYPE_B(Identifier);
@@ -60,7 +60,7 @@ class Class
 
 DEFAULT_PRINT(Script_id, General_script_def, script);
 DEFAULT_PRINT(Lookup_id, Lookup, lookup);
-DEFAULT_PRINT(Input_translator_id, Input_trans, input_translator);
+DEFAULT_PRINT(Translator_id, Translator, translator);
 DEFAULT_PRINT(Symtables_id, Symtables, symtables);
 DEFAULT_PRINT(Music_id,Music , music);
 DEFAULT_PRINT(Request_id, Request, request);
@@ -106,7 +106,7 @@ Idclass::accessor () {\
        Idclass::Idclass (Class*st, int code):Identifier (code) { data_p_ = st; }\
 
 IMPLEMENT_ID_CLASS(Duration_id, Duration, duration);
-IMPLEMENT_ID_CLASS(Input_translator_id, Input_translator, input_translator);
+IMPLEMENT_ID_CLASS(Translator_id, Translator, translator);
 IMPLEMENT_ID_CLASS(Int_id, int, intid);
 IMPLEMENT_ID_CLASS(Real_id, Real, real);
 IMPLEMENT_ID_CLASS(Script_id, General_script_def, script);
@@ -124,7 +124,7 @@ Identifier::Identifier (Identifier const&)
 }
 
 DEFAULT_ACCESSOR(Duration_id, Duration, duration);
-DEFAULT_ACCESSOR(Input_translator_id,Input_translator, input_translator);
+VIRTUAL_ACCESSOR(Translator_id,Translator, translator);
 DEFAULT_ACCESSOR(Int_id, int, intid);
 DEFAULT_ACCESSOR(Real_id, Real, real);
 VIRTUAL_ACCESSOR(Script_id, General_script_def, script);
index ddea124250c32b186a1eab65ea101d1bc77a4a7c..3a9afc14dc3ee7e217f75602e567c3c6a622ec0e 100644 (file)
 #include "engraver.hh"
 #include "drul-array.hh"
 
-class Abbreviation_beam; // move me to lily-proto
-
 /**
   Generate an abbreviation beam.  Eat stems.
  */
 class Abbreviation_beam_engraver : public Engraver
 {
 public:
+  TRANSLATOR_CLONE(Abbreviation_beam_engraver);
   DECLARE_MY_RUNTIME_TYPEINFO;
 
   Abbreviation_beam_engraver();
index b5f09403f87449591729a277ddfad90dbee6b81d..273675f611035b07cbad4c1eb8a3d8b6cbe303f5 100644 (file)
@@ -26,7 +26,7 @@ public:
     void print() const;
 
     Link_list<Audio_item *> audio_item_l_list_;
-    Audio_score * audio_score_l_;
+    Performance * performance_l_;
 
 private:
     Audio_column (Audio_column const&);
index 6deaf157137214533930cc8fa08239d3b4b1d234..c870887c6f7bb420ef262d97a93b496df3289c69 100644 (file)
 #include "virtual-methods.hh"
 
 struct Audio_element {
-    virtual ~Audio_element();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  void print ()const;
+  
+  virtual ~Audio_element();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  virtual void do_print () const;
 };
 #endif // AUDIO_ELEMENT_HH
index 61c24d3a49174def679eb9bb8627ead08a9328b2..3e3c00c4fb649e50beab4a2870dfa5a8c4142795 100644 (file)
   virtual CSound_item* score_item_p() = 0;
  */
 struct Audio_item : public Audio_element {
-    Audio_item (Request* req_l);
+  Audio_item (Request* req_l);
 
-    /// Create a midi-item from myself.
-    virtual Midi_item* midi_item_p() = 0;
+  /// Create a midi-item from myself.
+  virtual Midi_item* midi_item_p() = 0;
 
-    Audio_column* audio_column_l_;
-    Request* req_l_;
+  Audio_column* audio_column_l_;
+  /*
+    THIS SUX. This ties the output system to the input system.  Bad move.
+   */
+  Request* req_l_;
 
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    
+  DECLARE_MY_RUNTIME_TYPEINFO;    
+protected:
+  virtual void do_print () const;
+  
 private:
-    Audio_item (Audio_item const&);
-    Audio_item& operator=( Audio_item const&);
+  Audio_item (Audio_item const&);
+  Audio_item& operator=( Audio_item const&);
 };
 
 struct Audio_key : public Audio_item {
-    Audio_key (Request* req_l);
-
-    virtual Midi_item* midi_item_p();
+  Audio_key (Request* req_l);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual Midi_item* midi_item_p();
 };
 
 struct Audio_instrument : public Audio_item {
-    Audio_instrument (String instrument_str);
-    virtual Midi_item* midi_item_p();
-    String str_;
+  Audio_instrument (String instrument_str);
+  virtual Midi_item* midi_item_p();
+  String str_;
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
                                       
 struct Audio_note : public Audio_item {
-    Audio_note (Request* req_l);
-    virtual Midi_item* midi_item_p();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Audio_note (Request* req_l);
+  virtual Midi_item* midi_item_p();
 };
 
 struct Audio_text : Audio_item {
-    enum Type { 
-       TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, 
-       MARKER, CUE_POINT
-    };
-
-    Audio_text (Audio_text::Type type, String text_str);
-    virtual Midi_item* midi_item_p();
-
-    Type type_;
-    String text_str_;
+  enum Type { 
+    TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, 
+    MARKER, CUE_POINT
+  };
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Audio_text (Audio_text::Type type, String text_str);
+  virtual Midi_item* midi_item_p();
+
+  Type type_;
+  String text_str_;
 };
 
 struct Audio_tempo : Audio_item {
-    Audio_tempo (int per_minute_4_i);
-    virtual Midi_item* midi_item_p();
-
-    int per_minute_4_i_;
+  Audio_tempo (int per_minute_4_i);
+  virtual Midi_item* midi_item_p();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  int per_minute_4_i_;
 };
 
 struct Audio_meter : Audio_item {
-    Audio_meter (Request* req_l);
-    virtual Midi_item* midi_item_p();
+  Audio_meter (Request* req_l);
+  virtual Midi_item* midi_item_p();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // AUDIO_ITEM_HH
index a9dbb3c5e16a552cb34eb6aae9e3ba6199fc1d41..812d983faa9f75cda9b56bba7454ba2fde01b3be 100644 (file)
@@ -1,6 +1,5 @@
-
 /*
-  axes.hh -- declare 
+  axes.hh -- declare Axis
 
   source file of the GNU LilyPond music typesetter
 
diff --git a/lily/include/axis-group-administration.hh b/lily/include/axis-group-administration.hh
new file mode 100644 (file)
index 0000000..77007f8
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  axis-group-administration.hh -- declare Axis_group_administration
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef AXIS_GROUP_ADMINISTRATION_HH
+#define AXIS_GROUP_ADMINISTRATION_HH
+
+
+#include "parray.hh"
+#include "axes.hh"
+#include "real.hh"
+#include "lily-proto.hh"
+
+/**
+  Do the dirty work for Axis_group_element.
+ */
+struct Axis_group_administration {
+  Link_array<Score_elem> elem_l_arr_;
+    
+  Interval extent (Axis) const;
+  void print() const ;
+  Axis_group_administration (Axis_group_administration const&);
+  Axis_group_administration(){}
+  void remove_all (Axis a1,   Axis a2);
+
+  bool contains_b (Score_elem const *) const;
+  void add_element (Score_elem*, Axis_group_element*, Axis a1, Axis a2);
+  void remove_element (Score_elem*, Axis a1, Axis a2);
+};
+
+#endif // AXIS_GROUP_ADMINISTRATION_HH
diff --git a/lily/include/axis-group-element.hh b/lily/include/axis-group-element.hh
new file mode 100644 (file)
index 0000000..42a31fd
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  axis-group-element.hh -- declare Axis_group_element
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef AXIS_GROUP_ELEMENT_HH
+#define AXIS_GROUP_ELEMENT_HH
+
+#include "score-elem.hh"
+#include "axis-group-administration.hh"
+/** 
+  Treat a group of elements a unity in either or both axis sense .
+  This is a wrapper around Axis_group_administration
+  */
+class Axis_group_element : public virtual Score_elem {
+protected:
+  Axis_group_administration axis_admin_;
+  virtual void do_print() const;
+  virtual Link_array<Score_elem> get_extra_dependencies() const;
+  virtual void do_unlink();
+  virtual void do_junk_links();
+
+public:
+  Axis_group_element();
+  virtual void remove_all()=0;
+  virtual void add_element (Score_elem*)=0;
+  virtual void remove_element (Score_elem*)=0;
+  virtual bool contains_b (Score_elem const *) const;
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // AXIS_GROUP_ELEMENT_HH
index 526d3ccd26ab4f8aeecbbcd97d2e26b262f94f8b..1059bdaeed82b810373577792e93b848a48597c3 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef AXIS_ITEM_HH
 #define AXIS_ITEM_HH
 
-#include "axis-group.hh" 
+#include "axis-group-element.hh" 
 #include "item.hh"
 
 /**
index 028529a6ef21473d1e39ebc66d9c2ff2519f842b..15b132d3663c2214244621ceac92ad0711133aec 100644 (file)
@@ -11,7 +11,7 @@
 #define SPAN_AXIS_GROUP_HH
 
 #include "spanner.hh"
-#include "axis-group.hh"
+#include "axis-group-element.hh"
 
 /** An element which groups a line in a certain direction. The most
   useful example of this is the Vertical_group_spanner */
index e2e030f0b9fd3b9184e8a43d05d4b9e141aa231e..152688ce69ad0efafa197dbac3f2743b984bc802 100644 (file)
@@ -1,5 +1,5 @@
 /*
-axis-group.hh -- declare Axis_group_administration, Axis_group_element
+axis-group-element.hh -- declare Axis_group_administration, Axis_group_element
 
   source file of the GNU LilyPond music typesetter
 
@@ -7,50 +7,6 @@ axis-group.hh -- declare Axis_group_administration, Axis_group_element
 */
 
 
+#error
 #ifndef Axis_group_administration_HH
-#define Axis_group_administration_HH
-
-#include "parray.hh"
-#include "axes.hh"
-#include "real.hh"
-#include "lily-proto.hh"
-#include "score-elem.hh"
-
-/**
-  Do the dirty work for Axis_group_element.
- */
-struct Axis_group_administration {
-  Link_array<Score_elem> elem_l_arr_;
-    
-  Interval extent (Axis) const;
-  void print() const ;
-  Axis_group_administration (Axis_group_administration const&);
-  Axis_group_administration(){}
-  void remove_all (Axis a1,   Axis a2);
-
-  bool contains_b (Score_elem const *) const;
-  void add_element (Score_elem*, Axis_group_element*, Axis a1, Axis a2);
-  void remove_element (Score_elem*, Axis a1, Axis a2);
-};
-
-/** 
-  Treat a group of elements a unity in either or both axis sense .
-  This is a wrapper around Axis_group_administration
-  */
-class Axis_group_element : public virtual Score_elem {
-protected:
-  Axis_group_administration axis_admin_;
-  virtual void do_print() const;
-  virtual Link_array<Score_elem> get_extra_dependencies() const;
-  virtual void do_unlink();
-  virtual void do_junk_links();
-
-public:
-  Axis_group_element();
-  virtual void remove_all()=0;
-  virtual void add_element (Score_elem*)=0;
-  virtual void remove_element (Score_elem*)=0;
-  virtual bool contains_b (Score_elem const *) const;
-  DECLARE_MY_RUNTIME_TYPEINFO;
-};
-#endif // Axis_group_administration_HH
+#define Axis_group_administration_HH#endif // Axis_group_administration_HH
index d7d8ba2c43cd4701bb95efe4c3e34b76d2cc7fe1..c05b2a5414c4c087a55c5fdb6753586d69d495ad 100644 (file)
 #define BAR_COLUMN_GRAV_HH
 
 #include "engraver.hh"
+#include "parray.hh"
 
 /// couple bars and appropriate scripts
 class Bar_column_engraver :public Engraver {
-    Bar_column *barcol_p_;
-    Array< Script * >  script_l_arr_;
+  Bar_column *barcol_p_;
+  Link_array<Script>  script_l_arr_;
 
-    Bar *bar_l_;
+  Bar *bar_l_;
     
 protected:
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 public:
-    Bar_column_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Bar_column_engraver);
+  Bar_column_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // BAR_COLUMN_GRAV_HH
index bb7cfb061babf2845a27df488d117a7d28675829..4bb7c9d33a0ef369c8a8f54e01c4eee6611355c0 100644 (file)
   generate bars. Either user ("|:"), or default (new measure)
   */
 class Bar_engraver : public Engraver {
-    Bar_req * bar_req_l_;
-    Bar * bar_p_;
+  Bar_req * bar_req_l_;
+  Bar * bar_p_;
 public:
-    Bar_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Bar_engraver);
+  Bar_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 
      
 protected:
-    virtual bool do_try_request (Request *req_l);
-    virtual void do_process_requests();
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 };
 
 #endif // BARGRAV_HH
index fcce6d53a62bc4c151b748ab2563e549968355d6..5db9c041a24ac61161af2e17342ed014f43d8637 100644 (file)
 /**
   catch bars, and put a number over them.
  */
-class Bar_number_grav : public Engraver {
+class Bar_number_engraver : public Engraver {
   Script * script_p_;
 protected:
 
   void acknowledge_element (Score_elem_info);
   void do_pre_move_processing();
 public:
-  Bar_number_grav();
+  TRANSLATOR_CLONE(Bar_number_engraver);
+  Bar_number_engraver();
   DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // BAR_NUMBER_GRAV_HH
index 3db08fc073d7e8244af5766e958c21b84b642453..81b68adfc19b7edfb3b851a7e34907a25dd551d5 100644 (file)
@@ -23,6 +23,7 @@ class Beam_engraver : public Engraver
   Rhythmic_grouping *current_grouping_p_;
 
 public:
+  TRANSLATOR_CLONE(Beam_engraver);
   DECLARE_MY_RUNTIME_TYPEINFO;
   Beam_engraver();
 protected:
index 624e7bdf2046d8a14800ddd0c1392892a0857d8c..ffd499920aac581a17d4b22708bfd149f4e11c4f 100644 (file)
@@ -1,11 +1,14 @@
 /*
-  clef.hh -- part of GNU LilyPond
+  clef-grav.hh -- declare Clef_engraver
 
-  (c) 1996,97 Han-Wen Nienhuys
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#ifndef CLEF_HH
-#define CLEF_HH
+
+#ifndef CLEF_GRAV_HH
+#define CLEF_GRAV_HH
 
 #include "scalar.hh"
 #include "varray.hh"
 
 /// where is c-0 in the staff?
 class Clef_engraver : public  Engraver {
-    Clef_item *clef_p_;
-    Clef_change_req * clef_req_l_;
-    void create_clef();
-    void read_req (Clef_change_req*);
-    bool set_type (String);
+  Clef_item *clef_p_;
+  Clef_change_req * clef_req_l_;
+  void create_clef();
+  void read_req (Clef_change_req*);
+  bool set_type (String);
 protected:
-     virtual void do_process_requests();
-    virtual void fill_staff_info (Staff_info&);
-    virtual void do_pre_move_processing();
-    virtual void do_removal_processing();
-    virtual void do_creation_processing();
-    virtual void do_post_move_processing();
-    virtual bool do_try_request (Request*);
-    virtual void acknowledge_element (Score_elem_info);
+  virtual void do_process_requests();
+  virtual void fill_staff_info (Staff_info&);
+  virtual void do_pre_move_processing();
+  virtual void do_removal_processing();
+  virtual void do_creation_processing();
+  virtual void do_post_move_processing();
+  virtual bool do_try_request (Request*);
+  virtual void acknowledge_element (Score_elem_info);
 public:
-    int c0_position_i_;
-    String clef_type_str_;
+  TRANSLATOR_CLONE(Clef_engraver);
+  int c0_position_i_;
+  String clef_type_str_;
 
-    /* ************** */
+  /* ************** */
    
-    Clef_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  Clef_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
    
 };
-#endif // CLEF_HH
-
+#endif 
index b04d9fe7465d31ede17e54b302dc3d3e81109aea..996165c3a3b8ce6f828c18224f5c232c9f8228d9 100644 (file)
 #include "engraver.hh"
 
 class Collision_engraver : public Engraver {
-    Collision* col_p_;
+  Collision* col_p_;
 
 protected:
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
 public:
-    Collision_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Collision_engraver);
+  Collision_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // COLLISION_GRAV_HH
index 848d4d9e43c58149a3e069070c51c518700a9ca4..d807e2a219acea0c50200f9a01c3fe2530f6ec54 100644 (file)
@@ -19,7 +19,6 @@
 class Command_req  : public virtual Request  {
 public:
     REQUESTMETHODS(Command_req, command);
-    virtual Group_feature_req * groupfeature() { return 0; }
     virtual Measure_grouping_req * measuregrouping() { return 0; }
     virtual Clef_change_req * clefchange() { return 0; }
     virtual Key_change_req * keychange() { return 0; }
@@ -125,14 +124,6 @@ public:
     REQUESTMETHODS(Bar_req,bar);
 };
 
-class Group_feature_req  : public Command_req  {
-public:
-    String type_str_;
-    String value_str_;
-    
-    REQUESTMETHODS(Group_feature_req, groupfeature);
-};
-
 
 /**
     Handle key changes.
diff --git a/lily/include/dot-column-grav.hh b/lily/include/dot-column-grav.hh
new file mode 100644 (file)
index 0000000..38db1b5
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+  dot-column-grav.hh -- declare Dot_column_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef DOT_COLUMN_GRAV_HH
+#define DOT_COLUMN_GRAV_HH
+
+#include "engraver.hh"
+
+class Dot_column_engraver : public Engraver
+{
+  
+};
+
+#endif // DOT_COLUMN_GRAV_HH
diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh
new file mode 100644 (file)
index 0000000..01e3e3d
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+  dot-column.hh -- declare Dot_column Dot_column
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef DOT_COLUMN_HH
+#define DOT_COLUMN_HH
+
+#include "horizontal-group-item.hh"
+
+/**
+  Group dots.  This is needed because, the dots have to be aligned per voice
+ */
+class Dot_column : public Horizontal_group_item
+{
+  Link_array<Rhythmic_head> head_l_arr_;
+  Link_array<Dots> dot_l_arr_;
+  void add (Dots*);
+
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  void add (Rhythmic_head*);
+protected:
+  virtual void do_pre_processing ();
+  virtual void do_substitute_dependency (Score_elem *o, Score_elem*n);
+};
+#endif // DOT_COLUMN_HH
diff --git a/lily/include/dots.hh b/lily/include/dots.hh
new file mode 100644 (file)
index 0000000..5463934
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+  dots.hh -- declare Dots
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef DOTS_HH
+#define DOTS_HH
+
+#include "item.hh"
+
+/**
+  The dots to go with a notehead/rest.  A separate class, since they
+  are a party in collision resolution.
+  */
+class Dots : public Item
+{
+protected:
+  virtual Molecule * brew_molecule_p () const;
+  virtual void do_post_processing ();
+public:
+  int no_dots_i_;
+  int position_i_;
+
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Dots ();
+};
+
+#endif // DOTS_HH
index bf71902245faac2e42464a9e849c5c3352674694..a44e3cc8018d38a70d833b0e913aa069f67719d5 100644 (file)
 #include "engraver.hh"
 
 class Dynamic_engraver : public Engraver {
-    Direction dir_;
-    Text_item * dynamic_p_;
-    Crescendo * to_end_cresc_p_;
-    Crescendo * cresc_p_;
-    Span_dynamic_req * cresc_req_l_;
-    Array<Dynamic_req*> dynamic_req_l_arr_;
-    /* ************** */
+  Direction dir_;
+  Text_item * dynamic_p_;
+  Crescendo * to_end_cresc_p_;
+  Crescendo * cresc_p_;
+  Span_dynamic_req * cresc_req_l_;
+  Array<Dynamic_req*> dynamic_req_l_arr_;
+  /* ************** */
 public:
-    Dynamic_engraver();
-    ~Dynamic_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Dynamic_engraver);
+  Dynamic_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual void acknowledge_element (Score_elem_info);
-    virtual bool do_try_request (Request *req_l);
-    virtual void do_process_requests();
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
-    virtual void set_feature (Feature);
+  virtual void do_removal_processing ();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 };
 
 #endif // DYNAMIC_GRAV_HH
index d65c17312370202fe5e307fc02715ec1ed9e001f..0edd067ec21814df8186765bdce7eaada035689b 100644 (file)
@@ -11,7 +11,7 @@
 #define ELEM_GROUP_HH
 
 #include "score-elem.hh"
-#include "axis-group.hh"
+#include "axis-group-element.hh"
 
 
 
index cdfee08c3858bfa6b49e58f1178abf35f9b5e317..9f3dc8b78a3275f99801861a587150fde51feabf 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  engravergroup.hh -- declare Engraver_group_engraver
+  engraver-group.hh -- declare Engraver_group_engraver
 
   source file of the GNU LilyPond music typesetter
 
 #include "plist.hh"
 #include "score-elem-info.hh"
 #include "engraver.hh"
-#include "translator.hh"
+#include "translator-group.hh"
 
 
 /**
   Group a number of engravers. Usually delegates everything to its contents.
   Postfix: group
   */
-class Engraver_group_engraver : public Engraver, public virtual Translator {
+class Engraver_group_engraver : public Engraver, public virtual Translator_group {
 protected:
-    Pointer_list<Engraver*> grav_list_;
-    Link_array<Engraver_group_engraver> group_l_arr_;
-    Link_array<Engraver> nongroup_l_arr_;
-    
-    Array<Score_elem_info> announce_info_arr_;
-    
-    virtual void do_print() const;
-    virtual bool removable_b() const;
+  Array<Score_elem_info> announce_info_arr_;
 public:
-    Engraver*get_simple_engraver (char const*typeinfo) const;
-    virtual void print() const ;
-
-    Input_translator * itrans_l_;
-    void check_removal();
-    Engraver_group_engraver();
-    ~Engraver_group_engraver();
-    
-    bool is_bottom_engraver_b() const;
-
-    
-    /**
-      Junk #grav_l#.
-      Pre:
-      #grav_l# is in #grav_list_#
-     */
-    virtual void terminate_engraver (Engraver * grav_l);
+  TRANSLATOR_CLONE(Engraver_group_engraver);
+  Engraver_group_engraver();
+  ~Engraver_group_engraver();
     
+  DECLARE_MY_RUNTIME_TYPEINFO;
     
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    
-    /**
-      Remove #grav_l# from the list, and return it.
-     */
-    virtual Engraver * remove_engraver_p (Engraver*grav_l);
-    virtual void set_feature (Feature i);
-    virtual void sync_features();
-
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
-    virtual void do_removal_processing();
-    virtual bool do_try_request (Request*);
-    virtual bool try_request (Request*);
-    virtual void do_process_requests();
-
-    virtual Staff_info get_staff_info() const;
-    
-    virtual Engraver_group_engraver * find_engraver_l (String name,String id);
-    virtual void do_announces();    
-    virtual void announce_element (Score_elem_info);
-    virtual void add (Engraver* grav_p);
-    virtual bool contains_b (Engraver*) const;
-
-    virtual Translator* find_get_translator_l (String name, String id);
-    virtual Translator * get_default_interpreter();
-    /**
-      Go up in the tree. default: choose next parent
-     */
-    Translator * ancestor_l (int l=1);
-    int depth_i() const;
+  virtual Staff_info get_staff_info() const;
+  virtual void do_announces();    
+  virtual void announce_element (Score_elem_info);
 };
 
 #endif // ENGRAVERGROUP_HH
index 335ab13034131178db0e6e1301d70a1bef4e6c28..b0f466d3ddeabfb8529caacd4e968b7248e11c18 100644 (file)
@@ -15,8 +15,7 @@
 #include "request.hh"
 #include "score-elem-info.hh"
 #include "staff-info.hh"
-
-
+#include "translator.hh"
 
 
 /**
   It may use derived classes. Hungarian postfix: grav
   
   */
-
-class Engraver {
+class Engraver : public virtual Translator {
     
-    friend class Engraver_group_engraver;
-    /**
-      You cannot copy a Engraver
-     */
-    Engraver (const Engraver&){}
-
-    enum { 
-       VIRGIN,
-       CREATION_INITED,
-       MOVE_INITED,
-       ACCEPTED_REQS,
-       PROCESSED_REQS,
-       ACKED_REQS,
-       MOVE_DONE
-    } status;
+  friend class Engraver_group_engraver;
 
 protected:
     
 
-    /// utility
-    virtual Paper_def * paper() const;
-
+  /// utility
+  Paper_def * paper() const;
+  /**
+    Invoke walker method to typeset element. Default: pass on to daddy.
+    */
+  virtual void typeset_element (Score_elem*elem_p);
     
-    /// make items/spanners with the requests you got
-    virtual void do_process_requests(){}
-
-    /** typeset any items/spanners. Default: do nothing
-     */
-    virtual void do_pre_move_processing(){}
-    /** reset any appropriate data. Default: do nothing
-     */
-    virtual void do_post_move_processing(){}
+  /**
+    take note of item/spanner
+    put item in spanner. Adjust local key; etc.
+
+    Default: ignore the info
+    */
+  virtual void acknowledge_element (Score_elem_info) {}
+  /**
+    Announce element. Default: pass on to daddy. Utility
+    */
+  virtual void announce_element (Score_elem_info);
    
+  /**
+    Get information on the staff. Default: ask daddy.
+    */
+  virtual Staff_info get_staff_info() const;
+  virtual void fill_staff_info (Staff_info&);
 
-    virtual void do_creation_processing() {}
-    virtual void do_removal_processing() {}
-
-    /**
-      Invoke walker method to typeset element. Default: pass on to daddy.
-      */
-    virtual void typeset_element (Score_elem*elem_p);
-    
-     /**
-      take note of item/spanner
-      put item in spanner. Adjust local key; etc.
-
-      Default: ignore the info
-      */
-    virtual void acknowledge_element (Score_elem_info) {}
-    /**
-      Announce element. Default: pass on to daddy. Utility
-      */
-    virtual void announce_element (Score_elem_info);
-    /**
-      Set Feature of the engraver (s). Default: ignore Feature.
-     */
-    virtual void set_feature (Feature){}
-    /**
-      ask daddy for a feature
-     */
-    virtual Scalar get_feature (String type_str);
-    /**
-      Does this equal or contain a certain engraver?
-     */
-
-    virtual void sync_features() {}
-   
-    virtual bool contains_b (Engraver*grav_l) const;
-    /**
-      Get information on the staff. Default: ask daddy.
-      */
-    virtual Staff_info get_staff_info() const;
-    virtual void fill_staff_info (Staff_info&);
-
-
-    virtual void do_print() const;  
-    /*    
-         @see{try_request}
-         Default: always return false
-      */
-    virtual bool do_try_request (Request *req_l);
 public:
-    void pre_move_processing();
-    void process_requests();
-    /**
-      try to fit the request in this engraver
-
-      @return
-      false: not noted,  not taken.
-
-      true: request swallowed. Don't try to put the request elsewhere.
-
-      */
-    bool try_request (Request*);
-    bool is_bottom_engraver() const;
-
-    void post_move_processing();
-    void removal_processing();
-    
-    Engraver_group_engraver * daddy_grav_l_;
-
-    Engraver();
-    virtual ~Engraver(){}
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    void print() const;
+  TRANSLATOR_CLONE(Engraver);
+  Engraver_group_engraver * daddy_grav_l() const;
+  /**
+    override other ctor
+   */
+  Engraver () {}
+
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  void print() const;
+  virtual Engraver * engraver_l () { return this; }
 };
 
-/**
-  A macro to automate administration of engravers.
- */
-#define ADD_THIS_ENGRAVER(c)                           \
-struct c ## init {                                     \
-    static Engraver * globalctor(){            \
-       return new c;                                   \
-    }                                                  \
-    c ## init() {                                      \
-       add_engraver (c::static_name(), globalctor);    \
-                                                       \
-    }                                                  \
-} _ ## c ## init;
-
-typedef Engraver*(*Grav_ctor)(void);
-void add_engraver (String s, Grav_ctor f);
 
 #endif // ENGRAVER_HH
 
diff --git a/lily/include/global-performers.hh b/lily/include/global-performers.hh
deleted file mode 100644 (file)
index 0ed76e4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-
-/*
-  global-performers.hh -- declare global performer stuff
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-                 Jan Nieuwenhuizen <jan@digicash.com>
-*/
-
-#ifndef GLOBAL_PERFORMER_HH
-#define GLOBAL_PERFORMER_HH
-
-/**
-  A macro to automate administration of performers
- */
-#define ADD_THIS_PERFORMER( c) \
-struct c ## init { \
-    static Performer* globalctor() \
-    { \
-       return new c;\
-    } \
-    c ## init() \
-    { \
-       add_Performer (c::static_name(), globalctor); \
-    } \
-} _ ## c ## init;
-
-// typedef Performer*(*Perf_ctor)(void); c++ ?
-typedef Performer*(*Perf_ctor)();
-void add_Performer (String s, Perf_ctor f);
-
-#endif // GLOBAL_PERFORMER_HH 
index ae97418b7ffd6494082ddc9eb780002f5db5d8b2..1d3d91ed5df438919a0056a4583d8bad3fc00f15 100644 (file)
 #ifndef GLOBAL_TRANSLATOR_HH
 #define GLOBAL_TRANSLATOR_HH
 
-#include "translator.hh"
+#include "translator-group.hh"
 #include "pqueue.hh"
 
-class Global_translator : public virtual Translator {
+class Global_translator : public virtual Translator_group{
   PQueue<Moment> extra_mom_pq_;
 public:
+  TRANSLATOR_CLONE(Global_translator);
   Moment last_mom_;
+  Moment now_mom_;
   Global_translator();
+
   int moments_left_i() const;
   void modify_next (Moment&);
   void add_moment_to_process (Moment);
@@ -27,13 +30,11 @@ public:
   virtual void process() {}
   virtual void finish() {}
   virtual void start() {}
-    
+
   DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    
+  virtual Moment now_moment () const;
   virtual Global_translator *global_l() { return this; }
-  virtual int depth_i() const;
-  virtual Translator *ancestor_l (int);
 };
 
 
diff --git a/lily/include/head-column.hh b/lily/include/head-column.hh
deleted file mode 100644 (file)
index ab38222..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-  head-column.hh -- declare Head_column
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef HEAD_COLUMN_HH
-#define HEAD_COLUMN_HH
-
-#include "script-column.hh"
-
-/**
-  Scripts and rests/noteheads
- */
-class Head_column : public Script_column
-{ 
-public:
-  Link_array<Note_head> head_l_arr_;
-  /** The relative position of the "voice" containing this
-    chord. Normally this would be the same as the stem direction,
-    but rests do not have stems.  
-
-    Hmm. outdated.. Rests *do* have stems.
-    */
-
-  Direction dir_;
-  Stem* stem_l_;
-
-  void add (Note_head*);
-  virtual void add (Script*s);
-  void set (Stem*);
-  Head_column();
-  DECLARE_MY_RUNTIME_TYPEINFO;
-protected:
-
-
-  virtual void do_pre_processing();
-  virtual void do_print() const;
-  virtual void do_substitute_dependency (Score_elem*,Score_elem*);
-};
-#endif // HEAD_COLUMN_HH
index fdbbe7064c45cf8f95066bf932b67e9243302149..66411a4ea86beeb14fbc3213932700bb35ed8d09 100644 (file)
   make balls and rests
  */
 class Note_head_engraver : public Engraver {
-    Note_head* note_p_;
-    Rhythmic_req * note_req_l_;
+  Note_head* note_p_;
+  Dots * dot_p_;
+  Rhythmic_req * note_req_l_;
     
 public:
-    Note_head_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Note_head_engraver);
+  Note_head_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual bool do_try_request (Request *req_l) ;
-    virtual void do_process_requests();
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
+  virtual bool do_try_request (Request *req_l) ;
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 
 };
 
index 62ee98ddf4c5c90d0503dc43f5eb5330220f11d6..e74aadc2360d18da7b21c75725e474089c231cc1 100644 (file)
 #define HEADER_HH
 
 #include "string.hh"
-#include "assoc.hh"
+#include "dictionary.hh"
 
 
-struct Header : Assoc<String, String>
+struct Header : Dictionary<String>
 {
   String lily_id_str_;
   String TeX_string() const;
index 935f962e39df71e631c85714755f154c34295025..fc077f60ab30a3701eb3408d6880a95793be63ac 100644 (file)
@@ -31,7 +31,7 @@ struct Identifier : public Input {
     void print() const;
     DECLARE_MY_RUNTIME_TYPEINFO;
     void error (String);
-    IDACCESSOR(Input_translator, input_translator)
+    IDACCESSOR(Translator, translator)
     IDACCESSOR(Music, music)
     IDACCESSOR(General_script_def, script)
     IDACCESSOR(Symtables, symtables)
@@ -61,7 +61,7 @@ struct Idclass : Identifier {\
 }\
 
 
-DECLARE_ID_CLASS(Input_translator_id, Input_translator, input_translator);
+DECLARE_ID_CLASS(Translator_id, Translator, translator);
 DECLARE_ID_CLASS(Duration_id, Duration, duration);
 DECLARE_ID_CLASS(Real_id, Real, real);
 DECLARE_ID_CLASS(Script_id, General_script_def, script);
index 14a35e507c29625e9540a383763c9b109f5bf472..115a48a1fe6b3b9c30855b872ec6783df7edd7c2 100644 (file)
 #include "lily-proto.hh"
 #include "input.hh"
 #include "string.hh"
+#error 
 #include "varray.hh"
 
 struct Input_translator_list : public Pointer_list<Input_translator*> 
 {
-    Input_translator_list (Input_translator_list const &);
-    Input_translator_list(){}
-    ~Input_translator_list(){}
+  Input_translator_list (Input_translator_list const &);
+  Input_translator_list(){}
+  ~Input_translator_list(){}
 };
 
 /** Define a intereter for music. This is an runtime interface to the
  typesystem */
 class Input_translator : public Input { 
 public:
-    Input_translator_list contains_itrans_p_list_;
-    Array<String> consists_str_arr_;
-    Array<String> alias_str_arr_;
-    String base_str_;
-    String type_str_;
-    String default_id_str_;
-
-    void add (Input_translator *);
-    bool is_name_b (String);
-    bool accept_req_b();
-    bool accepts_b (String);
-    void print() const;
-    Engraver_group_engraver * get_group_engraver_p();
-    Performer_group_performer * get_group_performer_p();
-    Input_translator * get_default_itrans_l();
-    Input_translator * recursive_find (String nm);
-    Input_translator * find_itrans_l (String nm);    
+  Input_translator_list contains_itrans_p_list_;
+  Array<String> consists_str_arr_;
+  Array<String> alias_str_arr_;
+  String base_str_;
+  String type_str_;
+  String default_id_str_;
+
+  void add (Input_translator *);
+  bool is_name_b (String);
+  bool accept_req_b();
+  bool accepts_b (String);
+  void print() const;
+  Translator_group * get_group_translator_p();
+  Input_translator * get_default_itrans_l();
+  Input_translator * recursive_find (String nm);
+  Input_translator * find_itrans_l (String nm);    
 };
-Engraver* get_engraver_p (String);
-Performer* get_performer_p (String);
 
 #endif // Input_translator_HH
index f60243fc8f0ec6ed56f3b1926a6b4c012a59a416..b81605e547ce4ed72ad98ecd99a842661733e584 100644 (file)
   Make the key signature.
  */
 class Key_engraver : public Engraver {
-    void create_key();
-    void read_req (Key_change_req * r);
+  void create_key();
+  void read_req (Key_change_req * r);
 
 public:
-    Key key_;
-    Key_change_req * keyreq_l_;
-    Key_item * kit_p_;
-    Array<int> accidental_idx_arr_;
-    bool default_key_b_;
-    bool change_key_b_;
+  Key_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Key_engraver);
+  Key key_;
+  Key_change_req * keyreq_l_;
+  Key_item * kit_p_;
+  Array<int> accidental_idx_arr_;
+  bool default_key_b_;
+  bool change_key_b_;
     
 protected:
-    virtual bool do_try_request (Request *req_l);
-    virtual void do_process_requests();
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
-    virtual void acknowledge_element (Score_elem_info);
-public:
-    Key_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+  virtual void acknowledge_element (Score_elem_info);
 };
 
 #endif // KEYGRAV_HH
index f459ea9353060d5bf577ab4c7c2853876c3a5d89..903e7f66b0b16979c2b3bf868dd5834f39ccc00a 100644 (file)
 
 class Key_performer : public Performer {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Key_performer();
-    ~Key_performer();
+  TRANSLATOR_CLONE(Key_performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Key_performer();
+  ~Key_performer();
 
 protected:
-    void do_print() const;
-    virtual bool do_try_request (Request* req_l);
-    virtual void process_requests();
+  void do_print() const;
+  virtual bool do_try_request (Request* req_l);
+  virtual void do_process_requests();
 
 private:
-    Key_change_req* key_req_l_;
+  Key_change_req* key_req_l_;
 };
 
 #endif // KEY_PERFOMER_HH
index 8e7c46c50a9e8f73bc1122265520221d309efd40..575b52afbd493f261075fa4a7169c8d9b6b87f1e 100644 (file)
@@ -17,7 +17,9 @@ struct Abbreviation_beam_req;
 struct Abbreviation_beam_engraver;
 struct Axis_group_element;
 struct Axis_group;
+struct Translator_group;
 struct Translator;
+struct Abbreviation_beam; 
 struct Audio_element;
 struct Audio_column;
 struct Audio_item;
@@ -25,7 +27,7 @@ struct Audio_key;
 struct Audio_meter;
 struct Audio_note;
 struct Audio_note_off;
-struct Audio_score;
+struct Performance;
 struct Audio_staff;
 struct Audio_tempo;
 struct Atom;
@@ -61,7 +63,8 @@ struct Complex_music;
 struct Cresc_req;
 struct Crescendo ;
 struct Decresc_req;
-
+struct Dots;
+struct Dot_column;
 struct Directional_spanner;
 struct Disallow_break_req;
 struct Durational_req;
@@ -69,13 +72,11 @@ struct Dynamic;
 struct Dynamic_req;
 struct Element_group;
 struct Element_group_item;
-struct Feature;
 struct General_script_def;
 struct Music_output;
 struct Music_output_def;
 struct Global_translator;
 struct Group_change_req;
-struct Group_feature_req;
 struct Head_column;
 struct Header;
 struct Horizontal_align_item;
@@ -84,10 +85,7 @@ struct Horizontal_group_item;
 struct Horizontal_vertical_group;
 struct Idealspacing;
 struct Identifier;
-struct Interpreter;
 struct Input_file;
-struct Input_score;
-struct Input_translator;
 struct Item;
 struct Key;
 struct Key_change_req;
@@ -159,6 +157,7 @@ struct Rational;
 struct Engraver_group_engraver;
 struct Performer;
 struct Performer_group_performer;
+struct Property_iterator;
 struct Request;
 struct Request_column;
 struct Engraver;
@@ -168,6 +167,7 @@ struct Rest_collision_engraver;
 struct Rest_column;
 struct Rest_req;
 struct Rhythmic_grouping;
+struct Rhythmic_head;
 struct Rhythmic_grouping_req;
 struct Rhythmic_req;
 struct Score;
@@ -203,6 +203,7 @@ struct Symtable;
 struct Symtables;
 struct Super_elem;
 struct Terminate_voice_req;
+struct Translation_property;
 struct Tempo_req;
 struct Tex_stream;
 struct Text_def;
index 65e35726dfc6fb8615fcbbfd51ac612d990705da..ac57f9ab6a5679d7b636f0911504bff54f488b6d 100644 (file)
   Engravers put elements on the same or lowel level in a line
   */
 class Line_group_engraver : public Engraver{
-    Vertical_group_spanner *staffline_p_;   
+  Vertical_group_spanner *staffline_p_;   
 
 protected:
-    virtual void do_creation_processing();
-    virtual void do_removal_processing();
-    virtual void acknowledge_element (Score_elem_info);
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
+  virtual void acknowledge_element (Score_elem_info);
 
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Line_group_engraver();
+  TRANSLATOR_CLONE(Line_group_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Line_group_engraver();
 };
 
 
index e060dc61883d52abb6e3381d84198bf98fc54345..49de9f82d225e91875b41ee1a4cf5438596f80a6 100644 (file)
 #include "parray.hh"
 
 struct Local_key_engraver : Engraver {
-    Key local_key_;
-    Key const *key_C_;
-    Array<Note_req* > mel_l_arr_;
-    Array<Item* > support_l_arr_;
-    Link_array<Item  > forced_l_arr_;
-    Link_array<Item > tied_l_arr_;
-    /* *************** */
-    virtual void do_process_requests();
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
-    Local_key_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  TRANSLATOR_CLONE(Local_key_engraver);
+  virtual void do_process_requests();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
+public:
+  Key local_key_;
+  Key const *key_C_;
+  Array<Note_req* > mel_l_arr_;
+  Array<Item* > support_l_arr_;
+  Link_array<Item  > forced_l_arr_;
+  Link_array<Item > tied_l_arr_;
+  Local_key_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // LOCALKEYGRAV_HH
index 632e9c571e53158c741ee7dbeaaa16cc6b7b7f27..96b6d1dbd05e59aacc3d48e9584d36f92772f4b3 100644 (file)
@@ -23,6 +23,7 @@ protected:
     virtual void do_process_requests();
     virtual void do_post_move_processing();
 public:
+  TRANSLATOR_CLONE(Lyric_engraver);
     DECLARE_MY_RUNTIME_TYPEINFO;
     Lyric_engraver();
 };
index f03c4faaf0460ad39ac28d46c57460d258952514..c8a476037d8ea497da7770baf006ac9c36c3fc54 100644 (file)
@@ -16,6 +16,7 @@
 
 class Lyric_performer : public Performer {
 public:
+  TRANSLATOR_CLONE(Lyric_performer);
     DECLARE_MY_RUNTIME_TYPEINFO;
     Lyric_performer();
     ~Lyric_performer();
@@ -23,7 +24,7 @@ public:
 protected:
     void do_print() const;
     virtual bool do_try_request (Request* req_l);
-    virtual void process_requests();
+    virtual void do_process_requests();
 
 private:
     Array<Lyric_req*> lreq_arr_;
index 75fc6a1e5483e2175315fb647d334746c93681e5..98ed2c920ea523440c0c4bfbfd1827a8a903b8db 100644 (file)
@@ -14,7 +14,6 @@ void set_debug (bool);
 void do_scores();
 void add_score (Score* s);
 void set_default_output (String s);
-Input_score* current_iscore_l();
 String find_file (String);
 String get_version_str();
 String get_version_number_str();
index e9e372f8ae11644c909093848751e8ca62e21e5f..90d19b1fdbbf367b445b3ef8cacab5695b6811a7 100644 (file)
@@ -21,6 +21,7 @@ protected:
   virtual void do_process_requests();
   virtual void do_pre_move_processing();
 public:
+  TRANSLATOR_CLONE(Meter_engraver);
   Meter * meter_p_;
 
   Meter_engraver();
index 51edbad020db58ea0e558c7d6bcdf2ed59d2c4ed..fa2f06e9ffcc54f2b8c3f4576a378612bcb0653a 100644 (file)
 
 class Meter_performer : public Performer {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Meter_performer();
-    ~Meter_performer();
+  TRANSLATOR_CLONE(Meter_performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Meter_performer();
+  ~Meter_performer();
 
 protected:
-    void do_print() const;
-    virtual bool do_try_request (Request* req_l);
-    virtual void process_requests();
+  void do_print() const;
+  virtual bool do_try_request (Request* req_l);
+  virtual void do_process_requests();
 
 private:
-    Meter_change_req* meter_req_l_;
+  Meter_change_req* meter_req_l_;
 };
 
 #endif // METER_PERFOMER_HH
index 115158dfdcd0cec62a0545452a65f0d5d3c66b09..964d87f15de1e88e0da5cf319d80f7fa8ffc3e76 100644 (file)
@@ -9,6 +9,7 @@
 
 #ifndef MIDI_DEF_HH
 #define MIDI_DEF_HH
+
 #include "lily-proto.hh"
 #include "real.hh"
 #include "string.hh"
  */
 class Midi_def : public Music_output_def {
 public:
-  // ugh!
-  static int den_i_s;
-  static int num_i_s;
   VIRTUAL_COPY_CONS(Midi_def, Music_output_def);
   DECLARE_MY_RUNTIME_TYPEINFO;
-  Input_translator* itrans_p_;
 
   /// duration of whole note
   Real whole_seconds_f_;
@@ -37,10 +34,7 @@ public:
   Real duration_to_seconds_f (Moment);
   int get_tempo_i (Moment moment);
   void print() const;
-  void set (Input_translator* itrans_p);
   void set_tempo (Moment moment, int count_per_minute_i);
-protected:
-  virtual Global_translator * get_global_translator_p ();  
 };
 
 #endif // MIDI_DEF_HH
index b031688e21d8b2729b5f800cfa3c628561377481..f83eda517b87b5fe50fe00b186181736b604c3a2 100644 (file)
@@ -1,37 +1,43 @@
+/*
+  molecule.hh -- declare Molecule
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
 #ifndef MOLECULE_HH
 #define MOLECULE_HH
 
 #include "lily-proto.hh"
 #include "plist.hh"
 #include "boxes.hh"
-
+#include "axes.hh"
+#include "direction.hh"
 
 /** a group of individually translated symbols. You can add molecules
     to the top, to the right, etc.  */
 struct Molecule {
-    Pointer_list<Atom*> ats;   // change to List<Atom>? 
+  Pointer_list<Atom*> ats;     // change to List<Atom>? 
 
-    /* *************** */
+  /* *************** */
     
-    Molecule() { }
-    Molecule (Atom const &a) { add (a) ;}
-
-    void add_right (const Molecule &m);
-    void add_left (const Molecule &m);
-    void add_top (const Molecule &m);
-    void add_bottom (const Molecule &m);
-    void add (Molecule const &m);
-    void translate (Offset);
-    void translate (Real,Axis);
-    void add (Atom const & a) ;
-    /// how big is #this#? 
-    Box extent() const;
-
-    String TeX_string() const;
-
-    Molecule (const Molecule&s);
-    void print() const;
+  Molecule() { }
+  Molecule (Atom const &a) { add (a) ;}
+
+  void add_at_edge (Axis a, Direction d, const Molecule &m);
+  
+  void add (Molecule const &m);
+  void translate (Offset);
+  void translate (Real,Axis);
+  void add (Atom const & a) ;
+  /// how big is #this#? 
+  Box extent() const;
+
+  String TeX_string() const;
+
+  Molecule (const Molecule&s);
+  void print() const;
 private:
-    void operator=(const Molecule&);
+  void operator=(const Molecule&);
 };
 #endif
index 352af5f3799194511c3ee3d264712b604927ad22..d543a858c99248ebccf7af0df66d835ba9029462 100644 (file)
 #include "virtual-methods.hh"
 
 class Music_iterator {
-  Array<Translator *>report_to_l_arr_;
-  void push_translator (Translator*);
+  Array<Translator_group*>report_to_l_arr_;
+  void push_translator (Translator_group*);
   void pop_translator();
 protected:
   bool first_b_;
   virtual void do_print() const;
     
-  virtual Translator * get_req_translator_l();
+  virtual Translator_group* get_req_translator_l();
   Music_iterator* get_iterator_p (Music*) const;
-  void set_translator (Translator*);
+  void set_translator (Translator_group*);
   Music_iterator *daddy_iter_l_;
     
 public:
-  Translator *report_to_l() const;
+  Translator_group*report_to_l() const;
   DECLARE_MY_RUNTIME_TYPEINFO;
  
-  static Music_iterator* static_get_iterator_p (Music*,Translator*);
+  static Music_iterator* static_get_iterator_p (Music*,Translator_group*);
   Music_iterator();
     
   virtual void process_and_next (Moment until);
   virtual Moment next_moment() const;
   virtual bool ok() const;
   virtual ~Music_iterator();
+
+  /**
+    Construct sub-iterators, and set the translator to 
+    report to
+   */
   virtual void construct_children();
   void print() const;
 };
index b0b83169412dbd190051365da89200e8e06e0a3b..26dacffa31f17ae9a81400246664e90fca46cebd 100644 (file)
@@ -9,9 +9,12 @@
 
 #ifndef Music_output_DEF_HH
 #define Music_output_DEF_HH
+
 #include "string.hh"
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
+#include "plist.hh"
+#include "dictionary.hh"
 
 /**
   Definition of how to output mudela. 
 class Music_output_def  
 {
 public:
+  Dictionary<Translator*> translator_p_dict_;
+  
+  Music_output_def (Music_output_def const&);
+  Music_output_def ();
+  virtual ~Music_output_def ();
+
   VIRTUAL_COPY_CONS(Music_output_def, Music_output_def);
   DECLARE_MY_RUNTIME_TYPEINFO;
-  virtual void print () const {}
-  virtual ~Music_output_def () {}
-  virtual Global_translator * get_global_translator_p () { return 0; }
+  virtual void print () const;
+
+  Global_translator *get_global_translator_p ();
+  Translator_group *get_group_translator_p (String type) const;
+  void assign_translator (String, Translator*);
   String outfile_str_;
+  Translator * find_translator_l (String) const;
 };
+
 #endif // Music_output_DEF_HH
index a267fc04eb08e0341c3c67b45b1d949397924d6c..767c109a535d78952aedcef851e98df25ab62a7a 100644 (file)
   */
 class Music:public Input {
 public:
-    Music_list * parent_music_l_;
+  Music_list * parent_music_l_;
     
-    /** The kind of iterator needed to walk this music.  This doesn't
-      make sense for simple (ie non-list) music, but it does no harm
-      here. Yes, it did harm Music_list: you can forget to copy it.
+  /** The kind of iterator needed to walk this music.  This doesn't
+    make sense for simple (ie non-list) music, but it does no harm
+    here. Yes, it did harm Music_list: you can forget to copy it.
       
-      */
-    String type_str_;
-
-    /// what name (or look for this name)
-    String id_str_;    
-
-    virtual MInterval time_int() const;
-    virtual ~Music(){}
-    void print() const;
-    virtual void transpose (Melodic_req const *);
-    virtual void translate (Moment dt);
-    VIRTUAL_COPY_CONS(Music,Music);
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Music();
+    */
+  String translator_type_str_;
+
+  /// what name (or look for this name)
+  String translator_id_str_;    
+
+  virtual MInterval time_int() const;
+  virtual ~Music(){}
+  void print() const;
+  virtual void transpose (Melodic_req const *);
+  virtual void translate (Moment dt);
+  VIRTUAL_COPY_CONS(Music,Music);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Music();
 protected:
-    virtual void do_print() const;
-  
+  virtual void do_print() const;
 };
 
 #endif // MUSIC_HH
index 6928a0efeae339afc74fb1a4261ad676709f6e85..e3272eb9cdfa2e591250ac48d2d66b9441dc624c 100644 (file)
@@ -35,7 +35,7 @@ public:
     void * lexval_l;
     
     Notename_table  *note_tab_p_;
-    Assoc<String, Identifier*> *identifier_assoc_p_;
+    Dictionary<Identifier*> *identifier_p_dict_p_;
     Keyword_table * keytable_p_;
     int errorlevel_i_;
 
diff --git a/lily/include/note-column-grav.hh b/lily/include/note-column-grav.hh
deleted file mode 100644 (file)
index 9c68248..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-  note-column-grav.hh -- declare Note_column_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef NOTE_COLUMN_GRAV_HH
-#define NOTE_COLUMN_GRAV_HH
-
-#include "engraver.hh"
-
-class Note_column_engraver :public Engraver {
-    Rest_column * rest_col_l();
-    Note_column * note_col_l();
-    
-    Array< Script * >  script_l_arr_;
-    Stem * stem_l_;
-    Note_column *ncol_p_;
-    Rest_column *restcol_p_;
-    bool h_shift_b_;
-    Direction dir_;
-    
-
-    bool acceptable_elem_b (Score_elem const*) const;
-protected:
-    virtual void set_feature (Feature);
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
-public:
-    Note_column_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
-};
-#endif // NOTE_COLUMN_GRAV_HH
index 3c2eb7568e60f084cae277416fb4bfd5794f95f5..b2be9b347962b8b2b6ab4a7a805174a02550a910 100644 (file)
 #define NOTE_COLUMN_HH
 
 #include "item.hh"
-#include "head-column.hh"
+#include "script-column.hh"
 
 /** a struct for treating a group of noteheads (noteheads, stem
   (chord) and scripts) as a single entity.  */
-class Note_column : public Head_column {
+class Note_column : public Script_column {
 protected:
   virtual void do_pre_processing();
-
+  virtual void do_print () const;
+  virtual void do_substitute_dependency (Score_elem*,Score_elem*);
 public:
+  /** The relative position of the "voice" containing this
+    chord. Normally this would be the same as the stem direction,
+    but rests do not have stems.  
+    */
+  Direction dir_;
   bool h_shift_b_;
+  Stem* stem_l_;
+
+
+  Link_array<Note_head> head_l_arr_;
+  Link_array<Rest> rest_l_arr_;
     
   Interval_t<int> head_positions_interval() const;
+  void translate_rests(int dy);
         
   DECLARE_MY_RUNTIME_TYPEINFO;
-  Note_column();
-  void sort();
+  Note_column ();
+  void set (Stem*);
+  void set (Dot_column*);
+  void add (Rhythmic_head*);
+  bool rest_b () const;
+  virtual void add (Script*s);
+  void sort ();
 };
 
 #endif // NOTE_COLUMN_HH
index c6826f2cfca729166ab2c27fd74d68c72d67f6e5..50395212238feb11224959d7d374522ed03e0120 100644 (file)
@@ -7,48 +7,35 @@
 #ifndef NOTEHEAD_HH
 #define NOTEHEAD_HH
 
-#include "item.hh"
+#include "rhythmic-head.hh"
 
-/** ball at the end of the stem takes care of:
+/** ball at the end of the stem. Takes care of:
 
   * help lines  
-  * proper placing of dots 
 
-  It also is the item for a Rest
-  
   */
 
-class Note_head : public Item {
+class Note_head : public Rhythmic_head {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  DECLARE_MY_RUNTIME_TYPEINFO;
 
-    bool rest_b_;
-    int position_i_;
+  int position_i_;
     
-    /// -1 = lowest, 0 = inside, 1 = top
-    int extremal_i_;
+  /// -1 = lowest, 0 = inside, 1 = top
+  int extremal_i_;
     
-    /// needed for the help-lines
-    int staff_size_i_;
-    int dots_i_;
-    int balltype_i_;
-    int dot_delta_y_i_;
-    Direction x_dir_;
+  /// needed for the help-lines
+  int staff_size_i_;
+  Direction x_dir_;
     
-    /* *************** */
-    
-    void set_rhythmic (Rhythmic_req *);
-
-    /**
-      position of top line (5 linestaff: 8)
-      */
-    Note_head (int staff_size);
-    void set_dots();
-    static int compare (Note_head * const &a, Note_head *const &b) ;
+  /**
+    position of top line (5 linestaff: 8)
+    */
+  Note_head ();
+  static int compare (Note_head * const &a, Note_head *const &b) ;
 protected:
-    virtual    void do_print() const;
-    virtual void do_pre_processing();
-    virtual    Molecule* brew_molecule_p() const;
+  virtual void do_pre_processing();
+  virtual Molecule* brew_molecule_p() const;
 };
 #endif // NOTEHEAD_HH
 
index 436b78bb2ac8d4350e900419e331106341821404..661e378dc132bbfc60958a9f917ae25ede1b440e 100644 (file)
 
 class Note_performer : public Performer {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Note_performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
 
-    Note_performer();
+  Note_performer();
 
 protected:
-    virtual void process_requests();
+  virtual void do_process_requests();
 
-    virtual bool do_try_request (Request *req_l) ;
-    virtual void do_print() const;
+  virtual bool do_try_request (Request *req_l) ;
+  virtual void do_print() const;
 
 private:
-    Melodic_req * note_req_l_;
+  Melodic_req * note_req_l_;
 };
 
 #endif // NOTE_PERFORMER_HH
index 5e083a6d7c2217128c9254471622c15cc78dde04..2e9b0bd9fd9b8aabfff14e5ce7c520ac81627737 100644 (file)
@@ -13,9 +13,9 @@
 #include "pointer.hh"
 #include "string.hh"
 #include "lily-proto.hh"
-#include "assoc.hh"
+#include "dictionary.hh"
 
-class Notename_table :   Assoc<String, P<Melodic_req> >{
+class Notename_table :   Dictionary< P<Melodic_req> >{
 public:
     void add (String, Melodic_req*);
     Melodic_req*get_l (String);
index 2210b2f4c2eb697d5a7dfb6f78e456e0b1483109..a06674be8d6c16a04a2f73e8803c7e756dac431b 100644 (file)
  */
 class Paper_def : public Music_output_def {
   Lookup *lookup_p_;
-  Assoc<String, Real> *real_vars_p_;
+  Dictionary<Real> *real_vars_p_;
 
-  Input_translator * itrans_p_;
 protected:
-  virtual  Global_translator * get_global_translator_p();
   VIRTUAL_COPY_CONS(Paper_def,Music_output_def);
-  DECLARE_MY_RUNTIME_TYPEINFO;
 public:    
   virtual ~Paper_def();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 
   void set_var (String, Real);
   Real get_var (String) const;
   void reinit();
   Paper_def();
   void set (Lookup*);
-  void set (Input_translator *);
 
   Paper_def (Paper_def const&);
   /// The distance between beams
index 1bcf0cc4f7419b928bd9386bb8daa8cc79feb60a..a48ce2c022c1085cfb64feeb8ac16d39727a3201 100644 (file)
@@ -13,9 +13,7 @@ String * get_scriptdef (char c);
 Request* get_script_req (char);
 Request*get_script_req (int d , Script_def*def);
 Request*get_text_req (int d , Text_def*def);
-Request* get_stemdir_req (int);
 Request*get_grouping_req (Array<int> i_arr);
-Request* get_hshift_req (int);
 
 #endif // PARSECONSTRUCT_HH
 
index e06dd3b017864370a9a91c253a62df7621fc0a18..da592ef9bf9d7729a75c6a435f43612ba41c75e1 100644 (file)
 #include "parray.hh"
 #include "plist.hh"
 #include "performer.hh"
-#include "translator.hh"
+#include "translator-group.hh"
 
 /**
   Group a number of performers. Usually delegates everything to its contents.
 */
 
-class Performer_group_performer : public Performer, public virtual Translator {
+class Performer_group_performer : public Performer, public virtual Translator_group {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Input_translator* itrans_l_;
-
-    virtual void add (Performer* perf_p);
-    virtual bool do_try_request (Request* req_l);
-    virtual void print() const;
-    virtual bool try_request (Request* r);
-    
-
-protected:
-    virtual ~Performer_group_performer();
-    virtual Translator* find_get_translator_l (String name, String id);
-    virtual Translator* get_default_interpreter();
-
-    Translator * ancestor_l (int l = 1);
-    virtual int depth_i() const;
-
-    virtual void process_requests();
-    virtual void do_removal_processing();
-    virtual void do_creation_processing();
-
-    bool is_bottom_performer_b() const;
-    virtual Performer_group_performer* find_performer_l (String name, String id);
-    virtual void do_print() const;
-
-private:
-    Pointer_list<Performer*> perf_p_list_;
-    
-    Link_array<Performer_group_performer> group_l_arr_;
-    Link_array<Performer> nongroup_l_arr_;
+  TRANSLATOR_CLONE(Performer_group_performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // PERFORMER_GROUP_PERFORMER_HH
index 8e9553f08f28bd2680bed280562bbfaa2fd06499..8335f87bc3c165b5fb1185f7403696012a9053a2 100644 (file)
 #include "request.hh"
 #include "score-elem-info.hh"
 #include "staff-info.hh"
+#include "translator.hh"
 
 /**
   Convert a music definition into a audio representation.
   A baseclass
  */
-class Performer {
-    bool init_b_;
+class Performer : public virtual Translator{
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Performer_group_performer* daddy_perf_l_;
-
-    Performer();
-    virtual ~Performer();
-
-    void print() const;
-    virtual void process_requests();
-
-    virtual bool try_request (Request* req_l);
-
-    virtual void do_removal_processing();
-    void creation_processing();
-
+  TRANSLATOR_CLONE(Performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Performer_group_performer* daddy_perf_l() const;
 protected:
-    virtual void do_creation_processing();
-    virtual bool do_try_request (Request*);
-    virtual int get_tempo_i() const;
-    virtual void do_print() const;
-    virtual void play (Audio_element * elem_p );
+  virtual int get_tempo_i() const;
+  virtual void play (Audio_element * elem_p );
+  Performer * performer_l () { return this; }
 };
 
-#include "global-performers.hh"
 
 #endif // PERFORMER_HH
diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh
new file mode 100644 (file)
index 0000000..08eb9bf
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  property-iterator.hh -- declare Property_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef PROPERTY_ITERATOR_HH
+#define PROPERTY_ITERATOR_HH
+
+#include "music-iterator.hh"
+
+class Property_iterator : public Music_iterator
+{
+  Translation_property *property_l_;
+  
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Property_iterator (Translation_property* prop_l);
+protected:
+  virtual void process_and_next (Moment);
+};
+
+#endif // PROPERTY_ITERATOR_HH
index e5ea98432496e9cbf022832f9f2a2c189beca5a9..b763e4c63b3daf1cedaddf1601764521c0b81194 100644 (file)
 #include "engraver.hh"
 
 class Rest_collision_engraver : public Engraver {
-    Rest_collision* rest_collision_p_;
+  Rest_collision* rest_collision_p_;
 
-    void make_collision();
 protected:
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_print() const;
-    virtual void do_pre_move_processing();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
 public:
-    Rest_collision_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Rest_collision_engraver);
+  Rest_collision_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // REST_COLLISION_GRAV_HH
index 84fe927e5bec6d2c9c92bff11d3265c0e846dc84..cbeaf6fbe83664bbdd8c1a5fcd51dcf724a1ef3c 100644 (file)
 #include "item.hh"
 
 class Rest_collision : public Item {
-    Link_array<Rest_column> rest_l_arr_;
+    Link_array<Note_column> rest_l_arr_;
     Link_array<Note_column> ncol_l_arr_;
 public:
     void add (Note_column*);
-    void add (Rest_column*);
     DECLARE_MY_RUNTIME_TYPEINFO;
     Rest_collision();
 protected:
diff --git a/lily/include/rest-column.hh b/lily/include/rest-column.hh
deleted file mode 100644 (file)
index 61fafc5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  rest-column.hh -- declare Rest_column
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef REST_COLUMN_HH
-#define REST_COLUMN_HH
-
-#include "script-column.hh"
-#include "head-column.hh"
-
-/** struct to treat a set of rests as union (one voice should only
-  produce one rest.  */
-class Rest_column : public Head_column {
-public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    void translate_heads (int dy);
-};
-
-#endif // REST_COLUMN_HH
diff --git a/lily/include/rest-grav.hh b/lily/include/rest-grav.hh
new file mode 100644 (file)
index 0000000..974955c
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+  rest-grav.hh -- declare Engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef REST_GRAV_HH
+#define REST_GRAV_HH
+
+#include "engraver.hh"
+
+class Rest_engraver : public Engraver
+{
+  Rest_req *rest_req_l_;
+  Dots * dot_p_;
+  Rest * rest_p_;
+protected:
+  virtual bool do_try_request (Request *);
+  virtual void do_pre_move_processing ();
+  virtual void do_post_move_processing ();
+  virtual void do_process_requests ();
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Rest_engraver);
+  Rest_engraver ();
+};
+#endif // REST_GRAV_HH
diff --git a/lily/include/rest.hh b/lily/include/rest.hh
new file mode 100644 (file)
index 0000000..028e7f8
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  rest.hh -- declare Rest
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef REST_HH
+#define REST_HH
+
+#include "rhythmic-head.hh"
+
+class  Rest : public Rhythmic_head
+{
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  
+  int position_i_;
+  Rest ();
+  void add (Dots*);
+protected:
+  virtual void do_add_processing ();
+  virtual Molecule * brew_molecule_p () const;
+};
+#endif // REST_HH
diff --git a/lily/include/rhythmic-column-grav.hh b/lily/include/rhythmic-column-grav.hh
new file mode 100644 (file)
index 0000000..b9a2e6c
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  rhythmic-column-grav.hh -- declare Rhythmic_column_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef RHYTHMIC_COLUMN_GRAV_HH
+#define RHYTHMIC_COLUMN_GRAV_HH
+
+#include "engraver.hh"
+#include "parray.hh"
+
+class Rhythmic_column_engraver :public Engraver {
+  Link_array<Script> script_l_arr_;
+  Stem * stem_l_;
+  Note_column *ncol_p_;
+  Dot_column *dotcol_p_;
+protected:
+  TRANSLATOR_CLONE(Rhythmic_column_engraver);
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+public:
+  Rhythmic_column_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+#endif // RHYTHMIC_COLUMN_GRAV_HH
+
+
+
diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh
new file mode 100644 (file)
index 0000000..3615910
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+  rhythmic-head.hh -- declare 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef RHYTHMIC_HEAD_HH
+#define RHYTHMIC_HEAD_HH
+
+#include "item.hh"
+
+class Rhythmic_head : public Item
+{
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+   
+  int balltype_i_;
+  int dots_i_;
+  Dots * dots_l_;
+
+  void add (Dots *);
+  Rhythmic_head ();
+protected:
+  virtual void do_add_processing ();
+  virtual void do_print () const;
+  virtual void do_substitute_dependent (Score_elem*,Score_elem*);
+};
+
+#endif // RHYTHMIC_HEAD_HH
index dc6eae2b65237417b348a2567676702da4d92eeb..6a25ac0271821def4f5cbf79eccf49c96eaf148c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  score-align-grav.hh -- declare Score_align_reg
+  score-align-grav.hh -- declare Type_align_engraver
 
   source file of the GNU LilyPond music typesetter
 
 /**
   Group  a number of items across staffs
  */
-class Score_align_engraver: public Engraver
+class Type_align_engraver: public Engraver
 {
-    Horizontal_group_item  * align_p_;
+  Horizontal_group_item  * align_p_;
 public:
+  TRANSLATOR_CLONE(Type_align_engraver);
     
-    const char* type_ch_C_;
-    int priority_i_;
-    Score_align_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  const char* type_ch_C_;
+  int priority_i_;
+  Type_align_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
 };
 #endif // SCORE_ALIGN_GRAV_HH
index 17b8172ee6f42aa2a72d4877fb608984d6d18092..5e327a4b0e4c24e91454ee35005b5a31053d4961 100644 (file)
@@ -28,8 +28,4 @@ struct Score_elem_info {
 };
 
 
-struct Feature {
-    Scalar type_; 
-    Scalar value_;
-};
 #endif // STAFFELEMINFO_HH
index 6328c9bd26f9a8c4b6482123ef4ceee67cc840be..fcdae480fa508e6a2caaa6157e667047c568f561 100644 (file)
@@ -32,6 +32,7 @@ class Score_engraver :
   void typeset_all();
     
 public:
+  TRANSLATOR_CLONE(Score_engraver);
   Paper_score * pscore_p_;
   DECLARE_MY_RUNTIME_TYPEINFO;
 
@@ -42,7 +43,6 @@ protected:
   virtual void finish();
   virtual void process();
   virtual int depth_i() const { return Global_translator::depth_i ();}
-  virtual Translator* ancestor_l (int l) { return Global_translator::ancestor_l (l);}
 
 protected:
   /* Engraver_group_engraver interface */
@@ -53,8 +53,8 @@ protected:
   virtual void announce_element (Score_elem_info);
   virtual void do_announces();
   virtual void typeset_element (Score_elem*elem_p);
-  virtual Paper_def * paper() const;
   virtual void do_pre_move_processing();
+  virtual void add_processing ();
 };
 
 #endif // SCORE_GRAV_HH
index 330cd310e24dca2515103af086ed100d5487deff..353ad8a0615c92c109a373816bbd78d78dc888b6 100644 (file)
 #define SCORE_HALIGN_GRAV_HH
 #include "engraver.hh"
 class Score_horizontal_align_engraver : public Engraver {
-    Break_align_item * halign_p_;
+  Break_align_item * halign_p_;
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Score_horizontal_align_engraver();
+  TRANSLATOR_CLONE(Score_horizontal_align_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Score_horizontal_align_engraver();
 protected:
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
 };
 #endif // SCORE_HALIGN_GRAV_HH
index 2638962d83d726793790329fc17e76ce759276e5..ef2385ad46d4a84066ebcd0982006ff20ae857ca 100644 (file)
@@ -18,26 +18,24 @@ class Score_performer:
   public Performer_group_performer, public Global_translator 
 {
 public:
+  TRANSLATOR_CLONE(Score_performer);
   DECLARE_MY_RUNTIME_TYPEINFO;
   Score_performer();
   ~Score_performer();
-  Audio_score *performance_p_;
+  Performance *performance_p_;
 
 protected:
-  virtual Translator* ancestor_l (int l);
-  virtual int depth_i() const;
-
   virtual void finish();
   virtual void prepare (Moment mom);
   virtual void process();
   virtual void start();
+  virtual void add_processing ();
   virtual int get_tempo_i() const;
   virtual void play (Audio_element* p);
   virtual Music_output *get_output_p ();
 private:
   void header (Midi_stream&);
 
-  Moment now_mom_;
   Audio_column* audio_column_l_;
 };
 
index 522fe5838ad3f438c81ec03e104c981bd244b80b..e0463fcf49f8443e5c37493970d4f92bebaa8da8 100644 (file)
 
 
 class Script_engraver : public Engraver {
-    Array<Script *> script_p_arr_;
-    Array<Script_req *> script_req_l_arr_;
+  Array<Script *> script_p_arr_;
+  Array<Script_req *> script_req_l_arr_;
 
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Script_engraver();
+  TRANSLATOR_CLONE(Script_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Script_engraver();
 protected:
-    virtual bool do_try_request (Request*);
-    virtual void do_process_requests();
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
+  virtual bool do_try_request (Request*);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 
 };
 
index 6662399cc7b86348b7d987d95ca05d3954a4ef6e..ad57d2443d68768afeee32ef541dc3f3e0d30847 100644 (file)
 #include "engraver.hh"
 
 class Slur_engraver :public Engraver {
-    Array<Slur_req*> requests_arr_;
-    Array<Slur_req*> new_slur_req_l_arr_;
-    Array<Slur *> slur_l_stack_;
-    Array<Slur*> end_slur_l_arr_;
-    Direction dir_;
-    /* *************** */
+  Array<Slur_req*> requests_arr_;
+  Array<Slur_req*> new_slur_req_l_arr_;
+  Array<Slur *> slur_l_stack_;
+  Array<Slur*> end_slur_l_arr_;
+  Direction dir_;
+  /* *************** */
 protected:
-    virtual ~Slur_engraver();
-    virtual bool do_try_request (Request*);
-    virtual void set_feature (Feature);
-    virtual void do_process_requests();
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
+  virtual ~Slur_engraver();
+  virtual bool do_try_request (Request*);
+  virtual void do_process_requests();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 public:
-    Slur_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Slur_engraver);
+  Slur_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // SLURGRAV_HH
index 8cb16c13023aa3ccf595f9ca8041f2e5d9087d8f..87b9911d7d9781f866a3c482cd98cc5b98e2c7fa 100644 (file)
   */
 class Span_bar_engraver : public Engraver
 {
-    Span_bar * spanbar_p_;
-    Array<Bar*> bar_l_arr_;
-    Vertical_align_element * valign_l_;
+  Span_bar * spanbar_p_;
+  Array<Bar*> bar_l_arr_;
+  Vertical_align_element * valign_l_;
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Span_bar_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
     
-    Span_bar_engraver();
+  Span_bar_engraver();
 protected:
     
-    virtual void acknowledge_element (Score_elem_info);
-    virtual void do_pre_move_processing();
-    virtual Span_bar* get_span_bar_p() const;
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
+  virtual Span_bar* get_span_bar_p() const;
 };
 
 #endif // SPAN_BAR_GRAV_HH
index 7881c183e788e2c4dacba61e512d113922a45185..fbdb2fb1318b42fae45d9d1e0558428519935cf6 100644 (file)
@@ -22,8 +22,9 @@
 class Span_score_bar_engraver : public Span_bar_engraver 
 {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual Span_bar* get_span_bar_p() const;
+  TRANSLATOR_CLONE(Span_score_bar_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual Span_bar* get_span_bar_p() const;
 };
 
 /**
@@ -32,8 +33,9 @@ public:
 class Piano_bar_engraver :  public Span_score_bar_engraver
 {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual Span_bar * get_span_bar_p() const;
+  TRANSLATOR_CLONE(Piano_bar_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual Span_bar * get_span_bar_p() const;
 };
 
 #endif // SPAN_SCORE_BAR_GRAV_HH
index f5413d93460e83a8e86e3f1565b13f116961c0d4..72cf2663833d499c5782a51111e128f2b1162c0f 100644 (file)
@@ -17,7 +17,6 @@ struct Staff_info {
     int *c0_position_i_l_;
     Staff_symbol*staff_sym_l_;
     
-    /// when is now?
     Time_description const *time_C_;
     Rhythmic_grouping const *rhythmic_C_;
     Score_column *musical_l_;
@@ -26,7 +25,6 @@ struct Staff_info {
     ///
     bool break_allowed_b_;
     Score * score_l_;
-    Moment when();
     Score *score_l();
     Paper_column * command_pcol_l();
     Score_column* musical_l();
index 53aea0812a80df983b90d03bd53fe83e63e54f1e..0d8058634203a58d4b5e8d1df4b9689b32392348 100644 (file)
 class Staff_performer : public Performer_group_performer 
 {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Staff_performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
 
-    Staff_performer();
-    ~Staff_performer();
+  Staff_performer();
+  ~Staff_performer();
 
-    String instrument_str();
+  String instrument_str();
 
 protected:
-    virtual void play (Audio_element* p);
-    virtual void do_removal_processing();
-    virtual void do_creation_processing();
+  virtual void play (Audio_element* p);
+  virtual void do_removal_processing();
+  virtual void do_creation_processing();
 
 private:
-    Audio_staff* audio_staff_p_;
+  Audio_staff* audio_staff_p_;
 };
 
 #endif // STAFF_PERFORMER_HH
index 3d3f1f3f836cfcf5146b8103ff9e64f38d39875b..9ec528d767cc95429c886a79c0f9a190b15cef70 100644 (file)
 class Staff_sym_engraver : public Engraver { 
     Staff_symbol *span_p_;
 public:
-    Staff_sym_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Staff_sym_engraver);
+  Staff_sym_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual ~Staff_sym_engraver();
-    virtual void fill_staff_info (Staff_info&);
-    virtual void do_removal_processing();
-    virtual void do_creation_processing();
+  virtual ~Staff_sym_engraver();
+  virtual void fill_staff_info (Staff_info&);
+  virtual void do_removal_processing();
+  virtual void do_creation_processing();
        
 };
 #endif // STAFF_SYM_GRAV_HH
index 36a3a0971c926ce268565a41d2d397440557df81..136e6e5095a543d230ed30a2f8344a2369ab93e0 100644 (file)
@@ -25,9 +25,9 @@ protected:
   virtual void acknowledge_element (Score_elem_info);
   virtual void do_pre_move_processing ();
   virtual bool do_try_request (Request*);
-  virtual void set_feature (Feature dir_i_);
 
 public:
+  TRANSLATOR_CLONE(Stem_engraver);
   Stem_engraver();
   DECLARE_MY_RUNTIME_TYPEINFO;
 };
index 12380ae48babc6c3a614a274f9a6fb326977e014..a492a3d4d862c4762c1c7791b20d047aec4329c4 100644 (file)
@@ -47,12 +47,9 @@ class Stem : public Item {
     -1 stem points down, +1: stem points up
     */
   Real stem_xoffset_f_;
-  /**
-    store the wholes (for vapourware tremolo)
-    */
-  Link_array<Note_head> whole_l_arr_;
+
   Link_array<Note_head> head_l_arr_;
-  Link_array<Note_head> rest_l_arr_;
+  Link_array<Rest> rest_l_arr_;
     
 public:
   /// abbrev flag? + count
@@ -77,6 +74,7 @@ public:
     
   /// ensure that this Stem also encompasses the Notehead #n#
   void add (Note_head*n);
+  void add (Rest*);
 
   DECLARE_MY_RUNTIME_TYPEINFO;
 
index 159f10707c80a3ad226ae6a3f5fa14c535156726..01f294becfccff1b637814380f2846854776b7e9 100644 (file)
  */
 class Swallow_engraver : public Engraver {
 protected:
-    bool acceptable_request_b (Request*) const;
-    bool do_try_request (Request*) ;
+  bool acceptable_request_b (Request*) const;
+  bool do_try_request (Request*) ;
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Swallow_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // SWALLOW_GRAV_HH
index 9e7218aa88c3cb720580662c19229882b9e1ab39..9f8f5514621fcda4d8e241fe4a92a925e07364e7 100644 (file)
 
 class Swallow_performer : public Performer {
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Swallow_performer);
+  DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual bool do_try_request (Request*) { return true; }
+  virtual bool do_try_request (Request*) { return true; }
 };
 
 #endif // SWALLOW_PERF_HH
index c0768988b9fa1b835e831418a30e74e30b588c8b..1c37f7c565e605c7e26ec5a00444bd012622efa3 100644 (file)
@@ -3,11 +3,11 @@
 */
 #ifndef SYMTABLE_HH
 #define SYMTABLE_HH
-#include "assoc.hh"
+#include "dictionary.hh"
 #include "string.hh"
 #include "symbol.hh"
 
-struct  Symtable : public Assoc<String, Symbol> {
+struct  Symtable : public Dictionary<Symbol> {
     String id_str;
     
     Symbol lookup (String) const;
@@ -15,7 +15,7 @@ struct  Symtable : public Assoc<String, Symbol> {
 };
 
 
-struct Symtables : private Assoc<String, Symtable*> {
+struct Symtables : private Dictionary<Symtable*> {
     
     Symtable* operator()(String s);
     ~Symtables();
diff --git a/lily/include/text-grav.hh b/lily/include/text-grav.hh
deleted file mode 100644 (file)
index 8bc0bb4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  text-grav.hh -- part of GNU LilyPond
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef TEXTGRAV_HH
-#define TEXTGRAV_HH
-#include "engraver.hh"
-
-class Text_engraver : public Engraver{
-    Text_item * text_p_;
-    Text_req * text_req_l_;
-    Direction dir_;
-    /* *************** */
-protected:
-    virtual void set_feature (Feature);
-    virtual bool do_try_request (Request*);
-    virtual void do_process_requests();
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
-    virtual void acknowledge_element (Score_elem_info);
-public:
-    Text_engraver();
-    DECLARE_MY_RUNTIME_TYPEINFO;
-};
-
-#endif // TEXTGRAV_HH
index ecdfd4fea7d26ef4942877a35a0d1365dc0b2b94..b967e42c197e33f271ea425742888fcbac9365b1 100644 (file)
@@ -27,12 +27,11 @@ protected:
     virtual void acknowledge_element (Score_elem_info);
     virtual bool do_try_request (Request*);
     virtual bool acceptable_request_b (Request*);
-    virtual void sync_features();
     virtual void do_process_requests();
     virtual void do_post_move_processing();
     virtual void do_pre_move_processing();
-    virtual void set_feature (Feature);
 public:
+TRANSLATOR_CLONE(Tie_engraver);
     Tie_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
 };
index be8b6730a056233c768627d61852c2133a8a07f7..c73ccdd83fdf2b9b4c4b42116fb1fbcba735a963 100644 (file)
 #ifndef TIMING_GRAV_HH
 #define TIMING_GRAV_HH
 
-#include "engraver.hh"
-#include "time-description.hh"
-#include "grouping.hh"
-#include "parray.hh"
+#include "timing-translator.hh"
 
 /**
   Do time bookkeeping
  */
-class Timing_engraver : public Engraver
+class Timing_engraver : public Timing_translator, public Engraver
 {   
-public:
-  Time_description time_;
-  Rhythmic_grouping  default_grouping_;
-  Link_array<Timing_req> timing_req_l_arr_;
-protected: 
-  virtual void do_creation_processing ();
+protected:
   virtual void fill_staff_info (Staff_info&);
-  virtual bool do_try_request (Request *req_l);
-  virtual void do_process_requests();
-  virtual void do_pre_move_processing();
-  virtual void do_post_move_processing();
+  virtual Engraver * engraver_l () { return Engraver::engraver_l (); }
 public:
-  Meter_change_req * meter_req_l () const;
-  Timing_engraver();
+  TRANSLATOR_CLONE(Timing_engraver);
   DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh
new file mode 100644 (file)
index 0000000..f03459b
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  timing-translator.hh -- declare Timing_translator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef TIMING_TRANSLATOR_HH
+#define TIMING_TRANSLATOR_HH
+
+#include "translator.hh"
+#include "time-description.hh"
+#include "grouping.hh"
+#include "parray.hh"
+
+class Timing_translator : public virtual Translator
+{
+public:
+  TRANSLATOR_CLONE(Timing_translator);
+  Meter_change_req * meter_req_l () const;
+  Timing_translator ();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Time_description time_;
+  Rhythmic_grouping  default_grouping_;
+  Link_array<Timing_req> timing_req_l_arr_;
+protected: 
+  virtual void do_creation_processing ();
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+};
+#endif // TIMING_TRANSLATOR_HH
diff --git a/lily/include/translation-property.hh b/lily/include/translation-property.hh
new file mode 100644 (file)
index 0000000..7fba807
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+  translation-property.hh -- declare Translation_property
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef TRANSLATION_PROPERTY_HH
+#define TRANSLATION_PROPERTY_HH
+
+#include "music.hh"
+#include "scalar.hh"
+
+/**
+  Set a property of Translator 
+ */
+class Translation_property : public Music
+{
+public:
+  String var_str_;
+  Scalar value_;
+  VIRTUAL_COPY_CONS(Translation_property, Music);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  virtual void do_print () const;
+};
+
+#endif // PROPERTY_HH
diff --git a/lily/include/translator-change.hh b/lily/include/translator-change.hh
new file mode 100644 (file)
index 0000000..a357307
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+  translator-change.hh -- declare Translator_change
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef TRANSLATOR_CHANGE_HH
+#define TRANSLATOR_CHANGE_HH
+
+class Translator_change : public Music
+{
+  
+}
+
+#endif // TRANSLATOR_CHANGE_HH
diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh
new file mode 100644 (file)
index 0000000..13b8ca3
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+  translator-group.hh -- declare Translator_group
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef TRANSLATOR_GROUP_HH
+#define TRANSLATOR_GROUP_HH
+
+#include "string.hh"
+#include "lily-proto.hh"
+#include "virtual-methods.hh"
+#include "translator.hh"
+#include "plist.hh"
+#include "parray.hh"
+
+typedef void (Translator::*Method_pointer)(void);
+
+/** Make some kind of #Element#s from Requests. Elements are made by
+  hierarchically grouped #Translator#s
+  */
+class Translator_group : public virtual Translator {
+public:
+  Pointer_list<Translator *> trans_p_list_;
+  String id_str_;
+  Array<String> consists_str_arr_;
+  Array<String> accepts_str_arr_;
+  int iterator_count_;
+
+  TRANSLATOR_CLONE(Translator_group);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+
+  Translator_group(Translator_group const &);
+  Translator_group();
+  void add (Translator *);
+
+  Link_array<Translator> nongroup_l_arr () const;
+  Link_array<Translator_group> group_l_arr () const;
+  
+  virtual Global_translator *global_l() { return 0; }
+  
+  /// Score_register = 0, Staff_registers = 1, etc)
+  Translator_group* ancestor_l (int l=1);
+  int depth_i() const;
+  bool is_bottom_translator_b () const;
+  bool removable_b() const;
+  void terminate_translator (Translator*r_l);
+  Translator *remove_translator_p (Translator*trans_l);
+  void check_removal ();
+
+  Translator *get_simple_translator (char const *type) const;
+  Translator_group *find_existing_translator_l (String n, String id);
+  Translator_group *find_create_translator_l (String n, String id);
+  Link_array<Translator_group> path_to_acceptable_translator (String alias) const;
+
+  Translator_group*get_default_interpreter();
+protected:
+  virtual ~Translator_group ();
+  virtual Translator_group * group_l () { return this; }
+  virtual void do_print () const;
+  virtual void do_process_requests ();
+  virtual void add_processing ();
+  virtual bool do_try_request (Request* req_l);       
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();   
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
+  void each (Method_pointer) const;
+};
+
+#endif // TRANSLATOR_GROUP_HH
index bfcf734e307007a63cf610844bc29637e9048edb..e9fc506a46b86e96537aa3346e09a54b93cd53b2 100644 (file)
 #include "string.hh"
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
+#include "scalar.hh"
+#include "dictionary.hh"
+#include "parray.hh"
+#include "input.hh"
+
+#define TRANSLATOR_CLONE(c)    VIRTUAL_COPY_CONS(c, Translator)
 
 /** Make some kind of #Element#s from Requests. Elements are made by
   hierarchically grouped #Translator#s
   */
-class Translator {
+class Translator : public Input {
+  Dictionary<Scalar> properties_dict_;
 public:
-  String id_str_;
-    
-  int iterator_count_;
-    
-  virtual Global_translator *global_l() { return 0; }
-
-  virtual void print() const;
-    
-  /// Score_register = 0, Staff_registers = 1, etc)
-  virtual int depth_i() const=0;
-  virtual bool is_bottom_engraver_b() const { return false; }
-  virtual bool try_request (Request*);
-  virtual Translator *find_get_translator_l (String name, String id)=0;
-  virtual Translator *ancestor_l (int l=1)=0;
-  virtual ~Translator(){}
-  DECLARE_MY_RUNTIME_TYPEINFO;
-  Translator();
-  virtual Translator *get_default_interpreter()=0;
+  Music_output_def * output_def_l_;
+  String  type_str_;
+
+  bool is_alias_b (String) const;
+  
+
+  DECLARE_MY_RUNTIME_TYPEINFO;  
+  TRANSLATOR_CLONE(Translator);
+  Translator (Translator const &);
+  Translator ();
+  virtual ~Translator ();
+  
+  Translator_group * daddy_trans_l_ ;
+  virtual void add_processing ();
+  void print () const;
+  
+  /**
+    try to fit the request in this engraver
+
+    @return
+    false: not noted,  not taken.
+
+    true: request swallowed. Don't try to put the request elsewhere.
+
+    */
+  bool try_request (Request*);
+  void pre_move_processing();
+  void creation_processing ();
+  void process_requests();
+  void post_move_processing();
+  void removal_processing();
+  /**
+    ask daddy for a feature
+    */
+  Scalar get_property (String type_str);
+  void set_property (String var_name, Scalar value);
+  Music_output_def *output_def_l () const;
+  
+  virtual Moment now_moment () const;  
+  virtual Engraver *engraver_l () { return 0; }
+  virtual Performer *performer_l() { return 0; }
+  virtual Translator_group * group_l () { return 0; }
+
+protected:
+   enum { 
+    ORPHAN,
+    VIRGIN,
+    CREATION_INITED,
+    MOVE_INITED,
+    ACCEPTED_REQS,
+    PROCESSED_REQS,
+    ACKED_REQS,
+    MOVE_DONE
+  } status;
+
+  /*    
+       @see{try_request}
+       Default: always return false
+       */
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_print () const;
+  virtual void do_pre_move_processing(){}
+  virtual void do_post_move_processing(){}
+  virtual void do_process_requests () {}
+  virtual void do_creation_processing() {}
+  virtual void do_removal_processing() {}
 };
 
+/**
+  A macro to automate administration of translators.
+ */
+#define ADD_THIS_TRANSLATOR(c)                         \
+struct c ## init {                                     \
+    c ## init() {                                      \
+         Translator *t = new c;\
+        t-> type_str_ = c::static_name ();\
+       add_translator (t);\
+    }                                                  \
+} _ ## c ## init;
+
+extern Dictionary<Translator*> *global_translator_dict_p;
+void add_translator (Translator*trans_p);
+
+Translator*get_translator_l (String s);
+
 #endif // TRANSLATOR_HH
diff --git a/lily/include/type-swallow-trans.hh b/lily/include/type-swallow-trans.hh
new file mode 100644 (file)
index 0000000..0bebd32
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  type-swallow-grav.hh -- declare Type_swallow_translator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef TYPESWALLOW_GRAV_HH
+#define TYPESWALLOW_GRAV_HH
+
+#include "translator.hh"
+/// eat a certain type of request
+class Type_swallow_translator : public virtual Translator
+{
+protected:
+  const char * type_;
+  bool do_try_request (Request*);
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Type_swallow_translator);
+  Type_swallow_translator ();
+};
+
+#define DECLARE_REQUEST_SWALLOWER(TYPE)  \
+struct TYPE ## _swallow_translator : public Type_swallow_translator {\
+  TYPE ## _swallow_translator() { \
+    type_ = TYPE::static_name ();\
+  }\
+  DECLARE_MY_RUNTIME_TYPEINFO;\
+  TRANSLATOR_CLONE(TYPE ## _swallow_translator);\
+};\
+IMPLEMENT_IS_TYPE_B1(TYPE ## _swallow_translator, Type_swallow_translator);\
+ADD_THIS_TRANSLATOR(TYPE ## _swallow_translator);\
+
+#endif // TYPESWALLOW_GRAV_HH
+
index 685073e242c7432f4f917146ea9a96ea2b534515..4f26048eee2a347cf755a537fef47ffea508b4f7 100644 (file)
 #include "engraver.hh"
 
 class Vertical_align_engraver : public Engraver {
-    Vertical_align_spanner * valign_p_;
+  Vertical_align_spanner * valign_p_;
     
 public:
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Vertical_align_engraver();
+  TRANSLATOR_CLONE(Vertical_align_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Vertical_align_engraver();
 protected:
-   virtual void acknowledge_element (Score_elem_info);
-   virtual void do_creation_processing();
-   virtual void do_removal_processing();
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
 };
 
 #endif // VERTICAL_ALIGN_GRAV_HH
diff --git a/lily/include/voice-group-gravs.hh b/lily/include/voice-group-gravs.hh
deleted file mode 100644 (file)
index e6b9a3d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-  voice-group-gravs.hh -- declare Voice_group_engravers
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef VOICEGROUPGRAVS_HH
-#define VOICEGROUPGRAVS_HH
-
-#include "engraver-group.hh"
-
-/**
-  A group of voices which share certain characteristics (such as beams.).
- */
-class Voice_group_engravers  : public Engraver_group_engraver {
-    Moment termination_mom_;
-    Direction dir_;
-
-protected:
-    virtual void do_print() const;
-    virtual Scalar get_feature (String);
-    virtual bool do_try_request (Request*);
-public:
-    
-    
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    static bool static_acceptable_request_b (Request*);
-    Voice_group_engravers();
-};
-#endif // VOICEGROUPGRAVS_HH
index a8cbd0a9db92cff01f5c050432e97bd21beeb7e4..4455a195b4590b23ee1128352e8e7bb8d41b8313 100644 (file)
@@ -35,11 +35,11 @@ Ineq_constrained_qp::eliminate_var (int idx, Real value)
   row.del (idx);
   lin +=row ;
 
-   for (int i=0; i < cons.size(); i++) 
-   {
-    consrhs[i] -= cons[i](idx) *value;
-    cons[i].del (idx);
-   }
+  for (int i=0; i < cons.size(); i++) 
+    {
+      consrhs[i] -= cons[i](idx) *value;
+      cons[i].del (idx);
+    }
 }
 
 void
@@ -81,12 +81,12 @@ min_elt_index (Vector v)
   int idx=-1;
   for (int i = 0; i < v.dim(); i++)
     {
-       if (v (i) < m) 
-         {
-           idx = i;
-           m = v (i);
-         }
-       assert (v (i) <= infinity_f);
+      if (v (i) < m) 
+       {
+         idx = i;
+         m = v (i);
+       }
+      assert (v (i) <= infinity_f);
     }
   return idx;
 }
@@ -109,11 +109,11 @@ Vector
 Ineq_constrained_qp::constraint_solve (Vector start) const 
 {    
   if (!dim())
-       return Vector (0);
+    return Vector (0);
   
   // experimental
   if (quad.dim() > 10)
-       quad.try_set_band();
+    quad.try_set_band();
   
   Active_constraints act (this);
   act.OK();    
@@ -121,87 +121,87 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
   
   Vector x (start);
   Vector gradient=quad*x+lin;
-       //    Real fvalue = x*quad*x/2 + lin*x + const_term;
-       // it's no use.
+  //    Real fvalue = x*quad*x/2 + lin*x + const_term;
+  // it's no use.
 
   Vector last_gradient (gradient);
   int iterations=0;
   
   while (iterations++ < MAXITER) 
     {
-       Vector direction= - act.find_active_optimum (gradient);
+      Vector direction= - act.find_active_optimum (gradient);
        
-       DOUT << "gradient "<< gradient<< "\ndirection " << direction<<"\n";
+      DOUT << "gradient "<< gradient<< "\ndirection " << direction<<"\n";
        
-       if (direction.norm() > EPS) 
-         {
-           DOUT << act.status() << '\n';
+      if (direction.norm() > EPS) 
+       {
+         DOUT << act.status() << '\n';
            
-           Real minalf = infinity_f;
+         Real minalf = infinity_f;
 
-           Inactive_iter minidx (act);
+         Inactive_iter minidx (act);
 
 
-           /*
+         /*
            we know the optimum on this "hyperplane". Check if we
            bump into the edges of the simplex
            */
   
-           for (Inactive_iter ia (act); ia.ok(); ia++) 
-             {
+         for (Inactive_iter ia (act); ia.ok(); ia++) 
+           {
 
-               if (ia.vec() * direction >= 0)
-                   continue;
-               Real alfa= - (ia.vec()*x - ia.rhs ())/
-                   (ia.vec()*direction);
+             if (ia.vec() * direction >= 0)
+               continue;
+             Real alfa= - (ia.vec()*x - ia.rhs ())/
+               (ia.vec()*direction);
                
-               if (minalf > alfa) 
-                 {
-                   minidx = ia;
-                   minalf = alfa;
-                 }
-             }
-           Real unbounded_alfa = 1.0;
-           Real optimal_step = min (minalf, unbounded_alfa);
-
-           Vector deltax=direction * optimal_step;
-           x += deltax;            
-           gradient += optimal_step * (quad * deltax);
+             if (minalf > alfa) 
+               {
+                 minidx = ia;
+                 minalf = alfa;
+               }
+           }
+         Real unbounded_alfa = 1.0;
+         Real optimal_step = min (minalf, unbounded_alfa);
+
+         Vector deltax=direction * optimal_step;
+         x += deltax;      
+         gradient += optimal_step * (quad * deltax);
            
-           DOUT << "step = " << optimal_step<< " (|dx| = " <<
-               deltax.norm() << ")\n";     
+         DOUT << "step = " << optimal_step<< " (|dx| = " <<
+           deltax.norm() << ")\n";         
           
-           if (minalf < unbounded_alfa) 
-             {
-               /* bumped into an edge. try again, in smaller space. */
-               act.add (minidx.idx());
-               DOUT << "adding cons "<< minidx.idx()<<'\n';
-               continue;
-             }
-           /*ASSERT: we are at optimal solution for this "plane"*/
+         if (minalf < unbounded_alfa) 
+           {
+             /* bumped into an edge. try again, in smaller space. */
+             act.add (minidx.idx());
+             DOUT << "adding cons "<< minidx.idx()<<'\n';
+             continue;
+           }
+         /*ASSERT: we are at optimal solution for this "plane"*/
   
   
-         }
+       }
        
-       Vector lagrange_mult=act.get_lagrange (gradient);       
-       int m= min_elt_index (lagrange_mult);
+      Vector lagrange_mult=act.get_lagrange (gradient);        
+      int m= min_elt_index (lagrange_mult);
        
-       if (m>=0 && lagrange_mult (m) > 0) 
-         {
-           break;              // optimal sol.
-         }
-       else if (m<0) 
-         {
-           assert (gradient.norm() < EPS) ;
+      if (m>=0 && lagrange_mult (m) > 0) 
+       {
+         break;                // optimal sol.
+       }
+      else if (m<0) 
+       {
+         assert (gradient.norm() < EPS) ;
            
-           break;
-         }
+         break;
+       }
        
-       DOUT << "dropping cons " << m<<'\n';
-       act.drop (m);
+      DOUT << "dropping cons " << m<<'\n';
+      act.drop (m);
     }
   if (iterations >= MAXITER)
-       WARN<<"didn't converge!\n";
+    WARN<<"didn't converge!\n";
   
   DOUT <<  ": found " << x<<" in " << iterations <<" iterations\n";
   assert_solution (x);
@@ -215,11 +215,11 @@ Ineq_constrained_qp::solve (Vector start) const
   /* no hassle if no constraints*/
   if (! cons.size()) 
     {
-       Choleski_decomposition chol (quad);
-       return - chol.solve (lin);
+      Choleski_decomposition chol (quad);
+      return - chol.solve (lin);
     }
   else 
     {
-       return constraint_solve (start);
+      return constraint_solve (start);
     }
 }
diff --git a/lily/input-translator.cc b/lily/input-translator.cc
deleted file mode 100644 (file)
index ff277cc..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-  input-translator.cc -- implement Input_translator
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "debug.hh"
-#include "engraver.hh"
-#include "input-translator.hh"
-#include "parray.hh"
-#include "input-translator.hh"
-#include "engraver-group.hh"
-#include "performer-group-performer.hh"
-
-bool
-Input_translator::is_name_b (String n)
-{
-  for (int i=0; i < alias_str_arr_.size(); i++)
-       if (alias_str_arr_[i] == n)
-           return true;
-  return false;
-}
-
-void
-Input_translator::print() const
-{
-#ifndef NPRINT
-  if (! check_debug)
-       return ;
-  DOUT << base_str_ <<" " << type_str_<<" {\n";
-  DOUT << "Consists of ";
-  for (int i=0; i< consists_str_arr_.size(); i++)
-       DOUT << consists_str_arr_[i] << ',';
-  if (contains_itrans_p_list_.size())
-       DOUT << "\nContains " ;
-  for (PCursor<Input_translator*> i (contains_itrans_p_list_.top()); i.ok (); i++) 
-       i->print();
-  DOUT << "}\n";
-#endif 
-}
-
-
-
-Input_translator *
-Input_translator::recursive_find (String nm)
-{
-  if (is_name_b (nm))
-       return this;
-
-  Input_translator * r =0;
-  // what bout for() ?
-  PCursor<Input_translator*> i (contains_itrans_p_list_.top());
-  for (; !r &&i.ok(); i++) 
-    {
-       if (i->recursive_find (nm))
-           r = i.ptr();
-    }
-
-  return r;
-}
-
-Input_translator *
-Input_translator::find_itrans_l (String nm)
-{
-  for (PCursor<Input_translator*> i (contains_itrans_p_list_.top()); i.ok (); i++) 
-       if (i->is_name_b (nm))
-           return i;
-
-  return 0;
-}
-
-
-Engraver_group_engraver *
-Input_translator::get_group_engraver_p()
-{
-  assert (base_str_ == "Engraver");
-  Engraver_group_engraver * grav_p = (Engraver_group_engraver*)
-       get_engraver_p (type_str_);
-
-  for (int i=0; i < consists_str_arr_.size(); i++) 
-    {
-       grav_p->add (get_engraver_p (consists_str_arr_[i]));
-    }
-  grav_p->itrans_l_ = this;
-  grav_p->id_str_ = default_id_str_;
-  return grav_p;
-}
-
-Performer_group_performer*
-Input_translator::get_group_performer_p()
-{    
-  assert (base_str_ == "Performer");
-  Performer_group_performer * perf_p = (Performer_group_performer*)
-       get_performer_p (type_str_);
-
-  for (int i=0; i < consists_str_arr_.size(); i++) 
-    {
-       perf_p->add (get_performer_p (consists_str_arr_[i]));
-    }
-  perf_p->itrans_l_ = this;
-  perf_p->id_str_ = default_id_str_;
-  return perf_p;
-}
-
-bool
-Input_translator::accept_req_b()
-{
-  return ! contains_itrans_p_list_.size();
-}
-
-void
-Input_translator::add (Input_translator *ip)
-{
-  contains_itrans_p_list_.bottom().add (ip);
-}
-
-Input_translator*
-Input_translator::get_default_itrans_l()
-{
-  if (contains_itrans_p_list_.size())
-       return contains_itrans_p_list_.top();
-  else
-       return 0;
-}
-
-
-Input_translator_list::Input_translator_list (Input_translator_list const &s)
-{
-  for (PCursor<Input_translator*> pc (s); pc.ok(); pc++) 
-    {
-       Input_translator *q = pc;
-       Input_translator *p=new Input_translator (*q) ; 
-       bottom().add (p);
-    }
-}
index f2d81ae9073645b0ad530e4906a547464258472b..f8d47a0830923b2c7a33af978507d51d3a3c73f8 100644 (file)
@@ -126,4 +126,4 @@ Key_engraver::do_post_move_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Key_engraver,Engraver);
-ADD_THIS_ENGRAVER(Key_engraver);
+ADD_THIS_TRANSLATOR(Key_engraver);
index 5fbfd29f39f39eaa9558e472c15c66b5956d929a..d328f44ac9746b0122d99e90c55abd433a342197 100644 (file)
@@ -74,7 +74,7 @@ Key_item::brew_molecule_p() const
        Atom a (s);
        a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
        Molecule m (a);
-       output->add_right (m);  
+       output->add_at_edge (X_AXIS, RIGHT, m); 
     }
   if (pitch.size()) 
     {
@@ -82,7 +82,7 @@ Key_item::brew_molecule_p() const
        Interval (0, paper()->note_width ()),
        Interval (0,0))));
 
-       output->add_right (m);
+       output->add_at_edge (X_AXIS, RIGHT, m);
     }
   return output;
 }
index 160dee4a64a72c015b4a377aed084b4689ecd687..bca4c5c106e8fd59f48e914a7b17ce632a76b82a 100644 (file)
@@ -13,7 +13,7 @@
 
 
 IMPLEMENT_IS_TYPE_B1(Key_performer,Performer);
-ADD_THIS_PERFORMER(Key_performer);
+ADD_THIS_TRANSLATOR(Key_performer);
 
 Key_performer::Key_performer()
 {
@@ -34,7 +34,7 @@ Key_performer::do_print() const
 }
 
 void
-Key_performer::process_requests()
+Key_performer::do_process_requests()
 {
   if (key_req_l_)
        play (new Audio_key (key_req_l_));
index 5915e7854430b973b46ed2b5156d476a3e279b60..a975b75cc6622ce93bd49cb4af0051eca5892645 100644 (file)
@@ -48,5 +48,5 @@ Line_group_engraver::do_creation_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Line_group_engraver,Engraver);
-ADD_THIS_ENGRAVER(Line_group_engraver);
+ADD_THIS_TRANSLATOR(Line_group_engraver);
 
index 7da053d41898f008bd779cdf02160bb99c15d068..ab566e121673af972ff7ea6d7199a64c0e719ff8 100644 (file)
@@ -122,4 +122,4 @@ Local_key_engraver::do_process_requests()
 
 
 IMPLEMENT_IS_TYPE_B1(Local_key_engraver,Engraver);
-ADD_THIS_ENGRAVER(Local_key_engraver);
+ADD_THIS_TRANSLATOR(Local_key_engraver);
index 33037e26ead1c56da0334263fa58bb6c13a82cba..eab94bf65940bdb67c6befcc6cf603b7e8b2b951 100644 (file)
@@ -43,8 +43,8 @@ Local_key_item::add (int o, int p , int a)
   l.name_i_ = p;
   l.accidental_i_ = a;
   for (int i=0; i< accs.size(); i++)
-       if (!Local_acc::compare (l, accs[i]))
-           return;
+    if (!Local_acc::compare (l, accs[i]))
+      return;
   
   accs.push (l);
 }
@@ -63,33 +63,33 @@ Local_key_item::brew_molecule_p() const
   int lastoct = -100;
   for  (int i = 0; i <  accs.size(); i++) 
     {
-       // do one octave
-       if (accs[i].octave_i_ != lastoct) 
-         {
-           if (octmol)
-             {
-               Real dy =lastoct*7*paper()->internote_f ();
-               octmol->translate (dy, Y_AXIS);
-               output->add (*octmol);
-               delete octmol;
-             }
-           octmol= new Molecule;
-         }
-       lastoct = accs[i].octave_i_;
-       Symbol s =paper()->lookup_l ()->accidental (accs[i].accidental_i_);   
-       Atom a (s);
-       Real dy = (accs[i].name_i_ + c0_position) * paper()->internote_f ();
-       a.translate (dy, Y_AXIS);
-
-       octmol->add_right (a);
+      // do one octave
+      if (accs[i].octave_i_ != lastoct) 
+       {
+         if (octmol)
+           {
+             Real dy =lastoct*7*paper()->internote_f ();
+             octmol->translate (dy, Y_AXIS);
+             output->add (*octmol);
+             delete octmol;
+           }
+         octmol= new Molecule;
+       }
+      lastoct = accs[i].octave_i_;
+      Symbol s =paper()->lookup_l ()->accidental (accs[i].accidental_i_);   
+      Atom a (s);
+      Real dy = (accs[i].name_i_ + c0_position) * paper()->internote_f ();
+      a.translate (dy, Y_AXIS);
+
+      octmol->add_at_edge (X_AXIS, RIGHT, a);
     }
 
   if (octmol)
     {
-       Real dy =lastoct*7*paper()->internote_f ();
-       octmol->translate (dy, Y_AXIS);
-       output->add (*octmol);
-       delete octmol;
+      Real dy =lastoct*7*paper()->internote_f ();
+      octmol->translate (dy, Y_AXIS);
+      output->add (*octmol);
+      delete octmol;
     }
 
   Interval head_width=itemlist_width (support_items_);
@@ -102,9 +102,9 @@ int
 Local_acc::compare (Local_acc&a, Local_acc&b)
 {
   if (a.octave_i_ - b.octave_i_)
-       return a.octave_i_ - b.octave_i_;
+    return a.octave_i_ - b.octave_i_;
   if (a.name_i_ - b.name_i_)
-       return a.name_i_ - b.name_i_;
+    return a.name_i_ - b.name_i_;
   
   return a.accidental_i_ - b.accidental_i_;
 };
index a10cf614b2b3baf93c6ab8b8b701c85f7e507bc7..346ade0301a1a41a13d4a2142e60898cf335ad0f 100644 (file)
@@ -24,7 +24,7 @@ Lyric_engraver::do_try_request (Request*r)
 {
   Musical_req * m =r->musical();
   if (!m || ! m->lreq_l()) 
-       return false;
+    return false;
   lreq_l_ = m->lreq_l();
 
   return true;
@@ -35,12 +35,12 @@ Lyric_engraver::do_process_requests()
 {
   if (lreq_l_) 
     {
-       lyric_item_p_ =  new Text_item (lreq_l_->tdef_p_);
+      lyric_item_p_ =  new Text_item (lreq_l_->tdef_p_);
 
-       lyric_item_p_->translate (paper()->note_width ()/2 , X_AXIS);
-       lyric_item_p_->dir_ = DOWN;
-       lyric_item_p_->fat_b_ = true;
-       announce_element (Score_elem_info (lyric_item_p_, lreq_l_));
+      lyric_item_p_->translate (paper()->note_width ()/2 , X_AXIS);
+      lyric_item_p_->dir_ = DOWN;
+      lyric_item_p_->fat_b_ = true;
+      announce_element (Score_elem_info (lyric_item_p_, lreq_l_));
     }
 }
 
@@ -55,11 +55,11 @@ Lyric_engraver::do_pre_move_processing()
 {
   if (lyric_item_p_)
     {
-       typeset_element (lyric_item_p_);
-       lyric_item_p_ =0;
+      typeset_element (lyric_item_p_);
+      lyric_item_p_ =0;
     }
 }
 
 
 IMPLEMENT_IS_TYPE_B1(Lyric_engraver,Engraver);
-ADD_THIS_ENGRAVER(Lyric_engraver);
+ADD_THIS_TRANSLATOR(Lyric_engraver);
index 9a7fef130c0f0ec011c5521e40e0d7cd8c6c69e9..f55844044c4db3bf140d6e69066c635ca7951d51 100644 (file)
@@ -14,7 +14,7 @@
 
 
 IMPLEMENT_IS_TYPE_B1(Lyric_performer,Performer);
-ADD_THIS_PERFORMER(Lyric_performer);
+ADD_THIS_TRANSLATOR(Lyric_performer);
 
 Lyric_performer::Lyric_performer()
 {
@@ -34,7 +34,7 @@ Lyric_performer::do_print() const
 }
 
 void
-Lyric_performer::process_requests()
+Lyric_performer::do_process_requests()
 {
   if (lreq_arr_.size() && lreq_arr_[ 0 ]->tdef_p_->text_str_.length_i())
        play (new Audio_text (Audio_text::LYRIC, lreq_arr_[ 0 ]->tdef_p_->text_str_));
index 259f95f6517fb5041d16535f522b34b9be4d731f..efba1f0c296c8ceba3dfef5cc2a51bf306065931 100644 (file)
@@ -106,12 +106,12 @@ static File_path path;
 void
 do_one_file (String init_str, String file_str)
 {
-  if (init_str != "" && "" == path.find (init_str)) 
+  if (init_str && "" == path.find (init_str)) 
     {
       error ("Can not find `" + init_str +"\'");
       return ;
     }
-  if (file_str!= "" && path.find (file_str) == "") 
+  if (file_str && !path.find (file_str))
     {
       error ("Can not find `" + file_str + "'");
       return ;
@@ -216,7 +216,7 @@ destill_inname (String &name_str_r)
          split_path (name_str_r,a,b,c,d);
 
          // add extension if not present.
-         if (d == ""
+         if (!d
            d = ".ly";
          name_str_r = a+b+c+d;
        }
index 378acbc74140ae017dbcc8b16e58df9e8577ee56..70ca2af2bc27ce0b7d2eb61400da67a321b9b4f2 100644 (file)
@@ -11,6 +11,7 @@
 #include "command-request.hh"
 #include "timing-grav.hh"
 #include "engraver-group.hh"
+
 Meter_engraver::Meter_engraver()
 { 
   meter_p_ =0;
@@ -20,7 +21,8 @@ void
 Meter_engraver::do_process_requests()
 {
   Timing_engraver * timing_grav_l= (Timing_engraver*)
-    daddy_grav_l_->get_simple_engraver (Timing_engraver::static_name());
+    daddy_grav_l()->get_simple_translator (Timing_engraver::static_name())
+    ->engraver_l ();
   
   Meter_change_req *req = timing_grav_l->meter_req_l();
   if (req)
@@ -47,5 +49,5 @@ Meter_engraver::do_pre_move_processing()
 }
 
 
-ADD_THIS_ENGRAVER(Meter_engraver);
+ADD_THIS_TRANSLATOR(Meter_engraver);
 IMPLEMENT_IS_TYPE_B1(Meter_engraver,Engraver); 
index 63eb06946b4b0499bab4794b34d6ec84014153f0..b7206c2b78ba63bc56c3a6c0dc31c67bf526549d 100644 (file)
@@ -11,7 +11,7 @@
 #include "audio-item.hh"
 
 IMPLEMENT_IS_TYPE_B1(Meter_performer,Performer);
-ADD_THIS_PERFORMER(Meter_performer);
+ADD_THIS_TRANSLATOR(Meter_performer);
 
 Meter_performer::Meter_performer()
 {
@@ -32,7 +32,7 @@ Meter_performer::do_print() const
 }
 
 void
-Meter_performer::process_requests()
+Meter_performer::do_process_requests()
 {
   if (meter_req_l_)
     play (new Audio_meter (meter_req_l_));
index c3ffe65d4742f8506cd98a96d09a46470be86e27..7fc60a1d642a32b3ef837d7ba61ec4fea5dece3c 100644 (file)
@@ -9,8 +9,8 @@
 #include <math.h>
 #include "misc.hh"
 #include "midi-def.hh"
-#include "input-translator.hh"
-#include "audio-score.hh"
+#include "translator.hh"
+#include "performance.hh"
 #include "assoc-iter.hh"
 #include "score-performer.hh"
 #include "debug.hh"
 //     destructor
 //     routines, alphasorted
 
-// statics Midi_def
-// ugh
-
-int Midi_def::den_i_s = 4;
-int Midi_def::num_i_s = 4;
-
 Midi_def::Midi_def()
 {
   outfile_str_ = ""; 
-  itrans_p_ = 0;
   // ugh
   set_tempo (Moment (1, 4), 60);
 }
 
 Midi_def::Midi_def (Midi_def const& s)
+  : Music_output_def (s)
 {
   whole_seconds_f_ = s.whole_seconds_f_;
-  itrans_p_ = s.itrans_p_ ? new Input_translator (*s.itrans_p_) : 0;
   outfile_str_ = s.outfile_str_;
 }
 
 Midi_def::~Midi_def()
 {
-  delete itrans_p_;
 }
 
 Real
@@ -56,17 +48,7 @@ Midi_def::duration_to_seconds_f (Moment mom)
   return Moment (whole_seconds_f_) * mom;
 }
 
-Global_translator*
-Midi_def::get_global_translator_p() 
-{
-  Global_translator *g =     itrans_p_->get_group_performer_p()->global_l ();
 
-  assert (g->is_type_b (Score_performer::static_name()));
-  Score_performer * perf = (Score_performer*)g;
-  perf->performance_p_ = new Audio_score;
-  perf->performance_p_->midi_l_ = this;
-  return g;
-}
 
 int
 Midi_def::get_tempo_i (Moment moment)
@@ -85,12 +67,6 @@ Midi_def::print() const
 #endif
 }
 
-void
-Midi_def::set (Input_translator* itrans_p)
-{
-  delete itrans_p_;
-  itrans_p_ = itrans_p;
-}
 
 void
 Midi_def::set_tempo (Moment moment, int count_per_minute_i)
index 0521e87c756537bd54d7075da9af731bcef7ef3c..874f367a42be3afd30323fd0fa571b964f16a12a 100644 (file)
@@ -30,13 +30,13 @@ Midi_stream::~Midi_stream()
 Midi_stream&
 Midi_stream::operator <<(String str)
 {
-  if (check_debug)
-       str = String_convert::bin2hex_str (str);
+  if (check_debug && !monitor->silence("Midistrings"))
+    str = String_convert::bin2hex_str (str);
   
   *os_p_ << str;
 
-  if (check_debug)
-      *os_p_ << "\n";
+  if (check_debug && !monitor->silence("Midistrings"))
+    *os_p_ << "\n";
 
   return *this;
 }
@@ -44,10 +44,10 @@ Midi_stream::operator <<(String str)
 Midi_stream&
 Midi_stream::operator <<(Midi_item const& mitem_c_r)
 {
-//    *this << mitem_c_r.str();
+  //    *this << mitem_c_r.str();
   mitem_c_r.output (this);
-  if (check_debug)
-      *os_p_ << "\n";
+  if (check_debug && !monitor->silence("Midistrings"))
+    *os_p_ << "\n";
   return *this;
 }
 
@@ -64,5 +64,5 @@ Midi_stream::open()
 {
   os_p_ = new ofstream (filename_str_);
   if (!*os_p_)
-       error ("can't open `" + filename_str_ + "\'");
+    error ("can't open `" + filename_str_ + "\'");
 }
index ad176da26fbcf6bc251e0b80d848b36b1cc19a78..e37f9e7c33d4ab9f34315d1f4d24c03a6880ef4a 100644 (file)
@@ -19,7 +19,7 @@ Molecule::TeX_string() const
 {
   String s;
   for (iter_top (ats,c); c.ok(); c++)
-       s+=c->TeX_string();
+    s+=c->TeX_string();
   return s;
 }
 
@@ -28,7 +28,7 @@ Molecule::extent() const
 {
   Box b;
   for (iter_top (ats,c); c.ok(); c++)
-       b.unite (c->extent());
+    b.unite (c->extent());
   return b;
 }
 
@@ -36,14 +36,14 @@ void
 Molecule::translate (Offset o)
 {
   for (iter_top (ats,c); c.ok(); c++)
-       c->translate (o);
+    c->translate (o);
 }
 
 void
 Molecule::translate (Real x,Axis a)
 {
   for (iter_top (ats,c); c.ok(); c++)
-       c->translate (x,a);
+    c->translate (x,a);
 }
 
 void
@@ -51,71 +51,27 @@ Molecule::add (Molecule const &m)
 {
   for (iter_top (m.ats,c); c.ok(); c++) 
     {
-       add (**c);
+      add (**c);
     }
 }
 
-void
-Molecule::add_right (Molecule const &m)
-{
-   if (!ats.size()) 
-     {
-       add (m);
-       return;
-    }
-   Real xof=extent().x ().right - m.extent ().x ().left;
-   
-  Molecule toadd (m);
-  toadd.translate (Offset (xof, 0.0));
-  add (toadd);
-}
-
-void
-Molecule::add_left (Molecule const &m)
-{
-  if (!ats.size()) 
-    {
-       add (m);
-       return;
-    }
-  Real xof=extent().x ().left - m.extent ().x ().right;
-   
-  Molecule toadd (m);
-  toadd.translate (Offset (xof, 0.0));
-  add (toadd);
-}
-
-
-void
-Molecule::add_top (Molecule const &m)
-{
-    if (!ats.size()) 
-      {
-       add (m);
-       return;
-    }
-   Real yof=extent().y ().right - m.extent ().y ().left;
-
-  Molecule toadd (m);
-  toadd.translate (yof, Y_AXIS);
-  add (toadd);
-}
 
 void
-Molecule::add_bottom (Molecule const &m)
+Molecule::add_at_edge (Axis a, Direction d, Molecule const &m)
 {
   if (!ats.size()) 
     {
-       add (m);
-       return;
+      add (m);
+      return;
     }
-   Real yof=extent().y ().left- m.extent ().y ().right;
+  Real offset = extent ()[a][d] - m.extent ()[a][-d];
   Molecule toadd (m);
-  toadd.translate (yof, Y_AXIS);
+  toadd.translate (offset, a);
   add (toadd);
 }
 
+  
+  
 void
 Molecule::operator = (Molecule const &)
 {
@@ -132,9 +88,9 @@ Molecule::print() const
 {
 #ifndef NPRINT
   if (! check_debug)
-       return;
+    return;
   for (iter_top (ats,c); c.ok(); c++)
-       c->print();
+    c->print();
 #endif
 }
 
index ef36b59d149a2f552e0ed5cb475d4e05c94c459c..d05b752df097ee42fe7a80e8ed3bc8ff2488336b 100644 (file)
@@ -9,10 +9,11 @@
 #include "music-list.hh"
 #include "music-iterator.hh"
 #include "voice-iterator.hh"
+#include "property-iterator.hh"
 #include "chord-iterator.hh"
 #include "request-iterator.hh"
-#include "translator.hh"
-
+#include "translator-group.hh"
+#include "translation-property.hh"
 
 IMPLEMENT_IS_TYPE_B(Music_iterator);
 
@@ -41,11 +42,11 @@ Music_iterator::print() const
 #endif
 }
 
-Translator *
+Translator_group*
 Music_iterator::get_req_translator_l()
 {
   assert (report_to_l());
-  if (report_to_l()->is_bottom_engraver_b ())
+  if (report_to_l()->is_bottom_translator_b ())
     return report_to_l();
 
   set_translator (report_to_l()->get_default_interpreter ());
@@ -53,7 +54,7 @@ Music_iterator::get_req_translator_l()
 }
 
 void
-Music_iterator::push_translator (Translator*t)
+Music_iterator::push_translator (Translator_group*t)
 {
   report_to_l_arr_.push (t);
   t->iterator_count_ ++;
@@ -67,7 +68,7 @@ Music_iterator::pop_translator()
   report_to_l_arr_.pop();
 }
 
-Translator* 
+Translator_group
 Music_iterator::report_to_l() const
 {
   if (! report_to_l_arr_.size())
@@ -77,7 +78,7 @@ Music_iterator::report_to_l() const
 
 
 void
-Music_iterator::set_translator (Translator*trans)
+Music_iterator::set_translator (Translator_group*trans)
 {   
   if (report_to_l()==trans)
     return;
@@ -118,7 +119,7 @@ Music_iterator::ok() const
 
 Music_iterator*
 Music_iterator::static_get_iterator_p (Music *m,
-                                      Translator *report_l)
+                                      Translator_group*report_l)
 {
   Music_iterator * p =0;
   if (m->is_type_b (Request_chord::static_name()))
@@ -127,11 +128,13 @@ Music_iterator::static_get_iterator_p (Music *m,
     p =  new Chord_iterator ((Chord*) m);
   else if (m->is_type_b (Voice::static_name())) 
     p =  new Voice_iterator ((Voice*) m);
-  
-  if (m -> type_str_ != "") 
+  else if (m->is_type_b (Translation_property::static_name ()))
+    p = new Property_iterator((Translation_property *) m);
+      
+  if (m -> translator_type_str_)
     {
-      Translator * a =report_l->
-       find_get_translator_l (m-> type_str_, m->id_str_);
+      Translator_group* a =report_l->
+       find_create_translator_l (m-> translator_type_str_, m->translator_id_str_);
       p->set_translator (a);
     }
 
index 5de256a365b1d2b07287e65952e899c4b0ab025d..0c93fb55ab8dac9176a6a71914e1c0d7a9641e6c 100644 (file)
@@ -6,7 +6,71 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
+#include "debug.hh"
 #include "music-output-def.hh"
+#include "global-translator.hh"
+#include "dictionary-iter.hh"
 
 IMPLEMENT_IS_TYPE_B(Music_output_def);
 
+Music_output_def::Music_output_def ()
+{
+}
+
+Music_output_def::~Music_output_def ()
+{
+  for (Dictionary_iter<Translator*> i (translator_p_dict_); i.ok (); i++)
+    delete i.val ();
+}
+
+Music_output_def::Music_output_def (Music_output_def const &s)
+{
+  for (Dictionary_iter<Translator*> i (s.translator_p_dict_); i.ok (); i++)
+    assign_translator (i.key (), i.val ()->clone ());
+}
+
+Translator*
+Music_output_def::find_translator_l (String name) const
+{
+  if (translator_p_dict_.elt_b (name))
+    return translator_p_dict_[name];
+
+  if (global_translator_dict_p->elt_b (name))
+    return (*global_translator_dict_p)[name];
+
+  return 0;
+}
+
+
+Global_translator *
+Music_output_def::get_global_translator_p () 
+{
+  Translator * t = find_translator_l ("Score")->clone ();
+  Global_translator *g = t->group_l ()->global_l ();
+  t->add_processing ();
+  
+  return g;
+}
+
+
+void
+Music_output_def::assign_translator (String s, Translator*t)
+{
+  t->type_str_ = s;
+  t->output_def_l_ = this;
+  if (translator_p_dict_.elt_b (s))
+    delete translator_p_dict_[s];
+  translator_p_dict_[s] = t;
+}
+
+void
+Music_output_def::print () const
+{
+#ifndef NPRINT
+  for (Dictionary_iter<Translator*> i (translator_p_dict_); i.ok (); i++)
+    {
+      DOUT << i.key () << " = ";
+      i.val ()->print ();
+    }
+#endif
+}
index 7de77d1fc9551ee6d5eed197aa5165054593cc4c..053275cc1f4dfda7b0421d5a91b1def08c9c6c1e 100644 (file)
@@ -24,8 +24,8 @@ Music::print() const
   if (! check_debug)
        return ;
   DOUT << name() << "{";
-  if  (type_str_!="" || id_str_!="")
-       DOUT << "`" <<type_str_ << " = " << id_str_<<"\'";
+  if  (translator_type_str_)
+       DOUT << translator_type_str_ << " = " << translator_id_str_;
   do_print();
   DOUT << "}\n";
 #endif
index f09f0dd6c81d0274220af01bedee72382e4ccd1f..13a479956c65a6f235cfa7f0b2df48059f938034 100644 (file)
@@ -22,7 +22,6 @@
 
 static Keyword_ent the_key_tab[]={
   {"accepts", ACCEPTS},
-  {"alias", ALIAS},
   {"bar", BAR},
   {"cadenza", CADENZA},
   {"clear", CLEAR},
@@ -32,11 +31,9 @@ static Keyword_ent the_key_tab[]={
   {"contains", CONTAINS},
   {"duration", DURATION},
   {"absdynamic", ABSDYNAMIC},
-  {"group", GROUP},
-  {"hshift", HSHIFT},
-  {"id", ID},
   {"in", IN_T},
-  {"requesttranslator", REQUESTTRANSLATOR},
+  {"translator", TRANSLATOR},
+  {"type", TYPE},
   {"lyric", LYRIC},
   {"key", KEY},
   {"melodic" , MELODIC},
@@ -52,12 +49,12 @@ static Keyword_ent the_key_tab[]={
   {"partial", PARTIAL},
   {"paper", PAPER},
   {"plet", PLET},
+  {"property", PROPERTY},
   {"pt", PT_T},
   {"score", SCORE},
   {"script", SCRIPT},
   {"skip", SKIP},
   {"staff", STAFF},
-  {"stem", STEM},
   {"table", TABLE},
   {"spandynamic", SPANDYNAMIC}, 
   {"symboltables", SYMBOLTABLES},
@@ -73,7 +70,7 @@ static Keyword_ent the_key_tab[]={
 My_lily_lexer::My_lily_lexer()
 {
   keytable_p_ = new Keyword_table (the_key_tab);
-  identifier_assoc_p_ = new Assoc<String, Identifier*>;
+  identifier_p_dict_p_ = new Dictionary<Identifier*>;
   errorlevel_i_ = 0;
   post_quotes_b_ = false;
   note_tab_p_ = new Notename_table;
@@ -88,10 +85,10 @@ My_lily_lexer::lookup_keyword (String s)
 Identifier*
 My_lily_lexer::lookup_identifier (String s)
 {
-  if (!identifier_assoc_p_->elt_b (s))
-       return 0;
+  if (!identifier_p_dict_p_->elt_b (s))
+    return 0;
   
-  return (*identifier_assoc_p_)[s];
+  return (*identifier_p_dict_p_)[s];
 }
 
 
@@ -101,10 +98,10 @@ My_lily_lexer::set_identifier (String name_str, Identifier*i)
   Identifier *old = lookup_identifier (name_str);
   if  (old) 
     {
-       old->warning("redeclaration of \\" + name_str);
-       delete old;
+      old->warning("redeclaration of \\" + name_str);
+      delete old;
     }
-  (*identifier_assoc_p_)[name_str] = i;
+  (*identifier_p_dict_p_)[name_str] = i;
 }
 
 My_lily_lexer::~My_lily_lexer()
@@ -112,25 +109,25 @@ My_lily_lexer::~My_lily_lexer()
   delete keytable_p_;
 
   for (Assoc_iter<String,Identifier*>
-            ai (*identifier_assoc_p_); ai.ok(); ai++) 
-              {
-       DOUT << "deleting: " << ai.key()<<'\n';
-       delete ai.val();
+        ai (*identifier_p_dict_p_); ai.ok(); ai++) 
+    {
+      DOUT << "deleting: " << ai.key()<<'\n';
+      delete ai.val();
     }
   delete note_tab_p_;
-  delete identifier_assoc_p_;
+  delete identifier_p_dict_p_;
 }
 void
 My_lily_lexer::print_declarations (bool init_b) const
 {
-  for (Assoc_iter<String,Identifier*> ai (*identifier_assoc_p_); ai.ok(); 
-        ai++) 
-          {
-       if (ai.val()->init_b_ == init_b) 
-         {
-           DOUT << ai.key() << '=';
-           ai.val()->print ();
-         }
+  for (Assoc_iter<String,Identifier*> ai (*identifier_p_dict_p_);
+       ai.ok(); ai++) 
+    {
+      if (ai.val()->init_b_ == init_b) 
+       {
+         DOUT << ai.key() << '=';
+         ai.val()->print ();
+       }
     }
 }
 
@@ -139,15 +136,13 @@ My_lily_lexer::LexerError (char const *s)
 {
   if (include_stack_.empty()) 
     {
-       *mlog << "error at EOF" << s << '\n';
+      *mlog << "error at EOF" << s << '\n';
     }
   else 
     {
-       errorlevel_i_ |= 1;
-       Input spot (source_file_l(),here_ch_C());
-
-       spot.error (s);
+      errorlevel_i_ |= 1;
+      Input spot (source_file_l(),here_ch_C());
+      spot.error (s);
     }
 }
 
index 9878369e16b96ae6d0d9ce4ec1c0748f54cd379d..d03e29ffec6460d9193bf91b820bd380d531e682 100644 (file)
@@ -90,6 +90,11 @@ My_lily_parser::parse_file (String init, String s)
   set_debug();
   lexer_p_->new_input (init, source_l_);
   do_yyparse();
+
+  if (error_level_i_)
+    {
+      error ("Found errors in init files");
+    }
   print_declarations();
 
   init_parse_b_ = false;
diff --git a/lily/note-column-grav.cc b/lily/note-column-grav.cc
deleted file mode 100644 (file)
index a775577..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
-  note-column-reg.cc -- implement Note_column_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "note-column-grav.hh"
-#include "note-head.hh"
-#include "stem.hh"
-#include "note-column.hh"
-#include "script.hh"
-#include "rest-column.hh"
-
-bool
-Note_column_engraver::acceptable_elem_b (Score_elem const*elem_C) const
-{
-  char const*nC = elem_C->name();
-  return (nC == Script::static_name() || nC == Note_head::static_name () 
-         || nC == Stem::static_name());
-}
-Note_column*
-Note_column_engraver::note_col_l()
-{
-  if (!ncol_p_)
-    {
-      ncol_p_ = new Note_column;
-      announce_element (Score_elem_info (ncol_p_, 0));
-    }
-  return ncol_p_;
-}
-
-Rest_column *
-Note_column_engraver::rest_col_l()
-{
-  if (!restcol_p_) 
-    {
-      restcol_p_  = new Rest_column;
-      announce_element (Score_elem_info (restcol_p_,0));
-    }
-  return restcol_p_;
-}
-
-void
-Note_column_engraver::acknowledge_element (Score_elem_info i)
-{
-  if (!acceptable_elem_b (i.elem_l_))
-    return;
-
-
-  char const*nC = i.elem_l_->name();
-
-  if (nC == Script::static_name() && i.req_l_ && i.req_l_->musical ()) 
-    {
-      script_l_arr_.push ((Script*)i.elem_l_->item());
-    }
-  else if (nC == Note_head::static_name()) 
-    {
-      Note_head * h_l = (Note_head*)i.elem_l_->item();
-      if (h_l->rest_b_)
-       rest_col_l()->add (h_l);
-      else
-       note_col_l()->add (h_l);
-
-    }
-  else if (nC == Stem::static_name())
-    {
-      stem_l_ = (Stem*)i.elem_l_->item();
-    }
-
-  if (ncol_p_ || restcol_p_) 
-    {
-      if (stem_l_) 
-       {
-         if (restcol_p_&& !restcol_p_->stem_l_)
-           restcol_p_->set (stem_l_);
-         if (ncol_p_ && !ncol_p_->stem_l_)
-           ncol_p_->set (stem_l_);
-       }
-  
-  
-      for (int i=0; i < script_l_arr_.size(); i++) 
-       {
-         if (restcol_p_)
-           restcol_p_->add (script_l_arr_[i]);
-         if (ncol_p_)
-           ncol_p_->add (script_l_arr_[i]);
-       }
-  
-      script_l_arr_.clear();
-    }
-
-}
-
-void
-Note_column_engraver::do_pre_move_processing()
-{
-  if (ncol_p_) 
-    {
-      if (! ncol_p_->h_shift_b_)
-       ncol_p_->h_shift_b_ = h_shift_b_;
-      if (! ncol_p_->dir_)
-       ncol_p_->dir_ = dir_;
-
-      typeset_element (ncol_p_);
-      ncol_p_ =0;
-    }
-  if (restcol_p_) 
-    {
-      if (! restcol_p_->dir_)
-       restcol_p_->dir_ = dir_;
-
-      typeset_element (restcol_p_);
-      restcol_p_ =0;
-    }
-}
-
-void
-Note_column_engraver::do_post_move_processing()
-{
-  script_l_arr_.clear();
-  stem_l_ =0;
-}
-
-void
-Note_column_engraver::set_feature (Feature i)
-{
-  if (i.type_ == "vdir")       
-    dir_ = (Direction) int(i.value_);
-  if (i.type_ == "hshift")
-    h_shift_b_ = (bool)(int)i.value_;
-}
-
-Note_column_engraver::Note_column_engraver()
-{
-  dir_ =CENTER;
-  h_shift_b_ = false;
-  
-  ncol_p_=0;
-  restcol_p_ =0;
-  do_post_move_processing();
-}
-
-
-IMPLEMENT_IS_TYPE_B1(Note_column_engraver,Engraver);
-ADD_THIS_ENGRAVER(Note_column_engraver);
index f310d0828c356f5f3b470f5ee9901cb4bf98b5d2..fb70c3e7a65dada41e3dfa344692064b031da6c4 100644 (file)
@@ -5,18 +5,27 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-
+#include "dot-column.hh"
 #include "note-column.hh"
 #include "script.hh"
 #include "note-head.hh"
 #include "stem.hh"
+#include "rest.hh"
+#include "debug.hh"
 
+IMPLEMENT_IS_TYPE_B1(Note_column,Script_column);
 
-IMPLEMENT_IS_TYPE_B1(Note_column,Head_column);
+bool
+Note_column::rest_b () const
+{
+  return rest_l_arr_.size ();
+}
 
 Note_column::Note_column()
 {
-  h_shift_b_ =false;
+  stem_l_ = 0;
+  h_shift_b_ = false;
+  dir_ =CENTER;
 }
 
 void
@@ -30,19 +39,107 @@ Note_column::head_positions_interval() const
 {
   ((Note_column*)this)->sort();
   return Interval_t<int> (head_l_arr_[0]->position_i_, 
-                            head_l_arr_.top()->position_i_);
+                         head_l_arr_.top()->position_i_);
 
 }
 
-
 void
 Note_column::do_pre_processing()
 {
-  if (!dir_&& !stem_l_)
+
+  if (!dir_)
     {
-       dir_ = (head_positions_interval().center () >=  5) ? DOWN:UP;
+      if (stem_l_)
+       dir_ = stem_l_->dir_;
+      else if (head_l_arr_.size ())
+       {
+         dir_ = (head_positions_interval().center () >=  5) ? DOWN:UP;
+       }
     }
-  Head_column::do_pre_processing();
+  Script_column::do_pre_processing();
 }
 
   
+
+void
+Note_column::set (Stem * stem_l)
+{
+  add_support (stem_l);
+  stem_l_ = stem_l;
+  /* 
+     don't add stem to support; mostly invisible for rest-columns (and possibly taken . .)
+    
+   */
+  Score_elem::add_dependency (stem_l);
+  for (int i=0; i < script_l_arr_.size(); i++)
+    script_l_arr_[i]->set_stem (stem_l);
+
+}
+
+void
+Note_column::add (Script *script_l)
+{
+  Script_column::add (script_l) ;
+  if  (stem_l_)
+    script_l->set_stem (stem_l_);
+}
+
+void
+Note_column::do_substitute_dependency (Score_elem*o, Score_elem*n)
+{
+  if (stem_l_ == o) 
+    {
+      stem_l_ = n ? (Stem*)n->item():0;
+    }
+  if (o->is_type_b (Note_head::static_name ()))
+    {
+      head_l_arr_.substitute ((Note_head*)o->item(), 
+                             (n)? (Note_head*)n->item() : 0);
+    }
+  Script_column::do_substitute_dependency (o,n);
+  if (o->is_type_b (Rest::static_name ())) 
+    {
+      rest_l_arr_.substitute ((Rest*)o->item(), 
+                             (n)? (Rest*)n->item() : 0);
+    }
+}
+
+void
+Note_column::add (Rhythmic_head *h)
+{
+  if (h->is_type_b (Rest::static_name ()))
+    {
+      rest_l_arr_.push ((Rest*)h);
+      add_support (h);  
+    }
+  if (h->is_type_b (Note_head::static_name ()))
+    {
+      head_l_arr_.push ((Note_head*) h);
+      add_support (h);
+    }
+}
+
+/**
+  translate the rest symbols
+ */
+void
+Note_column::translate_rests (int dy_i)
+{
+  for (int i=0; i < rest_l_arr_.size(); i++)
+    rest_l_arr_[i]->position_i_ += dy_i;
+}
+
+void
+Note_column::do_print() const
+{
+#ifndef NPRINT
+  DOUT << "rests: " << rest_l_arr_.size() << ", ";
+  DOUT << "heads: " << head_l_arr_.size();
+#endif
+}
+
+void
+Note_column::set (Dot_column *d)
+{
+  add_element (d);
+}
index 9ae829f7ff37f1673a9cdedf62af86decb0b921d..4b60d69229142332c2ba349575764f115152ccca 100644 (file)
@@ -7,15 +7,12 @@
  */
 
 #include "note-performer.hh"
-#include "translator.hh"
-#include "input-translator.hh"
 #include "musical-request.hh"
 #include "audio-item.hh"
 #include "debug.hh"
 
 IMPLEMENT_IS_TYPE_B1(Note_performer,Performer);
-
-ADD_THIS_PERFORMER(Note_performer);
+ADD_THIS_TRANSLATOR(Note_performer);
 
 Note_performer::Note_performer()
 {
@@ -28,17 +25,17 @@ Note_performer::do_print() const
 #ifndef NPRINT
   if (note_req_l_) 
     {
-       note_req_l_->print();
+      note_req_l_->print();
     }
 #endif
 }
 
 void 
-Note_performer::process_requests() 
+Note_performer::do_process_requests() 
 {
   // this is _really_ braindead, but it generates some output
   if (!note_req_l_ || !note_req_l_->melodic()  || !note_req_l_->rhythmic ())
-       return;
+    return;
 
   play (new Audio_note (note_req_l_));
   note_req_l_ = 0;
@@ -48,10 +45,10 @@ bool
 Note_performer::do_try_request (Request* req_l)
 {
   if (note_req_l_)
-       return false;
+    return false;
   
   if (!req_l->musical() || !req_l->musical ()->note ())
-       return false;
+    return false;
 
   note_req_l_ = req_l->musical()->melodic ();
   return true;
index 6bb466a5af0f085a2dd93a8ad96845d8f461939d..caa6abf3da1d0ad729a3aebe4629ef3b622150a4 100644 (file)
@@ -23,24 +23,24 @@ get_scriptdef (char c)
   String s;
   switch (c) 
     {
-  case '^' : s = "marcato";
-       break;
-  case  '+' : s = "stopped";
-       break;
-  case '-' : s = "tenuto";
-       break;
-  case  '|':  s = "staccatissimo";
-       break;
-  case  'o' : s = "";
-       break;
-  case '>' : s = "accent";
-       break;
-  case  'v' : s = ""; 
-       break;
-  case  '.' : s = "staccato";
-       break;
-  default:
-       assert (false);
+    case '^' : s = "marcato";
+      break;
+    case  '+' : s = "stopped";
+      break;
+    case '-' : s = "tenuto";
+      break;
+    case  '|':  s = "staccatissimo";
+      break;
+    case  'o' : s = "";
+      break;
+    case '>' : s = "accent";
+      break;
+    case  'v' : s = ""; 
+      break;
+    case  '.' : s = "staccato";
+      break;
+    default:
+      assert (false);
     }
   return new String (s);
 }
@@ -56,23 +56,7 @@ get_script_req (int d , General_script_def*def)
 
 
 
-Request*
-get_stemdir_req (int d)
-{
-  d = sign (long (d));
-  Group_feature_req * gfreq_p = new Group_feature_req;
-  gfreq_p->type_str_ = "vdir";
-  gfreq_p->value_str_ = String (d);
-  return gfreq_p;
-}
-Request*
-get_hshift_req (int i)
-{
-   Group_feature_req * gfreq_p = new Group_feature_req;
-  gfreq_p->type_str_ = "hshift";
-  gfreq_p->value_str_ = String (i);
-  return gfreq_p;
-}
+
   
 Request*
 get_grouping_req (Array<int> i_arr)
@@ -80,8 +64,8 @@ get_grouping_req (Array<int> i_arr)
   Measure_grouping_req * mr_p = new Measure_grouping_req;
   for (int i=0; i <i_arr.size();) 
     {
-       mr_p->elt_length_arr_.push (Moment (1, i_arr[i++]));
-       mr_p->beat_i_arr_.push (i_arr[i++]);
+      mr_p->elt_length_arr_.push (Moment (1, i_arr[i++]));
+      mr_p->beat_i_arr_.push (i_arr[i++]);
     }
   return mr_p;
 }
index 0afaabd49fedf07e473554d3041a6f9c117befae..389ff0cf60ff8ed33cdf6014e21fef790f78e0e5 100644 (file)
@@ -7,6 +7,7 @@
 */
 
 #include "misc.hh"
+#include "dots.hh"
 #include "note-head.hh"
 #include "dimen.hh" 
 #include "debug.hh"
 #include "molecule.hh"
 #include "musical-request.hh"
 
-/*
-  TODO
-  
-  Separate notehead into 
-
-
-   Rhythmic_head
-     Note_head
-     Rest
 
-   and Stem takes Rhythmic_heads 
- */
-
-
-Note_head::Note_head (int ss)
+Note_head::Note_head ()
 {
   x_dir_ = CENTER;
-  staff_size_i_=ss;
+  staff_size_i_= 8;            // UGH
   position_i_ = 0;
-  balltype_i_ = 0;
-  dots_i_ = 0;
-  dot_delta_y_i_ = 0;
   extremal_i_ = 0;
-  rest_b_ = false;
 }
 
 void
-Note_head::do_pre_processing()
+Note_head::do_pre_processing ()
 {
   // 8 ball looks the same as 4 ball:
-  if (balltype_i_ > 2 && !rest_b_)
+  if (balltype_i_ > 2)
     balltype_i_ = 2;
-       
-  if (rest_b_) 
-    {
-      if (balltype_i_ == 0)
-       position_i_ += 6;
-      else if (balltype_i_ == 0)
-       position_i_ += 4;
-    }
+  if (dots_l_)                 // move into Rhythmic_head?
+    dots_l_->position_i_ = position_i_;
 }
 
-void
-Note_head::set_rhythmic (Rhythmic_req*r_req_l)
-{
-  balltype_i_ = r_req_l->duration_.durlog_i_;
-  dots_i_ = r_req_l->duration_.dots_i_;
-}
-  
-
-IMPLEMENT_IS_TYPE_B1(Note_head,Item);
-
-void
-Note_head::do_print() const
-{
-#ifndef NPRINT
-  if (rest_b_)
-    DOUT << "REST! ";
-  DOUT << "balltype_i_ "<< balltype_i_ << ", position_i_ = "<< position_i_
-       << "dots_i_ " << dots_i_;
-#endif
-}
+IMPLEMENT_IS_TYPE_B1(Note_head,Rhythmic_head);
 
 
 int
@@ -85,57 +44,26 @@ Note_head::compare (Note_head *const  &a, Note_head * const &b)
   return a->position_i_ - b->position_i_;
 }
 
-void
-Note_head::set_dots()
-{
-  if (!(position_i_ %2) && rest_b_ && balltype_i_ == 0)
-    dot_delta_y_i_ = -1;
-  else if (!(position_i_ %2))
-    dot_delta_y_i_ = 1;
-}
-
-/*
-  Ugh, hairy.
- */
 Molecule*
 Note_head::brew_molecule_p() const 
 {
-  ((Note_head*)this)->set_dots(); // UGH GUH
   Molecule*out = 0;
   Paper_def *p = paper();
-  Real inter_f = p->internote_f();
-  Symbol s;
+  Real inter_f = p->internote_f ();
 
   // ugh
   bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
   
-  if (!rest_b_)
-    s = p->lookup_l()->ball (balltype_i_);
-  else 
-    {
-      s = p->lookup_l()->rest (balltype_i_, streepjes_b);
-    }
+  Symbol  s = p->lookup_l()->ball (balltype_i_);
   out = new Molecule (Atom (s));
-  out->translate (x_dir_ * s.dim.x().length () , X_AXIS);
-  if (dots_i_) 
-    {
-      Symbol d = p->lookup_l()->dots (dots_i_);
-      Molecule dm;
-      dm.add (Atom (d));
-      dm.translate (inter_f * dot_delta_y_i_ , Y_AXIS);
-      out->add_right (dm);
-    }
+  out->translate (x_dir_ * s.dim.x().length (), X_AXIS);
 
-  
-  if (rest_b_) 
-    {
-      streepjes_b = false;
-    }
-  
   if (streepjes_b) 
     {
       int dir = sign (position_i_);
-      int s =(position_i_<-1) ? -((-position_i_)/2): (position_i_-staff_size_i_)/2;
+      int s =(position_i_<-1) 
+       ? -((-position_i_)/2)
+       : (position_i_-staff_size_i_)/2;
        
       Symbol str = p->lookup_l()->streepjes (s);
       Molecule sm;
@@ -148,4 +76,3 @@ Note_head::brew_molecule_p() const
   out->translate (inter_f*position_i_, Y_AXIS);
   return out;
 }
-
index ffa0dcfc2bcb1e1f22c2a544f3be61d7803f0f03..986d3665ba82a9609103f3da9ddef92ff5dc7374 100644 (file)
@@ -205,7 +205,7 @@ Paper_score::process ()
 
   // output
   String outname = paper_l_->outfile_str_ ;
-  if (outname == "")
+  if (!outname)
     outname = default_out_str_+ ".tex";
   
   *mlog << "TeX output to " <<  outname << " ...\n";
index 8bf32b14905f0ac92654bb5dcaf9bdf54c0c89a9..d55e3b740d90ae0dbd1b105f85611b1bfae48dfa 100644 (file)
 #include "debug.hh"
 #include "lookup.hh"
 #include "dimen.hh"
-#include "input-translator.hh"
 #include "assoc-iter.hh"
 #include "score-grav.hh"
 #include "p-score.hh"
 #include "main.hh"
 
+
+Paper_def::Paper_def()
+{
+  lookup_p_ = 0;
+  real_vars_p_ = new Dictionary<Real>;
+}
+
+Paper_def::~Paper_def()
+{
+  delete real_vars_p_;
+  delete lookup_p_;
+}
+
+Paper_def::Paper_def (Paper_def const&s)
+  : Music_output_def (s)
+{
+  lookup_p_ = s.lookup_p_? new Lookup (*s.lookup_p_) : 0;
+  lookup_p_->paper_l_ = this;
+  real_vars_p_ = new Dictionary<Real> (*s.real_vars_p_);
+  outfile_str_ = s.outfile_str_;
+}
+
 void
 Paper_def::set_var (String s, Real r)
 {
@@ -77,36 +98,6 @@ Paper_def::geometric_spacing(Moment d) const
   return get_var ("basicspace") + get_var ("unitspace")  * dur_f;
 }
 
-Paper_def::Paper_def()
-{
-  itrans_p_ = 0;
-  lookup_p_ = 0;
-  real_vars_p_ = new Assoc<String,Real>;
-}
-
-Paper_def::~Paper_def()
-{
-  delete itrans_p_;
-  delete real_vars_p_;
-  delete lookup_p_;
-}
-
-Paper_def::Paper_def (Paper_def const&s)
-{
-  itrans_p_ = s.itrans_p_ ? new Input_translator (*s.itrans_p_):0;
-  lookup_p_ = s.lookup_p_? new Lookup (*s.lookup_p_) : 0;
-  lookup_p_->paper_l_ = this;
-  real_vars_p_ = new Assoc<String,Real> (*s.real_vars_p_);
-  outfile_str_ = s.outfile_str_;
-}
-
-void
-Paper_def::set (Input_translator * itrans_p)
-{
-  delete itrans_p_;
-  itrans_p_  = itrans_p;
-}
-
 void
 Paper_def::set (Lookup*l)
 {
@@ -150,10 +141,10 @@ void
 Paper_def::print() const
 {
 #ifndef NPRINT
+  Music_output_def::print ();
   DOUT << "Paper {";
   DOUT << "out: " <<outfile_str_;
   lookup_p_->print();
-  itrans_p_->print();
   for (Assoc_iter<String,Real> i (*real_vars_p_); i.ok(); i++) 
     {
       DOUT << i.key() << "= " << i.val () << "\n";
@@ -169,20 +160,4 @@ Paper_def::lookup_l()
   return lookup_p_;
 }
 
-Global_translator*
-Paper_def::get_global_translator_p() 
-{
-  if (only_midi) 
-    {
-      return 0;
-    }
-
-  Global_translator* g =  itrans_p_->get_group_engraver_p()->global_l ();
-  assert (g->is_type_b (Score_engraver::static_name()));
-  Score_engraver*grav = (Score_engraver*) g;
-  grav->pscore_p_ = new Paper_score;
-  grav->pscore_p_->paper_l_ = this;
-  return g;      
-}
-
 IMPLEMENT_IS_TYPE_B1(Paper_def, Music_output_def);
index 48aee8d856f507b84c10dd24397749219ccd475a..ed9a28aceb332d36258f1c3119ef58dd8fdcaab3 100644 (file)
 #include <iostream.h>
 
 // mmm
-#define MUDELA_VERSION "0.1.2"
+#define MUDELA_VERSION "0.1.5"
 
+#include "scalar.hh"
+#include "translation-property.hh"
 #include "script-def.hh"
 #include "symtable.hh"
 #include "lookup.hh"
@@ -31,7 +33,7 @@
 #include "musical-request.hh"
 #include "my-lily-parser.hh"
 #include "text-def.hh"
-#include "input-translator.hh"
+#include "translator-group.hh"
 #include "score.hh"
 #include "music-list.hh"
 #include "header.hh"
@@ -60,7 +62,7 @@
     Chord * chord;
     Duration *duration;
     Identifier *id;
-    Input_translator* itrans;
+    Translator* trans;
     Music *music;
     Music_list *musiclist;
     Score *score;
@@ -77,6 +79,7 @@
     Real real;
     Request * request;
     General_script_def * script;
+    Scalar *scalar;
     String *string;
     Symbol * symbol;
     Symtable * symtable;
 %{
 
 int
-yylex(YYSTYPE *s,  void * v_l)
+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_;
 
        lex_l->lexval_l = (void*) s;
-       return lex_l->yylex();
+       return lex_l->yylex ();
 }
 
 
@@ -120,12 +123,9 @@ yylex(YYSTYPE *s,  void * v_l)
 %token ABSDYNAMIC
 %token END
 %token GROUPING
-%token GROUP
-%token REQUESTTRANSLATOR
-%token HSHIFT
+%token TRANSLATOR
 %token HEADER
 %token IN_T
-%token ID
 %token LYRIC
 %token KEY
 %token MELODIC
@@ -147,14 +147,15 @@ yylex(YYSTYPE *s,  void * v_l)
 %token SPANDYNAMIC
 %token STAFF
 %token START_T
-%token STEM
 %token SYMBOLTABLES
 %token TABLE
 %token TRANSPOSE
 %token TEMPO
+%token TYPE
 %token TEXID
 %token TEXTSTYLE
 %token TITLE
+%token PROPERTY
 %token VERSION
 
 /* escaped */
@@ -172,7 +173,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %token <id>    SCRIPT_IDENTIFIER
 %token <id>    COMMAND_IDENTIFIER
 %token <id>    REAL_IDENTIFIER
-%token <id>    INPUT_TRANS_IDENTIFIER
+%token <id>    TRANS_IDENTIFIER
 %token <id>    INT_IDENTIFIER
 %token <id>    SCORE_IDENTIFIER
 %token <id>    MIDI_IDENTIFIER
@@ -207,7 +208,9 @@ yylex(YYSTYPE *s,  void * v_l)
 %type <midi>   midi_block midi_body
 %type <moment> duration_length
 
+%type <scalar>  scalar
 %type <music>  Music transposed_music
+%type <music>  propertydef
 %type <musiclist> Voice Voice_body
 %type <chord>  Chord Chord_body
 %type <paper>  paper_block paper_body
@@ -222,11 +225,12 @@ yylex(YYSTYPE *s,  void * v_l)
 %type <string> script_abbreviation
 %type <symbol> symboldef
 %type <symtable>       symtable symtable_body
-%type <itrans> input_translator_spec input_translator_spec_body
+%type <trans>  translator_spec translator_spec_body
 %type <tempo>  tempo_request
 %type <string> header_record
 
-%left PRIORITY
+%expect 2
+
 
 %%
 
@@ -236,7 +240,7 @@ mudela:     /* empty */
                THIS->default_header_p_ = $2;
        }
        | mudela score_block {
-               add_score($2);
+               add_score ($2);
        }
        | mudela add_declaration { }
        | mudela error
@@ -246,12 +250,12 @@ mudela:   /* empty */
 
 check_version:
        VERSION STRING ';'              {
-               if ( String( *$2 ) != MUDELA_VERSION) {
+               if (String (*$2) != MUDELA_VERSION) {
                        if (THIS->ignore_version_b_) {
-                               THIS->here_input().error("Incorrect mudela version");
+                               THIS->here_input ().error ("Incorrect mudela version");
                        } else {
                                THIS->fatal_error_i_ = 1;
-                               THIS->parser_error("Incorrect mudela version");
+                               THIS->parser_error ("Incorrect mudela version");
                        }
                }
        }
@@ -264,10 +268,10 @@ notenames_body:
        /**/    {
        }
        | notenames_body CLEAR  {
-               THIS->clear_notenames();
+               THIS->clear_notenames ();
        }
        | notenames_body STRING '=' melodic_request {
-               THIS->add_notename(*$2, $4);
+               THIS->add_notename (*$2, $4);
                delete $2;
        }
        ;
@@ -285,12 +289,12 @@ mudela_header_body:
 
 mudela_header:
        HEADER  {
-               THIS->lexer_p_->push_header_state();
+               THIS->lexer_p_->push_header_state ();
        }
 
        '{' mudela_header_body '}'      {
                $$ = $4;
-               THIS->lexer_p_->pop_state();
+               THIS->lexer_p_->pop_state ();
        }
        ;
 
@@ -311,118 +315,113 @@ header_record:
 
 add_declaration:
        STRING {
-               THIS->remember_spot();
+               THIS->remember_spot ();
        }
        /* cont */ '=' identifier_init {
-           THIS->lexer_p_->set_identifier(*$1, $4);
+           THIS->lexer_p_->set_identifier (*$1, $4);
            $4->init_b_ = THIS->init_parse_b_;
-           $4->set_spot(THIS->pop_spot());
+           $4->set_spot (THIS->pop_spot ());
        }
        ;
 identifier_init:
        score_block {
-               $$ = new Score_id($1, SCORE_IDENTIFIER);
+               $$ = new Score_id ($1, SCORE_IDENTIFIER);
 
        }
        | paper_block {
-               $$ = new Paper_def_id($1, PAPER_IDENTIFIER);
+               $$ = new Paper_def_id ($1, PAPER_IDENTIFIER);
 
        }
        | midi_block {
-               $$ = new Midi_def_id($1, MIDI_IDENTIFIER);
+               $$ = new Midi_def_id ($1, MIDI_IDENTIFIER);
 
        }
        | script_definition {
-               $$ = new Script_id($1, SCRIPT_IDENTIFIER);
+               $$ = new Script_id ($1, SCRIPT_IDENTIFIER);
 
        }
        | Music  {
-               $$ = new Music_id($1, MUSIC_IDENTIFIER);
+               $$ = new Music_id ($1, MUSIC_IDENTIFIER);
 
        }
        | symtables {
-               $$ = new Lookup_id($1, IDENTIFIER);
+               $$ = new Lookup_id ($1, IDENTIFIER);
 
        }
        | real  {
-               $$ = new Real_id(new Real($1), REAL_IDENTIFIER);
+               $$ = new Real_id (new Real ($1), REAL_IDENTIFIER);
 
        }
        | int   {
-               $$ = new Int_id(new int($1), INT_IDENTIFIER);
+               $$ = new Int_id (new int ($1), INT_IDENTIFIER);
 
        }
        | post_request {
-               $$ = new Request_id($1, POST_REQUEST_IDENTIFIER);
+               $$ = new Request_id ($1, POST_REQUEST_IDENTIFIER);
 
        }
        | melodic_request {
-               $$ = new Request_id($1, MELODIC_REQUEST_IDENTIFIER);
+               $$ = new Request_id ($1, MELODIC_REQUEST_IDENTIFIER);
 
        }
-       | input_translator_spec {
-               $$ = new Input_translator_id ( $1, INPUT_TRANS_IDENTIFIER);
+       | translator_spec {
+               $$ = new Translator_id ($1, TRANS_IDENTIFIER);
        }
        | explicit_duration {
-               $$ = new Duration_id$1, DURATION_IDENTIFIER);
+               $$ = new Duration_id ($1, DURATION_IDENTIFIER);
        }
        ;
 
 
 
-input_translator_spec:
-       REQUESTTRANSLATOR '{' input_translator_spec_body '}'
+translator_spec:
+       TRANSLATOR '{' translator_spec_body '}'
                { $$ = $3; }
        ;
 
-input_translator_spec_body:
-       INPUT_TRANS_IDENTIFIER  {
-               $$ = $1->input_translator();
-               $$-> set_spot( THIS->here_input() );
+translator_spec_body:
+       TRANS_IDENTIFIER        {
+               $$ = $1->translator ();
+               $$-> set_spot (THIS->here_input ());
        }
-       | STRING STRING {
-               $$ = new Input_translator;
-               $$->base_str_ = *$1;
-               $$->type_str_ =*$2;
-               $$->set_spot ( THIS->here_input() );
-               delete $1;
+       | TYPE STRING ';'       {
+               $$ = get_translator_l (*$2)->clone ();
+               $$->set_spot (THIS->here_input ());
                delete $2;
        }
-       | input_translator_spec_body ID STRING ';' {
-               $$-> default_id_str_ = *$3;
-               delete $3;
+       | translator_spec_body STRING '=' scalar ';'    {
+               $$-> set_property (*$2, *$4);
+               delete $2;
+               delete $4;
        }
-       | input_translator_spec_body ALIAS STRING ';' {
-               $$-> alias_str_arr_.push(*$3);
+       | translator_spec_body CONSISTS STRING ';'      {
+               $$->group_l ()->consists_str_arr_.push (*$3);
                delete $3;
        }
-       | input_translator_spec_body CONSISTS STRING ';'        {
-               $$-> consists_str_arr_.push(*$3);
+       | translator_spec_body ACCEPTS STRING ';' {
+               $$->group_l ()->accepts_str_arr_.push (*$3);
                delete $3;
        }
-       | input_translator_spec_body CONTAINS input_translator_spec {
-               $$->add($3);
-       }
        ;
 
 /*
        SCORE
 */
 score_block:
-       SCORE { THIS->remember_spot();
+       SCORE { THIS->remember_spot ();
                THIS->error_level_i_ =0;
        }
        /*cont*/ '{' score_body '}'     {
                $$ = $4;
-               $$->set_spot(THIS->pop_spot());
+               $$->set_spot (THIS->pop_spot ());
                if (!$$->def_p_arr_.size ())
-                       $$->add ( THIS->default_paper());
+                       $$->add (THIS->default_paper ());
 
                /* handle error levels. */
                $$->errorlevel_i_ = THIS->error_level_i_;
                THIS->error_level_i_ = 0;
                if (!$$->header_p_ && THIS->default_header_p_)
-                       $$->header_p_ = new Header(*THIS->default_header_p_);
+                       $$->header_p_ = new Header (*THIS->default_header_p_);
        }
        ;
 
@@ -430,7 +429,7 @@ score_body:         {
                $$ = new Score;
        }
        | SCORE_IDENTIFIER {
-               $$ = $1->score();
+               $$ = $1->score ();
        }
        | score_body mudela_header      {
                $$->header_p_ = $2;
@@ -439,7 +438,7 @@ score_body:         {
                $$->music_p_ = $2;
        }
        | score_body output_def {
-               $$->add$2);
+               $$->add ($2);
        }
        | score_body error {
 
@@ -458,7 +457,7 @@ output_def:
 intastint_list:
        /* */   { $$ =new Array<int>; }
        | intastint_list int '*' int    {
-               $$->push($2); $$->push($4);
+               $$->push ($2); $$->push ($4);
        }
        ;
 
@@ -473,24 +472,25 @@ paper_block:
 
 paper_body:
        /* empty */                     {
-               $$ = THIS->default_paper(); // paper / video / engrave
+               $$ = THIS->default_paper (); // paper / video / engrave
        }
        | PAPER_IDENTIFIER      {
-               $$ = $1->paperdef();
+               $$ = $1->paperdef ();
        }
        | paper_body OUTPUT STRING ';'  { 
                $$->outfile_str_ = *$3;
                delete $3;
        }
-       | paper_body symtables          { $$->set($2); }
+       | paper_body symtables          { $$->set ($2); }
        | paper_body STRING '=' dim ';'         {
-               $$->set_var(*$2, $4);
+               $$->set_var (*$2, $4);
        }
        | paper_body STRING '=' real ';' {
-               $$->set_var(*$2, $4);
+               $$->set_var (*$2, $4);
        }
-       | paper_body input_translator_spec      {
-               $$->set( $2 );
+       | paper_body STRING '=' translator_spec {
+               $$-> assign_translator (*$2, $4);
+               delete $2;
        }
        | paper_body error {
 
@@ -507,19 +507,20 @@ midi_block:
        ;
 
 midi_body: /* empty */                 {
-               $$ = THIS->default_midi();
+               $$ = THIS->default_midi ();
+       }
+       | midi_body STRING '=' translator_spec  {
+               $$-> assign_translator (*$2, $4);
+               delete $2;
        }
        | midi_body OUTPUT STRING ';'   {
                $$->outfile_str_ = *$3;
                delete $3;
        }
        | midi_body tempo_request ';' {
-               $$->set_tempo( $2->dur_.length(), $2->metronome_i_ );
+               $$->set_tempo ($2->dur_.length (), $2->metronome_i_);
                delete $2;
        }
-       | midi_body input_translator_spec       {
-               $$->set( $2 );
-       }
        | midi_body error {
 
        }
@@ -548,35 +549,69 @@ Voice_body:
        /**/            {
                $$ = new Voice;
        }
-       | Voice_body ID STRING STRING ';'       {
-               $$ = new Voice;
-               $$->type_str_ = *$3;
-               $$->id_str_ = *$4;
-               delete $3;
-               delete $4;
-       }
        | Voice_body Music              {
-               $$->add($2);
+               $$->add ($2);
        }
        ;
 
 Music:
        full_element            { $$ = $1; }
+       | TYPE STRING Music     {
+               $$ = $3;
+               $$->translator_type_str_ = *$2;
+               delete $2;
+       }
+       | TYPE STRING '=' STRING Music {
+               $$ = $5;
+               $$->translator_type_str_ = *$2;
+               $$->translator_id_str_ = *$4;
+               delete $2;
+               delete $4;
+       }
        | Voice         { $$ = $1; }
        | Chord                 { $$ = $1; }
        | transposed_music      { $$ = $1; }
-       | MUSIC_IDENTIFIER      { $$ = $1->music(); }
+       | MUSIC_IDENTIFIER      { $$ = $1->music (); }
        | MELODIC
-               { THIS->lexer_p_->push_note_state(); }
+               { THIS->lexer_p_->push_note_state (); }
        Music
-               { $$=$3; THIS->lexer_p_->pop_state(); }
+               { $$=$3; THIS->lexer_p_->pop_state (); }
 
        | LYRIC
-               { THIS->lexer_p_->push_lyric_state(); }
+               { THIS->lexer_p_->push_lyric_state (); }
        Music
-               { $$ = $3; THIS->lexer_p_->pop_state(); }
+               { $$ = $3; THIS->lexer_p_->pop_state (); }
+       | propertydef
        ;
 
+propertydef:
+       TRANSLATOR STRING '=' STRING  {
+               /* kluge.  Could use Music just as well */
+               Translation_property * t = new Translation_property;
+               t-> translator_type_str_ = *$2;
+               t-> translator_id_str_ = *$4;
+               $$ = t;
+               delete $2;
+               delete $4;
+       }
+       | PROPERTY STRING '.' STRING '=' scalar {
+               Translation_property *t = new Translation_property;
+               t-> translator_type_str_ = *$2;
+               t-> var_str_ = *$4;
+               t-> value_ = *$6;
+               $$ = t;
+               delete $2;
+               delete $4;
+               delete $6;
+       }
+       ;
+
+scalar:
+       STRING          { $$ = new Scalar (*$1); delete $1; }
+       | int           { $$ = new Scalar ($1); }
+       ;
+
+
 Chord:
        '<' Chord_body '>'      { $$  = $2; }
        ;
@@ -589,21 +624,15 @@ Chord_body:
        | Chord_body MULTI INT ';' {
                $$->multi_level_i_=$3;
        }
-       | Chord_body ID STRING STRING ';'       {
-               $$->type_str_ = *$3;
-               $$->id_str_ = *$4;
-               delete $4;
-               delete $3;
-       }
        | Chord_body Music {
-               $$->add($2);
+               $$->add ($2);
        }
        ;
 
 transposed_music:
        TRANSPOSE steno_melodic_req Music {
                $$ = $3;
-               $$ -> transpose($2);
+               $$ -> transpose ($2);
                delete $2;
        }
        ;
@@ -614,7 +643,7 @@ transposed_music:
 */
 full_element:
        pre_requests simple_element post_requests       {
-               THIS->add_requests((Chord*)$2);//ugh
+               THIS->add_requests ((Chord*)$2);//ugh
                $$ = $2;
        }
        | command_elt
@@ -629,9 +658,9 @@ simple_element:
 command_elt:
        command_req {
                $$ = new Request_chord;
-               $$-> set_spot( THIS->here_input());
-               $1-> set_spot( THIS->here_input());
-               ((Chord*)$$) ->add($1);//ugh
+               $$-> set_spot (THIS->here_input ());
+               $1-> set_spot (THIS->here_input ());
+               ((Chord*)$$) ->add ($1);//ugh
 
        }
        ;
@@ -646,30 +675,24 @@ abbrev_command_req:
                $$ = new Barcheck_req;
        }
        | COMMAND_IDENTIFIER    {
-               $$ = $1->request();
+               $$ = $1->request ();
        }
        ;
 
 verbose_command_req:
        BAR STRING                      {
-               $$ = new Bar_req(*$2);
+               $$ = new Bar_req (*$2);
                delete $2;
        }
        | METER int '/' int     {
                Meter_change_req *m = new Meter_change_req;
-               m->set($2,$4);
-               // sorry hw, i need meter at output of track,
-               // but don-t know where to get it... statics should go.
-               // HW : default: 4/4, meterchange reqs may change it.
-
-               Midi_def::num_i_s = $2;
-               Midi_def::den_i_s = $4;
+               m->set ($2,$4);
                $$ = m;
        }
        | SKIP duration_length {
                Skip_req * skip_p = new Skip_req;
-               skip_p->duration_.set_plet($2->numerator().as_long(),
-                       $2->denominator().as_long());
+               skip_p->duration_.set_plet ($2->numerator ().as_long (),
+                       $2->denominator ().as_long ());
 
                delete $2;
                $$ = skip_p;
@@ -678,20 +701,14 @@ verbose_command_req:
                $$ = $1;
        }
        | CADENZA int   {
-               $$ = new Cadenza_req($2);
+               $$ = new Cadenza_req ($2);
        }
        | PARTIAL duration_length       {
-               $$ = new Partial_measure_req(*$2);
+               $$ = new Partial_measure_req (*$2);
                delete $2;
        }
-       | STEM int      {
-               $$ = get_stemdir_req($2);
-       }
-       | HSHIFT int    {
-               $$ = get_hshift_req($2);
-       }
        | CLEF STRING {
-               $$ = new Clef_change_req(*$2);
+               $$ = new Clef_change_req (*$2);
                delete $2;
        }
        | KEY pitch_list        {
@@ -701,30 +718,35 @@ verbose_command_req:
                delete $2;
        }
        | GROUPING intastint_list {
-               $$ = get_grouping_req(*$2); delete $2;
+               $$ = get_grouping_req (*$2); delete $2;
        }
        ;
 
 post_requests:
        {
-               assert(THIS->post_reqs.empty());
+               assert (THIS->post_reqs.empty ());
        }
        | post_requests post_request {
-               $2->set_spot( THIS->here_input());
-               THIS->post_reqs.push($2);
+               $2->set_spot (THIS->here_input ());
+               THIS->post_reqs.push ($2);
        }
        ;
 
 
 post_request:
        POST_REQUEST_IDENTIFIER {
-               $$ = (Request*)$1->request();
+               $$ = (Request*)$1->request ();
        }
        |close_request_parens   {
-               $$ = THIS->get_parens_request($1);
+               $$ = THIS->get_parens_request ($1);
        }
        | script_req
        | dynamic_req
+       | abbrev_type   {
+               Abbreviation_req* a = new Abbreviation_req;
+               a->type_i_ = $1;
+               $$ = a;
+       }
        ;
 
 
@@ -734,7 +756,7 @@ post_request:
 */
 steno_melodic_req:
        NOTENAME_ID     {
-               $$ = $1->clone()->musical()->melodic();
+               $$ = $1->clone ()->musical ()->melodic ();
                $$->octave_i_ += THIS->default_octave_i_;
        }
        | steno_melodic_req POST_QUOTES         {
@@ -863,7 +885,7 @@ script_definition:
 script_body:
        STRING int int int int int              {
                Script_def *s = new Script_def;
-               s->set_from_input(*$1,$2, $3,$4,$5, $6);
+               s->set_from_input (*$1,$2, $3,$4,$5, $6);
                $$  = s;
                delete $1;
        }
@@ -874,7 +896,7 @@ script_req:
                Musical_script_req *m = new Musical_script_req;
                $$ = m;
                m-> scriptdef_p_ = $2;
-               m-> set_spot ( THIS->here_input() );
+               m-> set_spot (THIS->here_input ());
                m-> dir_  = $1;
        }
        ;
@@ -882,7 +904,7 @@ script_req:
 gen_script_def:
        text_def        { $$ = $1; }
        | mudela_script { $$ = $1;
-               $$-> set_spot( THIS->here_input() );
+               $$-> set_spot (THIS->here_input ());
        }
        ;
 
@@ -893,27 +915,27 @@ text_def:
                t->text_str_ = *$1;
                delete $1;
                t->style_str_ = THIS->textstyle_str_;
-               $$->set_spot( THIS->here_input() );
+               $$->set_spot (THIS->here_input ());
        }
        ;
 
 script_abbreviation:
-       '^'             { $$ = get_scriptdef('^'); }
-       | '+'           { $$ = get_scriptdef('+'); }
-       | '-'           { $$ = get_scriptdef('-'); }
-       | '|'           { $$ = get_scriptdef('|'); }
-       | 'o'           { $$ = get_scriptdef('o'); }
-       | '>'           { $$ = get_scriptdef('>'); }
+       '^'             { $$ = get_scriptdef ('^'); }
+       | '+'           { $$ = get_scriptdef ('+'); }
+       | '-'           { $$ = get_scriptdef ('-'); }
+       | '|'           { $$ = get_scriptdef ('|'); }
+       | 'o'           { $$ = get_scriptdef ('o'); }
+       | '>'           { $$ = get_scriptdef ('>'); }
        | '.'           {
-               $$ = get_scriptdef('.');
+               $$ = get_scriptdef ('.');
        }
        ;
 
 mudela_script:
-       SCRIPT_IDENTIFIER               { $$ = $1->script(); }
+       SCRIPT_IDENTIFIER               { $$ = $1->script (); }
        | script_definition             { $$ = $1; }
        | script_abbreviation           {
-               $$ = THIS->lexer_p_->lookup_identifier(*$1)->script();
+               $$ = THIS->lexer_p_->lookup_identifier (*$1)->script ();
                delete $1;
        }
        ;
@@ -926,27 +948,27 @@ script_dir:
 
 pre_requests:
        | pre_requests pre_request {
-               THIS->pre_reqs.push($2);
-               $2->set_spot( THIS->here_input());
+               THIS->pre_reqs.push ($2);
+               $2->set_spot (THIS->here_input ());
        }
        ;
 
 pre_request:
        open_request_parens     {
-               $$ = THIS->get_parens_request($1);
+               $$ = THIS->get_parens_request ($1);
        }
        ;
 
 voice_command:
        PLET     INT '/' INT {
-               THIS->default_duration_.set_plet($2,$4);
+               THIS->default_duration_.set_plet ($2,$4);
        }
        | DURATION STRING {
-               THIS->set_duration_mode(*$2);
+               THIS->set_duration_mode (*$2);
                delete $2;
        }
        | DURATION entered_notemode_duration {
-               THIS->set_default_duration($2);
+               THIS->set_default_duration ($2);
                delete $2;
        }
        | OCTAVE {
@@ -971,10 +993,10 @@ voice_command:
 
 duration_length:
        {
-               $$ = new Moment(0,1);
+               $$ = new Moment (0,1);
        }
        | duration_length explicit_steno_duration               {
-               *$$ += $2->length();
+               *$$ += $2->length ();
        }
        ;
 
@@ -985,14 +1007,14 @@ dots:
 
 entered_notemode_duration:
        /* */           {
-               $$ = new Duration(THIS->default_duration_);
+               $$ = new Duration (THIS->default_duration_);
        }
        | dots          {
-               $$ = new Duration(THIS->default_duration_);
+               $$ = new Duration (THIS->default_duration_);
                $$->dots_i_  = $1;
        }
        | explicit_steno_duration       {
-               THIS->set_last_duration($1);
+               THIS->set_last_duration ($1);
                $$ = $1;
        }
        ;
@@ -1008,14 +1030,14 @@ notemode_duration:
 explicit_steno_duration:
        int             {
                $$ = new Duration;
-               if ( !Duration::duration_type_b($1) )
-                       THIS->parser_error("Not a duration");
+               if (!Duration::duration_type_b ($1))
+                       THIS->parser_error ("Not a duration");
                else {
-                       $$->durlog_i_ = Duration_convert::i2_type($1);
+                       $$->durlog_i_ = Duration_convert::i2_type ($1);
                     }
        }
        | DURATION_IDENTIFIER   {
-               $$ = $1->duration();
+               $$ = $1->duration ();
        }
        | explicit_steno_duration '.'   {
                $$->dots_i_ ++;
@@ -1030,11 +1052,7 @@ explicit_steno_duration:
 
 
 abbrev_type: 
-       /* */
-               {
-               $$ = THIS->default_abbrev_type_i_;
-       }
-       | ':' int {
+       ':' int {
                if (!Duration::duration_type_b ($2))
                        THIS->parser_error ("Not a duration");
                else if ($2 < 8)
@@ -1046,21 +1064,15 @@ abbrev_type:
        ;
 
 music_elt:
-       steno_note_req notemode_duration abbrev_type {
+       steno_note_req notemode_duration  {
                if (!THIS->lexer_p_->note_state_b ())
                        THIS->parser_error ("have to be in Note mode for notes");
                $1->set_duration (*$2);
                int durlog_i = $2->durlog_i_;
-               Chord* c = THIS->get_note_element ($1, $2);
-               $$ = c;
-               if ($3) {
-                       Abbreviation_req* a = new Abbreviation_req;
-                       a->type_i_ = $3;
-                       c->add (a);
-               }
+               $$ = THIS->get_note_element ($1, $2);
        }
        | RESTNAME notemode_duration            {
-               $$ = THIS->get_rest_element(*$1, $2);
+               $$ = THIS->get_rest_element (*$1, $2);
                delete $1;
        }
        ;
@@ -1068,9 +1080,9 @@ music_elt:
 lyrics_elt:
        text_def notemode_duration                      {
        /* this sux! text-def should be feature of lyric-engraver. */
-               if (!THIS->lexer_p_->lyric_state_b())
-                       THIS->parser_error("Have to be in Lyric mode for lyrics");
-               $$ = THIS->get_word_element($1, $2);
+               if (!THIS->lexer_p_->lyric_state_b ())
+                       THIS->parser_error ("Have to be in Lyric mode for lyrics");
+               $$ = THIS->get_word_element ($1, $2);
 
        };
 
@@ -1081,7 +1093,7 @@ pitch_list:                       {
                $$ = new Array<Melodic_req*>;
        }
        | pitch_list NOTENAME_ID        {
-               $$->push($2->clone()->musical()->melodic());
+               $$->push ($2->clone ()->musical ()->melodic ());
        }
        ;
 
@@ -1090,7 +1102,7 @@ int:
                $$ = $1;
        }
        | INT_IDENTIFIER        {
-               int *i_p = $1->intid();
+               int *i_p = $1->intid ();
                $$ = *i_p;
                delete i_p;
        }
@@ -1102,7 +1114,7 @@ real:
                $$ = $1;
        }
        | REAL_IDENTIFIER               {
-               Real *r_p = $1->real();
+               Real *r_p = $1->real ();
                $$ = * r_p;
                delete r_p;
        }
@@ -1133,14 +1145,14 @@ symtables_body:
                $$ = new Lookup;
        }
        | IDENTIFIER            {
-               $$ = $1->lookup();
+               $$ = $1->lookup ();
        }
        | symtables_body TEXID STRING           {
                $$->texsetting = *$3;
                delete $3;
        }
        | symtables_body STRING '=' symtable            {
-               $$->add(*$2, $4);
+               $$->add (*$2, $4);
                delete $2;
        }
        ;
@@ -1152,7 +1164,7 @@ symtable:
 symtable_body:
                                { $$ = new Symtable; }
        | symtable_body STRING  symboldef {
-               $$->add(*$2, *$3);
+               $$->add (*$2, *$3);
                delete $2;
                delete $3;
        }
@@ -1160,56 +1172,56 @@ symtable_body:
 
 symboldef:
        STRING  box             {
-               $$ = new Symbol(*$1, *$2);
+               $$ = new Symbol (*$1, *$2);
                delete $1;
                delete $2;
        }
        | STRING {
-               Box b(Interval(0,0), Interval(0,0));
-               $$ = new Symbol(*$1, b);
+               Box b (Interval (0,0), Interval (0,0));
+               $$ = new Symbol (*$1, b);
                delete $1;
        }
        ;
 
 box:
        dinterval dinterval     {
-               $$ = new Box(*$1, *$2);
+               $$ = new Box (*$1, *$2);
                delete $1;
                delete $2;
        }
        ;
 
 dinterval: dim dim             {
-               $$ = new Interval($1, $2);
+               $$ = new Interval ($1, $2);
        }
        ;
 
 %%
 
 void
-My_lily_parser::set_yydebug(bool b )
+My_lily_parser::set_yydebug (bool b)
 {
 #ifdef YYDEBUG
        yydebug = b;
 #endif
 }
 void
-My_lily_parser::do_yyparse()
+My_lily_parser::do_yyparse ()
 {
-       yyparse((void*)this);
+       yyparse ((void*)this);
 }
 
 Paper_def*
-My_lily_parser::default_paper()
+My_lily_parser::default_paper ()
 {
-       Identifier *id = lexer_p_->lookup_identifier( "default_paper" );
-       return id ? id->paperdef() : new Paper_def ;
+       Identifier *id = lexer_p_->lookup_identifier ("default_paper");
+       return id ? id->paperdef () : new Paper_def ;
 }
 
 Midi_def*
-My_lily_parser::default_midi()
+My_lily_parser::default_midi ()
 {
-       Identifier *id = lexer_p_->lookup_identifier( "default_midi" );
-       return id ? id->mididef() : new Midi_def ;
+       Identifier *id = lexer_p_->lookup_identifier ("default_midi");
+       return id ? id->mididef () : new Midi_def ;
 }
 
index ae1e93dd6fc595a68f7ed7e8a4055c9adc6d644b..525b6202fcec0583147eb23c755d8d42bbc70018 100644 (file)
@@ -8,168 +8,9 @@
  */
 
 #include "performer-group-performer.hh"
-#include "input-translator.hh"
-#include "debug.hh"
-
-IMPLEMENT_IS_TYPE_B2(Performer_group_performer,Performer, Translator);
-ADD_THIS_PERFORMER(Performer_group_performer);
-
-Performer_group_performer::~Performer_group_performer()
-{
-
-}
-
-void
-Performer_group_performer::add (Performer *perf_p)
-{
-  perf_p_list_.bottom().add (perf_p);
-  perf_p->daddy_perf_l_ = this;
-
-  if (perf_p->is_type_b (Performer_group_performer::static_name())) 
-    {
-       group_l_arr_.push ((Performer_group_performer*)perf_p);
-    }
-  else 
-    {
-       nongroup_l_arr_ .push (perf_p);
-    }
-}
-
-Translator*
-Performer_group_performer::ancestor_l (int l)
-{
-  if (!l || !daddy_perf_l_)
-       return this;
-  
-  return daddy_perf_l_->ancestor_l (l - 1);
-}
-
-int
-Performer_group_performer::depth_i() const
-{
-  return daddy_perf_l_->depth_i() + 1;
-}
-
-void
-Performer_group_performer::do_creation_processing()
-{
-  for (PCursor<Performer*> i (perf_p_list_.top()); i.ok (); i++)
-       i->creation_processing();
-}
-
-void
-Performer_group_performer::do_print() const
-{
-#ifndef NPRINT
-  if (!check_debug)
-       return ;
-  for (PCursor<Performer*> i (perf_p_list_.top()); i.ok (); i++)
-       i->print();
-#endif
-}
 
-void
-Performer_group_performer::do_removal_processing()
-{
-  for (PCursor<Performer*> i (perf_p_list_.top()); i.ok (); i++)
-       i->do_removal_processing();
-}
-
-bool
-Performer_group_performer::do_try_request (Request* req_l)
-{
-  bool hebbes_b =false;
-  for (int i =0; !hebbes_b && i < nongroup_l_arr_.size() ; i++)
-       hebbes_b =nongroup_l_arr_[i]->try_request (req_l);
-  if (!hebbes_b && daddy_perf_l_)
-       hebbes_b = daddy_perf_l_->try_request (req_l);
-  return hebbes_b ;
-}
-
-Translator*
-Performer_group_performer::find_get_translator_l (String n,String id)
-{
-  Translator * ret=0;
-  Input_translator* itrans_l= itrans_l_-> recursive_find (n);
-  if (itrans_l) 
-    {
-       ret = find_performer_l (n,id);
-       if (!ret) 
-         {
-           Performer_group_performer * group = 
-               itrans_l-> get_group_performer_p();
-           
-           add (group);
-           ret = group;
-           
-           if (group->itrans_l_->is_name_b (n))
-               ret ->id_str_ = id;
-           else
-               return ret->find_get_translator_l (n,id);
-
-         }
-    }
-  else if (daddy_perf_l_)
-       ret =daddy_perf_l_->find_get_translator_l (n,id);
-  else 
-    {
-       warning ("Can't find or create `" + n + "' called `" + id + "'\n");
-       ret =0;
-    }
-  return ret;
-}
-
-Performer_group_performer*
-Performer_group_performer::find_performer_l (String n, String id)
-{
-  if (name() == n && id_str_ == id)
-       return this;
-  Performer_group_performer * r = 0;
-  for (int i =0; !r && i<  group_l_arr_.size(); i++) 
-    {
-       r = group_l_arr_[i]->find_performer_l (n,id);
-    }
-  
-  return r;
-}
-
-Translator*
-Performer_group_performer::get_default_interpreter()
-{
-  // ? 
-  if (is_bottom_performer_b())
-       return daddy_perf_l_->get_default_interpreter();
-
-  Performer_group_performer *perf_p= itrans_l_->
-       get_default_itrans_l()->get_group_performer_p ();
-  add (perf_p);
-  if (perf_p->is_bottom_performer_b())
-       return perf_p;
-  else
-       return perf_p->get_default_interpreter();
-}
-
-bool
-Performer_group_performer::is_bottom_performer_b() const
-{
-  return !itrans_l_->get_default_itrans_l();
-}
-
-void
-Performer_group_performer::print() const 
-{ 
-  Performer::print();
-}
+#include "debug.hh"
 
-void
-Performer_group_performer::process_requests()
-{
-  for (PCursor<Performer*> i (perf_p_list_.top()); i.ok (); i++)
-       i->process_requests();
-}
+IMPLEMENT_IS_TYPE_B2(Performer_group_performer,Performer, Translator_group);
+ADD_THIS_TRANSLATOR(Performer_group_performer);
 
-bool 
-Performer_group_performer::try_request (Request* r)
-{
-  return Performer::try_request (r); 
-}
index ed72f2a2cee5f948f4f8dc00bb328189ad6d08d5..5775f157eb4133230dbe0a73a96cb34e97ccaf48 100644 (file)
 #include "debug.hh"
 
 
-IMPLEMENT_IS_TYPE_B(Performer);
+IMPLEMENT_IS_TYPE_B1(Performer, Translator);
 
 Performer::Performer()
-{
-  daddy_perf_l_ = 0;
-  init_b_ =false;
-}
-
-Performer::~Performer()
-{
-}
-
-void
-Performer::do_print() const
 {
 }
 
 void 
 Performer::play (Audio_element* p) 
 { 
-  daddy_perf_l_->play (p); 
+  daddy_perf_l ()->play (p); 
 }
 
 int
 Performer::get_tempo_i() const
 {
-  return daddy_perf_l_->get_tempo_i();
-}
-
-void
-Performer::print() const
-{
-#ifndef NPRINT
-  DOUT << "\n" << name() << " {";
-  do_print();
-  DOUT << "}";
-#endif
-}
-
-void
-Performer::process_requests()
-{
-}
-
-bool 
-Performer::do_try_request (Request* req_l)
-{
-  return false;
-}
-
-bool
-Performer::try_request (Request*r)
-{
-  if (!init_b_) 
-    {
-       creation_processing();
-    }
-  return do_try_request (r);
-}
-
-void
-Performer::creation_processing()
-{
-  if (!init_b_) 
-    {
-       do_creation_processing();
-       init_b_ = true;
-    }
-}
-
-void
-Performer::do_creation_processing()
-{
+  return daddy_perf_l ()->get_tempo_i();
 }
 
-void
-Performer::do_removal_processing()
+Performer_group_performer*
+Performer::daddy_perf_l () const
 {
+  return (daddy_trans_l_) 
+    ?(Performer_group_performer*) daddy_trans_l_->performer_l ()
+    : 0;
 }
diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc
new file mode 100644 (file)
index 0000000..7fbab5f
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  property-iterator.cc -- implement Property_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "property-iterator.hh"
+#include "translation-property.hh"
+#include "translator-group.hh"
+
+Property_iterator::Property_iterator (Translation_property *prop_l)
+{
+  property_l_ = prop_l;
+}
+
+void
+Property_iterator::process_and_next (Moment m)
+{
+  if (property_l_->var_str_)
+    report_to_l ()->set_property (property_l_->var_str_, property_l_->value_);
+  Music_iterator::process_and_next (m);
+}
+
+IMPLEMENT_IS_TYPE_B1(Property_iterator, Music_iterator);
index b7f9eee739c0cd195b4fc40645174e301ccd8e56..7a99cc639ff18693f767014595fc1ffc59d72d74 100644 (file)
@@ -34,20 +34,20 @@ Vector
 Mixed_qp::solve (Vector start) const 
 {
   if (!dim())
-       return Vector (0);
+    return Vector (0);
   
   print();
   Ineq_constrained_qp pure (*this);
   
   for  (int i= eq_cons.size()-1; i>=0; i--) 
     {
-       pure.eliminate_var (eq_cons[i], eq_consrhs[i]);
-       start.del (eq_cons[i]);
+      pure.eliminate_var (eq_cons[i], eq_consrhs[i]);
+      start.del (eq_cons[i]);
     }
   Vector sol = pure.solve (start);
   for (int i= 0; i < eq_cons.size(); i++) 
     {
-       sol.insert (eq_consrhs[i],eq_cons[i]);
+      sol.insert (eq_consrhs[i],eq_cons[i]);
     }
   return sol;
 }
@@ -59,10 +59,10 @@ Ineq_constrained_qp::assert_solution (Vector sol) const
   Array<int> binding;
   for (int i=0; i < cons.size(); i++) 
     {
-       Real R=cons[i] * sol- consrhs[i];
-       assert (R> -EPS);
-       if (R < EPS)
-           binding.push (i);
+      Real R=cons[i] * sol- consrhs[i];
+      assert (R> -EPS);
+      if (R < EPS)
+       binding.push (i);
     }
   // KKT check...
   // todo
@@ -74,11 +74,11 @@ Ineq_constrained_qp::print() const
 #ifndef NPRINT
   DOUT << "Quad " << quad;
   DOUT << "lin " << lin <<"\n"
-       << "const " << const_term<<"\n";
+       << "const " << const_term<<"\n";
   for (int i=0; i < cons.size(); i++) 
     {
-       DOUT << "constraint["<<i<<"]: " << cons[i] << " >= " << consrhs[i];
-       DOUT << "\n";
+      DOUT << "constraint["<<i<<"]: " << cons[i] << " >= " << consrhs[i];
+      DOUT << "\n";
     }
 #endif
 }
@@ -104,7 +104,7 @@ Mixed_qp::print() const
   Ineq_constrained_qp::print();
   for (int i=0; i < eq_cons.size(); i++) 
     {
-       DOUT << "eq cons "<<i<<": x["<<eq_cons[i]<<"] == " << eq_consrhs[i]<<"\n";
+      DOUT << "eq cons "<<i<<": x["<<eq_cons[i]<<"] == " << eq_consrhs[i]<<"\n";
     }
 #endif
 }
index d2ffad85d43115d539fdd57dd7b96905bb360e84..b863a63f67069a991dabff491f912f7b72cd7362 100644 (file)
@@ -22,13 +22,13 @@ Active_constraints::status() const
   String s ("Active|Inactive [");
   for (int i=0; i< active.size(); i++) 
     {
-       s += String (active[i]) + " ";
+      s += String (active[i]) + " ";
     }
 
   s+="| ";
   for (int i=0; i< inactive.size(); i++) 
     {
-       s += String (inactive[i]) + " ";
+      s += String (inactive[i]) + " ";
     }
   s+="]";
 
@@ -47,19 +47,19 @@ Active_constraints::OK()
   Array<int> allcons;
 
   for (int i=0; i < opt->cons.size(); i++)
-       allcons.push (0);
+    allcons.push (0);
   for (int i=0; i < active.size(); i++) 
     {
-       int j = active[i];
-       allcons[j]++;
+      int j = active[i];
+      allcons[j]++;
     }
   for (int i=0; i < inactive.size(); i++) 
     {
-       int j = inactive[i];
-       allcons[j]++;
+      int j = inactive[i];
+      allcons[j]++;
     }
   for (int i=0; i < allcons.size(); i++)
-       assert (allcons[i] == 1);
+    assert (allcons[i] == 1);
 #endif
 }
 
@@ -86,24 +86,24 @@ Active_constraints::add (int k)
   Vector addrow (Ha.dim());
   if (abs (aHa) > EPS) 
     {
-       /*
-         a != 0, so if Ha = O(EPS), then
-         Ha * aH / aHa = O(EPS^2/EPS)
+      /*
+       a != 0, so if Ha = O(EPS), then
+       Ha * aH / aHa = O(EPS^2/EPS)
 
-         if H*a == 0, the constraints are dependent.
+       if H*a == 0, the constraints are dependent.
          */
-       H -= Matrix (Ha/aHa , Ha);
+      H -= Matrix (Ha/aHa , Ha);
   
 
-       /*
+      /*
          sorry, don't know how to justify this. ..
          */
-       addrow=Ha;
+      addrow=Ha;
       addrow/= aHa;
-       A -= Matrix (A*a, addrow);
-       A.insert_row (addrow,A.rows());
-  }else
-       WARN << "degenerate constraints";
+      A -= Matrix (A*a, addrow);
+      A.insert_row (addrow,A.rows());
+    }else
+      WARN << "degenerate constraints";
 }
 
 void
@@ -111,7 +111,7 @@ Active_constraints::drop (int k)
 {
   int q=active.size()-1;
 
-      // drop indices
+  // drop indices
   inactive.push (active[k]);
   active.swap (k,q);
   A.swap_rows (k,q);
@@ -120,15 +120,15 @@ Active_constraints::drop (int k)
   Vector a (A.row (q));
   if (a.norm() > EPS) 
     {
-       /*
+      /*
         
-        */
+       */
       Real q = a*opt->quad*a;
-       Matrix aaq (a,a/q);
-       H += aaq;
-       A -= A*opt->quad*aaq;
-  }else
-       WARN << "degenerate constraints";
+      Matrix aaq (a,a/q);
+      H += aaq;
+      A -= A*opt->quad*aaq;
+    }else
+      WARN << "degenerate constraints";
 #ifndef NDEBUG
   Vector rem_row (A.row (q));
   assert (rem_row.norm() < EPS);
@@ -140,16 +140,16 @@ Active_constraints::drop (int k)
 
 Active_constraints::Active_constraints (Ineq_constrained_qp const *op)
   :       A(0,op->dim()),
-           H(op->dim()),
-           opt (op)
+         H(op->dim()),
+         opt (op)
 {
   for (int i=0; i < op->cons.size(); i++)
-       inactive.push (i);
+    inactive.push (i);
   Choleski_decomposition chol (op->quad);
 
   /*
     ugh.
-   */
+    */
   H=chol.inverse();
   OK();
 }
index 82093173e8eb019cebb30e1214cebaacdf548d45..f9cf8f0046289573330c1c007ac904cea562c5f0 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#include "translator.hh"
+#include "translator-group.hh"
 #include "debug.hh"
 #include "request-iterator.hh"
 #include "music-list.hh"
index fbd6d0ba5ed99ad04049b9750a8158ad51d7d228..7a41c7ab45c4b8152562cadd265466475c79286a 100644 (file)
 
 
 IMPLEMENT_IS_TYPE_B1(Rest_collision_engraver, Engraver);
-ADD_THIS_ENGRAVER(Rest_collision_engraver);
+ADD_THIS_TRANSLATOR(Rest_collision_engraver);
 
 Rest_collision_engraver::Rest_collision_engraver()
 {
   rest_collision_p_ =0;
 }
 
-void
-Rest_collision_engraver::make_collision()
-{
-  if (!rest_collision_p_) 
-    {
-           rest_collision_p_ = new Rest_collision;
-           announce_element (Score_elem_info (rest_collision_p_, 0));
-    }
-}
 void
 Rest_collision_engraver::acknowledge_element (Score_elem_info i)
 {
-  char const * nC = i.elem_l_->name();
-  if (nC == Note_column::static_name()) 
+  if (i.elem_l_->name()== Note_column::static_name()) 
     {
-       // what should i do, what should _engraver do?
-       make_collision();
-       rest_collision_p_->add ((Note_column*)i.elem_l_->item());
-    }
-  else if (nC == Rest_column::static_name()) 
-    {
-       make_collision();
-       rest_collision_p_->add ((Rest_column*)i.elem_l_->item());
+      // what should i do, what should _engraver do?
+      if (!rest_collision_p_) 
+       {
+         rest_collision_p_ = new Rest_collision;
+         announce_element (Score_elem_info (rest_collision_p_, 0));
+       }
+      rest_collision_p_->add ((Note_column*)i.elem_l_->item());
     }
 }
 
@@ -53,16 +42,7 @@ Rest_collision_engraver::do_pre_move_processing()
 {
   if (rest_collision_p_) 
     {
-       typeset_element (rest_collision_p_);
-       rest_collision_p_ = 0;
+      typeset_element (rest_collision_p_);
+      rest_collision_p_ = 0;
     }
 }
-
-void
-Rest_collision_engraver::do_print() const
-{
-#ifndef NPRINT
-  if (rest_collision_p_)
-       rest_collision_p_->print();
-#endif
-}
index 3e66ec751300ef138689e08880c616324f6d2ce0..54392d55858bd8858326d2f1a36276d8c027681f 100644 (file)
@@ -22,14 +22,10 @@ void
 Rest_collision::add (Note_column *nc_l)
 {
   add_dependency (nc_l);
-  ncol_l_arr_.push (nc_l);
-}
-
-void
-Rest_collision::add (Rest_column *rc_l)
-{
-  add_dependency (rc_l);
-  rest_l_arr_.push (rc_l);
+  if (nc_l->rest_b ())
+    rest_l_arr_.push (nc_l);
+  else
+    ncol_l_arr_.push (nc_l);
 }
 
 void
@@ -51,10 +47,10 @@ Rest_collision::do_post_processing()
   // can this happen?
   Stem* stem_l = rest_l_arr_[0]->stem_l_;
   if (!stem_l)
-       return;
+    return;
   // no beam
   if (!(stem_l->beams_left_i_ || stem_l->beams_right_i_))
-       return;
+    return;
 
   int dir_i = rest_l_arr_[0]->dir_;
   int midpos = 4;
@@ -66,66 +62,66 @@ Rest_collision::do_post_processing()
 #else // nogo: stem_start not set for rests?
   int pos = (stem_l->stem_start_f() - midpos) + dir_i * 2;
 #endif
-  rest_l_arr_[0]->translate_heads (pos);       
+  rest_l_arr_[0]->translate_rests (pos);       
 }
 
 void
 Rest_collision::do_pre_processing()
 {
   /* 
-    handle rest-rest and rest-note collisions
+     handle rest-rest and rest-note collisions
 
-    [todo]
-    decide not to print rest if too crowded?
+     [todo]
+     decide not to print rest if too crowded?
    */
 
   // no rests to collide
   if (!rest_l_arr_.size())
-       return;
+    return;
 
   // no partners to collide with
   if (rest_l_arr_.size() + ncol_l_arr_.size () < 2)
-       return;
+    return;
 
   // meisjes met meisjes
   if (!ncol_l_arr_.size()) 
     {
-       int dy = rest_l_arr_.size() > 2 ? 6 : 4;
+      int dy = rest_l_arr_.size() > 2 ? 6 : 4;
        
-       rest_l_arr_[0]->translate_heads (rest_l_arr_[0]->dir_ *dy);     
-       // top is last element...
-       rest_l_arr_.top()->translate_heads (rest_l_arr_.top ()->dir_* dy);      
+      rest_l_arr_[0]->translate_rests (rest_l_arr_[0]->dir_ *dy);      
+      // top is last element...
+      rest_l_arr_.top()->translate_rests (rest_l_arr_.top ()->dir_* dy);       
     }
   // meisjes met jongetjes
   else 
     {
 #if 0 // breendet: rests go always under
-       // geen gemug, trug op je rug
-       int dir_i = -1;
-       rest_l_arr_[0]->translate_heads (dir_i * 3);    
+      // geen gemug, trug op je rug
+      int dir_i = -1;
+      rest_l_arr_[0]->translate_rests (dir_i * 3);     
 #else
-       // int dir_i = - ncol_l_arr_[0]->dir_;
-       int dir_i = rest_l_arr_[0]->dir_;
-       // hope it's 4: if it works->doco
-       int midpos = 4;
+      // int dir_i = - ncol_l_arr_[0]->dir_;
+      int dir_i = rest_l_arr_[0]->dir_;
+      // hope it's 4: if it works->doco
+      int midpos = 4;
        
       // minimum move
-       int minpos = 4;
+      int minpos = 4;
        
-       // quart rest height
-       // UGH Should get dims from table!
-       int size_i = 6;
+      // quart rest height
+      // UGH Should get dims from table!
+      int size_i = 6;
        
-       int sep_i = 3 + size_i / 2;
-       for (int i = 0; i < ncol_l_arr_.size(); i++) 
-         {
-           // how to know whether to sort?
-           ncol_l_arr_[i]->sort();
-           for (int j = 0; j < ncol_l_arr_[i]->head_l_arr_.size(); j++)
-               minpos = minpos >? dir_i * 
-                   (ncol_l_arr_[i]->head_l_arr_[j]->position_i_ -midpos) + sep_i;
-         }
-       rest_l_arr_[0]->translate_heads (dir_i * minpos);       
+      int sep_i = 3 + size_i / 2;
+      for (int i = 0; i < ncol_l_arr_.size(); i++) 
+       {
+         // how to know whether to sort?
+         ncol_l_arr_[i]->sort();
+         for (int j = 0; j < ncol_l_arr_[i]->head_l_arr_.size(); j++)
+           minpos = minpos >? dir_i * 
+             (ncol_l_arr_[i]->head_l_arr_[j]->position_i_ -midpos) + sep_i;
+       }
+      rest_l_arr_[0]->translate_rests (dir_i * minpos);        
 #endif
     }
 }
@@ -143,10 +139,14 @@ void
 Rest_collision::do_substitute_dependency (Score_elem*o,Score_elem*n)
 {
   Item*o_l = o->item();
-  Item*n_l = n?n->item():0;
   
-  rest_l_arr_.substitute ((Rest_column*)o_l,(Rest_column*)n_l);
-  ncol_l_arr_.substitute ((Note_column*)o_l,(Note_column*)n_l);
+
+  if (o_l&&o_l->is_type_b (Note_column::static_name ()))
+    {
+      Note_column *n_l = n?(Note_column*)n->item():0;
+      rest_l_arr_.substitute ((Note_column*)o_l, n_l);
+      ncol_l_arr_.substitute ((Note_column*)o_l, n_l);
+    }
 }
 
 Rest_collision::Rest_collision()
diff --git a/lily/rest-column.cc b/lily/rest-column.cc
deleted file mode 100644 (file)
index 0c7260e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  rest-column.cc -- implement Rest_column
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "debug.hh"
-#include "rest-column.hh"
-#include "note-head.hh"
-#include "rest-column.hh"
-#include "stem.hh"
-
-
-IMPLEMENT_IS_TYPE_B1(Rest_column,Head_column);
-
-
-/**
-  translate the rest symbols
- */
-void
-Rest_column::translate_heads (int dy_i)
-{
-  for (int i=0; i < head_l_arr_.size(); i++)
-       head_l_arr_[i]->position_i_ += dy_i;
-}
-
diff --git a/lily/rest-grav.cc b/lily/rest-grav.cc
new file mode 100644 (file)
index 0000000..762cbd6
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+  rest-grav.cc -- implement Rest_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "rest-grav.hh"
+#include "musical-request.hh"
+#include "dots.hh"
+#include "rest.hh"
+/*
+  Should merge with Note_head_engraver
+ */
+Rest_engraver::Rest_engraver ()
+{
+  rest_req_l_ =0;
+  rest_p_ =0;
+  dot_p_ =0;
+}
+
+void
+Rest_engraver::do_post_move_processing ()
+{
+  rest_req_l_ =0;
+}
+
+void
+Rest_engraver::do_pre_move_processing ()
+{
+  if (rest_p_)
+    {
+      typeset_element (rest_p_);
+      rest_p_ =0;
+    }
+  if (dot_p_)
+    {
+      typeset_element (dot_p_);
+      dot_p_ =0;
+    }    
+}
+
+void
+Rest_engraver::do_process_requests ()
+{
+  if (rest_req_l_ && !rest_p_) 
+    {
+      rest_p_ = new Rest;
+      rest_p_->balltype_i_ = rest_req_l_->duration_.durlog_i_; 
+      rest_p_->dots_i_ = rest_req_l_->duration_.dots_i_;
+      if (rest_p_->dots_i_)
+       {
+         dot_p_ = new Dots;
+         rest_p_->dots_l_  =dot_p_;
+         announce_element (Score_elem_info (dot_p_,0));
+       }
+      announce_element (Score_elem_info (rest_p_, rest_req_l_));
+    }
+}
+
+bool
+Rest_engraver::do_try_request (Request *r)
+{
+  Musical_req *m = r->musical ();
+  if (!m || !m->rest ())
+    return false;
+
+  rest_req_l_ = m->rest ();    // ugh
+  return true;
+}
+
+IMPLEMENT_IS_TYPE_B1(Rest_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Rest_engraver);
diff --git a/lily/rest.cc b/lily/rest.cc
new file mode 100644 (file)
index 0000000..d2ccd2a
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+  rest.cc -- implement 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "molecule.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+#include "rest.hh"
+#include "dots.hh"
+#include "axis-group-element.hh"
+#include "p-score.hh"
+
+void
+Rest::do_add_processing ()
+{
+  if (balltype_i_ == 0)
+    position_i_ += 6;
+  else if (balltype_i_ == 1)
+    position_i_ += 4;
+  Rhythmic_head::do_add_processing ();
+  if (dots_l_)
+      dots_l_->position_i_ = position_i_;
+}
+
+Rest::Rest ()
+{
+  position_i_ =0;
+}
+
+Molecule *
+Rest::brew_molecule_p () const
+{
+  int staff_size_i_ =8;
+  bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
+  
+  Symbol s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
+  Molecule * m = new Molecule ( Atom (s));
+  m->translate (position_i_ *  paper ()->internote_f (), Y_AXIS);
+  return m;
+}
+
+IMPLEMENT_IS_TYPE_B1(Rest, Rhythmic_head);
diff --git a/lily/rhythmic-column-grav.cc b/lily/rhythmic-column-grav.cc
new file mode 100644 (file)
index 0000000..af3238c
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+  rhythmic-column-grav.cc -- implement Rhythmic_column_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "rhythmic-column-grav.hh"
+#include "note-head.hh"
+#include "stem.hh"
+#include "note-column.hh"
+#include "script.hh"
+#include "dot-column.hh"
+
+Rhythmic_column_engraver::Rhythmic_column_engraver()
+{
+  stem_l_ =0;
+  ncol_p_=0;
+  dotcol_p_ =0;
+}
+
+
+void
+Rhythmic_column_engraver::acknowledge_element (Score_elem_info i)
+{
+  if (i.elem_l_->is_type_b (Script::static_name ())
+      && i.req_l_ && i.req_l_->musical ()) 
+    {
+      script_l_arr_.push ((Script*)i.elem_l_->item());
+    }
+  else if (i.elem_l_->is_type_b (Stem::static_name()))
+    {
+      stem_l_ = (Stem*) i.elem_l_->item();
+    }
+  else if (i.elem_l_->is_type_b (Rhythmic_head::static_name ()))
+    {
+      Rhythmic_head * r = (Rhythmic_head*)i.elem_l_->item ();
+      if (!ncol_p_)
+       {
+         ncol_p_ = new Note_column;
+         announce_element (Score_elem_info (ncol_p_, 0));
+       }
+      ncol_p_->add (r);
+
+      if (r->dots_l_)
+       {
+         if (!dotcol_p_)
+           {
+             dotcol_p_ = new Dot_column;
+             ncol_p_->set (dotcol_p_);
+             announce_element (Score_elem_info (dotcol_p_, 0));
+           }
+         dotcol_p_->add (r);
+       }
+    }
+  
+  if (ncol_p_)
+    {
+      if (stem_l_&& !ncol_p_->stem_l_) 
+       ncol_p_->set (stem_l_);
+  
+      for (int i=0; i < script_l_arr_.size(); i++) 
+       {
+         if (ncol_p_)
+           ncol_p_->add (script_l_arr_[i]);
+       }
+  
+      script_l_arr_.clear();
+    }
+}
+
+void
+Rhythmic_column_engraver::do_pre_move_processing()
+{
+  if (ncol_p_) 
+    {
+      if (! ncol_p_->h_shift_b_)
+       ncol_p_->h_shift_b_  = (bool) get_property ("hshift");
+      if (! ncol_p_->dir_)
+       ncol_p_->dir_ =(Direction) int(get_property ("ydirection"));
+
+      typeset_element (ncol_p_);
+      ncol_p_ =0;
+    }
+  if (dotcol_p_)
+    {
+      typeset_element (dotcol_p_);
+      dotcol_p_ =0;
+    }
+}
+
+void
+Rhythmic_column_engraver::do_post_move_processing()
+{
+  script_l_arr_.clear();
+  stem_l_ =0;
+}
+
+
+
+
+IMPLEMENT_IS_TYPE_B1(Rhythmic_column_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Rhythmic_column_engraver);
diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc
new file mode 100644 (file)
index 0000000..616b8bf
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+  rhythmic-head.cc -- implement 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "rhythmic-head.hh"
+#include "debug.hh"
+#include "molecule.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+#include "rest.hh"
+#include "dots.hh"
+#include "axis-group-element.hh"
+#include "p-score.hh"
+
+void
+Rhythmic_head::do_add_processing ()
+{
+  if (dots_i_ && !dots_l_)
+    {
+      Dots *d = new Dots;
+      add (d);
+      pscore_l_->typeset_element (d);
+      axis_group_l_a_[Y_AXIS]->add_element (d);
+      axis_group_l_a_[X_AXIS]->add_element (d);
+    }
+  if (dots_l_)
+    {
+      dots_l_->no_dots_i_ = dots_i_;
+    }
+}
+
+void
+Rhythmic_head::add (Dots *dot_l)
+{
+  dots_l_ = dot_l;  
+  dot_l->add_dependency (this);  
+}
+
+
+Rhythmic_head::Rhythmic_head ()
+{
+  dots_l_ =0;
+  balltype_i_ =0;
+  dots_i_ = 0;
+}
+
+void
+Rhythmic_head::do_substitute_dependent (Score_elem*o,Score_elem*n)
+{
+  if (o == dots_l_)
+    dots_l_ = n ? (Dots*)n->item () :0;
+}
+
+IMPLEMENT_IS_TYPE_B1(Rhythmic_head, Item);
+void
+Rhythmic_head::do_print () const
+{
+#ifndef NPRINT
+  DOUT << "balltype = "<< balltype_i_ << "dots = " << dots_i_;
+#endif
+}
+
index 7f8ee615e1b31be5c2fce593545f6b025bfc3ec2..3af608484c84e95b3b48928a294df243623c2d62 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  score-align-reg.cc -- implement Score_align_engraver
+  score-align-reg.cc -- implement Type_align_engraver
 
   source file of the GNU LilyPond music typesetter
 
@@ -11,7 +11,7 @@
 #include "score-align-grav.hh"
 #include "item.hh"
 
-Score_align_engraver::Score_align_engraver()
+Type_align_engraver::Type_align_engraver()
 {
   type_ch_C_ = 0;
   priority_i_ =0;
@@ -19,33 +19,33 @@ Score_align_engraver::Score_align_engraver()
 }
 
 void
-Score_align_engraver::do_pre_move_processing()
+Type_align_engraver::do_pre_move_processing()
 {
   if (align_p_) 
     {
-       typeset_element (align_p_);
-       align_p_ =0;
+      typeset_element (align_p_);
+      align_p_ =0;
     }
 }
 
 void
-Score_align_engraver::acknowledge_element (Score_elem_info inf)
+Type_align_engraver::acknowledge_element (Score_elem_info inf)
 {
   if (inf.elem_l_->is_type_b (type_ch_C_)) 
     {
   
-       if (!align_p_) 
-         {
-           align_p_ = new Horizontal_group_item;
-           align_p_->breakable_b_ = true;
-           announce_element (Score_elem_info (align_p_,0));
-         }
-       Score_elem * unbound_elem = inf.elem_l_;
-       while (unbound_elem->axis_group_l_a_[X_AXIS])
-           unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS];
-       align_p_->add_element (unbound_elem);
+      if (!align_p_) 
+       {
+         align_p_ = new Horizontal_group_item;
+         align_p_->breakable_b_ = true;
+         announce_element (Score_elem_info (align_p_,0));
+       }
+      Score_elem * unbound_elem = inf.elem_l_;
+      while (unbound_elem->axis_group_l_a_[X_AXIS])
+       unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS];
+      align_p_->add_element (unbound_elem);
     }
   
 }
 
-IMPLEMENT_IS_TYPE_B1(Score_align_engraver,Engraver);
+IMPLEMENT_IS_TYPE_B1(Type_align_engraver,Engraver);
index 32127d18867ead08bf93d9964f7f42ac8dfbd615..c3531e596b8d6e2aa25de6f4245cdc5fbe198090 100644 (file)
 #include "bar.hh"
 #include "score-align-grav.hh"
 
-#define IMPLEMENT_ALIGN_REG(C,T,p)\
-class C ## _align_engraver : public Score_align_engraver               \
+#define IMPLEMENT_ALIGN_GRAV(C,T,p)\
+class C ## _align_engraver : public Type_align_engraver                \
 {                                                                      \
 public:                                                                        \
   DECLARE_MY_RUNTIME_TYPEINFO;                                 \
-  C ## _align_engraver() : Score_align_engraver () \
+  TRANSLATOR_CLONE(C ## _align_engraver);\
+  C ## _align_engraver() : Type_align_engraver () \
   { type_ch_C_ = T::static_name();\
   priority_i_ = p;}    \
 };                                                                     \
-ADD_THIS_ENGRAVER(C ## _align_engraver);                               \
-IMPLEMENT_IS_TYPE_B1(C ## _align_engraver, Score_align_engraver)       ;
+ADD_THIS_TRANSLATOR(C ## _align_engraver);                             \
+IMPLEMENT_IS_TYPE_B1(C ## _align_engraver, Type_align_engraver)        ;
 
 
-IMPLEMENT_ALIGN_REG(Key,Key_item,3);
-IMPLEMENT_ALIGN_REG(Clef,Clef_item,2);
-IMPLEMENT_ALIGN_REG(Meter,Meter,4);
-IMPLEMENT_ALIGN_REG(Bar, Bar,0);
+IMPLEMENT_ALIGN_GRAV(Key,Key_item,3);
+IMPLEMENT_ALIGN_GRAV(Clef,Clef_item,2);
+IMPLEMENT_ALIGN_GRAV(Meter,Meter,4);
+IMPLEMENT_ALIGN_GRAV(Bar, Bar,0);
 
index 9d7b090dafc733a31823c8cc7a9c5e893086da2d..9995896a02d19f81f5a8480f754755611b66f1e3 100644 (file)
 #include "item.hh"
 #include "p-col.hh"
 
+Score_elem::Score_elem()
+{
+  transparent_b_ = empty_b_ = false;
+  axis_group_l_a_[0] = axis_group_l_a_[1] =0;
+  pscore_l_=0;
+  offset_ = Offset (0,0);
+  output = 0;
+  status_ = ORPHAN;
+}
+
+Score_elem::Score_elem (Score_elem const&s)
+{
+  /* called from derived ctor, so most info points to the same deps
+     as (Directed_graph_node&)s. Nobody points to us, so don't copy
+     dependents.      
+   */
+  copy_edges_out (s);
+  transparent_b_ = s.transparent_b_;
+  empty_b_ = s.empty_b_;
+  axis_group_l_a_[0] = axis_group_l_a_[1] =0;
+  status_ = s.status_;
+  assert (!s.output);
+  output = 0;
+  pscore_l_ = s.pscore_l_;
+  offset_ = Offset (0,0);
+}
+
+Score_elem::~Score_elem()
+{
+  // some paranoia to prevent weird segv's
+  assert (status_ < DELETED);
+  delete output;
+  status_ = DELETED;
+  output = 0;
+}
+
 Score_elem*
 Score_elem::dependency (int i) const
 {
@@ -53,7 +89,7 @@ Score_elem::make_TeX_string (Offset o)const
   a.push (print_dimen (o.y()));
   a.push (print_dimen (o.x()));
   String t = output->TeX_string();
-  if (t == "")
+  if (!t)
     return t;
 
   a.push (t);
@@ -69,32 +105,6 @@ Score_elem::do_TeX_output_str () const
   return make_TeX_string(absolute_offset());
 }
 
-Score_elem::Score_elem (Score_elem const&s)
-{
-  /* called from derived ctor, so most info points to the same deps
-     as (Directed_graph_node&)s. Nobody points to us, so don't copy
-     dependents.      
-   */
-  copy_edges_out (s);
-  transparent_b_ = s.transparent_b_;
-  empty_b_ = s.empty_b_;
-  axis_group_l_a_[0] = axis_group_l_a_[1] =0;
-  status_ = s.status_;
-  assert (!s.output);
-  output = 0;
-  pscore_l_ = s.pscore_l_;
-  offset_ = Offset (0,0);
-}
-
-Score_elem::~Score_elem()
-{
-  // some paranoia to prevent weird segv's
-  assert (status_ < DELETED);
-  delete output;
-  status_ = DELETED;
-  output = 0;
-}
-
 /*
   GEOMETRY
  */
@@ -241,16 +251,6 @@ Score_elem::print() const
 #endif
 }
 
-Score_elem::Score_elem()
-{
-  transparent_b_ = empty_b_ = false;
-  axis_group_l_a_[0] = axis_group_l_a_[1] =0;
-  pscore_l_=0;
-  offset_ = Offset (0,0);
-  output = 0;
-  status_ = ORPHAN;
-}
-
 
 Paper_def*
 Score_elem::paper()  const
index 183d8e54fe72189eb390b1e118e696405691867d..bad0498dcc71704eda9db19a3a7f9a7d2dd5be7d 100644 (file)
@@ -9,15 +9,13 @@
 #include "super-elem.hh"
 #include "scoreline.hh"
 #include "debug.hh"
-#include "score-elem.hh"
-#include "bar.hh"              // needed for Bar::static_name
+#include "item.hh"
 #include "score-grav.hh"
-#include "p-col.hh"
 #include "p-score.hh"
-#include "score.hh"
 #include "musical-request.hh"
 #include "score-column.hh"
 #include "command-request.hh"
+#include "paper-def.hh"
 
 
 Score_engraver::Score_engraver()
@@ -33,6 +31,7 @@ Score_engraver::Score_engraver()
 void
 Score_engraver::prepare (Moment w)
 {
+  Global_translator::prepare (w);
   set_columns (new Score_column (w),  new Score_column (w));
   
   disallow_break_b_ = false;
@@ -210,11 +209,6 @@ Score_engraver::get_staff_info() const
   return inf;
 }
 
-Paper_def*
-Score_engraver::paper() const
-{
-  return pscore_p_->paper_l_;
-}
 
 
 Music_output*
@@ -235,6 +229,14 @@ Score_engraver::do_try_request (Request*r)
 }
 
 IMPLEMENT_IS_TYPE_B1(Score_engraver,Engraver_group_engraver);
-ADD_THIS_ENGRAVER(Score_engraver);
+ADD_THIS_TRANSLATOR(Score_engraver);
 
-  
+void
+Score_engraver::add_processing ()
+{
+  Translator_group::add_processing ();
+  assert (output_def_l_->is_type_b (Paper_def::static_name ()));
+  assert (!daddy_trans_l_);
+  pscore_p_ = new Paper_score;
+  pscore_p_->paper_l_ = (Paper_def*)output_def_l_;
+}
index c694c50ee235571064672540e15a1e9e561d91ad..8af2412f66d84a28b044274ee8126146b0929541 100644 (file)
@@ -21,8 +21,8 @@ Score_horizontal_align_engraver::do_pre_move_processing()
 {
   if (halign_p_) 
     {
-       typeset_element (halign_p_);
-       halign_p_ =0;
+      typeset_element (halign_p_);
+      halign_p_ =0;
     }
        
 }
@@ -32,22 +32,22 @@ Score_horizontal_align_engraver::acknowledge_element (Score_elem_info i)
 {
   Engraver* reg = i.origin_grav_l_arr_[0];
   if (reg->is_type_b (
-       Score_align_engraver::static_name()))
-  {
-       Score_align_engraver * align_grav_l = (Score_align_engraver*) reg;
-       if (!halign_p_) 
-         {
-           halign_p_ = new Break_align_item;
-           halign_p_->breakable_b_ = true;
-           announce_element (Score_elem_info (halign_p_,0));
-         }
-       Item * it = i.elem_l_->item();
-       if (align_grav_l->type_ch_C_ == Bar::static_name())
-           halign_p_->center_l_ = it;
+                     Type_align_engraver::static_name()))
+    {
+      Type_align_engraver * align_grav_l = (Type_align_engraver*) reg;
+      if (!halign_p_) 
+       {
+         halign_p_ = new Break_align_item;
+         halign_p_->breakable_b_ = true;
+         announce_element (Score_elem_info (halign_p_,0));
+       }
+      Item * it = i.elem_l_->item();
+      if (align_grav_l->type_ch_C_ == Bar::static_name())
+       halign_p_->center_l_ = it;
        
-       halign_p_->add (it, align_grav_l->priority_i_);
+      halign_p_->add (it, align_grav_l->priority_i_);
     }
 }
 
 IMPLEMENT_IS_TYPE_B1(Score_horizontal_align_engraver,Engraver);
-ADD_THIS_ENGRAVER(Score_horizontal_align_engraver);
+ADD_THIS_TRANSLATOR(Score_horizontal_align_engraver);
index 647348928440f934d9647b2fe18717c3493967fa..75e9fc2200c020a7469489602fd0c0bc220168d0 100644 (file)
@@ -7,11 +7,10 @@
  */
 
 #include "score-performer.hh"
-#include "input-translator.hh"
 #include "midi-def.hh"
 #include "audio-column.hh"
 #include "audio-item.hh"
-#include "audio-score.hh"
+#include "performance.hh"
 #include "midi-stream.hh"
 #include "string-convert.hh"
 #include "debug.hh"
@@ -21,8 +20,7 @@
 #include "audio-staff.hh"
 
 IMPLEMENT_IS_TYPE_B1(Score_performer,Performer_group_performer);
-
-ADD_THIS_PERFORMER(Score_performer);
+ADD_THIS_TRANSLATOR(Score_performer);
 
 
 Score_performer::Score_performer()
@@ -34,28 +32,12 @@ Score_performer::~Score_performer()
 {
 }
 
-
-Translator* 
-Score_performer::ancestor_l (int l) 
-{ 
-  return Global_translator::ancestor_l (l);
-}
-
-
-int 
-Score_performer::depth_i() const 
-{ 
-  return Global_translator::depth_i();
-}
-
-
-
 void
 Score_performer::play (Audio_element * p)
 {
   if  (p->is_type_b (Audio_item::static_name())) 
     {
-       audio_column_l_->add ((Audio_item*)p);
+      audio_column_l_->add ((Audio_item*)p);
     }
   else if (p->is_type_b (Audio_staff::static_name())) 
     {
@@ -64,13 +46,13 @@ Score_performer::play (Audio_element * p)
   performance_p_->add (p);
 }
 
-
 void 
 Score_performer::prepare (Moment m)
 {
-  now_mom_ = m;
+  Global_translator::prepare (m);
   audio_column_l_ = new Audio_column (m);
   performance_p_->add (audio_column_l_);
+  post_move_processing ();
 }
 
 
@@ -78,10 +60,10 @@ void
 Score_performer::process()
 {
   process_requests();
+  pre_move_processing();
+  check_removal();
 }
 
-
-
 void
 Score_performer::start()
 {
@@ -97,7 +79,8 @@ Score_performer::get_tempo_i() const
 void
 Score_performer::finish()
 {
-  Performer_group_performer::do_removal_processing();
+  check_removal ();
+  removal_processing();
 }
 
 Music_output *
@@ -107,3 +90,12 @@ Score_performer::get_output_p ()
   performance_p_ =0;
   return o;
 }
+
+void
+Score_performer::add_processing ()
+{
+  Translator_group::add_processing ();
+  assert (output_def_l_->is_type_b (Midi_def::static_name ()));
+  performance_p_ = new Performance;
+  performance_p_->midi_l_ = (Midi_def*) output_def_l_;  
+}
index 3da46e2c235f9e9318aa47616e0f0bbde2a93d25..f1adcc0def2f553762c2bc1d5fad3ecdcdab0a68 100644 (file)
@@ -123,6 +123,7 @@ Score::print() const
 {
 #ifndef NPRINT
   DOUT << "score {\n"; 
+  music_p_ -> print ();
   for (int i=0; i < def_p_arr_.size (); i++)
     def_p_arr_[i]->print();
   DOUT << "}\n";
index 3886a7715d536b035b92a56d92a79734a737169b..90fbcf17a703d2916cd8a16f7113d9f83460f349 100644 (file)
@@ -22,22 +22,21 @@ do_scores()
 {
   for (int i=0; i < global_score_array.size(); i++) 
     {
-       Score *&is_p = global_score_array[i];
-       if (is_p->header_p_)
-         is_p->header_p_->lily_id_str_ = "Lily was here, " + 
-           get_version_number_str();
-       if (is_p->errorlevel_i_) 
-         {
-           is_p->warning ("Score contains errors. Will not process it. ");
-           exit_status_i_ |= 1;
-         }
-       else 
-         {
-           is_p->print();
-           is_p->process();
-         }
-       delete is_p;
-       is_p =0;
+      Score *&is_p = global_score_array[i];
+      if (is_p->header_p_)
+       is_p->header_p_->lily_id_str_ = "Lily was here, " + 
+         get_version_number_str();
+      if (is_p->errorlevel_i_) 
+       {
+         is_p->warning ("Score contains errors. Will not process it. ");
+         exit_status_i_ |= 1;
+       }
+      else 
+       {
+         is_p->process();
+       }
+      delete is_p;
+      is_p =0;
 
     }
   global_score_array.clear();
index c9c1585612c6a97bc24e1cade0de10b5517615d0..d49c447fb5b1335e03e4a01eed3db02ce359749f 100644 (file)
@@ -67,4 +67,4 @@ Script_engraver::do_post_move_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Script_engraver,Engraver);
-ADD_THIS_ENGRAVER(Script_engraver);
+ADD_THIS_TRANSLATOR(Script_engraver);
index a96eae70cbaee85010221bc1221581b10e3b457e..14fea917f6b7e28af5aca4b159bb787a9985b364 100644 (file)
@@ -36,13 +36,6 @@ Slur_engraver::acknowledge_element (Score_elem_info info)
     }
 }
 
-void
-Slur_engraver::set_feature (Feature f)
-{
-  if (f.type_ == "vdir")
-    dir_ = (Direction)int(f.value_);
-}
-
 /*
   abracadabra
   */
@@ -86,6 +79,7 @@ Slur_engraver::do_process_requests()
 void
 Slur_engraver::do_pre_move_processing()
 {
+  dir_ = (Direction) int(get_property ("ydirection"));
   for (int i = 0; i < end_slur_l_arr_.size(); i++) 
     {
       if (dir_)
@@ -109,4 +103,4 @@ Slur_engraver::~Slur_engraver()
 }
 
 IMPLEMENT_IS_TYPE_B1(Slur_engraver,Engraver);
-ADD_THIS_ENGRAVER(Slur_engraver);
+ADD_THIS_TRANSLATOR(Slur_engraver);
index 7d51fbe78cc8d1a1791d3fa93ba1e67f942e197d..1850c66ab948d634cf4eb3af9f33c6051de46e76 100644 (file)
@@ -61,4 +61,4 @@ Span_bar_engraver::do_pre_move_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Span_bar_engraver,Engraver);
-ADD_THIS_ENGRAVER(Span_bar_engraver);
+ADD_THIS_TRANSLATOR(Span_bar_engraver);
index 5f19f84177b93538ac1e13d3c2f89d86efcb698c..ba2c3739f28d512719edeb61a06b73af8eb479cb 100644 (file)
@@ -29,16 +29,16 @@ Span_bar::do_substitute_dependency (Score_elem*o, Score_elem*n)
 {
   Bar * bold = 0;
   if  (o->is_type_b (Bar::static_name())) 
-       bold = (Bar*)o->item();
+    bold = (Bar*)o->item();
   else
-       return;
+    return;
 
   bold->spanned_i_ --;
   Bar * b =0;
   if (n && n->is_type_b (Bar::static_name())) 
     {
-       b = (Bar*)n->item();
-       b->spanned_i_ ++;
+      b = (Bar*)n->item();
+      b->spanned_i_ ++;
     }
   
   spanning_l_arr_.substitute (bold , b);
@@ -62,26 +62,26 @@ Span_bar::do_pre_processing()
 {
   if (spanning_l_arr_.size() < 1) 
     {
-       transparent_b_ = true;
-       empty_b_ =true;
+      transparent_b_ = true;
+      empty_b_ =true;
     }
   else 
     {
-       if (type_str_ == "")
-           type_str_ = spanning_l_arr_[0]->type_str_;
-       if (type_str_ ==""
-         {
-           transparent_b_=true;
-           empty_b_ = true;
-         }
-       else if (type_str_ == "|:") 
-         {
-           type_str_ = ".|";
-         }
-       else if (type_str_ == ":|")
-         {
-           type_str_ = "|.";
-         }
+      if (!type_str_)
+       type_str_ = spanning_l_arr_[0]->type_str_;
+      if (!type_str_
+       {
+         transparent_b_=true;
+         empty_b_ = true;
+       }
+      else if (type_str_ == "|:") 
+       {
+         type_str_ = ".|";
+       }
+      else if (type_str_ == ":|")
+       {
+         type_str_ = "|.";
+       }
     }
 }
 
@@ -98,13 +98,13 @@ Span_bar::brew_molecule_p() const
   Interval y_int;
   for (int i=0; i < spanning_l_arr_.size(); i++) 
     {
-       Axis_group_element *common = 
-           common_group (spanning_l_arr_[i], Y_AXIS);
+      Axis_group_element *common = 
+       common_group (spanning_l_arr_[i], Y_AXIS);
        
-       Real y = spanning_l_arr_[i]->relative_coordinate (common, Y_AXIS)  
-           -relative_coordinate (common,Y_AXIS);
+      Real y = spanning_l_arr_[i]->relative_coordinate (common, Y_AXIS)  
+       -relative_coordinate (common,Y_AXIS);
 
-       y_int.unite (y + spanning_l_arr_[i]->height());
+      y_int.unite (y + spanning_l_arr_[i]->height());
     }
 
   Symbol s = get_bar_sym (y_int.length());
index b09322c3297f2e053dbcd3dd585fdc3c9e4a97a8..6f4d282330b0feaf2d826b6e4d8e88fca2b47be2 100644 (file)
@@ -25,5 +25,5 @@ Piano_bar_engraver::get_span_bar_p() const
   return new Piano_brace;
 }
 
-ADD_THIS_ENGRAVER(Piano_bar_engraver);
-ADD_THIS_ENGRAVER(Span_score_bar_engraver);
+ADD_THIS_TRANSLATOR(Piano_bar_engraver);
+ADD_THIS_TRANSLATOR(Span_score_bar_engraver);
index 397cfdb6c5fbf37c9bd8fd20a4f3c2230460d6ea..07eb278b84cde5bbf4f84d33855bea833d24b1d8 100644 (file)
@@ -78,12 +78,17 @@ Spanner::set_my_columns()
 void
 Spanner::set_bounds(Direction d, Item*i)
 {
+    
   if (spanned_drul_[d])
     spanned_drul_[d]->attached_span_l_arr_.substitute(this,0);
   
   spanned_drul_[d] =i;
   if (i)
     i->attached_span_l_arr_.push(this);
+
+  assert (!spanned_drul_[d] ||
+         spanned_drul_[Direction(-d)] != spanned_drul_[d]);
+
 }
 
 void
index 75854b82a92c966bb4f1042930a9521fb2d78ef8..383df71ce1689c5148818d85c5632172e7679366 100644 (file)
@@ -50,9 +50,3 @@ Staff_info::musical_pcol_l()
   return musical_l();
 }
 
-Moment
-Staff_info::when()
-{
-  return command_l()->when ();
-}
-
index 72b1ef6840339ae3b2aa0a007de0a4e88091ff04..99eed10c50585acf6d8ea94d7e80a4c7d1dfc399 100644 (file)
@@ -7,15 +7,14 @@
  */
 
 #include "staff-performer.hh"
-#include "translator.hh"
-#include "input-translator.hh"
+#include "translator-group.hh"
 #include "debug.hh"
 #include "audio-column.hh"
 #include "audio-item.hh"
 #include "audio-staff.hh"
 
 IMPLEMENT_IS_TYPE_B1(Staff_performer,Performer_group_performer);
-ADD_THIS_PERFORMER(Staff_performer);
+ADD_THIS_TRANSLATOR(Staff_performer);
 
 Staff_performer::Staff_performer()
 {
@@ -34,23 +33,25 @@ Staff_performer::do_creation_processing()
 
   if (instrument_str().length_i()) 
     {
-       // staff name
-       play (new Audio_text (Audio_text::TRACK_NAME, instrument_str ()));
-       // instrument description
-       play (new Audio_text (Audio_text::INSTRUMENT_NAME, instrument_str ()));
+      // staff name
+      play (new Audio_text (Audio_text::TRACK_NAME, id_str_));
+      // instrument description
+      play (new Audio_text (Audio_text::INSTRUMENT_NAME, instrument_str ()));
     }
 
   // tempo
-  play(new Audio_tempo(get_tempo_i()));
+  play (new Audio_tempo (get_tempo_i ()));
 
   if (instrument_str ().length_i ())
-       // instrument
-       play (new Audio_instrument (instrument_str ()));
+    // instrument
+    play (new Audio_instrument (instrument_str ()));
+  Performer_group_performer::do_creation_processing ();
 }
 
 void
 Staff_performer::do_removal_processing()
 {
+  Performer_group_performer::do_removal_processing ();
   Performer::play (audio_staff_p_);
   audio_staff_p_ = 0;
 }
@@ -58,7 +59,7 @@ Staff_performer::do_removal_processing()
 String 
 Staff_performer::instrument_str() 
 { 
-  return Translator::id_str_; 
+  return get_property ("instrument");
 }
 
 void 
@@ -66,7 +67,7 @@ Staff_performer::play (Audio_element* p)
 {
   if (p->is_type_b (Audio_item::static_name())) 
     {
-       audio_staff_p_->add ((Audio_item*)p);
+      audio_staff_p_->add ((Audio_item*)p);
     }
   Performer::play (p);
 }
index f2dfad4d32e91234b7c0ebedf62b5f5a83c8c1ce..d704518f8cc01e511c90df1fe372cdb0ab26a44a 100644 (file)
@@ -48,4 +48,4 @@ Staff_sym_engraver::do_removal_processing()
 
 
 IMPLEMENT_IS_TYPE_B1(Staff_sym_engraver,Engraver);
-ADD_THIS_ENGRAVER(Staff_sym_engraver);
+ADD_THIS_TRANSLATOR(Staff_sym_engraver);
index 08f07ff59f4e39ab184269dfad1b1e6112b43b2a..2d81cc58f25eaa3e6c7ff5fcce9e6301fbe2af97 100644 (file)
@@ -46,6 +46,7 @@ Stem_engraver::do_pre_move_processing()
 {
   if (stem_p_)
     {
+      dir_ = (Direction) int(get_property ("ydirection"));
       if (dir_)
        stem_p_->dir_ = dir_;
 
@@ -71,12 +72,5 @@ Stem_engraver::do_try_request (Request* r)
   return true;
 }
 
-void
-Stem_engraver::set_feature (Feature i)
-{
-  if (i.type_ == "vdir")       
-    dir_ = (Direction) int(i.value_);
-}
-
 IMPLEMENT_IS_TYPE_B1(Stem_engraver, Engraver);
-ADD_THIS_ENGRAVER(Stem_engraver);
+ADD_THIS_TRANSLATOR(Stem_engraver);
index e876f7a0203623d1690653551ab77cf5b0394148..0cd5486d0fe23d4390f074d87f312984f6826e36 100644 (file)
@@ -16,6 +16,7 @@
 #include "p-col.hh"
 #include "misc.hh"
 #include "beam.hh"
+#include "rest.hh"
 
 const int STEMLEN=7;
 
@@ -101,23 +102,23 @@ void
 Stem::add (Note_head *n)
 {
   n->add_dependency (this);
-  if (n->rest_b_) 
-      rest_l_arr_.push (n);
-  else 
-      head_l_arr_.push (n);
-
-#if 0
-  else if (1) //why different? (n->balltype_i_) 
       head_l_arr_.push (n);
-  else
-      whole_l_arr_.push (n);
-#endif
+}
+void
+Stem::add (Rest *r)
+{
+  rest_l_arr_.push (r);
+  r->add_dependency (this);    // ?
 }
 
 bool
 Stem::invisible_b () const
 {
-  return !head_l_arr_.size();
+  
+  return !head_l_arr_.size () || 
+    head_l_arr_[0]->balltype_i_ <= 0;
+
 }
 
 // if dir_ is set we return fake values.
@@ -244,11 +245,12 @@ Stem::do_pre_processing ()
   if (stem_bottom_f_== stem_top_f_)
     set_default_extents ();
   set_noteheads ();
-  flag_i_ = dir_*abs (flag_i_);
+  flag_i_ = dir_ * abs (flag_i_);
   transparent_b_ = invisible_b ();
   empty_b_ = invisible_b ();
 }
 
+
 Interval
 Stem::do_width () const
 {
@@ -260,46 +262,50 @@ Stem::do_width () const
   return r;
 }
 
-Molecule
-Stem::abbrev_mol () const
-{
-  Real dy = paper ()->interbeam_f ();
-  Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim.x ().length ();
-  Real beamdy = paper ()->interline_f () / 2;
-
-  int beams_i = 0;
-  Real slope = paper ()->internote_f () / 4;
-
-  if (beam_l_) {
-    // huh?
-    slope = 2 * beam_l_->slope;
-    // ugh, rather calc from Abbreviation_req
-    beams_i = beams_right_i_ >? beams_left_i_; 
-  }
-  paper()->lookup_l ()->beam (slope, 20 PT);
-
-  Molecule beams;
-  Atom a (paper ()->lookup_l ()->beam (slope, w));
-  a.translate (Offset(- w / 2, stem_end_f () - (w / 2 * slope)));
-  // ugh
-  if (!beams_i)
-    a.translate (dy + beamdy - dir_ * dy, Y_AXIS);
-  else
-    a.translate (2 * beamdy - dir_ * (beamdy - dy), Y_AXIS);
-       
-  for (int i = 0; i < abbrev_flag_i_; i++) 
-    {
-      Atom b (a);
-      b.translate (-dir_ * dy * (beams_i + i), Y_AXIS);
-      beams.add (b);
-    }
 
-  return beams;
-}
+  
+ Molecule
+ Stem::abbrev_mol () const
+ {
+   Real dy = paper ()->interbeam_f ();
+   Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim.x ().length ();
+   Real beamdy = paper ()->interline_f () / 2;
+   int beams_i = 0;
+   Real slope = paper ()->internote_f () / 4;
+   if (beam_l_) {
+     // huh?
+     slope = 2 * beam_l_->slope;
+     // ugh, rather calc from Abbreviation_req
+     beams_i = beams_right_i_ >? beams_left_i_; 
+   }
+   paper ()->lookup_l ()->beam (slope, 20 PT);
+   Molecule beams;
+   Atom a (paper ()->lookup_l ()->beam (slope, w));
+   a.translate (Offset(- w / 2, stem_end_f () - (w / 2 * slope)));
+   // ugh
+   if (!beams_i)
+     a.translate (dy + beamdy - dir_ * dy, Y_AXIS);
+   else
+     a.translate (2 * beamdy - dir_ * (beamdy - dy), Y_AXIS);
+       
+   for (int i = 0; i < abbrev_flag_i_; i++) 
+     {
+       Atom b (a);
+       b.translate (-dir_ * dy * (beams_i + i), Y_AXIS);
+       beams.add (b);
+     }
+   return beams;
+ }
 
 Molecule*
 Stem::brew_molecule_p () const 
 {
+  Molecule *mol_p =new Molecule;
+      
   Real bot  = stem_bottom_f_;
   Real top = stem_top_f_;
   
@@ -308,31 +314,32 @@ Stem::brew_molecule_p () const
   Paper_def *p =paper ();
 
   Real dy = p->internote_f ();
-  Symbol ss =p->lookup_l ()->stem (bot*dy,top*dy);
-
-  Molecule* mol_p = new Molecule;
-  if (head_l_arr_.size() && head_l_arr_[0]->balltype_i_)
-    mol_p->add (Atom (ss));
-
-  if (!beam_l_ && abs (flag_i_) > 4)
+  if (!invisible_b ())
+    {
+      Symbol ss =p->lookup_l ()->stem (bot*dy,top*dy);
+      mol_p->add (Atom (ss));
+    }
+  
+  if (!beam_l_ &&abs (flag_i_) > 4)
     {
       Symbol fl = p->lookup_l ()->flag (flag_i_);
       Molecule m (fl);
-      if (flag_i_ < -4){               
-       mol_p->add_bottom (m);
-      }
+      if (flag_i_ < -4)
+       {
+         mol_p->add_at_edge (Y_AXIS, DOWN, m);
+       }
       else if (flag_i_ > 4) 
        {
-         mol_p->add_top (m);
+         mol_p->add_at_edge (Y_AXIS, UP, m);
        }
       else
        assert (false); 
-      assert (!abbrev_flag_i_);
   }
+         assert (!abbrev_flag_i_);
+ }
 
   if (abbrev_flag_i_)
     mol_p->add (abbrev_mol ());
-
+  
   mol_p->translate (stem_xoffset_f_, X_AXIS);
   return mol_p;
 }
@@ -348,8 +355,7 @@ void
 Stem::do_substitute_dependency (Score_elem*o,Score_elem*n)
 {
   Item * o_l = o->item ();
-  Item * n_l = n? n->item ():0;
-//  whole_l_arr_.substitute ((Note_head*)o_l, (Note_head*)n_l);
+  Item * n_l = n? n->item () : 0;
   head_l_arr_.substitute ((Note_head*)o_l, (Note_head*)n_l);
-  rest_l_arr_.substitute ((Note_head*)o_l, (Note_head*)n_l);
+  rest_l_arr_.substitute ((Rest*)o_l, (Rest*)n_l);
 }
index 84de4871b50a1e965d99fe3b6aaf751a842ecb9a..a8fbfcd0f31077fd6d34cec799f71feb120ae307 100644 (file)
@@ -9,7 +9,7 @@
 
 
 IMPLEMENT_IS_TYPE_B1(Swallow_engraver,Engraver);
-ADD_THIS_ENGRAVER(Swallow_engraver);
+ADD_THIS_TRANSLATOR(Swallow_engraver);
 
 
 bool
index 332964af408d088720a1dc468110e0d7113b5143..6d8c55936eac5154d682ea74c05ca72e1ab3fcda 100644 (file)
@@ -10,4 +10,4 @@
 
 
 IMPLEMENT_IS_TYPE_B1(Swallow_performer, Performer);
-ADD_THIS_PERFORMER(Swallow_performer);
+ADD_THIS_TRANSLATOR(Swallow_performer);
index 25e4ff8ce735eaf19ab5ee48d928d8947fe89c94..2bb6f53fa9886e08d1412fb5841ff51260d0e03c 100644 (file)
@@ -51,7 +51,7 @@ Symtable::lookup (String s) const
 Symtable* 
 Symtables::operator()(String s) 
 {
-  return Assoc<String, Symtable*>::operator[](s);
+  return Dictionary<Symtable*>::operator[](s);
 } 
 void
 Symtables::print() const
@@ -76,5 +76,5 @@ void
 Symtables::add (String s, Symtable*p)
 {
   p-> id_str = s;
-  Assoc<String, Symtable*>::add (s,p);
+  Dictionary<Symtable*>::add (s,p);
 }
index 9e6e7e6dcebd3ad524c7070483d607b7854d144e..d9ea0deba264d0185cd74d4f1c8113dcb00431a8 100644 (file)
@@ -7,11 +7,8 @@
 */
 
 #include "symbol.hh"
-#include "request.hh"
-#include "input-translator.hh"
 #include "molecule.hh"
 #include "plist.tcc"
 #include "pcursor.tcc"
 
 template POINTERLIST_INSTANTIATE(Atom);
-template POINTERLIST_INSTANTIATE(Input_translator);
index a1ef773cd2d4c406537cc06331f366d90719f671..63b5cad9ad32fbfdb20cd0e23ae6e54a80a00cc6 100644 (file)
@@ -6,9 +6,4 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#if 0
-#include "proto.hh"
-#include "list.tcc"
-#include "cursor.tcc"
-
-#endif
+// empty. Yes I know.
index dd7bf02997752ce741ece68639e66ac964c287e5..eff2467ad5b77eccadc10143e2b12758655f6b4c 100644 (file)
@@ -1,7 +1,7 @@
 #include "proto.hh"
 #include "plist.tcc"
-#include "engraver.hh"
-#include "performer.hh"
+#include "translator.hh"
+
+
+template POINTERLIST_INSTANTIATE(Translator);
 
-template POINTERLIST_INSTANTIATE(Engraver);
-template POINTERLIST_INSTANTIATE(Performer);
index 30d06d3d32609ffa421d2d7a77751355f822bea5..27dede2e41ac2fb96adce1e2f3e3092ef8914597 100644 (file)
@@ -235,8 +235,8 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const
   mol.add (l);
   Atom a (m);
   a.translate (slur_extra * internote_f, Y_AXIS);
-  mol.add_right (m);
-  mol.add_right (r);
+  mol.add_at_edge (X_AXIS, RIGHT, m);
+  mol.add_at_edge (X_AXIS, RIGHT, r);
   mol.translate (l_dy * internote_f, Y_AXIS);
   Symbol s;
   s.tex = mol.TeX_string();
index f1b3463c3111ba86023a819548b926d30e561973..c7201bde2ead3dbb1ea175036788a15d886c7099 100644 (file)
@@ -24,24 +24,17 @@ Tie_engraver::Tie_engraver()
   dir_ = CENTER;
 }
 
-void
-Tie_engraver::sync_features()
-{
-  dir_ = Direction (int (get_feature ("vdir")));
-}
-  
-
 void
 Tie_engraver::do_post_move_processing()
 {
-  if (tie_p_ && get_staff_info().when () == end_mom_) 
+  if (tie_p_ && now_moment () == end_mom_) 
     {
-       end_tie_p_ = tie_p_;
-       end_req_l_ = req_l_;
-       end_melodic_req_l_ = melodic_req_l_;
-       tie_p_ =0;
-       req_l_ =0;
-       end_mom_ = -1;
+      end_tie_p_ = tie_p_;
+      end_req_l_ = req_l_;
+      end_melodic_req_l_ = melodic_req_l_;
+      tie_p_ =0;
+      req_l_ =0;
+      end_mom_ = -1;
     }
 }
 
@@ -55,23 +48,24 @@ bool
 Tie_engraver::do_try_request (Request*r)
 {
   if (!acceptable_request_b (r))
-       return false;
+    return false;
   if (req_l_) 
     {
-       return false;
+      return false;
     }
   req_l_ = r->musical()->tie ();
   end_mom_ = r->parent_music_l_->time_int().length ()
-       + get_staff_info().when ();
+    + now_moment ();
   return true;
 }
 
 void
 Tie_engraver::do_process_requests()
 {
+  dir_ = (Direction) int (get_property ("ydirection"));
   if (req_l_ && ! tie_p_) 
     {
-       tie_p_ = new Tie;
+      tie_p_ = new Tie;
     }
 }
 
@@ -80,19 +74,19 @@ Tie_engraver::acknowledge_element (Score_elem_info i)
 {
   if (i.elem_l_->name() == Note_head::static_name ()) 
     {
-       if (tie_p_) 
-         {
-           tie_p_->set_head (LEFT, (Note_head*)i.elem_l_->item());
-           melodic_req_l_ = i.req_l_->musical()->melodic ();
-         }
-
-       if (end_tie_p_) 
-         {
-           end_tie_p_->set_head (RIGHT, (Note_head*)i.elem_l_->item());
-           if (!Melodic_req::compare (*end_melodic_req_l_, *melodic_req_l_))
-               end_tie_p_->same_pitch_b_ = true;
-           announce_element (Score_elem_info (end_tie_p_,end_req_l_));
-         }
+      if (tie_p_) 
+       {
+         tie_p_->set_head (LEFT, (Note_head*)i.elem_l_->item());
+         melodic_req_l_ = i.req_l_->musical()->melodic ();
+       }
+
+      if (end_tie_p_) 
+       {
+         end_tie_p_->set_head (RIGHT, (Note_head*)i.elem_l_->item());
+         if (!Melodic_req::compare (*end_melodic_req_l_, *melodic_req_l_))
+           end_tie_p_->same_pitch_b_ = true;
+         announce_element (Score_elem_info (end_tie_p_,end_req_l_));
+       }
     }
 }
 
@@ -101,32 +95,25 @@ Tie_engraver::do_pre_move_processing()
 {
   if (end_tie_p_) 
     {
-       if (dir_)
-           end_tie_p_->dir_ =  dir_;
+      if (dir_)
+       end_tie_p_->dir_ =  dir_;
        
-       typeset_element (end_tie_p_);
-       end_tie_p_ =0;
-       end_req_l_ =0;
+      typeset_element (end_tie_p_);
+      end_tie_p_ =0;
+      end_req_l_ =0;
     }
 }
 
 Tie_engraver::~Tie_engraver()
 {
   if (tie_p_) 
     {
-       req_l_->warning ("unended Tie");
-       delete tie_p_;
+      req_l_->warning ("unended Tie");
+      delete tie_p_;
     }
 }
 
-void
-Tie_engraver::set_feature (Feature f)
-{
-  if (f.type_ == "vdir")
-       dir_ = Direction (int (f.value_));
-}
 
 
 IMPLEMENT_IS_TYPE_B1(Tie_engraver,Engraver);
-ADD_THIS_ENGRAVER(Tie_engraver);
+ADD_THIS_TRANSLATOR(Tie_engraver);
index b5863193cf5d81727494e6167cd43432a2222dfd..c0564a0b97d62e77ca8f6ead33bebc49f5d188c5 100644 (file)
@@ -10,6 +10,7 @@
 #include "tie.hh"
 #include "note-head.hh"
 #include "p-col.hh"
+#include "debug.hh"
 
 
 void
@@ -38,7 +39,9 @@ Tie::set_default_dir()
 void
 Tie::do_add_processing()
 {
-  assert (head_l_drul_[LEFT] && head_l_drul_[RIGHT]);
+  if (!(head_l_drul_[LEFT] && head_l_drul_[RIGHT]))
+    warning ("Lonely tie.. ");
+  
   set_bounds(LEFT,head_l_drul_[LEFT]);
   set_bounds(RIGHT,head_l_drul_[RIGHT]);
 }
index f27e9f92befb02db8014ac3fb7f887886e05c796..9b5ea11d9c341573c21af749fcf340b45f1adb57 100644 (file)
 #include "command-request.hh"
 
 
-Timing_engraver::Timing_engraver()
-{
-  default_grouping_ = Rhythmic_grouping (MInterval (0,4),4); // ugh
-}
 
 void
 Timing_engraver::fill_staff_info (Staff_info &inf)
@@ -22,123 +18,5 @@ Timing_engraver::fill_staff_info (Staff_info &inf)
   inf.rhythmic_C_ = &default_grouping_;
 }
 
-bool
-Timing_engraver::do_try_request(Request*r)
-{
-  Command_req * c = r->command();
-  if (!(c && c->timing()))
-    return false;
-  for (int i=0; i < timing_req_l_arr_.size (); i++) 
-    {
-      if (timing_req_l_arr_[i]->equal_b(r))
-       return true;
-      if (timing_req_l_arr_[i]->name() == r->name()) 
-       {
-         r->warning ("conflicting timing request");
-         return false;
-       }
-    }
-  
-  timing_req_l_arr_.push(c->timing());
-  return true;
-}
-
-Meter_change_req*
-Timing_engraver::meter_req_l() const
-{
-  Meter_change_req *m_l=0;
-  for (int i=0; !m_l && i < timing_req_l_arr_.size (); i++) 
-    {
-      m_l=timing_req_l_arr_[i]->meterchange();
-    }
-  return m_l;  
-}
-
-void
-Timing_engraver::do_process_requests()
-{
-  for (int i=0; i < timing_req_l_arr_.size (); i++) 
-    {
-      Timing_req * tr_l = timing_req_l_arr_[i];
-      Meter_change_req *m_l = tr_l->meterchange();
-      if (m_l) 
-       {
-         int b_i= m_l->beats_i_;
-         int o_i = m_l->one_beat_i_;
-         if (! time_.allow_meter_change_b())
-           tr_l->warning ("Meter change not allowed here");
-         else
-           {
-             time_.set_meter (b_i, o_i);
-             default_grouping_ = 
-               Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)), b_i);
-           }
-       }
-      else if (tr_l->partial()) 
-       {
-         Moment m = tr_l->partial()->duration_;
-         String error = time_.try_set_partial_str (m);
-         if (error != "") 
-           {
-             tr_l->warning (error);
-           }
-         else 
-           time_.setpartial (m);
-       }
-      else if (tr_l->barcheck()) 
-       {
-         if (time_.whole_in_measure_) 
-           {
-             tr_l ->warning ("Barcheck failed");
-           
-             time_.whole_in_measure_ = 0; // resync
-             time_.error_b_ = true;
-           }
-
-       }
-      else if (tr_l->cadenza()) 
-       {
-         time_.set_cadenza (tr_l->cadenza()->on_b_);
-
-       }
-      else if (tr_l->measuregrouping()) 
-       {
-         default_grouping_ = 
-           parse_grouping (tr_l->measuregrouping()->beat_i_arr_,
-                           tr_l->measuregrouping()->elt_length_arr_);
-
-       }
-    }
-}
-
-
-void
-Timing_engraver::do_pre_move_processing()
-{
-  timing_req_l_arr_.set_size (0);
-  Engraver_group_engraver * grav_l = daddy_grav_l_;
-  while (grav_l->daddy_grav_l_) 
-    {
-      grav_l = grav_l->daddy_grav_l_;
-    }
-  
-  assert (grav_l->name() == Score_engraver::static_name ());
-  if (!time_.cadenza_b_)
-    ((Score_engraver*)grav_l)->add_moment_to_process (time_.next_bar_moment());
-}
-
-IMPLEMENT_IS_TYPE_B1(Timing_engraver, Engraver);
-ADD_THIS_ENGRAVER(Timing_engraver);
-
-void
-Timing_engraver::do_creation_processing()
-{
-  time_.when_ = get_staff_info().when ();
-}
-
-void
-Timing_engraver::do_post_move_processing()
-{
-  time_.add (get_staff_info().when ()  - time_.when_);
-}
-
+IMPLEMENT_IS_TYPE_B1(Timing_engraver, Timing_translator);
+ADD_THIS_TRANSLATOR(Timing_engraver);
diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc
new file mode 100644 (file)
index 0000000..c282d0c
--- /dev/null
@@ -0,0 +1,135 @@
+
+/*
+  timing-translator.cc -- implement Timing_translator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "timing-translator.hh"
+#include "command-request.hh"
+#include "translator-group.hh"
+#include "global-translator.hh"
+
+Timing_translator::Timing_translator()
+{
+  default_grouping_ = Rhythmic_grouping (MInterval (0,4),4); // ugh
+}
+
+bool
+Timing_translator::do_try_request(Request*r)
+{
+  Command_req * c = r->command();
+  if (!(c && c->timing()))
+    return false;
+  for (int i=0; i < timing_req_l_arr_.size (); i++) 
+    {
+      if (timing_req_l_arr_[i]->equal_b(r))
+       return true;
+      if (timing_req_l_arr_[i]->name() == r->name()) 
+       {
+         r->warning ("conflicting timing request");
+         return false;
+       }
+    }
+  
+  timing_req_l_arr_.push(c->timing());
+  return true;
+}
+
+Meter_change_req*
+Timing_translator::meter_req_l() const
+{
+  Meter_change_req *m_l=0;
+  for (int i=0; !m_l && i < timing_req_l_arr_.size (); i++) 
+    {
+      m_l=timing_req_l_arr_[i]->meterchange();
+    }
+  return m_l;  
+}
+
+void
+Timing_translator::do_process_requests()
+{
+  for (int i=0; i < timing_req_l_arr_.size (); i++) 
+    {
+      Timing_req * tr_l = timing_req_l_arr_[i];
+      Meter_change_req *m_l = tr_l->meterchange();
+      if (m_l) 
+       {
+         int b_i= m_l->beats_i_;
+         int o_i = m_l->one_beat_i_;
+         if (! time_.allow_meter_change_b())
+           tr_l->warning ("Meter change not allowed here");
+         else
+           {
+             time_.set_meter (b_i, o_i);
+             default_grouping_ = 
+               Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)), b_i);
+           }
+       }
+      else if (tr_l->partial()) 
+       {
+         Moment m = tr_l->partial()->duration_;
+         String error = time_.try_set_partial_str (m);
+         if (error) 
+           {
+             tr_l->warning (error);
+           }
+         else 
+           time_.setpartial (m);
+       }
+      else if (tr_l->barcheck()) 
+       {
+         if (time_.whole_in_measure_) 
+           {
+             tr_l ->warning ("Barcheck failed");
+           
+             time_.whole_in_measure_ = 0; // resync
+             time_.error_b_ = true;
+           }
+
+       }
+      else if (tr_l->cadenza()) 
+       {
+         time_.set_cadenza (tr_l->cadenza()->on_b_);
+
+       }
+      else if (tr_l->measuregrouping()) 
+       {
+         default_grouping_ = 
+           parse_grouping (tr_l->measuregrouping()->beat_i_arr_,
+                           tr_l->measuregrouping()->elt_length_arr_);
+
+       }
+    }
+}
+
+
+void
+Timing_translator::do_pre_move_processing()
+{
+  timing_req_l_arr_.set_size (0);
+  Global_translator *global_l = 
+    daddy_trans_l_->ancestor_l (100)->global_l (); // ugh 100.
+  
+  if (!time_.cadenza_b_)
+    global_l->add_moment_to_process (time_.next_bar_moment ());
+}
+
+IMPLEMENT_IS_TYPE_B1(Timing_translator, Translator);
+ADD_THIS_TRANSLATOR(Timing_translator);
+
+void
+Timing_translator::do_creation_processing()
+{
+  time_.when_ = now_moment ();
+}
+
+void
+Timing_translator::do_post_move_processing()
+{
+  time_.add (now_moment ()  - time_.when_);
+}
+
diff --git a/lily/translation-property.cc b/lily/translation-property.cc
new file mode 100644 (file)
index 0000000..483036b
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+  translation-property.cc -- implement Translation_property
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "translation-property.hh"
+#include "debug.hh"
+
+IMPLEMENT_IS_TYPE_B1(Translation_property, Music);
+
+void
+Translation_property::do_print () const
+{
+#ifndef NPRINT
+  DOUT << "." << var_str_ << " = " << String(value_);
+#endif
+}
diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc
new file mode 100644 (file)
index 0000000..b313340
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  translator-ctors.cc -- implement Translator construction
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "translator.hh"
+#include "dictionary.hh"
+#include "debug.hh"
+
+Dictionary<Translator*> *global_translator_dict_p=0;
+
+void
+add_translator (Translator *t)
+{
+  if (!global_translator_dict_p)
+    global_translator_dict_p = new Dictionary<Translator*>;
+  
+  global_translator_dict_p->elem (t->name ()) = t;
+}
+
+Translator*
+get_translator_l (String s)
+{
+  if (global_translator_dict_p->elt_b (s))
+    {
+      return (*global_translator_dict_p)[s];
+    }
+
+  error ("Unknown translator `" + s +"\'");
+  return 0;
+}
diff --git a/lily/translator-group.cc b/lily/translator-group.cc
new file mode 100644 (file)
index 0000000..cd7b6e6
--- /dev/null
@@ -0,0 +1,328 @@
+/*
+  Translator_group.cc -- implement Translator_group
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "music-output-def.hh"
+#include "translator-group.hh"
+#include "translator.hh"
+#include "debug.hh"
+#include "pcursor.hh"
+
+Translator_group::Translator_group (Translator_group const&s)
+  : Translator(s)
+{
+  consists_str_arr_ = s.consists_str_arr_;
+  accepts_str_arr_ = s.accepts_str_arr_;
+  iterator_count_ =0;
+}
+
+Translator_group::~Translator_group ()
+{
+  assert (removable_b());
+}
+
+
+Translator_group::Translator_group()
+{
+  iterator_count_  = 0;
+}
+
+void
+Translator_group::check_removal()
+{
+  for (int i =0; i < group_l_arr ().size();) 
+    {
+      group_l_arr ()[i]->check_removal();
+      if (group_l_arr ()[i]->removable_b())
+       terminate_translator (group_l_arr ()[i]);
+      else 
+       i++;
+    }
+}
+
+
+
+IMPLEMENT_IS_TYPE_B1(Translator_group, Translator);
+
+void
+Translator_group::add (Translator *trans_p)
+{
+  trans_p_list_.bottom().add (trans_p);
+  trans_p->daddy_trans_l_ = this;
+  trans_p->output_def_l_ = output_def_l_;
+  trans_p->add_processing ();
+}
+
+bool
+Translator_group::removable_b() const
+{
+  return !(iterator_count_ || group_l_arr ().size());
+}
+
+Translator_group * 
+Translator_group::find_existing_translator_l (String n, String id)
+{
+  if (is_alias_b (n) && (id_str_ == id || !id)) 
+    return this;
+  Translator_group* r = 0;
+  for (int i =0; !r && i < group_l_arr ().size(); i++) 
+    {
+      r = group_l_arr ()[i]->find_existing_translator_l (n,id);
+    }
+  
+  return r;
+}
+
+Link_array<Translator_group>
+Translator_group::path_to_acceptable_translator (String type) const
+{
+  Link_array<Translator_group> retval; 
+
+  if (type_str_ == type)
+    {
+      retval.push (output_def_l ()->find_translator_l (type)->group_l ());
+    }
+  else for (int i=0; i < accepts_str_arr_.size (); i++)
+    {
+      Translator *t = output_def_l ()->find_translator_l (accepts_str_arr_[i]);
+      if (!t || !t->group_l ())
+       continue;
+      
+      Translator_group * g = t->group_l ();
+      
+      Link_array<Translator_group> result
+       = g->path_to_acceptable_translator (type);
+      if (result.size ())
+       {
+         retval.push (output_def_l ()->find_translator_l (type_str_)->group_l ());
+         retval.concat (result);
+         break;
+       }
+    }
+
+  return retval;
+}
+
+Translator_group*
+Translator_group::find_create_translator_l (String n, String id)
+{
+  Translator_group * existing = find_existing_translator_l (n,id);
+  if (existing)
+    return existing;
+  
+  Link_array<Translator_group> path = path_to_acceptable_translator (n);
+
+  if (path.size ())
+    {
+      Translator_group * current = this;
+
+      // start at 1.  The first one will be us.
+      for (int i=1; i < path.size (); i++) 
+       {
+         Translator_group * new_group = path[i]->clone ()->group_l ();
+         current->add (new_group);
+         current = new_group;
+       }
+      current->id_str_ = id;
+      return current;
+    }
+
+  
+  Translator_group *  ret =0;
+  if (daddy_trans_l_)
+    ret = daddy_trans_l_->find_create_translator_l (n,id);
+  else 
+    {
+      warning ("Can't find or create `" + n + "' called `" + id + "'\n");
+      ret =0;
+    }
+  return ret;
+}
+
+
+bool
+Translator_group::do_try_request (Request* req_l)
+{
+  bool hebbes_b =false;
+  for (int i =0; !hebbes_b && i < nongroup_l_arr ().size() ; i++)
+    hebbes_b =nongroup_l_arr ()[i]->try_request (req_l);
+  if (!hebbes_b && daddy_trans_l_)
+    hebbes_b = daddy_trans_l_->try_request (req_l);
+  return hebbes_b ;
+}
+
+int
+Translator_group::depth_i() const
+{
+  return (daddy_trans_l_) ? daddy_trans_l_->depth_i()  + 1 : 0;
+}
+
+Translator_group*
+Translator_group::ancestor_l (int level)
+{
+  if (!level || !daddy_trans_l_)
+    return this;
+  
+  return daddy_trans_l_->ancestor_l (level-1);
+}
+
+Link_array<Translator_group>
+Translator_group::group_l_arr () const
+{
+  Link_array<Translator_group> groups;
+  for (PCursor<Translator*> i (trans_p_list_.top ()); i.ok (); i++)
+    {
+      if (i->group_l ())
+       groups.push (i->group_l ());
+    }
+  return groups;
+}
+
+Link_array<Translator>
+Translator_group::nongroup_l_arr () const
+{
+  Link_array<Translator> groups;
+  for (PCursor<Translator*> i (trans_p_list_.top ()); i.ok (); i++)
+    {
+      if (!i->group_l ())
+       groups.push (i.ptr ());
+    }
+  return groups;
+}
+
+void
+Translator_group::terminate_translator (Translator*r_l)
+{
+  DOUT << "Removing " << r_l->name() << " at " << now_moment () << "\n";
+  r_l->removal_processing();
+  Translator * trans_p =remove_translator_p (r_l);
+  
+  delete trans_p;
+}
+
+Translator *
+Translator_group::remove_translator_p (Translator*trans_l)
+{
+  PCursor<Translator*> trans_cur (trans_p_list_.find (trans_l));
+  return trans_cur.remove_p();
+}
+
+
+Translator*
+Translator_group::get_simple_translator (char const *type) const
+{
+  for (int i=0; i < nongroup_l_arr ().size(); i++) 
+    {
+      if (nongroup_l_arr ()[i]->name() == type)
+       return nongroup_l_arr ()[i];
+    }
+  if (daddy_trans_l_)
+    return daddy_trans_l_->get_simple_translator (type);
+  return 0;
+}
+
+
+bool
+Translator_group::is_bottom_translator_b () const
+{
+  return !accepts_str_arr_.size ();
+}
+
+
+
+Translator_group*
+Translator_group::get_default_interpreter()
+{
+  if (accepts_str_arr_.size())
+    {
+      Translator*t = output_def_l ()->find_translator_l (accepts_str_arr_[0]);
+      Translator_group * g= t->clone ()->group_l ();
+      add (g);
+      
+      if (!g->is_bottom_translator_b ())
+       return g->get_default_interpreter ();
+      else
+       return g;
+    }
+  return this;
+}
+
+void
+Translator_group::each (Method_pointer method) const
+{
+  for (PCursor<Translator*> i (trans_p_list_.top ()); i.ok (); i++)
+    (i.ptr()->*method) ();     
+}
+
+void
+Translator_group::do_print() const
+{
+#ifndef NPRINT
+  if (!check_debug)
+    return ;
+  if (status == ORPHAN)
+    {
+      DOUT << "consists of: ";
+      for (int i=0; i < consists_str_arr_.size (); i++)
+       DOUT << consists_str_arr_[i] << ", ";
+      DOUT << "\naccepts: ";
+      for (int i=0; i < accepts_str_arr_.size (); i++)
+       DOUT << accepts_str_arr_[i] << ", ";
+    }
+  else
+    {
+      if (id_str_)
+       DOUT << "ID: " << id_str_ ;
+      DOUT << " iterators: " << iterator_count_<< "\n";
+    }
+  each (&Translator::print);
+#endif
+}
+
+void
+Translator_group::do_pre_move_processing ()
+{
+  each (&Translator::pre_move_processing);
+}
+
+void
+Translator_group::do_post_move_processing ()
+{
+  each (&Translator::post_move_processing);
+}
+
+void
+Translator_group::do_process_requests ()
+{
+  each (&Translator::process_requests);
+}
+
+void
+Translator_group::do_creation_processing ()
+{
+  each (&Translator::creation_processing);
+}
+
+void
+Translator_group::do_removal_processing ()
+{
+  each (&Translator::removal_processing);
+}
+
+void
+Translator_group::add_processing ()
+{
+  Translator::add_processing ();
+   for (int i=0; i < consists_str_arr_.size(); i++) 
+    {
+      Translator * t = output_def_l ()->find_translator_l (consists_str_arr_[i]);
+      if (!t)
+       warning ("Could not find `" +consists_str_arr_[i]+ "'");
+      else
+       add (t->clone ());
+    }
+}
index 642c9b94012a5b3630fee15b514956929e4cad1f..636123a950d32420ad9d1c51a29863303663cc28 100644 (file)
 /*
-  Translator.cc -- implement Translator
+  translator.cc -- implement Translator
 
   source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
+
 #include "translator.hh"
+#include "debug.hh"
+#include "translator-group.hh"
+#include "dictionary-iter.hh"
 
-Translator::Translator()
+Translator::~Translator ()
 {
-  iterator_count_  = 0;
 }
 
+Translator::Translator ()
+{
+  status = ORPHAN;
+  daddy_trans_l_ = 0;
+  output_def_l_ = 0;
+}
 
-IMPLEMENT_IS_TYPE_B(Translator);
+Translator::Translator (Translator const &s)
+{
+  status = ORPHAN;
+  daddy_trans_l_ =0;
+  output_def_l_ = s.output_def_l_;
+  properties_dict_ = s.properties_dict_;
+  type_str_ = s.type_str_;
+}
+
+bool
+Translator::is_alias_b (String s) const
+{
+  return s == type_str_;
+}
 
 bool
-Translator::try_request (Request*)
+Translator::do_try_request (Request *)
 {
   return false;
 }
+                           
+
+Moment
+Translator::now_moment () const
+{
+  return daddy_trans_l_->now_moment ();
+}
+
+
+void
+Translator::add_processing ()
+{
+  if (status == ORPHAN)
+    status = VIRGIN;
+}
+
+void
+Translator::print () const
+{
+#ifndef NPRINT
+  DOUT << name () << " {";
+  if (name () != type_str_)
+    DOUT << "type= " << type_str_;
+  for (Dictionary_iter<Scalar> i (properties_dict_); i.ok (); i++)
+    {
+      DOUT << i.key () << "=" << i.val () <<"\n";
+    }
+  do_print ();
+  DOUT << "}\n";
+#endif
+}
+
+void
+Translator::do_print () const
+{
+}
+
+IMPLEMENT_IS_TYPE_B(Translator);
+
+
+void
+Translator::creation_processing ()
+{
+  if (status >= CREATION_INITED)
+    return ;
+  
+  do_creation_processing ();
+  status = CREATION_INITED;
+}
+
+void
+Translator::post_move_processing()
+{
+  if (status >= MOVE_INITED)
+    return;
 
+  creation_processing();
+  do_post_move_processing();
+  status = MOVE_INITED;
+}
 
 void
-Translator::print() const
+Translator::removal_processing()
+{
+  creation_processing();
+  do_removal_processing();
+}
+
+
+bool
+Translator::try_request (Request * r)
 {
+  if (status < MOVE_INITED)
+    post_move_processing();
+
+  return do_try_request (r);
+}
 
+void
+Translator::process_requests()
+{
+  if (status < PROCESSED_REQS)
+    post_move_processing();
+  else if (status >= PROCESSED_REQS)
+    return; 
+  
+  status = PROCESSED_REQS;
+  do_process_requests();
+}
+
+void
+Translator::pre_move_processing()
+{
+  do_pre_move_processing();
+  status = CREATION_INITED;
+}
+
+Scalar
+Translator::get_property (String id)
+{
+  if (properties_dict_.elt_b (id))
+    {
+      return properties_dict_[id];
+    }
+  
+  if (daddy_trans_l_)
+    return daddy_trans_l_->get_property (id);
+
+  return "";
+}
+
+void
+Translator::set_property (String id, Scalar val)
+{
+  properties_dict_[id] = val;
+}
+
+
+Music_output_def *
+Translator::output_def_l () const
+{
+  return output_def_l_;
 }
diff --git a/lily/type-swallow-trans.cc b/lily/type-swallow-trans.cc
new file mode 100644 (file)
index 0000000..b90ced5
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  type-swallow-trans.cc -- implement Type_swallow_translator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "type-swallow-trans.hh"
+#include "musical-request.hh"
+
+Type_swallow_translator::Type_swallow_translator ()
+{
+  type_ =0;
+}
+
+bool
+Type_swallow_translator::do_try_request (Request*r)
+{
+  if (type_&&r->is_type_b (type_))
+      return true;
+  return false;
+}
+
+IMPLEMENT_IS_TYPE_B1(Type_swallow_translator, Translator);
+
+DECLARE_REQUEST_SWALLOWER(Skip_req);
+
index 65fcceec2dfedbc5954876cc540c6deee2cda894..94f5d0520437e3da70de61835c5c920c39731380 100644 (file)
@@ -46,4 +46,4 @@ Vertical_align_engraver::acknowledge_element (Score_elem_info i)
 
 
 IMPLEMENT_IS_TYPE_B1(Vertical_align_engraver, Engraver);
-ADD_THIS_ENGRAVER(Vertical_align_engraver);
+ADD_THIS_TRANSLATOR(Vertical_align_engraver);
diff --git a/lily/voice-group-gravs.cc b/lily/voice-group-gravs.cc
deleted file mode 100644 (file)
index 927d998..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-  voicegroup.cc -- implement Voice_group_engravers
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-#include "proto.hh"
-#include "plist.hh"
-#include "musical-request.hh"
-#include "voice-group-gravs.hh"
-#include "engraver.hh"
-#include "command-request.hh"
-#include "debug.hh"
-
-
-Voice_group_engravers::Voice_group_engravers()
-{
-  dir_ =CENTER;
-}
-
-bool
-Voice_group_engravers::do_try_request (Request*r_l)
-{
-  Command_req* c_l = r_l->command();
-  if (c_l&& c_l->groupfeature()) 
-    {
-      Feature f;
-      f.type_ = c_l->groupfeature()->type_str_;
-      f.value_ = c_l->groupfeature()->value_str_;
-      set_feature (f);
-      return true;
-    }
-  return Engraver_group_engraver::do_try_request (r_l);
-}
-
-
-
-IMPLEMENT_IS_TYPE_B1(Voice_group_engravers,Engraver_group_engraver);
-
-void
-Voice_group_engravers::do_print() const
-{
-#ifndef NPRINT
-  Engraver_group_engraver::do_print();
-#endif
-}
-
-
-
-Scalar
-Voice_group_engravers::get_feature (String f)
-{
-  if (f == "vdir")
-    return dir_;
-  Engraver_group_engraver::get_feature (f);
-}
-
-ADD_THIS_ENGRAVER(Voice_group_engravers);
index b8318e2c745975bdaf2c9ee67752e93bcbc11cf4..a5b3d60711d5f733d70dfef15692654c413b940e 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#include "translator.hh"
+#include "translator-group.hh"
 #include "debug.hh"
 #include "voice-iterator.hh"
 #include "music-list.hh"
index 3d5f8bf8850489fa4d6a5f50f937d67d43cc90a4..55823d2e0a020f189a175c16c749fa83a5d9825a 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 0.1.12
-Entered-date: 03SEP97
+Version: 0.1.13
+Entered-date: 11SEP97
 Description:   LilyPond is the GNU Project music typesetter. This
                program converts music definition files into
                visual or auditive output: it can typeset formatted
@@ -14,8 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps
-       395k lilypond-0.1.12.tar.gz 
+       395k lilypond-0.1.13.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       395k lilypond-0.1.12.tar.gz 
+       395k lilypond-0.1.13.tar.gz 
 Copying-policy: GPL
 End
index 2d43580ecfc0b7cb6da8856dc216ea469aaee179..dbee70b290d5cc872710f93d956075d1e4969dbd 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.1.12
+Version: 0.1.13
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.12.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.13.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
@@ -29,7 +29,7 @@ make -C Documentation gifs
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
 %doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README 
-%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/fugue1.ly input/gallina.ly input/gallina.tex input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/prelude1.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen-16.tex input/standchen-20.tex input/standchen.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wohltemperirt.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
+%doc input/abbrev.ly input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/gallina.ly input/gallina.tex input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen-16.tex input/standchen-20.tex input/standchen.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
 %doc Documentation/out/lelie_logo.gif
 /usr/bin/convert-mudela
 /usr/bin/mudela-book
index c6fbecd8c1d5c8d4470f55bc9a8eedef0ed587ba..f3523f04c14d1249bce00ebb9bc1a5ac5b8a6a71 100644 (file)
@@ -12,7 +12,7 @@ include ./$(depth)/make/Include.make
 # 
 TEXFILES = $(wildcard *.tex)
 MFFILES = $(wildcard *.mf)
-DISTFILES = Makefile $(MFFILES) $(TEXFILES)
+EXTRA_DISTFILES = $(MFFILES) $(TEXFILES) TODO
 #
 
 localinstall:
diff --git a/mf/TODO b/mf/TODO
new file mode 100644 (file)
index 0000000..06eef8d
--- /dev/null
+++ b/mf/TODO
@@ -0,0 +1,11 @@
+       - move to OpusTeX fonts
+       - make own lilyfont{10,11,13,16,20} files
+       - opustex/lilypond fonts from the same generic driver files
+       - LilyPond fonts should generate TFM spacing info
+       - include important spaacing dims in TFM
+       - lilyrules.mf for different rules (lines) ?
+       - check out Adobe Sonata/Petrucci font layout.  They are the
+standard for Music fonts
+       - rewrite : make a metafont iso font
+l
+
diff --git a/mf/dimen.tex b/mf/dimen.tex
new file mode 100644 (file)
index 0000000..1b38526
--- /dev/null
@@ -0,0 +1,57 @@
+%
+% A tex file to help determine dims.
+%
+
+\font\musicfont=musix16
+\font\slurfont=xslu16
+\font\specfont=musixspx
+\def\thefont{\musicfont}
+%\def\thefont{\specfont}
+
+\def\mb#1{{\thefont\char#1}}
+
+\newdimen\wid
+\newdimen\inc
+\newdimen\here
+\def\hruler#1{%
+        \wid=#1pt
+        \inc=\wid
+        \divide\inc by #1
+        \divide\wid by 2
+        \here=-\wid
+        \loop\ifdim\here<\wid\advance\here by\inc
+                \hbox to0pt{\kern\here\vrule width0.05pt height 1pt depth 1pt\hss}%
+        \repeat%
+}
+
+\def\vruler#1{%
+        \wid=#1pt
+        \inc=\wid
+        \divide\inc by #1
+        \divide\wid by 2
+        \here=-\wid
+        \loop\ifdim\here<\wid\advance\here by\inc
+                \hbox to0pt{\vbox to0pt{\vss\hrule width2pt height 0.05pt\kern\here}\hss}%
+        \repeat%
+}
+\def\twhrul{\hbox to 0pt{\hbox{\hruler{20}%
+       \vrule width0.1pt height 2pt depth 2pt}}}
+\def\twvrul{\vbox to0pt{\vss\hbox to0pt{\hss\vruler{12}}\vss}%
+       \kern-1pt\vrule width4pt height 0.1pt}%
+       
+\def\doitem#1{
+        #1%
+        \vbox to12pt{\vfill\hbox to0pt{\qquad\kern-1pt\twvrul\hss}}%
+        \hbox to50pt{\qquad\twhrul\mb{#1}\hss}%
+       \setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
+
+\newcount\n
+\def\charn{\n=-1
+        \loop\ifnum\n<255\advance\n by1
+        \doitem{\number\n}\endgraf\repeat}
+
+
+        \charn
+
+\bye
index 10b1d534f01b1239820761f72823df008429b375..914f005e682747197d1c6b1f9b67259abc41ef39 100644 (file)
@@ -2,7 +2,7 @@
 % A tex file to help view dynamic letters
 %
 
-\font\dynfont=dyn10 scaled \magstep2
+\font\dynfont=dyn10
 \def\thefont{\dynfont}
 
 \def\mb#1{{\thefont\char#1}}
 %        \vbox to12pt{\vfill\hbox to0pt{\qquad\kern-1pt\twvrul\hss}}%
 %        \hbox to50pt{\qquad\twhrul\mb{#1}\hss}%
         \hbox to 30pt{\qquad\mb{#1}\hss}
-       \setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
+        \setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
 
 \newcount\n
 \def\charn{\n=-1
-        \loop\ifnum\n<5\advance\n by1
+        \loop\ifnum\n<4\advance\n by1
         \doitem{\number\n}\endgraf\repeat}
 
         \charn
 
-\input dyndefs
+%from lilyponddefs
+% dynamics take extra kerning
+\def\dyn{\dynfont}
+\def\kdynf{{\dynfont \char0\kern-.2ex}}
+\def\kdynm{{\dynfont \char1\kern-.18ex}}
+\def\kdynp{{\dynfont \char2\kern-.08ex}}
+\def\kdyns{{\dynfont \char3\kern-.22ex}}
+\def\kdynz{{\dynfont \char4\kern-.2ex}}
+
+\def\dynp{\kdynp}
+\def\dynpp{\dynp\kdynp}
+\def\dynppp{\dynpp\kdynp}
+\def\dynmp{\kdynm\kdynp}
+\def\dynmf{\kdynm\kdynf}
+\def\dynf{\kdynf}
+\def\dynff{\dynf\kdynf}
+\def\dynfff{\dynff\kdynf}
+
+\def\dynfp{\kdynf\kern.35ex\kdynp}
+\def\dynsf{\kdyns\kdynf}
+\def\dynsfz{\dynsf\kern.3ex\kdynz}
 
 \hbox{\dynp}
 \hbox{\dynpp}
index 7e2d853f74bdd8d15eb9e8bc04913b84b65f1e92..3b49ec253d09f05c6757d8c048e137b47872b5a1 100644 (file)
@@ -94,32 +94,19 @@ math_fitting:=false;    % should math-mode spacing be used?
 % "s", "m", and "z".  sometimes the "m" and "z" are a bit fatter than
 % "s".
 
-slant:=.68;      % tilt ratio $(\Delta x/\Delta y)$
+slant:=.62;      % tilt ratio $(\Delta x/\Delta y)$
 crisp#:=19/36pt#;    % diameter of serif corners
 tiny#:=19/36pt#;    % diameter of rounded corners
 fine#:=20/36pt#;    % diameter of sharply rounded corners
 thin_join#:=20/36pt#;    % width of extrafine details
-stem#:=72/36pt#;    % lowercase stem breadth
-%curve#:=64/36pt#;    % lowercase curve breadth
-flare#:=52/36pt#;    % diameter of bulbs or breadth of terminals
+stem#:=57/36pt#;    % lowercase stem breadth
+curve#:=64/36pt#;    % lowercase curve breadth
+flare#:=64/36pt#;    % diameter of bulbs or breadth of terminals
 
-%  mode_setup; font_setup;
-mode_setup;
-font_setup;
-
-num=-1;
+mode_setup; font_setup;
 input ital-f;
-
 slant:=.38;      % tilt ratio $(\Delta x/\Delta y)$
-stem#:=58/36pt#;    % lowercase stem breadth
-font_setup;
-
-input ital-f;
-stem#:=54/36pt#;    % lowercase stem breadth
-
-% mode_setup; font_setup;
-font_setup;
-
+mode_setup; font_setup;
 input ital-p;
 
 slant:=.28;      % tilt ratio $(\Delta x/\Delta y)$
@@ -132,12 +119,11 @@ fine#:=10/36pt#;    % diameter of sharply rounded corners
 thin_join#:=10/36pt#;    % width of extrafine details
 hair#:=20/36pt#;    % lowercase hairline breadth
 % stem#:=38/36pt#;    % lowercase stem breadth
-curve#:=43/36pt#;    % lowercase curve breadth
+curve#:=43/36pt#;    % lowercase curve breadth
 flare#:=42/36pt#;    % diameter of bulbs or breadth of terminals
 % ess#:=35/36pt#;      % breadth in middle of lowercase s
 
-% mode_setup; font_setup;
-font_setup;
+mode_setup; font_setup;
 
 input ital-m;
 input ital-s;
index 027eadaead54e37fdd2f00d55b4c8708d8b42113..be97ed02633986672fee32c0e5ea2a4bd8c4916b 100644 (file)
@@ -12,7 +12,7 @@
 % cmchar "Italic letter f";
 % beginchar("f",max(1.5u#,stem#)+max(3.5u#,2flare#),asc_height#,desc_depth#);
 \"Dynamic letter f";
-beginchar(incr num,max(1.5u#,stem#)+max(3.5u#,2flare#),asc_height#,desc_depth#);
+beginchar(0,max(1.5u#,stem#)+max(3.5u#,2flare#),asc_height#,desc_depth#);
 italcorr asc_height#*slant+.75u#;
 adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib;
 numeric theta; z88=(.5w-.5u,h); z89=(.5w+.5u,-d); theta=angle(z88-z89);
@@ -22,8 +22,7 @@ pos5(stem,theta-90); pos6(.5[hair,stem],0);
 pos7(vair,-90); pos8(hair,-180); pos9(flare,-180);
 rt x1r=hround(w+.25u); lft x8r=hround-.35u; x2=.6[x1,x4]; x7=.6[x8,x5];
 y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo;
-% y4=.25[x_height,h]; y5=.5[-d,y4];
-y4=x_height-.5bar; y5=y4;
+y4=.25[x_height,h]; y5=.5[-d,y4];
 z4=whatever[z88,z89]; z5=whatever[z88,z89];
 x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7];
 bulb(2,1,0); bulb(7,8,9);  % bulbs
index c3d85636837170aaeba4398bde1e79a16eef3c1b..6f6828d2d2ea00a0462675b4ba8f33770328763e 100644 (file)
@@ -12,7 +12,7 @@
 % cmchar "Italic letter m";
 % beginchar("m",15u#,x_height#,0);
 \"Dynamic letter m";
-beginchar(incr num,15u#,x_height#,0);
+beginchar(1,15u#,x_height#,0);
 italcorr 1/3x_height#*slant+.5hair#+.5u#;
 adjust_fit(if monospace:-1.5u#,-2u# else: 0,0 fi); pickup fine.nib;
 numeric shaved_stem; shaved_stem=mfudged.stem;
index c9e0cdc8889071a4d7ede9a3d81202ed5302a403..3c853cc8f2341dd785ed99d7a9ea9ae29f558032 100644 (file)
@@ -12,7 +12,7 @@
 % cmchar "Italic letter p";
 % beginchar("p",9u#,x_height#,desc_depth#);
 \"Dynamic letter p";
-beginchar(incr num,9u#,x_height#,desc_depth#);
+beginchar(2,9u#,x_height#,desc_depth#);
 italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi;
 adjust_fit(0,0); pickup fine.nib;
 x0=0; x2-.5stem=hround(2.5u-.5stem); hook_in(0,1,2);  % opening hook
index 60af94b6e527ba6c3732bd237f0943fc31ed752a..0599a312d874a7fef21569dad870e781eacc3b5d 100644 (file)
@@ -12,7 +12,7 @@
 % cmchar "Italic letter s";
 % beginchar("s",5.25u#+max(1.75u#,flare#),x_height#,0);
 \"Dynamic letter s";
-beginchar(incr num,5.25u#+max(1.75u#,flare#),x_height#,0);
+beginchar(3,5.25u#+max(1.75u#,flare#),x_height#,0);
 italcorr x_height#*slant-.5u#;
 adjust_fit(0,0); pickup fine.nib;
 numeric theta; theta=90-angle(40u,h); slope:=-h/40u;  % angle at middle
index 6c0f517aed62b5234f3d1080e42716e999a2fee8..9e8992878e205531982bf1a9383d7ac6194d8063 100644 (file)
@@ -12,7 +12,7 @@
 % cmchar "Italic letter z";
 % beginchar("z",5.5u#+max(1.5u#,stem#),x_height#,0);
 \"Dynamic letter z";
-beginchar(incr num,5.5u#+max(1.5u#,stem#),x_height#,0);
+beginchar(4,5.5u#+max(1.5u#,stem#),x_height#,0);
 italcorr x_height#*slant+.5hair#;
 adjust_fit(if monospace:.5u#,.5u# else: 0,0 fi); pickup fine.nib;
 pos1(hair,0); pos2(stem,-90); pos3(vair,-90); pos4(hair,0);
diff --git a/tex/dimen.tex b/tex/dimen.tex
deleted file mode 100644 (file)
index 1b38526..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-%
-% A tex file to help determine dims.
-%
-
-\font\musicfont=musix16
-\font\slurfont=xslu16
-\font\specfont=musixspx
-\def\thefont{\musicfont}
-%\def\thefont{\specfont}
-
-\def\mb#1{{\thefont\char#1}}
-
-\newdimen\wid
-\newdimen\inc
-\newdimen\here
-\def\hruler#1{%
-        \wid=#1pt
-        \inc=\wid
-        \divide\inc by #1
-        \divide\wid by 2
-        \here=-\wid
-        \loop\ifdim\here<\wid\advance\here by\inc
-                \hbox to0pt{\kern\here\vrule width0.05pt height 1pt depth 1pt\hss}%
-        \repeat%
-}
-
-\def\vruler#1{%
-        \wid=#1pt
-        \inc=\wid
-        \divide\inc by #1
-        \divide\wid by 2
-        \here=-\wid
-        \loop\ifdim\here<\wid\advance\here by\inc
-                \hbox to0pt{\vbox to0pt{\vss\hrule width2pt height 0.05pt\kern\here}\hss}%
-        \repeat%
-}
-\def\twhrul{\hbox to 0pt{\hbox{\hruler{20}%
-       \vrule width0.1pt height 2pt depth 2pt}}}
-\def\twvrul{\vbox to0pt{\vss\hbox to0pt{\hss\vruler{12}}\vss}%
-       \kern-1pt\vrule width4pt height 0.1pt}%
-       
-\def\doitem#1{
-        #1%
-        \vbox to12pt{\vfill\hbox to0pt{\qquad\kern-1pt\twvrul\hss}}%
-        \hbox to50pt{\qquad\twhrul\mb{#1}\hss}%
-       \setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
-
-\newcount\n
-\def\charn{\n=-1
-        \loop\ifnum\n<255\advance\n by1
-        \doitem{\number\n}\endgraf\repeat}
-
-
-        \charn
-
-\bye
diff --git a/tex/dyndefs.tex b/tex/dyndefs.tex
deleted file mode 100644 (file)
index 630cf8e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-% dyndefs.tex
-%
-
-\def\dyn{\dynfont}
-\def\dynaf{\dynfont\char0}
-\def\dynnf{\dynfont\char1}
-\def\dynnf{\dynfont\char1}
-\def\dynp{\dynfont\char2}
-\def\dynm{\dynfont\char3}
-\def\dyns{\dynfont\char4}
-\def\dynz{\dynfont\char5}
-
-\def\kdynf{\dynnf}
-\def\kdynp{\dynp\kern-.1ex}
-
-\def\dynf{\dynaf}
-\def\dynpp{\kdynp\dynp}
-\def\dynppp{\kdynp\kdynp\dynp}
-\def\dynmp{\dynm\kern -.2ex\dynp}
-\def\dynmf{\dynfont\raise.08ex\hbox{\dynm}\kern-.3ex\dynnf}
-\def\dynff{\kdynf\dynnf}
-\def\dynfff{\kdynf\kdynf\dynnf}
-
-\def\dynfp{\kdynf\dynp}
-\def\dynsf{\dyns\kern-.3ex\dynnf}
-\def\dynsfz{\dynsf\dynz}
-
index 49e60c567ead3f24be729c0617c91e847f93f771..9a5256e9aa8fe7ef08ca1787eb53aa4074cd7d0c 100644 (file)
@@ -66,6 +66,7 @@
         \noteheight=5pt
         \staffrulethickness=0.4pt
         \musixtwentyfonts
+        \font\textmusic=cmmi12
         \musixcalc
 }
 
         \notewidth=5pt
         \noteheight=4pt
         \musixsixteenfonts
+        \font\textmusic=cmmi10
         \musixcalc
 }
 
+\def\textsharp{\raise.4ex\hbox{\textmusic\char"5D}}
+\def\textflat{\raise.4ex\hbox{\textmusic\char"5B}}
+\def\flt{\raise.2ex\hbox{\mus\char"5B}}
+
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % do derivative calcs
 
 }
 
 
-\input dyndefs
+\def\kdynf{{\dynfont \char0\kern-.2ex}}
+\def\kdynm{{\dynfont \char1\kern-.18ex}}
+\def\kdynp{{\dynfont \char2\kern-.08ex}}
+\def\kdyns{{\dynfont \char3\kern-.22ex}}
+\def\kdynz{{\dynfont \char4\kern-.2ex}}
+
+\def\dynp{\kdynp}
+\def\dynpp{\dynp\kdynp}
+\def\dynppp{\dynpp\kdynp}
+\def\dynmp{\kdynm\kdynp}
+\def\dynmf{\kdynm\kdynf}
+\def\dynf{\kdynf}
+\def\dynff{\dynf\kdynf}
+\def\dynfff{\dynff\kdynf}
+
+\def\dynfp{\kdynf\kern.35ex\kdynp}
+\def\dynsf{\kdyns\kdynf}
+\def\dynsfz{\dynsf\kern.3ex\kdynz}
 
 \input taupindefs
 
 % big fat marks, if errors are detected.
 \def\columnerrormark{\placebox{-5pt}{0pt}{\bf C!}}
 \def\scorelineerrormark{\placebox{0pt}{-10pt}{\bf L!}}
+\def\errormark{{\bf E!}}
 \def\unknown{{\bf u}}
 
 \def\postheader{}
                 \renewcommand{\@oddfoot}{\ifnum\thepage=1
         {\hfil \LilyIdString
         }\else{foo\hfil\the\pageno\hfil}\fi}}
-        \def\ps@empty{
-                \renewcommand{\@oddhead}{}%
-                \renewcommand{\@evenfoot}{}%
-                \renewcommand{\@evenhead}{}%
-                \renewcommand{\@oddfoot}{\ifnum\thepage=1
-        {\hfil \LilyIdString
-        }\else{foo\hfil\the\pageno\hfil}\fi}}
 \fi
+
index 9e2c6c1c520f2fef2dfc013b5c9e888c81c83c10..2aef5e5e877b2d61e73b11c482abb28ceaa6f77b 100644 (file)
@@ -12,7 +12,7 @@
         \font\musicfnt=musix20
         \font\musicdraw=musixsps
         \font\italicfont=cmti10
-        \font\dynfont=dyn10 scaled \magstep2
+        \font\dynfont=dyn10% scaled \magstep2
         \font\musicmathfont=cmsy10
 }
 
@@ -29,7 +29,7 @@
         \font\hslurdfont=xslhd16
         \font\hslurhfont=xslhz20
         \font\musicfnt=musix16
-        \font\dynfont=dyn10 scaled \magstep1
+        \font\dynfont=dyn10% scaled \magstep1
         \font\musicdraw=musixsps
         \font\musicmathfont=cmsy8
 }
 \musicdef\halfball{'010}
 \musicdef\wholeball{'011}
 \musicdef\breveball{'040}
+\musicdef\longaball{'047}
 \musicdef\halfrest{'074}
 \musicdef\wholerest{'075}
+
 \musicdef\breverest{'072}
+\musicdef\breverest{'073} %% <- Mats, is this cool?
+
 %% hmm
 \musicdef\outsidehalfrest{10}
 \musicdef\outsidewholerest{11}