]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.1.15 release/0.1.15
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Sep 1997 12:12:47 +0000 (14:12 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Sep 1997 12:12:47 +0000 (14:12 +0200)
65 files changed:
Documentation/index.pod
Documentation/other-packages.pod
NEWS
TODO
VERSION
bin/make-website.in
init/table16.ly
input/coriolan-alto.ly
input/font.ly
input/gallina.ly
input/scsii-menuetto.ly
lily/VERSION
lily/abbreviation-beam.cc
lily/atom.cc
lily/bar.cc
lily/beam.cc
lily/bow.cc
lily/clef-item.cc
lily/crescendo.cc
lily/dots.cc
lily/dynamic-grav.cc
lily/general-script-def.cc
lily/gourlay-breaking.cc
lily/include/atom.hh [new file with mode: 0644]
lily/include/crescendo.hh
lily/include/lily-proto.hh
lily/include/lookup.hh
lily/include/musical-request.hh
lily/include/note-head.hh
lily/include/paper-def.hh
lily/include/span-bar.hh
lily/include/span-score-bar.hh
lily/include/stem.hh
lily/include/symbol.hh
lily/include/symtable.hh
lily/key-item.cc
lily/local-key-item.cc
lily/lookup.cc
lily/meter.cc
lily/molecule.cc
lily/musical-request.cc
lily/note.cc
lily/notehead.cc
lily/parser.y
lily/rest.cc
lily/score-elem.cc
lily/scoreline.cc
lily/script-def.cc
lily/span-bar.cc
lily/span-score-bar.cc
lily/stem-info.cc
lily/stem.cc
lily/symbol.cc [deleted file]
lily/symtable.cc
lily/template3.cc
lily/tex-beam.cc
lily/tex-slur.cc
lily/tex.cc
lily/text-def.cc
lily/text-item.cc
lily/text-spanner.cc
lily/translator-group.cc
make/lilypond.lsm
make/lilypond.spec
make/lilypond.spec.in

index 767db76fe249b7752268144f021db4f7927b7e35..c9c213623a37771c503bce31d75464147be84877 100644 (file)
@@ -23,6 +23,12 @@ examples of what LilyPond can do: MIDI, PS, .gif and input.
 </a
 >
 
+=head2 NEWS! 
+
+This is what the latest version brings:
+
+top_of_NEWS
+
 =head2 Documentation: Introduction
 
 =over 4
index 26b645fe06fe2f5bc48bfe597d0cf745e6080543..49c2e7dbe45da8d2f865225ff904a3d6d646db54 100644 (file)
@@ -45,20 +45,23 @@ 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 was written by Daniel Taupin.  Now obsoleted
-by MusiXTeX and OpusTeX.
+instrumental music.  It was originally written by Daniel Taupin.  
 
 It includes a full-featured set of fonts.
 
 =item MusiXTeX, http://www.gmd.de/Misc/Music/
 
-Newer version of MusicTeX.  It also contains contributions by Ross
-Mitchell and Andreas Egler.  Daniel Taupin's branch still carries this
-name.
+A rewrite of MusicTeX, originally by Ross Mitchell and Andreas Egler. 
+After quarrels,  MusiXTeX has been split into two branches:
+
+=item MusiXTeX, http://www.gmd.de/Misc/Music/
+
+Daniel Taupin's now maintains the branch that still carries 
+the name MusiXTeX.
 
 =item OpusTeX, http://www.inf.ethz.ch/people/achermann/opustex
 
-Andreas Egler's branch of MusiXTeX.
+Andreas Egler's branch is called MusiXTeX.
 
 =item ABC2MTeX, http://www.gre.ac.uk/~c.walshaw/abc
 
diff --git a/NEWS b/NEWS
index 8f004c6166b7de22eb032f7857fa30d1e17edf6d..0946caab2d68138430ffb2f19bc4694880d531ac 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,20 @@
+pl 15
+       - put top of NEWS file in the webpage
+       - breadth first search for engravers.
+       - bf: coriolan-alto.ly
+       - Stem / Notehead width now properly calced
+       - Atom and Symbol merged
+
 pl 14.jcn1
-       - lily's own music bolletjes (font-en-tja*.mf)
-       - {table,paper}* and taupindefs adaptions (when are we moving?)
+       - lily's own noteheads (balls/globes :)  (font-en-tja*.mf)
+       - {table,paper}* and taupindefs adaptations (when are we moving?)
        - fp, sf, sfz dynamics
        - font.ly
        - bf: dist mudela-mode
 
+*******
+sep 15
+
 pl 14
        - Simple but nifty mudela-mode.el for Emacs
        - slightly better syntax for single-note-repeat, now default kept in
diff --git a/TODO b/TODO
index 47cd313b8122253b06a3049a31e143f45e4f90a0..15869f6f39236b8e5b7f70a9cede2114da3f5d3a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,8 +6,17 @@ 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
 
+       - naming Mozarella, Madeira, Muella, Fontaigna?
+
        - bf: abbrevs over whole note
 
+       - scoping for properties
+
+       { \multi 2  < { \stemup .. } { \stemdown .. } >
+               c2 }
+       
+       this modifies \stem for the c2
+
        * use properties for:
        - Text_style
        - default_octave
@@ -21,9 +30,9 @@ grep for TODO and ugh/ugr
        - cadenza mode? 
        - MIDI instrument
        - staff title
-       
+
        * check out egcs
-       
+
        * give Items/Spanners access to unbroken originals      
 
 3RD PARTY BUGS:
@@ -102,8 +111,8 @@ languages:
 
        \score { < 
                \melodic \type Staff { c'4 g'4 }
-               \lyric {   \id "Lyric" ""; hello4 bye4 < a chord > }
-               \lyric {   \id "Lyric" ""; bye4 hello4 }
+               \lyric { \id "Lyric" ""; hello4 bye4 < a chord > }
+               \lyric { \id "Lyric" ""; bye4 hello4 }
                \melodic { \id "Staff" ""; c'4 g'4 }
        > }
 
@@ -120,7 +129,7 @@ languages:
        (which is at Voice_gravs level)
        - make encapsulated spacing problems.
 
-       * On-demand loading of simple-engravers
+       * On-demand loading of simple-engravers?
 
        * accidentals per Voice_group
 
@@ -260,8 +269,6 @@ SMALLISH PROJECTS
 
        * A range for context errors (eg. mark both { and }. )
 
-       * merge Atom and Symbol
-
        * lyric in staff  (sharpsharp in staff, text below)
 
        * write Dynamic_line (to group dynamics horizontally)
diff --git a/VERSION b/VERSION
index 67ef9c7c0003347ec45b23f0924b6eb73e47639d..e7f388b50643ec3c6851845ee5841302d365363d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 14
+TOPLEVEL_PATCH_LEVEL = 15
 
 # use to send patches, always empty for released version:
-TOPLEVEL_MY_PATCH_LEVEL = .jcn1
+TOPLEVEL_MY_PATCH_LEVEL = 
index 98b49fd31dde2de6e71646ac8a8c3412f11aa6b2..7f25e76d9f93939347c83035a2a0f3b274d2e84f 100644 (file)
@@ -221,9 +221,35 @@ sub copy_txt_file
     if (! $f =~ /.txt$/) {
        $d = "$f.txt";
     }
-    print $f, $d;
+    print, $d;
 }
     
+sub top_of_NEWS
+{
+    open NEWS, "NEWS.txt";
+    input_record_separator NEWS "****";
+    $desc = <NEWS>;
+    chop ($desc);
+    close NEWS;
+
+    return $desc;
+}
+
+sub edit_index
+{
+    $ton = top_of_NEWS();
+    $ton = "\n<XMP>\n$ton\n</XMP>\n";
+    open INDEX, "index.html";
+    input_record_separator NEWS undef;
+    $index = <INDEX>;
+    close INDEX;
+    $index =~ s/top_of_NEWS/$ton/;
+    open INDEX, ">index.html";
+    print INDEX $index;
+    close INDEX;
+}
+
+
 sub copy_files
 {  
     print "copying files\n";
@@ -302,6 +328,7 @@ sub main
 
     gen_html;
     copy_files;
+
     if (! $opt_noexamples) {
        gen_examples;
        gen_list;
@@ -310,6 +337,7 @@ sub main
     set_images;
 
     edit_html;
+    edit_index;
     docxx_update;
     do_tar;
 }
index 6abe8df49cdaadfc300b46c48a76317be86ac4d5..5097530ac834f83e2c120c3bc17dd9798e2c17ed 100644 (file)
@@ -75,7 +75,6 @@ table_sixteen=
        "tenor_change"  "\caltoclef"    0.0\pt  11.2\pt 0.0\pt  16.0\pt
      }
 
-     % dimens are ignored?
      "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
index 8fd27dd47e76383a2385f5ee9141b8b112ec0faf..f580b6eb99eae1c285dd115d4e5ae525a2e1d407 100644 (file)
@@ -19,68 +19,60 @@ EndMudelaHeader
 
 \version "0.1.6";
 
