]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.25
authorfred <fred>
Tue, 26 Mar 2002 21:46:31 +0000 (21:46 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:46:31 +0000 (21:46 +0000)
NEWS
input/test/harmonics.fly [new file with mode: 0644]
lily/heads-engraver.cc
lily/include/lookup.hh
lily/include/note-head.hh
lily/lookup.cc
lily/note-head.cc
mf/feta-bolletjes.mf

diff --git a/NEWS b/NEWS
index 9234df1a8efe73f5eea390d5aa591ad1460071b8..d182cc1488791ce844a6da72bbe5943136da2439 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,46 @@
+
+pl 23.ms2
+       - property noteheadStyle
+       - first attempt to make harmonics : see input/test/harmonics.fly
+
+pl 23.ms1
+       - sinfonia.ly: several fixes
+       - dynamics
+        * increased range pppppp to ffffff
+         * added sp, spp, sff, rfz
+         * example see input/test/tchaikovsky.ly
+         * updated dynamics in refman
+
+
+pl 24.jcn2
+       - website fixes
+       - bf's: chords:
+         * reverted c1*2, collides with \times {}
+         * should use: c\breve, c\longa for long chords
+         * addition: c-9, subtraction: c^5
+         * multiple -add, ^sub: c-7+.9-^3.5
+       - bf: lyric chord
+       - bf: lookup text height
+       - bf's: autobeamer
+
+ pl 24.jcn1
+       - bf: rest collisions
+       - separate tfm-reader
+       - bf: :|: should not have thin lines
+
+
+pl 24.mb1
+        - bf: Correct units now used in the .afm files.
+
+******
+
 pl 24, Hacking Apart Together (Jan 25)
 
+pl 23.jcn9
+       - bf's: preludes-* (found a \meter and \transpose c`` there!)
+       - bf: ly2dvi: don't barf on 'linewidth = -1.;'
+       - bf: lily-version
+
 pl 23.jbr1
         - scripts/ly2dvi.py: Windows 95 shell does not support redivrection 
           of stderr.  We now distribute ash and use it when needed.
diff --git a/input/test/harmonics.fly b/input/test/harmonics.fly
new file mode 100644 (file)
index 0000000..59d8925
--- /dev/null
@@ -0,0 +1,8 @@
+% this should be normal notes:
+c'1 | d2 d | e4 e 
+
+% and this should be harmonics:
+\property Voice.noteheadStyle = "harmonic"
+e8 e e16 e e e32 e
+
+
index c2d52cf13912e4aba58aad175d858f08dd855fa4..4e894ba4383d46692e6d7bb8f0f44a4768c29b9a 100644 (file)
@@ -49,6 +49,9 @@ Note_heads_engraver::do_process_requests()
       note_p->steps_i_ = note_req_l->pitch_.steps ();
       //      note_p->position_i_ = note_req_l->pitch_.steps ();
 
+      String noteheadstyle = get_property ("noteheadStyle", 0);
+      if (noteheadstyle.length_i ())
+        note_p->note_head_type_str_ = noteheadstyle;
   
       Score_element_info itinf (note_p,note_req_l);
       announce_element (itinf);
index 78a01267869769ba7de34621776164c89832adc2..955ce1e87d70feeccf429b67945a8c3a20dc00b3 100644 (file)
@@ -24,7 +24,10 @@ class Lookup
 public:
   Lookup ();
   Lookup (Lookup const&);
+
+
   
+  Atom special_ball (int, String) const;
   Atom simple_bar (String s, Real w) const;
   Molecule accidental (int, bool cautionary) const;
   Atom afm_find (String, bool warn=true) const;
index 1cc0bad9b891ffe129e7fd75d68cec4e745d53c0..853fee35817515bfd2ebc538f29350e607bd9498 100644 (file)
@@ -18,6 +18,8 @@
 class Note_head : public Rhythmic_head {
 public:
   
+  String note_head_type_str_;
+
   /// position of top line (5 linestaff: 8)
   int position_i_;
 
index 757cf25535c2980c2b0b5eb137598183bc152018..7cc0d6b8a070ea45194e8b5468225c2e5504e035 100644 (file)
@@ -80,11 +80,8 @@ Lookup::afm_find (String s, bool warn) const
   Atom a;
   if (m.code () < 0)
     return a;
-  
-  a.dim_ = m.B_;
-  a.dim_[X_AXIS] *= 1 / 1000.0;
-  a.dim_[Y_AXIS] *= 1 / 1000.0;
-
+    
+  a.dim_ = m.dimensions();
   
   a.lambda_ = gh_list (ly_symbol ("char"),
                       gh_int2scm (m.code ()),
@@ -170,10 +167,8 @@ Lookup::bar (String str, Real h) const
   else if (str == ":|:")
     {
       m.add_at_edge (X_AXIS, LEFT, thick,kern/2);
-      m.add_at_edge (X_AXIS, LEFT, thin,kern);
       m.add_at_edge (X_AXIS, LEFT, colon,kern);      
       m.add_at_edge (X_AXIS, RIGHT, thick,kern);
-      m.add_at_edge (X_AXIS, RIGHT, thin,kern);
       m.add_at_edge (X_AXIS, RIGHT, colon,kern);      
     }
   else if (str == "||")
@@ -406,7 +401,11 @@ Lookup::text (String style, String text) const
     {
       style = String (cmr_dict [style]) + to_str  ((int)font_h); // ugh
     }
+
   Real w = 0;
+  Real h = 0;
+  Real d = 0;
+
   Font_metric* afm_l = all_fonts_global_p->find_font (style);
   DOUT << "\nChars: ";
   
@@ -419,11 +418,14 @@ Lookup::text (String style, String text) const
        {
          Character_metric *c = afm_l->get_char (text[i],false);
          w += c->dimensions()[X_AXIS].length ();
+         h = h >? c->dimensions()[Y_AXIS].max ();
+         d = d <? c->dimensions()[Y_AXIS].min ();
        }
     }
 
   DOUT << "\n" << to_str (w) << "\n";
   a.dim_.x () = Interval (0, w);
+  a.dim_.y () = Interval (d, h);
   a.font_ = font_name_;
   return a;
 }
@@ -544,3 +546,12 @@ Lookup::volta (Real w, bool last_b) const
   return a;
 }
 