-alto = \melodic{ 
-       
+alto1 = \melodic{
        \meter 4/4; 
        \key bes es as;
                
        \clef "alto";
        % these are chords (i.e. non-divisi)
-       
-%30     
-       <       
-               { \octave  c ;
+       { \octave  c ;
                        
-                       [ c8 c-. ] c2.( | 
+       [ c8 c8-. ] c2.( | 
 %31
-                       [ ) c8 c-. ] c2.( | 
+       [ ) c8 c8-. ] c2.( | 
 %32
-                       [ ) c8 c-. ] c4. c-. c4( |
+       [ ) c8 c8-. ] c4. c8-. c4( |
 %33
-                       [ ) c8 c-. ] c4. c-. c4 
-               \group "+bla";
-                \stemup[ c16^"div." c16 c16 c16 ] c4 c2 
-               \group "-";
-               }
+       [ ) c8 c8-. ] c4. c8-. c4  |
+
+       %% divisi
+       \type Voice="altodivisi1" {\stemup c4:16 ^"div." c4: c2: }
+       \stemboth
+       }
 %30:2
-               { 
-                       \octave  'c ;
-                       \textstyle "italic";
-                       % this should be a \dynamic, rather than text
-                       [ c c_"cresc. \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
-                               - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
-                               - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
-                               - \ \ \ \ - \ \ \ \ -" ] c2.( |  
-                       \textstyle "roman";
+}
+
+alto2 = \melodic{ 
+               \octave  'c ;
+               \textstyle "italic";
+               % this should be a \dynamic, rather than text
+               [ c8 c8_"cresc. \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \ 
+                       - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \ 
+                       - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \ 
+                       - \ \ \ \ - \ \ \ \ -" ] c2.( |  
+               \textstyle "roman";
 %31:2
-                       [ ) c8 c-. ] c2.( | 
+               [ ) c8 c-. ] c2.( | 
 %32:2
-                       [ ) c8 c-. ] c4. c-. c4( | 
+               [ ) c8 c-. ] c4. c8-. c4( | 
 %33:2
-                       [ ) c8 c-. ] c4. c-. c4 |
-                       \octave c ;
+               [ ) c8 c-. ] c4. c8-. c4 |
+               \octave c ;
 
 %34            
-                       \group "+b";
-       % these are two \voices (i.e. divisi)
-       % the c4 and c2, however are really 16th...
-       % we-ll say "simile" for now...
+               % these are two \voices (i.e. divisi)
+               % the c4 and c2, however are really 16th...
+                       % we-ll say "simile" for now...
        % 
-                       \octave  'c ;
-                       \textstyle "italic";
-                       \stemdown
-                       [ as16 \ff as16 as16 as16 ] as4_"simile" as2
-                       \textstyle "roman";
-                       \group "-";
-               }
-       >
-       
+               \octave  'c ;
+               \type Voice="altodivisi2" {
+               \stemdown
+               as4: as4: as2}
+               \stemboth
 }
 
 \score{
-       \staff{ melodicregs alto }
+       \type Voice < \alto1 \alto2 >
        \paper{ 
-               \unitspace 14\mm
-               \geometric 1.4
        }
 }
index 1cc2af59bbd90d37461896eea6e309a2dc6ce77a..955c8d9b8f083b66cac4b38cc046c97e0fdeba23 100644 (file)
@@ -14,7 +14,7 @@ TestedFeatures        font-en-tja
                c2 g c' a'
                c4 g c' a'
                a\ppp a\pp a\p a\mp a\mf a\f a\ff a\fff
-               a\fp a\sf a\sfz
+               %a\fp a\sf a\sfz
        }
        \paper{ 
            \paper_twenty
index c13e9fdbf62db061d5ba6af1a83b3a484240b514..2d110e4a79409005d6fb6818a6e826a0b83439ac 100644 (file)
@@ -18,10 +18,6 @@ Subject: Re: brevis?
 
 [snip]
 
-Here comes a sample score where I've tried to fiddle around with different
-spacing parameters to get a decent layout, but it still looks quite strange.
-For example is the second half of the bar more spread out than the first
-half in many cases. 
 Hopefully it could be useful input to future improvements. I've entered the
 music directly from the 1637 manuscript and intend to publish it public
 domain on for example ftp.gmd.de when finished. You could include it as an
index 4e3590437c3b867946f4489e3caa1ff6146e0bfe..a2cb6fb0bd906a042e943380f92a38348938fb66 100644 (file)
@@ -63,6 +63,7 @@ IImenuetto = \melodic{
        \multi 2 <  
                {\stemup a4~  d'4 cis'4-. }
                { \stemdown f2 e4 } > |
+       \stemboth
 %%12
        < [ g'8^"4" d8 > f' e' f' d'^"3"~   c' ] |
 %%13
@@ -71,6 +72,7 @@ IImenuetto = \melodic{
                 { \stemup bes2 c'4 }
                 { \stemdown g4~  f4 e4 }% ugh
        > |
+       \stemboth
 %%14
        < [ a8 f8 > g8 a8 f8 ] < d'4-\upbow e4 'bes4 > |
 %%15
@@ -90,6 +92,7 @@ IImenuetto = \melodic{
                {\stemup  d'4( \stemup )cis'4 d'4 }  
                { \stemdown g2 f4 }
        > |
+       \stemboth
 %%22
        < { [ g8 ~  f8 g8 e8 ] }  cis8  > < f4 d4 > |
 %%23
index 7876a844d8c5263a77494217365182cfbeacdf0b..bb301778994050886eda9cec45a162a9e9cfc11d 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 14
+PATCH_LEVEL = 15
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index e47407cdc726baabda1b25c587dd02e556adc104..309337dffb893dd7795fbae9a84cb367e72a73a6 100644 (file)
@@ -14,7 +14,7 @@
 #include "abbreviation-beam.hh"
 #include "misc.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "leastsquares.hh"
 #include "stem.hh"
index 00660aac555a6751a9918ae6299a23c231794a73..0f1f2052891710a10d25883ab588aa3e53a12580 100644 (file)
@@ -5,7 +5,7 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-#include "symbol.hh"
+#include "atom.hh"
 #include "tex.hh"
 #include "interval.hh"
 #include "dimen.hh"
@@ -17,28 +17,43 @@ void
 Atom::print() const
 {
 #ifndef NPRINT
-  DOUT << "texstring: " <<sym_.tex<<"\n";    
+  DOUT << "texstring: " <<tex_<<"\n";    
 #endif
 }
 
 Box
 Atom::extent() const
 {
-  Box b (sym_.dim);
+  Box b (dim_);
   b.translate (off_);
   return b;
 }
 
-Atom::Atom (Symbol s)
+
+Atom::Atom()
+  : dim_ (Interval (0,0),Interval (0,0))
+{
+  tex_ = "\\unknown";
+}
+
+Atom::Atom (String s, Box b)
+  :  dim_ (b)
 {
-  sym_=s;
+  tex_ = s;
 }
 
 
+String
+Atom::str() const 
+{
+  return "Atom (\'"+tex_+"\', (" + dim_.x().str () + ", " 
+    + dim_.y ().str () + "))";
+}
+
 String
 Atom::TeX_string() const
 {
-  String tex_str = sym_.tex;
+  String tex_str = tex_;
   Offset off = off_;
 
   /* infinity checks. */
index 43811f88c63fd8ccf9a788c4046b89fa35bb9cd3..05a855714861d389d68f24b6ad50eff4f3e5f31a 100644 (file)
@@ -34,7 +34,7 @@ Molecule*
 Bar::brew_molecule_p() const
 {    
   Paper_def *p = paper();
-  Symbol s = p->lookup_l()->bar (type_str_, 
+  Atom s = p->lookup_l()->bar (type_str_, 
                                 p->get_var ("bar_size"));
   Molecule*output = new Molecule (Atom (s));
   return output;
index 27825954b61eddc731d51582e61f7bad803e0b4d..d2b5e1e3c620a3d07a7460be9b052f0433c8a50b 100644 (file)
@@ -21,7 +21,7 @@
 #include "abbreviation-beam.hh"
 #include "misc.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "leastsquares.hh"
 #include "stem.hh"
@@ -304,8 +304,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
       int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ;
       int lwholebeams= here->beams_left_i_ <? prev->beams_right_i_ ;
       Real w = (here->hpos_f () - prev->hpos_f ())/4;
-      Symbol dummy;
-      Atom a (dummy);
+      Atom a;
       if (lhalfs)              // generates warnings if not
        a =  paper()->lookup_l ()->beam (sl, w);
       a.translate (Offset (-w, -w * sl));
index 1bd0a0076208bc0c2fd95f268321c85e329ecf54..34b7eb77940d9e49cc369ebbf9a5743dde9d40f4 100644 (file)
@@ -44,12 +44,10 @@ Bow::brew_molecule_p() const
   w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]) * nw_f ;
   Real round_w = w;            // slur lookup rounds the slurwidth .
   
-  Symbol sl = paper()->lookup_l ()->slur (dy , round_w, dir_);
+  Atom a = paper()->lookup_l ()->slur (dy , round_w, dir_);
 
   Real error = w-round_w;
-  
-  Atom a (sl);
-  a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
+    a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
                       pos_i_drul_[LEFT] * nh_f));
   output->add (a);
   return output;
index 920d2c5512fda8c06d55f21e120f2fb036416fc9..a0ca99bcc5b90d9fc987da43cf2435b2be25558c 100644 (file)
@@ -59,7 +59,7 @@ Clef_item::brew_molecule_p() const
   String t = type_;
   if  (change_b_)
     t += "_change";
-  Symbol s = paper()->lookup_l ()->clef (t);
+  Atom s = paper()->lookup_l ()->clef (t);
   Molecule*output = new Molecule (Atom (s));
   output->translate (paper()->internote_f () * y_off, Y_AXIS);
   return output;
index 3fe1a4114c00c78e77e375ca0195bf2d3c02ba55..1bd91d0f0cde3b4cdf9c856f65041cc9afbb076c 100644 (file)
@@ -24,12 +24,12 @@ Crescendo::Crescendo()
 Interval
 Crescendo::symbol_height() const
 {
-  return get_symbol().dim[Y_AXIS];
+  return get_symbol().dim_[Y_AXIS];
 }
 
 static Real absdyn_dim = 10 PT;        // ugh
 
-Symbol
+Atom
 Crescendo::get_symbol() const
 {    
   Real w_dim = width().length ();
@@ -48,7 +48,7 @@ Crescendo::get_symbol() const
       w_dim = 0;
     }
 
-  return Symbol (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0));
+  return Atom (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0));
 }
 
 Molecule*
@@ -60,7 +60,7 @@ Crescendo::brew_molecule_p() const
     x_off_dim += absdyn_dim;
   
   m_p = new Molecule;
-  Symbol s (get_symbol());
+  Atom s (get_symbol());
   m_p->add (Atom (s));
   m_p->translate (Offset (x_off_dim, pos_i_ * paper()->internote_f ()));
   return m_p;
index 0525aa1dda9e45f3cd01915d708d05be90b5df9f..946b74b19576e06a456235c28b6ec36965a0daab 100644 (file)
@@ -27,7 +27,7 @@ Dots::do_post_processing ()
 Molecule* 
 Dots::brew_molecule_p () const
 {
-  Symbol d = paper ()->lookup_l ()->dots (no_dots_i_);
+  Atom 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);
index 241737cf329b812e22ffc869331321b7592688a7..bd875bd8396beb80b154f21031e571b3c71155fc 100644 (file)
@@ -51,10 +51,8 @@ Dynamic_engraver::do_process_requests()
        {
          Text_def * td_p = new Text_def;
          td_p->align_i_ = 0;
-         String loud =Dynamic_req::loudness_str (
-                                                 dreq_l->absdynamic()->loudness_);
-           
-         td_p->text_str_ = paper()->lookup_l ()->dynamic (loud).tex;
+         String loud = dreq_l->absdynamic()->loudness_str ();      
+         td_p->text_str_ = paper()->lookup_l ()->dynamic (loud).tex_;
          td_p->style_str_ = "dynamic";
 
          assert (!dynamic_p_) ; // TODO
index 70c2b740af0b49ab8ca852a8f2bf4759afda2edc..2a014cc54205a282802c9ec460833bfe96b41061 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "general-script-def.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 Direction
 General_script_def::staff_dir() const
 {
@@ -65,7 +65,7 @@ General_script_def::do_print() const
 Atom
 General_script_def::get_atom (Paper_def*, Direction) const
 {
-  Symbol s;
+  Atom s;
   return Atom (s);
 }
 
index 9806130d140f79d2502223e44505bf889bc6d9c8..3daa4ab12e22cf11a966dc269c4860cc3d6c6bc5 100644 (file)
@@ -152,8 +152,6 @@ Gourlay_breaking::do_solve() const
 
   Array<Col_hpositions> lines;
 
-  Real max_energy_f = 0;
-  
   /* skip 0-th element, since it is a "dummy" elt*/
   for (int i = optimal_paths.size()-1; i> 0;) 
     {
diff --git a/lily/include/atom.hh b/lily/include/atom.hh
new file mode 100644 (file)
index 0000000..d25942c
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  atom.hh -- declare Atom
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#ifndef ATOM_HH
+#define ATOM_HH
+
+#include "string.hh"
+#include "boxes.hh"
+#include "lily-proto.hh"
+
+
+/// a symbol which can be translated, and freely copied
+struct Atom {
+  String tex_;
+  Box dim_;
+  Offset off_;
+
+  String str() const;          // for printing.
+  Atom (String, Box);
+    Atom ();
+  void translate (Offset o) {
+    off_ += o;
+  }
+  void translate (Real r,Axis a){
+    off_[a] += r;
+  }
+  /// how big is #this#?
+  Box extent() const;
+  void print() const;
+  String TeX_string() const;
+};
+#endif
index 99e0e287ccacd7a89aa16d1a08b8360623d60a99..6c8a9df8054fefa9b77a52d5b6af0cebe7075ac4 100644 (file)
@@ -30,7 +30,7 @@ protected:
   DECLARE_MY_RUNTIME_TYPEINFO;
     
 private:
-  Symbol get_symbol() const;
+  Atom get_symbol() const;
 };
 
 #endif // CRESCENDO_HH
index 7c735faa272ec351c62055a95ed29ab8e1bd00b7..d8b5b3bddcc52631e592c89a8883b00245dd1e54 100644 (file)
@@ -199,7 +199,7 @@ struct Stem_beam_engraver;
 struct Stem_req;
 struct String;
 struct Subtle_req;
-struct Symbol;
+struct Atom;
 struct Symtable;
 struct Symtables;
 struct Super_elem;
index 638e8c3bdffce990e67562dee83c55844869a4f3..f4696f9faae94e368fdce95d331c5b3bbd6c3328 100644 (file)
@@ -9,12 +9,13 @@
 #ifndef LOOKUPSYMS_HH
 #define LOOKUPSYMS_HH
 
-#include "symbol.hh"
+#include "atom.hh"
 #include "fproto.hh"
 #include "scalar.hh"
 #include "direction.hh"
 
-/// intuitive interface to symbol table
+/** handy interface to symbol table
+ */
 struct Lookup {
     Paper_def * paper_l_;
     Symtables *symtables_;
@@ -23,40 +24,40 @@ struct Lookup {
     void add (String, Symtable*);
     void print() const;
 
-    Symbol linestaff (int n, Real w) const;
-    Symbol fill (Box b) const;
-    Symbol beam_element (int,int,Real=0) const;
+    Atom linestaff (int n, Real w) const;
+    Atom fill (Box b) const;
+    Atom beam_element (int,int,Real=0) const;
 
     /// round slope to closest TeXslope
-    Symbol beam (Real&,Real) const;
+    Atom beam (Real&,Real) const;
 
     /**
       pos == 3 : 3 lines above staff (extending below note)
 
       pos == -3: below staff
       */
-    Symbol streepjes (int pos) const;
+    Atom streepjes (int pos) const;
 
-    Symbol vbrace (Real &dy) const;
-    Symbol meter (Array<Scalar>) const;
-    Symbol stem (Real y1_pos, Real y2_pos) const;
-    Symbol rule_symbol (Real height, Real width) const;
-    Symbol accidental (int) const;
-    Symbol ball (int) const;
-    Symbol flag (int, Direction) const;
-    Symbol rest (int, bool outside) const;
-    Symbol clef (String) const;
-    Symbol bar (String, Real height) const;
+    Atom vbrace (Real &dy) const;
+    Atom meter (Array<Scalar>) const;
+    Atom stem (Real y1_pos, Real y2_pos) const;
+    Atom rule_symbol (Real height, Real width) const;
+    Atom accidental (int) const;
+    Atom ball (int) const;
+    Atom flag (int, Direction) const;
+    Atom rest (int, bool outside) const;
+    Atom clef (String) const;
+    Atom bar (String, Real height) const;
     
-    Symbol dots (int) const;
-    Symbol slur (int dy, Real &dx, Direction dir) const;
-    Symbol half_slur (int dy, Real &dx, Direction dir, int xpart) const;
-    Symbol half_slur_middlepart (Real &dx, Direction dir) const;
-    Symbol big_slur (int dy, Real &dx, Direction dir) const;
-    Symbol text (String style, String text, int align = 1) const;
-    Symbol script (String idx) const;
-    Symbol hairpin (Real & width, bool decresc) const;
-    Symbol dynamic (String) const;
+    Atom dots (int) const;
+    Atom slur (int dy, Real &dx, Direction dir) const;
+    Atom half_slur (int dy, Real &dx, Direction dir, int xpart) const;
+    Atom half_slur_middlepart (Real &dx, Direction dir) const;
+    Atom big_slur (int dy, Real &dx, Direction dir) const;
+    Atom text (String style, String text, int align = 1) const;
+    Atom script (String idx) const;
+    Atom hairpin (Real & width, bool decresc) const;
+    Atom dynamic (String) const;
     Lookup();
     Lookup (Lookup const &);
     ~Lookup();
index 48e4a80258a2d3191e896118c6526fe6b892c668..5ebe4cb3a382b390e7073c5e83ec32dada0ef803 100644 (file)
@@ -221,17 +221,23 @@ public:
 
 class Dynamic_req  : public virtual Musical_req  {
 public:
-  /// for absolute dynamics
+  /**
+    for absolute dynamics
+
+    This sux. We'd want increasing numbers for FFF till PPP, but not 
+    for FP, SF, SFZ (FP is *not* louder than FFF)
+   */
   enum Loudness {
     FFF, FF, F, MF, MP, P, PP, PPP, FP, SF, SFZ
   };
-  static String loudness_str (Loudness);
+  static String loudness_static_str (Loudness);
   REQUESTMETHODS(Dynamic_req, dynamic);
 };
 
 class Absolute_dynamic_req  : public Dynamic_req  {
 public:
   Loudness loudness_;
+  String loudness_str () const;
   Absolute_dynamic_req();
   REQUESTMETHODS(Absolute_dynamic_req, absdynamic);
 };
index 50395212238feb11224959d7d374522ed03e0120..2a18dff66255956887a2e6bb339522e2cd02e078 100644 (file)
@@ -34,6 +34,7 @@ public:
   Note_head ();
   static int compare (Note_head * const &a, Note_head *const &b) ;
 protected:
+  virtual Interval do_width () const;
   virtual void do_pre_processing();
   virtual Molecule* brew_molecule_p() const;
 };
index a06674be8d6c16a04a2f73e8803c7e756dac431b..e73959e435f0a75d641f7ef3637362b497f64b02 100644 (file)
@@ -60,7 +60,6 @@ public:
 
   /// thickness of the standard line 
   Real rule_thickness() const;
-  Real whole_width() const;
   Real linewidth_f() const;
   /// height of the staff
   Real standard_height() const;
index d49974c902acc1c37b5faf74c3cee67ae0e54d28..136564678f483a9d3e90ef6e28a0458f2a3f6109 100644 (file)
@@ -29,7 +29,7 @@ protected:
     
     virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual Molecule * brew_molecule_p() const;
-    virtual Symbol get_bar_sym (Real dy) const;
+    virtual Atom get_bar_sym (Real dy) const;
 };
 
 #endif // SPAN_BAR_HH
index 5b25faa3ca0bf4df4dc1e35342d7be9daceb0102..06398251808aa95493e484b6e4f8894c53ad8f37 100644 (file)
@@ -32,7 +32,7 @@ public:
     SCORE_ELEM_CLONE(Piano_brace);
 protected:
     virtual Interval do_width() const;
-    virtual Symbol get_bar_sym (Real) const;
+    virtual Atom get_bar_sym (Real) const;
 };
 
 #endif // SPAN_SCORE_BAR_HH
index f7240397b302fdfaf1b868bc0cf29b465e393b77..7ed9e4615eccb76ab2459d3e6347c38e565a9f0d 100644 (file)
@@ -31,7 +31,7 @@ class Stem : public Item {
 
   Molecule abbrev_mol () const;
     
-  Real stem_bottom_f_, stem_top_f_;
+  Drul_array<Real> yextent_drul_;
     
   /// needed for determining direction/length
   int staff_size_i_;
@@ -45,7 +45,7 @@ class Stem : public Item {
     geen gedonder, jij gaat onder.
     -1 stem points down, +1: stem points up
     */
-  Real stem_xoffset_f_;
+  Direction  stem_xdir_;
 
   Link_array<Note_head> head_l_arr_;
   Link_array<Rest> rest_l_arr_;
@@ -97,6 +97,7 @@ public:
   Real stem_length_f() const;
   Real stem_end_f() const;
   Real stem_start_f() const;
+  Real note_delta_f () const;
 
   bool invisible_b() const;
     
index 09f7e14e4a930f2a7f23f0c78d914e7c28ab2e80..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,47 +1,2 @@
-/*
-  symbol.hh -- declare Symbol, Atom
 
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#ifndef SYMBOL_HH
-#define SYMBOL_HH
-
-#include "string.hh"
-#include "boxes.hh"
-#include "lily-proto.hh"
-
-struct Symbol {
-    String tex;
-    Box dim;
-
-    Symbol (String, Box);
-    Symbol();
-    String str() const;                // for printing.
-};
-
-
-/// a symbol which can be translated, and freely copied
-struct Atom {
-    Offset off_;
-    Symbol sym_;
-
-    /* *************** */
-    
-    void translate (Offset o) {
-       off_ += o;
-    }
-    void translate (Real r,Axis a){
-       off_[a] += r;
-    }
-    /// how big is #this#?
-    Box extent() const;
-    Atom (Symbol s);
-
-    void print() const;
-
-    String TeX_string() const;
-};
-#endif
+#error
index 1c37f7c565e605c7e26ec5a00444bd012622efa3..8c36ee6cbf5004d11bcbc98d4df1f7fbd7b23e53 100644 (file)
@@ -1,16 +1,23 @@
 /*
-  lilypond, (c) 1996,97 Han-Wen Nienhuys
+  symtable.hh -- declare 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
+
+
 #ifndef SYMTABLE_HH
 #define SYMTABLE_HH
+
 #include "dictionary.hh"
 #include "string.hh"
-#include "symbol.hh"
+#include "atom.hh"
 
-struct  Symtable : public Dictionary<Symbol> {
+struct  Symtable : public Dictionary<Atom> {
     String id_str;
     
-    Symbol lookup (String) const;
+    Atom lookup (String) const;
     void print() const;
 };
 
index f3b57d20a1f1738a48690f16ddf7277fdfe65612..4dd094b667ffd6df76709401d9af6f27167c9dae 100644 (file)
@@ -34,10 +34,10 @@ Key_item::read (Key_engraver const & key_grav_r)
   const Array<int> &idx_arr =key_grav_r.accidental_idx_arr_; 
   for (int i = 0 ; i< idx_arr.size(); i++) 
     {
-       int note = idx_arr[i];
-       int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
+      int note = idx_arr[i];
+      int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
 
-       add (note, acc);
+      add (note, acc);
     }
 }
 
@@ -54,8 +54,8 @@ Key_item::add (int p, int a)
 {
   if ((a<0 && p>FLAT_TOP_PITCH) ||
       (a>0 && p>SHARP_TOP_PITCH)) 
-        {
-    p -= 7; /* Typeset below c_position */
+    {
+      p -= 7; /* Typeset below c_position */
     }
   pitch.push (p);
   acc.push (a);
@@ -70,19 +70,18 @@ Key_item::brew_molecule_p() const
   
   for (int i =0; i < pitch.size(); i++) 
     {
-       Symbol s= paper()->lookup_l ()->accidental (acc[i]);
-       Atom a (s);
-       a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
-       Molecule m (a);
-       output->add_at_edge (X_AXIS, RIGHT, m); 
+      Atom a =paper()->lookup_l ()->accidental (acc[i]);
+      a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
+      Molecule m (a);
+      output->add_at_edge (X_AXIS, RIGHT, m);  
     }
   if (pitch.size()) 
     {
-       Molecule m (paper()->lookup_l ()->fill (Box (
-       Interval (0, paper()->note_width ()),
-       Interval (0,0))));
+      Molecule m (paper()->lookup_l ()->fill (Box (
+                                                  Interval (0, paper()->note_width ()),
+                                                  Interval (0,0))));
 
-       output->add_at_edge (X_AXIS, RIGHT, m);
+      output->add_at_edge (X_AXIS, RIGHT, m);
     }
   return output;
 }
@@ -94,7 +93,7 @@ Key_item::do_pre_processing()
 {
   if (default_b_) 
     {
-       transparent_b_ = (break_status_i() != 1);
-       set_empty (transparent_b_);
+      transparent_b_ = (break_status_i() != 1);
+      set_empty (transparent_b_);
     }
 }
index eab94bf65940bdb67c6befcc6cf603b7e8b2b951..65c5ad7253c070cbdd0d3ad43f9ebb631681cf85 100644 (file)
@@ -76,12 +76,12 @@ Local_key_item::brew_molecule_p() const
          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 ();
+      Atom a (paper()->lookup_l ()->accidental (accs[i].accidental_i_));
       a.translate (dy, Y_AXIS);
-
-      octmol->add_at_edge (X_AXIS, RIGHT, a);
+      Molecule m(a);
+      octmol->add_at_edge (X_AXIS, RIGHT, m);
     }
 
   if (octmol)
index 119c52e449e0a805f6c0b86e0800cb2c45b36af5..a706a36bd88f8b49f3ba779a3accd32365a20fc0 100644 (file)
@@ -54,24 +54,24 @@ Lookup::print() const
 #endif
 }
 
-Symbol
+Atom
 Lookup::text (String style, String text, int dir) const
 {
   Array<String> a;
  
   a.push (text);
-  Symbol tsym =  (*symtables_)("style")->lookup (style);
-  a[0] = substitute_args (tsym.tex,a);
+  Atom tsym =  (*symtables_)("style")->lookup (style);
+  a[0] = substitute_args (tsym.tex_,a);
 
-  Symbol s = (*symtables_)("align")->lookup (dir);
-  s.tex = substitute_args (s.tex,a);
-  s.dim = tsym.dim;
+  Atom s = (*symtables_)("align")->lookup (dir);
+  s.tex_ = substitute_args (s.tex_,a);
+  s.dim_ = tsym.dim_;
   return s;
 }
 
 
 
-Symbol
+Atom
 Lookup::ball (int j) const
 {
   if (j > 2)
@@ -81,57 +81,57 @@ Lookup::ball (int j) const
   return st->lookup (String (j));
 }
 
-Symbol
+Atom
 Lookup::rest (int j, bool o) const
 {
   return (*symtables_)("rests")->lookup (String (j) + (o ? "o" : ""));
 }
 
-Symbol
+Atom
 Lookup::fill (Box b) const
 {
-  Symbol s ((*symtables_)("param")->lookup ("fill"));
-  s.dim = b;
+  Atom s ((*symtables_)("param")->lookup ("fill"));
+  s.dim_ = b;
   return s;
 }
 
-Symbol
+Atom
 Lookup::accidental (int j) const
 {
   return (*symtables_)("accidentals")->lookup (String (j));
 }
 
 
-Symbol
+Atom
 Lookup::bar (String s, Real h) const
 {
   Array<String> a;
   a.push (print_dimen (h));
-  Symbol ret=(*symtables_)("bars")->lookup (s);;
-  ret.tex = substitute_args (ret.tex, a);
-  ret.dim.y() = Interval (0, h);
+  Atom ret=(*symtables_)("bars")->lookup (s);;
+  ret.tex_ = substitute_args (ret.tex_, a);
+  ret.dim_.y() = Interval (0, h);
   return ret;
 }
 
-Symbol
+Atom
 Lookup::script (String s) const
 {
   return (*symtables_)("scripts")->lookup (s);
 }
 
-Symbol
+Atom
 Lookup::dynamic (String s) const
 {
   return (*symtables_)("dynamics")->lookup (s);
 }
 
-Symbol
+Atom
 Lookup::clef (String s) const
 {
   return (*symtables_)("clefs")->lookup (s);
 }
  
-Symbol
+Atom
 Lookup::dots (int j) const
 {
   if (j>3) 
@@ -142,14 +142,14 @@ Lookup::dots (int j) const
   return (*symtables_)("dots")->lookup (j);
 }
 
-Symbol
+Atom
 Lookup::flag (int j, Direction d) const
 {
   char c = (d == UP) ? 'u' : 'd';
   return (*symtables_)("flags")->lookup (c + String (j));
 }
 
-Symbol
+Atom
 Lookup::streepjes (int i) const
 {
   assert (i);
@@ -167,63 +167,63 @@ Lookup::streepjes (int i) const
       arg = i;
       idx = "toplines";
     }
-  Symbol ret = (*symtables_)("streepjes")->lookup (idx);
+  Atom ret = (*symtables_)("streepjes")->lookup (idx);
   
   Array<String> a;
   a.push (arg);
-  ret.tex = substitute_args (ret.tex, a);
+  ret.tex_ = substitute_args (ret.tex_, a);
 
   return ret;
 }
 
-Symbol
+Atom
 Lookup::hairpin (Real &wid, bool decresc) const
 {
   int idx = int (rint (wid / 6 PT));
   if (!idx) idx ++;
   wid = idx*6 PT;
   String idxstr = (decresc)? "decrescendosym" : "crescendosym";
-  Symbol ret=(*symtables_)("param")->lookup (idxstr);
+  Atom ret=(*symtables_)("param")->lookup (idxstr);
      
   Array<String> a;
   a.push (idx);
-  ret.tex = substitute_args (ret.tex, a);
-  ret.dim.x() = Interval (0,wid);
+  ret.tex_ = substitute_args (ret.tex_, a);
+  ret.dim_.x() = Interval (0,wid);
   return ret;
 }
 
-Symbol
+Atom
 Lookup::linestaff (int lines, Real wid) const
 {
   Real internote_f = paper_l_ ->internote_f();
-  Symbol s;
+  Atom s;
   Real dy = (lines >0) ? (lines-1)*internote_f : 0;
-  s.dim = Box (Interval (0,wid), Interval (0,dy));
+  s.dim_ = Box (Interval (0,wid), Interval (0,dy));
 
   Array<String> a;
   a.push (lines);
   a.push (print_dimen (wid));
 
-  s.tex = (*symtables_)("param")->lookup ("linestaf").tex;
-  s.tex = substitute_args (s.tex, a);
+  s.tex_ = (*symtables_)("param")->lookup ("linestaf").tex_;
+  s.tex_ = substitute_args (s.tex_, a);
 
   return s;
 }
 
 