+
+Atom
+Lookup::special_ball (int j, String kind_of_ball) const
+{
+  if (j > 2)
+    j = 2;
+
+  return afm_find (String ("balls") + String ("-") + kind_of_ball);
+}
index 10cb7b1c2518df970620ddd0f609c3b71448ff28..f26cfc4c51d1d026302d22fb59204f569181d1ad 100644 (file)
@@ -65,10 +65,24 @@ Note_head::do_brew_molecule_p() const
     ? 0
     : (abs(position_i_) - staff_size_i_/2) /2;
   
-  Atom  s = lookup_l()->ball (balltype_i_);
+  //Atom  s = lookup_l()->ball (balltype_i_);
+  
+  Atom  s; // = lookup_l()->ball (balltype_i_);
+
+  if (note_head_type_str_.length_i ()) {
+    if (note_head_type_str_ == "normal")
+      note_head_type_str_ = "";
+    s = lookup_l()->special_ball (balltype_i_, note_head_type_str_);
+    }
+  else
+    s = lookup_l()->ball (balltype_i_);
   out = new Molecule (Atom (s));
   out->translate_axis (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
 
+
+  //out = new Molecule (Atom (s));
+  //out->translate_axis (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
+
   if (streepjes_i) 
     {
       int dir = sign (position_i_);
index 5ef657ad805962b677dabc5810bbefcc983b144e..410e4375bf7968ea439a11fd7a9307a669c6d68f 100644 (file)
@@ -241,8 +241,8 @@ fet_endchar;
 
 
 
-if test = 0:
-else:
+%if test = 0:
+%else:
 def draw_harmonic_notehead(expr harmwid) =
        save beamheight, head_width, head_char_width;
        save holeheight, stem_width;
@@ -269,8 +269,8 @@ def draw_harmonic_notehead(expr harmwid) =
 %      ht# = noteheight#;
        head_char_width = 1.54 noteheight;
        head_char_width# := 1.54 ht#;
-       schuif_op = head_char_width - head_width; %ugh
-       schuif_op# := head_char_width# - head_width#;
+       %schuif_op = head_char_width - head_width; %ugh
+       %schuif_op# := head_char_width# - head_width#;
 %      set_char_box(0, head_char_width#, noteheight#/2, noteheight#/2); 
        set_char_box(0, head_width#, head_width#/2, head_width#/2);
 %      2 beamheight + holeheight = noteheight;
@@ -288,15 +288,15 @@ def draw_harmonic_notehead(expr harmwid) =
        penpos8(thick, 225);
 
 %      1.5 noteheight = head_width;
-       z1l = (schuif_op, 0);
+       z1l = (0, 0);
        z2l = z1l;
-%      z3l = (schuif_op + head_width/2,-head_width/2);
-       z3l = (schuif_op + head_width/2, -noteheight/2);
+%      z3l = (head_width/2,-head_width/2);
+       z3l = (head_width/2, -noteheight/2);
        z4l = z3l;
-       z5l = (schuif_op + head_width, 0);
+       z5l = (head_width, 0);
        z6l = z5l;
-%      z7l = (schuif_op + head_width/2, head_width/2);
-       z7l = (schuif_op + head_width/2, noteheight/2);
+%      z7l = (head_width/2, head_width/2);
+       z7l = (head_width/2, noteheight/2);
        z8l = z7l;
        
        pickup pencircle; %scaled stemthick;
@@ -319,7 +319,7 @@ fet_endchar;
 fet_beginchar("Harmonic ledger", "harmonicl", "harmonicledger")
         draw_ledger(harmonic_wid#);
 fet_endchar;
-fi
+%fi
 
 fet_endgroup("balls");