-Symbol
+Atom
 Lookup::meter (Array<Scalar> a) const
 {
-  Symbol s;
-  s.dim.x() = Interval (0 PT, 10 PT);
-  s.dim.y() = Interval (0, 20 PT);     // todo
-  String src = (*symtables_)("param")->lookup ("meter").tex;
-  s.tex = substitute_args (src,a);
+  Atom s;
+  s.dim_.x() = Interval (0 PT, 10 PT);
+  s.dim_.y() = Interval (0, 20 PT);    // todo
+  String src = (*symtables_)("param")->lookup ("meter").tex_;
+  s.tex_ = substitute_args (src,a);
   return s;    
 }
 
 
-Symbol
+Atom
 Lookup::stem (Real y1,Real y2) const
 {
   if (y1 > y2) 
@@ -232,24 +232,24 @@ Lookup::stem (Real y1,Real y2) const
       y1 = y2;
       y2 = t;
     }
-  Symbol s;
+  Atom s;
   
-  s.dim.x() = Interval (0,0);
-  s.dim.y() = Interval (y1,y2);
+  s.dim_.x() = Interval (0,0);
+  s.dim_.y() = Interval (y1,y2);
   
   Array<String> a;
   a.push (print_dimen (y1));
   a.push (print_dimen (y2));
        
-  String src = (*symtables_)("param")->lookup ("stem").tex;
-  s.tex = substitute_args (src,a);
+  String src = (*symtables_)("param")->lookup ("stem").tex_;
+  s.tex_ = substitute_args (src,a);
   return s;
 }
 
 /*
-  should be handled via TeX code and Lookup::bar()
+  should be handled via Tex_ code and Lookup::bar()
  */
-Symbol
+Atom
 Lookup::vbrace (Real &y) const
 {
   if (y < 2* 20 PT) 
@@ -265,19 +265,19 @@ Lookup::vbrace (Real &y) const
   
   int idx = int (rint ((y/2.0 - 20) + 148));
   
-  Symbol s = (*symtables_)("param")->lookup ("brace");
+  Atom s = (*symtables_)("param")->lookup ("brace");
   {
     Array<String> a;
     a.push (idx);
-    s.tex = substitute_args (s.tex,a);
-    s.dim.y() = Interval (0,y);
+    s.tex_ = substitute_args (s.tex_,a);
+    s.dim_.y() = Interval (0,y);
   }
   {
     Array<String> a;
     a.push (print_dimen (y/2));
     a.push (print_dimen (0));
-    a.push (s.tex);
-    s.tex = substitute_args ("\\placebox{%}{%}{%}", a);
+    a.push (s.tex_);
+    s.tex_ = substitute_args ("\\placebox{%}{%}{%}", a);
   }
 
        
index aa41b7922bbf785aabb15792fd25a7764ee34f20..0c4d4e0ad168b13cd0a9cf891b249d3b26ac63ff 100644 (file)
@@ -13,7 +13,7 @@ Meter::Meter (Array<Scalar>a)
 Molecule*
 Meter::brew_molecule_p() const
 {
-  Symbol s = paper()->lookup_l ()->meter (args);
+  Atom s = paper()->lookup_l ()->meter (args);
   return new Molecule (Atom (s));
 }
 
index e37f9e7c33d4ab9f34315d1f4d24c03a6880ef4a..4dfe7d6c1309dd0e130530e04fd7e12f26329ca8 100644 (file)
@@ -10,7 +10,7 @@
 #include "dimen.hh"
 #include "string.hh"
 #include "molecule.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "debug.hh"
 #include "tex.hh"
 
index c7a4b8fe9b7ad0152c805f77b443ba620e4bf822..5b69a4f5813cfa39e2616efaf8e403f46996cbaf 100644 (file)
@@ -423,32 +423,44 @@ Absolute_dynamic_req::do_print() const
 {
 #ifndef NPRINT
   Dynamic_req::do_print();
-  DOUT << " loudness " <<loudness_str (loudness_);
+  DOUT << " loudness " <<loudness_str ();
 #endif
 }
 
 String
-Dynamic_req::loudness_str (Loudness l) 
+Dynamic_req::loudness_static_str (Loudness l) 
 {
   switch (l) 
     {
-  case FFF: return "fff";
-  case FF: return "ff";
-  case F: return "f";
-  case MF: return "mf";
-  case MP: return "mp";
-  case P: return "p";
-  case PP: return "pp";
-  case PPP: return "ppp";
-
-  case FP: return "fp";
-  case SF: return "sf";
-  case SFZ: return "sfz";
+    case FFF: return "fff";
+    case FF: return "ff";
+    case F: return "f";
+    case MF: return "mf";
+    case MP: return "mp";
+    case P: return "p";
+    case PP: return "pp";
+    case PPP: return "ppp";
+    case FP: return "fp";
+    case SF: return "sf";
+    case SFZ: return "sfz";
     }
-  assert (false);
   return "";
 }
 
+String
+Absolute_dynamic_req::loudness_str () const
+{
+  String s = loudness_static_str (loudness_);
+  if (!s)
+    {
+      s = "mf";
+      warning (String ("Never heard of dynamic scale ") 
+              + loudness_ + " assuming mf");
+    }
+  return s;
+}
+
+
 Absolute_dynamic_req::Absolute_dynamic_req()
 {
   loudness_ = MF;
index caa6abf3da1d0ad729a3aebe4629ef3b622150a4..78e64294731e26f6cb536b580142b9a46beedb11 100644 (file)
@@ -49,7 +49,7 @@ Request*
 get_script_req (int d , General_script_def*def)
 {
   Musical_script_req* script_req_p = new Musical_script_req;
-  script_req_p->dir_ =d;
+  script_req_p->dir_ =(Direction)d;
   script_req_p->scriptdef_p_=def;
   return script_req_p;
 }
index 389ff0cf60ff8ed33cdf6014e21fef790f78e0e5..4d65dff62ea654f2eef62c8611b089a0e81114f4 100644 (file)
@@ -44,6 +44,15 @@ Note_head::compare (Note_head *const  &a, Note_head * const &b)
   return a->position_i_ - b->position_i_;
 }
 
+Interval
+Note_head::do_width () const
+{
+  Atom a =  paper ()->lookup_l()->ball (balltype_i_);
+  Interval i = a.dim_[X_AXIS];
+  i+= x_dir_ * i.length ();
+  return i;
+}
+
 Molecule*
 Note_head::brew_molecule_p() const 
 {
@@ -54,9 +63,9 @@ Note_head::brew_molecule_p() const
   // ugh
   bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
   
-  Symbol  s = p->lookup_l()->ball (balltype_i_);
+  Atom  s = p->lookup_l()->ball (balltype_i_);
   out = new Molecule (Atom (s));
-  out->translate (x_dir_ * s.dim.x().length (), X_AXIS);
+  out->translate (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
 
   if (streepjes_b) 
     {
@@ -65,7 +74,7 @@ Note_head::brew_molecule_p() const
        ? -((-position_i_)/2)
        : (position_i_-staff_size_i_)/2;
        
-      Symbol str = p->lookup_l()->streepjes (s);
+      Atom str = p->lookup_l()->streepjes (s);
       Molecule sm;
       sm.add (Atom (str));
       if (position_i_ % 2)
index d7b2a0d4faada19162d32d4068241e164c38920f..8a60f8b3ab2f46fdb45a02e4a3cc6ea1c53ef65f 100644 (file)
@@ -82,7 +82,7 @@
     General_script_def * script;
     Scalar *scalar;
     String *string;
-    Symbol * symbol;
+    Atom * symbol;
     Symtable * symtable;
     Symtables * symtables;
     Text_def * textdef;
@@ -1180,13 +1180,13 @@ symtable_body:
 
 symboldef:
        STRING  box             {
-               $$ = new Symbol (*$1, *$2);
+               $$ = new Atom (*$1, *$2);
                delete $1;
                delete $2;
        }
        | STRING {
                Box b (Interval (0,0), Interval (0,0));
-               $$ = new Symbol (*$1, b);
+               $$ = new Atom (*$1, b);
                delete $1;
        }
        ;
index d2ccd2a01b608bc8594f24a7df1ce043e37c572d..0a7dc7419a8b8cfe7b847a910743b7eaf94f904f 100644 (file)
@@ -37,7 +37,7 @@ 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));
+  Atom 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;
index c06ebd0d2cc014801dee5e1124dac3067078e072..35920338471fd553c9aef3c9303489a3952a3397 100644 (file)
@@ -293,8 +293,6 @@ Score_elem::handle_broken_dependencies()
   remove_us_arr.uniq();
   for (int i=0;  i <remove_us_arr.size(); i++)
     remove_dependency (remove_us_arr[i]);
-
-  //  status_i_= BROKEN;
 }
 
 /*
@@ -341,9 +339,6 @@ Score_elem::handle_prebroken_dependencies()
   for (int i=0;  i < old_arr.size(); i++)
     if (old_arr[i])
       substitute_dependency (old_arr[i], new_arr[i]);
-       
-       
-  //  status_i_= PREBROKEN;
 }
 
 
index 2bd4f870b48b6996d98f8835eca86401680f8662..f65690cafba48c48d4fed974463a69e795693a5e 100644 (file)
@@ -9,7 +9,7 @@
 #include "scoreline.hh"
 #include "dimen.hh"
 #include "spanner.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "p-col.hh"
 #include "p-score.hh"
index 6ece2874f582880172417783ebea320048fc17f1..fa067cd3cc96b9d08d1f1ea72e248b805a13d98a 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "debug.hh"
 #include "script-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
index e23b3226781ca2d4eb15b55cd4ce9bea8fb8d369..d4bd26f0a99662e2f69a9844080632856103852b 100644 (file)
@@ -9,7 +9,7 @@
 #include "dimen.hh"
 #include "span-bar.hh"
 #include "lookup.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "molecule.hh"
 #include "vertical-align-elem.hh"
@@ -55,8 +55,9 @@ Span_bar::set (Vertical_align_element *a)
 Interval
 Span_bar::do_width() const
 {
-  return paper()->lookup_l ()->bar (type_str_, 40 PT).dim.x (); // ugh
+  return paper()->lookup_l ()->bar (type_str_, 40 PT).dim_.x (); // ugh
 }
+
 void
 Span_bar::do_pre_processing()
 {
@@ -85,7 +86,7 @@ Span_bar::do_pre_processing()
     }
 }
 
-Symbol
+Atom
 Span_bar::get_bar_sym (Real dy) const
 {
   return paper()->lookup_l ()->bar (type_str_, dy);
@@ -107,7 +108,7 @@ Span_bar::brew_molecule_p() const
       y_int.unite (y + spanning_l_arr_[i]->height());
     }
 
-  Symbol s = get_bar_sym (y_int.length());
+  Atom s = get_bar_sym (y_int.length());
   Molecule*output = new Molecule (Atom (s));
   output->translate (y_int[-1], Y_AXIS);
   return output;
index 97b195ef1ea13a39cb98089c22e9c77045fa5d8a..5ad94b760dfda30d4786361497294f0f3f770d42 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "span-score-bar.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
@@ -29,7 +29,7 @@ Span_score_bar::do_pre_processing()
 }
 
 
-Symbol
+Atom
 Piano_brace::get_bar_sym (Real dy) const
 {
   return paper()->lookup_l ()->vbrace (dy);
index a3287ce55cbeb8891d2066fc347b8d432ee4c0d2..89cd395c0b66001f3bcff05ea20b8e4fc4012d2c 100644 (file)
@@ -11,7 +11,7 @@
 #include "dimen.hh"
 #include "misc.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "stem.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
index 60f7b1bad336edfdce8a3d64213fa2667e925665..a2aa5c55c4b7b5b85facd55522258cee705f6c95 100644 (file)
@@ -34,12 +34,12 @@ Stem::Stem ()
   beams_left_i_ = 0;
   beams_right_i_ = 0;
 
-  stem_bottom_f_ = stem_top_f_ = 0;
+  yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
   flag_i_ = 2;
   dir_ = CENTER;
+  stem_xdir_ = LEFT;
   staff_size_i_ = 8;
 
-  stem_xoffset_f_ =0;
   beam_gap_i_ = 0;
 }
 
@@ -75,19 +75,19 @@ Stem::do_print () const
 Real 
 Stem::stem_length_f () const
 {
-  return stem_top_f_-stem_bottom_f_ ;
+  return yextent_drul_[UP]-yextent_drul_[DOWN] ;
 }
 
 Real
 Stem::stem_start_f () const
 {
-  return (dir_ < 0)? stem_top_f_ : stem_bottom_f_;
+  return (dir_ < 0)? yextent_drul_[UP] : yextent_drul_[DOWN];
 }
 
 Real
 Stem::stem_end_f () const
 {
-  return (dir_ < 0)? stem_bottom_f_ : stem_top_f_;
+  return (dir_ < 0)? yextent_drul_[DOWN] : yextent_drul_[UP];
 }
 
 
@@ -99,8 +99,8 @@ Stem::set_stemend (Real se)
          (se <= min_head_i () && dir_ <0)))    
     warning ("Weird stem size; check for narrow beams");
 
-  stem_top_f_  = (dir_ < 0) ? max_head_i () : se;
-  stem_bottom_f_  = (dir_ < 0) ? se  : min_head_i ();
+  yextent_drul_[UP]  = (dir_ < 0) ? max_head_i () : se;
+  yextent_drul_[DOWN]  = (dir_ < 0) ? se  : min_head_i ();
 }
 
 int
@@ -207,13 +207,11 @@ Stem::set_default_extents ()
 
   set_stemend ((dir_< 0) ? 
               max_head_i ()-stem_length_f (): min_head_i () + stem_length_f ());
-  // ugh, a whole ball is wider
+  
+  if (dir_ == UP)
+    stem_xdir_ = RIGHT;
   if (head_l_arr_[0]->balltype_i_ <= 0)
-    stem_xoffset_f_ = paper ()->note_width () / 2;
-  else if (dir_ > 0)   
-    stem_xoffset_f_ = paper ()->note_width () - paper ()->rule_thickness ();
-  else
-    stem_xoffset_f_ = 0;
+    stem_xdir_ = CENTER;
 }
 
 /*
@@ -242,7 +240,7 @@ Stem::set_noteheads ()
       if (dy <= 1) 
        {
          if (parity)
-           head_l_arr_[i]->x_dir_ = (stem_xoffset_f_>0) ? UP:DOWN;
+           head_l_arr_[i]->x_dir_ = (stem_xdir_ == LEFT) ? LEFT : RIGHT;
          parity = !parity;
        }
       else
@@ -254,7 +252,7 @@ Stem::set_noteheads ()
 void
 Stem::do_pre_processing ()
 {
-  if (stem_bottom_f_== stem_top_f_)
+  if (yextent_drul_[DOWN]== yextent_drul_[UP])
     set_default_extents ();
   set_noteheads ();
   flag_i_ = flag_i_;
@@ -276,8 +274,8 @@ Stem::do_width () const
   else
     {
       Paper_def*p= paper ();
-      r = p->lookup_l ()->flag (flag_i_, dir_).dim.x ();
-      r+= stem_xoffset_f_;
+      r = p->lookup_l ()->flag (flag_i_, dir_).dim_.x ();
+      r += note_delta_f ();
     }
   return r;
 }
@@ -285,10 +283,10 @@ Stem::do_width () const
 
   
 Molecule
- Stem::abbrev_mol () const
+Stem::abbrev_mol () const
 {
   Real dy = paper ()->interbeam_f ();
-  Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim.x ().length ();
+  Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim_.x ().length ();
   Real beamdy = paper ()->interline_f () / 2;
  
   int beams_i = 0;
@@ -326,8 +324,8 @@ Molecule*
 {
   Molecule *mol_p =new Molecule;
   
-  Real bot  = stem_bottom_f_;
-  Real top = stem_top_f_;
+  Real bot  = yextent_drul_[DOWN];
+  Real top = yextent_drul_[UP];
   
   assert (bot!=top);
   
@@ -336,28 +334,43 @@ Molecule*
   Real dy = p->internote_f ();
   if (!invisible_b ())
     {
-      Symbol ss =p->lookup_l ()->stem (bot*dy,top*dy);
+      Atom ss =p->lookup_l ()->stem (bot*dy,top*dy);
       mol_p->add (Atom (ss));
     }
   
   if (!beam_l_ &&abs (flag_i_) > 2)
     {
-      Symbol fl = p->lookup_l ()->flag (flag_i_, dir_);
+      Atom fl = p->lookup_l ()->flag (flag_i_, dir_);
       mol_p->add_at_edge (Y_AXIS, dir_, Molecule (Atom (fl)));
       assert (!abbrev_flag_i_);
     }
   
   if (abbrev_flag_i_)
     mol_p->add (abbrev_mol ());
-  
-  mol_p->translate (stem_xoffset_f_, X_AXIS);
+
+  if (head_l_arr_.size())
+    {
+      mol_p->translate (note_delta_f (), X_AXIS);
+    }
   return mol_p;
 }
 
+Real 
+Stem::note_delta_f () const
+{
+  Real r=0;
+  if (head_l_arr_.size())
+    {
+      r += head_l_arr_[0]->width ().length() * (stem_xdir_+1.0)/2.0;
+      if (stem_xdir_ == RIGHT)
+       r -= paper ()->rule_thickness ();
+    }
+  return r;
+}
 Real
- Stem::hpos_f () const
+Stem::hpos_f () const
 {
-  return Item::hpos_f () + stem_xoffset_f_;
+  return note_delta_f () +Item::hpos_f ();
 }
 
 
diff --git a/lily/symbol.cc b/lily/symbol.cc
deleted file mode 100644 (file)
index 9ba3d45..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "symbol.hh"
-#include "varray.hh"
-
-
-Symbol::Symbol()
-  :    dim (Interval (0,0),Interval (0,0))
-{
-  tex = "\\unknown";
-}
-Symbol::Symbol (String s, Box b)
-  :  dim (b)
-{
-  tex = s;
-}
-
-
-String
-Symbol::str() const 
-{
-  return  "symbol (\'"+tex+"\', (" + dim.x().str () + ", " + dim.y ().str () + "))";
-}
index 2bb6f53fa9886e08d1412fb5841ff51260d0e03c..9098e18ad4c7390dfd8feca0b26fc73e8a1565a2 100644 (file)
@@ -10,7 +10,7 @@
 #include "dimen.hh"
 #include "debug.hh"
 #include "real.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "assoc.hh"
 #include "assoc-iter.hh"
 #include "symtable.hh"
@@ -35,7 +35,7 @@ Symtables::~Symtables()
     }
 }
 
-Symbol 
+Atom 
 Symtable::lookup (String s) const
 {
   if (elt_b (s))
@@ -43,7 +43,7 @@ Symtable::lookup (String s) const
   else 
     {
       warning ("Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
-      Symbol sy;       
+      Atom sy; 
       return sy;
     }
 }
@@ -66,7 +66,7 @@ Symtables::print() const
 void
 Symtable::print() const
 {
-  for (Assoc_iter<String, Symbol>  i (*this); i.ok(); i++) 
+  for (Assoc_iter<String, Atom>  i (*this); i.ok(); i++) 
     {
       DOUT << "\'" << i.key() << "\'->" << i.val ().str () << "\n";
     }
index d9ea0deba264d0185cd74d4f1c8113dcb00431a8..e1e1b4d5f23e5361fd0a4733ea31b9260d306f0a 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "plist.tcc"
 #include "pcursor.tcc"
index c16a0e9c02a722e0b65da52327b4072a75926be1..5bc8ebbfcce0a22f9a82cc1470c2b3a6cc5206a1 100644 (file)
@@ -11,7 +11,7 @@
   */
 
 #include <math.h>
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "tex.hh"
 #include "symtable.hh"
 #include "debug.hh"
 #include "lookup.hh"
 
-Symbol
+Atom
 Lookup::beam_element (int sidx, int widx, Real slope) const
 {
-  Symbol bs=(*symtables_)("beamslopes")->lookup ("slope");
+  Atom bs=(*symtables_)("beamslopes")->lookup ("slope");
   
   Array<String> args;
   args.push (sidx);
   args.push (widx);
-  bs.tex = substitute_args (bs.tex,args);
+  bs.tex_ = substitute_args (bs.tex_,args);
   int w = 2 << widx;
   Real width = w PT;
-  bs.dim.x() = Interval (0,width);
-  bs.dim.y() = Interval (0,width*slope);
+  bs.dim_.x() = Interval (0,width);
+  bs.dim_.y() = Interval (0,width*slope);
   return bs;
 }
 
@@ -54,20 +54,20 @@ slope_index (Real &s)
     return -6 * i+ 186;
 }
 
-Symbol
+Atom
 Lookup::rule_symbol (Real height, Real width) const
 {
-  Symbol bs=(*symtables_)("beamslopes")->lookup ("horizontal");    
+  Atom bs=(*symtables_)("beamslopes")->lookup ("horizontal");    
   Array<String> args;
   args.push (print_dimen (height));
   args.push (print_dimen (width));
-  bs.tex = substitute_args (bs.tex,args);
-  bs.dim.x() = Interval (0,width);
-  bs.dim.y() = Interval (0,height);
+  bs.tex_ = substitute_args (bs.tex_,args);
+  bs.dim_.x() = Interval (0,width);
+  bs.dim_.y() = Interval (0,height);
   return bs;
 }
 
-Symbol
+Atom
 Lookup::beam (Real &slope, Real width) const
 {        
   int sidx = slope_index (slope);
@@ -105,10 +105,10 @@ Lookup::beam (Real &slope, Real width) const
   a.translate (Offset (last_x, (last_x) * slope));
   m.add (a);
   
-  Symbol ret;
-  ret.tex = m.TeX_string();
-  ret.dim.y() = Interval (0,width*slope);
-  ret.dim.x() = Interval (0,width);
+  Atom ret;
+  ret.tex_ = m.TeX_string();
+  ret.dim_.y() = Interval (0,width*slope);
+  ret.dim_.x() = Interval (0,width);
   
   return ret;
 }
index 27dede2e41ac2fb96adce1e2f3e3092ef8914597..664460f8b9c542e4942071d24f8605273d559386 100644 (file)
@@ -36,7 +36,7 @@ direction_char (Direction y_sign)
   return c;
 }
 
-Symbol
+Atom
 Lookup::half_slur_middlepart (Real &dx, Direction dir) const
 {
   // todo
@@ -53,10 +53,10 @@ Lookup::half_slur_middlepart (Real &dx, Direction dir) const
       WARN <<  "slur too narrow\n";
     }
 
-  Symbol s;
+  Atom s;
   
-  s.dim.y() = Interval (min (0,0), max (0,0)); // todo
-  s.dim.x() = Interval (0,dx);
+  s.dim_.y() = Interval (min (0,0), max (0,0)); // todo
+  s.dim_.x() = Interval (0,dx);
 
   String f =  String ("\\hslurchar");
   f += direction_char (CENTER);
@@ -67,16 +67,14 @@ Lookup::half_slur_middlepart (Real &dx, Direction dir) const
 
   assert (idx < 256);
 
-  f+=String ("{") + String (idx) + "}";
-  s.tex = f;
-  Atom a (s);
-  a.translate (dx/2, X_AXIS);
-  s.tex = a.TeX_string();
+  f +=String ("{") + String (idx) + "}";
+  s.tex_ = f;
+  s.translate (dx/2, X_AXIS);
 
   return s;
 }
 
-Symbol
+Atom
 Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
 {
   Real orig_dx = dx;
@@ -100,9 +98,9 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
       WARN <<  "slur too narrow " << print_dimen (orig_dx)<<"\n";
     }
        
-  Symbol s;
-  s.dim.x() = Interval (0,dx);
-  s.dim.y() = Interval (min (0,dy), max (0,dy));
+  Atom s;
+  s.dim_.x() = Interval (0,dx);
+  s.dim_.y() = Interval (min (0,dy), max (0,dy));
 
 
   String f = String ("\\hslurchar");
@@ -123,12 +121,12 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
   f+=String ("{") + String (idx) + "}";
 
   
-  s.tex = f;
+  s.tex_ = f;
  
   return s;
 }
 
-Symbol
+Atom
 Lookup::slur (int dy , Real &dx, Direction dir) const
 {
   
@@ -172,9 +170,9 @@ Lookup::slur (int dy , Real &dx, Direction dir) const
       WARN<<"slur to steep: " << dy << " shrinking (ugh)\n";
     }
   
-  Symbol s;
-  s.dim.x() = Interval (0,dx);
-  s.dim.y() = Interval (min (0,dy), max (0,dy));
+  Atom s;
+  s.dim_.x() = Interval (-dx/2,dx/2);
+  s.dim_.y() = Interval (min (0,dy), max (0,dy));
 
   String f = String ("\\slurchar") + String (direction_char (y_sign));
 
@@ -199,16 +197,14 @@ Lookup::slur (int dy , Real &dx, Direction dir) const
   
   assert (idx < 256);
   f+=String ("{") + String (idx) + "}";
-  s.tex = f;
+  s.tex_ = f;
+
 
-  Atom a (s);
-  a.translate (dx/2, X_AXIS);
-  s.dim = a.extent();
-  s.tex = a.TeX_string();
+  s.translate (dx/2, X_AXIS);
   return s;    
 }
 
-Symbol
+Atom
 Lookup::big_slur (int dy , Real &dx, Direction dir) const
 {
   if (dx < 24 PT) 
@@ -229,18 +225,17 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const
   Atom r = half_slur (r_dy, right_wid, dir, 1);
   Real mid_wid = dx - left_wid - right_wid;
 
-  Atom m = half_slur (0, mid_wid, dir, 0);
-
   Molecule mol;
   mol.add (l);
-  Atom a (m);
+  Atom a (half_slur (0, mid_wid, dir, 0));
   a.translate (slur_extra * internote_f, Y_AXIS);
-  mol.add_at_edge (X_AXIS, RIGHT, m);
+  mol.add_at_edge (X_AXIS, RIGHT, a);
   mol.add_at_edge (X_AXIS, RIGHT, r);
   mol.translate (l_dy * internote_f, Y_AXIS);
-  Symbol s;
-  s.tex = mol.TeX_string();
-  s.dim = mol.extent();
+  
+  Atom s;
+  s.tex_ = mol.TeX_string();
+  s.dim_ = mol.extent();
   return s;
 }
 
index 6e7bb4732b9b282cc5dd88b898980e44817c9ba9..19285561c1296280fa5923ae3c44d8e416e6a8a6 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "dimen.hh"
 #include "tex.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "varray.hh"
 
 String
index ead696b073629faacfc3b4c783bcbcdc5a743d00..c41bfeb58a404bc90c42f019826a98bee6727b62 100644 (file)
@@ -18,7 +18,7 @@ Text_def::width (Paper_def * p) const
 {
   Atom a = get_atom (p,CENTER);
 
-  Real guess_width_f = text_str_.length_i() * a.sym_.dim.x ().length (); // ugh
+  Real guess_width_f = text_str_.length_i() * a.dim_.x ().length (); // ugh
   Interval i (0, guess_width_f);
   i += - (align_i_ + 1)* i.center();
   return i;
index 876acfde39f0b0133970dd94aedf4fbb8fbc94fc..4701f2b10983c6616c6b164e3bbeb90a31fb7665 100644 (file)
@@ -36,7 +36,7 @@ Text_item::do_pre_processing()
 Interval
 Text_item::symbol_height() const
 {
-  return tdef_p_->get_atom (paper(), dir_).sym_.dim.y ();
+  return tdef_p_->get_atom (paper(), dir_).dim_.y ();
 }
   
 Molecule*
index edf430aa139de4973efeb92a00908e31fcb32566..c23bb7e645e3ad1d40988579e6a9cca83d95a058 100644 (file)
@@ -12,7 +12,7 @@
 #include "text-def.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
 
 
 void
index c824164d5053eeae495f8ce68d4e377d7b97f5e7..29bd652dedfbfc2cb785906cbc9df580b35b1f22 100644 (file)
@@ -80,31 +80,40 @@ Translator_group::find_existing_translator_l (String n, String id)
 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++)
+ Link_array<Translator_group> accepted_arr;
+  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 ();
+      accepted_arr.push (t->group_l());
+    }
+
+ for (int i=0; i < accepted_arr.size (); i++)
+    if (accepted_arr[i]->type_str_ == type)
+      {
+       Link_array<Translator_group> retval; 
+       retval.push (accepted_arr[i]);
+       return retval;
+      }
+  Link_array<Translator_group> best_result; 
+  int best_depth= INT_MAX;
+  for (int i=0; i < accepted_arr.size (); i++)
+    {
+      Translator_group * g = accepted_arr[i];
       
       Link_array<Translator_group> result
        = g->path_to_acceptable_translator (type);
-      if (result.size ())
+      if (result.size () && result.size () < best_depth)
        {
-         retval.push (output_def_l ()->find_translator_l (type_str_)->group_l ());
-         retval.concat (result);
-         break;
+         result.insert (g,0);
+         best_result = result;
        }
     }
 
-  return retval;
+  return best_result;
 }
 
 Translator_group*
@@ -116,17 +125,12 @@ Translator_group::find_create_translator_l (String n, String id)
   
   Link_array<Translator_group> path = path_to_acceptable_translator (n);
       
-  /* 
-        if path.size () == 1, then 
-        type_str_ == n, but not id == id_str_
-        */
-  if (path.size () > 1)
+  if (path.size ())
     {
-      assert (path.size () > 1);
       Translator_group * current = this;
 
       // start at 1.  The first one (index 0) will be us.
-      for (int i=1; i < path.size (); i++) 
+      for (int i=0; i < path.size (); i++) 
        {
          Translator_group * new_group = path[i]->clone ()->group_l ();
          current->add (new_group);
index d554febe9e215477b0716b18ff83935779c6b6c2..4d819522c0bbcb47316a20cdac910f2ebae31b46 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 0.1.14
-Entered-date: 14SEP97
+Version: 0.1.15
+Entered-date: 17SEP97
 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.14.tar.gz 
+       395k lilypond-0.1.15.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       395k lilypond-0.1.14.tar.gz 
+       395k lilypond-0.1.15.tar.gz 
 Copying-policy: GPL
 End
index 4717e5d4443fa31734cd2319f9127d95988933e7..f848370fdfc917c9ca722b50009e8468692a7da0 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.1.14
+Version: 0.1.15
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.14.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.15.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
@@ -28,8 +28,8 @@ strip lily/out/lilypond mi2mu/out/mi2mu
 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/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/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/abbrev.ly input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/font.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 2f04d5d6a537746b641200179d960ce5a81a14ec..7a871bacb413c371463ee249fb563ce60a8ba96c 100644 (file)
@@ -28,7 +28,7 @@ strip lily/out/lilypond mi2mu/out/mi2mu
 make -C Documentation gifs
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
-%doc @TEXT_DOCS@ 
+%doc @TEXT_DOCS@
 %doc @EXAMPLE_LYS@ 
 %doc Documentation/out/lelie_logo.gif
 /usr/bin/convert-mudela