]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.5.11 release/1.5.11
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 20 Sep 2001 22:55:56 +0000 (00:55 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 20 Sep 2001 22:55:56 +0000 (00:55 +0200)
===========

* include python midi parser.

* stepmake updates.

* add .cvsignore patterns for making patches the standard, manual way.

* midi2ly: support chords, duration conversion rewrite.

* parser.yy: Guile > 1.4 compilation fix; scm_unprotect_object is deprecated.

1.5.10.h

28 files changed:
CHANGES
Documentation/misc/NEWS-1.4 [new file with mode: 0644]
NEWS
VERSION
flower/rational.cc
input/test/ancient-font.ly
lily/include/porrectus.hh
lily/lexer.ll
lily/my-lily-lexer.cc
lily/parser.yy
lily/porrectus-engraver.cc
lily/porrectus.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
ly/engraver-init.ly
make/out/lilypond.lsm
make/out/lilypond.mandrake.spec
make/out/lilypond.redhat.spec
make/out/lilypond.suse.spec
midi2ly/duration-iter.cc [deleted file]
midi2ly/duration.cc
midi2ly/include/duration-iter.hh [deleted file]
midi2ly/include/midi-score-parser.hh
modules/GNUmakefile
mutopia/J.S.Bach/wtk1-fugue2.ly
scm/grob-description.scm
scm/grob-property-description.scm
scm/translator-description.scm

diff --git a/CHANGES b/CHANGES
index c1cc36046fa71d9109e1f2371f2a73bd3d872137..397f031cf4ac700a8e6d99cc797aa32ab4c42a8e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
 * parser.yy: Guile > 1.4 compilation fix; scm_unprotect_object is deprecated.
 
+1.5.10.hwn1
+===========
+
+* Rational bugfix.
+
+* Cleaned up definitions of SystemStartDelimiter
+
+* WTK fix.
+
+* Porrectus patch (Juergen Reuter):
+
+- Syntax change: \porrectus -> \~
+- New porrectus properties: porrectus-width, line-thickness.
+- Bugfix: left<->right confusion in porrectus-engraver.cc.
+- Bugfix: Box dimensions for horizontal slope molecule in porrectus.cc.
+- Enhanced mensural style porrectus shape, considering optical
+  illusion in vertical endings due to slope.  Simplified drawing.
+- Code clean-up.
+
 1.5.10
 ======
 
@@ -28,7 +47,6 @@ where @WEB-TITLE@ is not defined.
 * Bugfix: stepmake: don't go building executables all over the place,
 if NAME is set in environment.  Some cleanups. 
  
 * add-html-footer.py: remove href to self.  Substitute @at-variables@
 defined in html comments.  Any occurrence of
 
diff --git a/Documentation/misc/NEWS-1.4 b/Documentation/misc/NEWS-1.4
new file mode 100644 (file)
index 0000000..12c621b
--- /dev/null
@@ -0,0 +1,78 @@
+
+New features in 1.4
+
+
+DESIGN
+
+
+* More pervasive GUILE integration resulting in improved design and
+implementation.  LilyPond is smaller, cleaner, more flexible, etc.
+
+ - Improved speed with comparable memory footprint
+
+ - More tweakability using less memory with the new `property push'
+  mechanism.
+
+ - Improved robustness: Lily almost never crashes.
+
+ - Access to internal music representation
+
+* New font selection scheme similar to Latex-NFSS.
+
+* Flexible formatting mechanism for musical texts.
+
+* Chordnames are now configurable in every respect
+
+* Part combining for orchestral scores and hymns: two voices are
+  combined into a staff automatically, including Solo/a2
+  indications as appropriate.
+
+
+ERGONOMICS
+
+* Point and click functionality using emacs and Xdvi.
+
+* Rewritten Emacs mode
+
+* Cleaned up syntax details 
+
+* Comprehensive documentation, including a rewritten tutorial.
+
+* All properties have doc strings, and internal documentation is
+generated automatically.
+
+* Windows point-and-click installer 
+
+
+NOTATION FEATURES
+
+* Piano pedals, Arpeggios, Glissandi, many more note head
+shapes, Medieval clefs, custodes.
+
+* Better lyrics placement: Automatical phrasing, melisma alignment,
+  and stanza numbering.
+
+* Typography: More elegant slurs, aligned dynamics, text crescendos,
+
+* Easy-play note heads
+
+* ASCIIScript: ASCII-art output 
+
+* Improved standalone postscript layout.
+
+
+IMPORT/EXPORT
+
+* dynamics, tempo changes in the MIDI output
+
+* Finale (.etf), PMX, Musedata and Mup import tools.
+
+
+MISCELLANEOUS
+
+* Mutopia ports collection: easily accessible music archive.
+
+* Translations into Japanese, French and Russian
+
+* Many many many bugfixes.
+
diff --git a/NEWS b/NEWS
index 12c621b564bf37ff2888f773abbebb7c1a98c965..bd0d47aa841606dcb33a36deffd9fe6b4428601e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,78 +1,10 @@
 
-New features in 1.4
+New features in 1.5
 
+* Figured bass support
 
-DESIGN
+* Improved grace notes
 
+* Better spacing.
 
-* More pervasive GUILE integration resulting in improved design and
-implementation.  LilyPond is smaller, cleaner, more flexible, etc.
-
- - Improved speed with comparable memory footprint
-
- - More tweakability using less memory with the new `property push'
-  mechanism.
-
- - Improved robustness: Lily almost never crashes.
-
- - Access to internal music representation
-
-* New font selection scheme similar to Latex-NFSS.
-
-* Flexible formatting mechanism for musical texts.
-
-* Chordnames are now configurable in every respect
-
-* Part combining for orchestral scores and hymns: two voices are
-  combined into a staff automatically, including Solo/a2
-  indications as appropriate.
-
-
-ERGONOMICS
-
-* Point and click functionality using emacs and Xdvi.
-
-* Rewritten Emacs mode
-
-* Cleaned up syntax details 
-
-* Comprehensive documentation, including a rewritten tutorial.
-
-* All properties have doc strings, and internal documentation is
-generated automatically.
-
-* Windows point-and-click installer 
-
-
-NOTATION FEATURES
-
-* Piano pedals, Arpeggios, Glissandi, many more note head
-shapes, Medieval clefs, custodes.
-
-* Better lyrics placement: Automatical phrasing, melisma alignment,
-  and stanza numbering.
-
-* Typography: More elegant slurs, aligned dynamics, text crescendos,
-
-* Easy-play note heads
-
-* ASCIIScript: ASCII-art output 
-
-* Improved standalone postscript layout.
-
-
-IMPORT/EXPORT
-
-* dynamics, tempo changes in the MIDI output
-
-* Finale (.etf), PMX, Musedata and Mup import tools.
-
-
-MISCELLANEOUS
-
-* Mutopia ports collection: easily accessible music archive.
-
-* Translations into Japanese, French and Russian
-
-* Many many many bugfixes.
-
+* More ancient notation support.
diff --git a/VERSION b/VERSION
index 7eb914293c47e843f337459b6fa388281914a5f0..d13210fa9aaba225f35c0bb337ebfd3618677660 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=10
-MY_PATCH_LEVEL=jcn3
+PATCH_LEVEL=11
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 11aaf1e23b6ce457df53985ca52e62e7143d7708..b2b7c898ee5f2a4491194c05d558e2d593c3f2e0 100644 (file)
@@ -144,12 +144,7 @@ Rational::compare (Rational const &r, Rational const &s)
     return 0;
   else
     {
-      /*
-       TODO: fix this code; (r-s).sign() is too expensive.
-       
-       return r.sign_ * ::sign  (r.num_ * s.den_ - s.num_ * r.den_);
-      */
-      return (r - s).sign ();
+      return r.sign_ * ::sign  (int (r.num_ * s.den_) - int (s.num_ * r.den_));
     }
 }
 
index c3f4ccf1551adaebfb3b429f6428bf587b0ffc2d..cfc7e498a30aef267873af6b687c94de8b6de7e1 100644 (file)
@@ -44,7 +44,7 @@ upperVoice =  \context Staff = upperVoice <
        a! b!
        \property Staff.BarLine \override #'bar-size = #3.0 \bar "|"
        \property Voice.NoteHead \override #'style = #'vaticana_virga
-       ces' b! ces'! \porrectus ges! \porrectus fes!
+       ces' b! ces'! \~ ges! \~ fes!
        \breathe
        \clef "vaticana_fa1"
        \property Voice.NoteHead \override #'style = #'vaticana_quilisma
@@ -128,28 +128,30 @@ lowerVoice =  \context Staff = lowerNotes <
        \property Voice.Porrectus \override #'solid = ##f
        \property Voice.Porrectus \override #'add-stem = ##t
        \property Voice.Porrectus \override #'stem-direction = #1
+       \property Voice.Porrectus \override #'line-thickness = #0.7
+       % \property Voice.Porrectus \override #'porrectus-width = #3.0
        \key a \major
 
        % IMPORTANT NOTE:
        %
-       % The porrectus syntax is subject to change.  For proper
-       % use, it may eventually change into something like this:
+       % The porrectus syntax is definitely subject to change.  For
+       % proper use, it may eventually change into something like this:
        %
-       % \ligature { e \porrectus c }
+       % \startLigature e \~ c \endLigature
        %
        % The reason is that there needs to be some enclosing instance
        % for correct handling of line breaking, alignment with
        % adjacent note heads, and placement of accidentals.
 
        \clef "neo_mensural_c2"
-       cis' e' \porrectus d' gis' \porrectus e'
+       cis' e' \~ d' gis' \~ e'
        \property Staff.forceClef = ##t
        \clef "neo_mensural_c2"
 
-       fis' \porrectus b cis''
-       b \porrectus a a \porrectus fis
+       fis' \~ b cis''
+       b \~ a a \~ fis
        \clef "petrucci_c2"
-       cis \porrectus fis ces1 % \bar "|"
+       cis \~ fis ces1 % \bar "|"
 
        \clef "petrucci_c2"
        r\longa
@@ -189,8 +191,8 @@ lowerVoice =  \context Staff = lowerNotes <
        % porrectus grobs.  Is this an initialization bug in the line
        % breaking algorithm?
 
-       bes'! \porrectus as'! \porrectus cis''!
-       bes'! \porrectus fis'! as'! \porrectus ges'!
+       bes'! \~ as'! \~ cis''!
+       bes'! \~ fis'! as'! \~ ges'!
        \property Staff.forceClef = ##t
        \clef "mensural_g"
        e' d' c'1 \bar "|"
index 8a11b0387d3b96b6d021ecb260ce9b542fb34af5..3b4a97a0468a3189f62147f42909982acd8d9e84 100644 (file)
 class Porrectus
 {
 public:
-  static void set_left_head (Grob *, SCM);
-  static SCM get_left_head (Grob *);
-  static void set_right_head (Grob *, SCM);
-  static SCM get_right_head (Grob *);
+  static void set_left_head (Grob *, Item *);
+  static Item *get_left_head (Grob *);
+  static void set_right_head (Grob *, Item *);
+  static Item *get_right_head (Grob *);
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
 
 private:
-  static Molecule brew_vaticana_molecule (Item *, bool, bool, Direction, Real);
-  static Molecule brew_mensural_molecule (Item *, bool, bool, Direction, Real);
+  static Molecule brew_vaticana_molecule (Item *, Real,
+                                         bool, Real, Real,
+                                         bool, Direction);
+  static Molecule brew_mensural_molecule (Item *, Real,
+                                         bool, Real, Real,
+                                         bool, Direction);
   static Molecule brew_horizontal_slope (Real, Real, Real);
   static Molecule create_ledger_line (Interval, Grob *);
   static Molecule create_streepjes (Grob *, int, int, Interval);
index 2bbf7c564c076fbfa1a0b3543ab6ab56a2212433..b44ae5ef9dadaac6932dd70023f51b9afa178c0e 100644 (file)
@@ -457,6 +457,8 @@ HYPHEN              --
        return E_OPEN;
     case ')':
        return E_CLOSE;
+    case '~':
+       return E_TILDE;
     default:
        return E_CHAR;
     }
index 54feff2251622e7fa5cb695e5e1a239d0d919d6d..a3d2a62fa2dc654dcb9d07d83f8c9b9c3cf1d5d5 100644 (file)
@@ -80,7 +80,6 @@ static Keyword_ent the_key_tab[]={
   {"repeat", REPEAT},
   {"addlyrics", ADDLYRICS},
   {"partcombine", PARTCOMBINE},
-  {"porrectus", PORRECTUS},
   {"score", SCORE},
   {"script", SCRIPT},
   {"stylesheet", STYLESHEET},
index 8d47fa28fd9691d08f017e7f61f43fe730516e9a..d147dd787e184ab81dbc9129e232d5ea5b07b3ef 100644 (file)
@@ -215,7 +215,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %token PAPER
 %token PARTIAL
 %token PENALTY
-%token PORRECTUS
 %token PROPERTY
 %token OVERRIDE SET REVERT 
 %token PT_T
@@ -242,7 +241,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token CONTEXT
 
 /* escaped */
-%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE
+%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE E_TILDE
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET 
 
 %type <i>      exclamations questions dots
@@ -1236,12 +1235,11 @@ shorthand_command_req:
        | BREATHE {
                $$ = new Breathing_sign_req;
        }
-       | PORRECTUS {
+       | E_TILDE {
                $$ = new Porrectus_req;
        }
        ;
 
-
 verbose_command_req:
        COMMANDSPANREQUEST bare_int STRING { /*TODO: junkme */
                Span_req * sp_p = new Span_req;
index 84d81f44605a449bd63494f301d259b63483b4b3..311ef312e9ccdbc6402874784a5eab4f31edbf30 100644 (file)
  * moment of the second note.  Actually, it should take the moment of
  * the first note.
  *
- * TODO: Introduce "\~" as alternative syntax for "\porrectus"?
+ * FIXME: Turn off typesetting of stems, flags, dots, etc.
  *
  * TODO: Hufnagel support.
  *
- * TODO: Fine-tuning of porrectus shape.  In particular, the mensural
- * non-solid shape could either be slightly bigger in height, or the
- * extrem points could be slightly vertically shifted apart.
+ * TODO: Fine-tuning of vaticana-style porrectus shape; in particular,
+ * ensure solidity if solid is set to #t and thickness is very small.
  *
  * TODO: For white mensural (i.e. #'style=#'mensural, #'solid=##f)
  * porrectus grobs, it is possible to automatically determine all
  * porrectus specific properties (add-stem, stem-direction) solely
  * from the duration of the contributing notes and time-signature.
  * Introduce a boolean grob property called auto-config, so that, if
- * turned on, lily automatically sets the remaining properties
- * properly.
+ * turned on, lily automatically sets the properties add-stem and
+ * stem-direction properly.
  *
- * TODO: The following issues are not (and should not be) handled by
- * this engraver: (1) accidentals placement, (2) avoiding line
- * breaking inbetween porrectus, (3) spacing.  For example, currently
- * only the accidental for the second note (cp. the above FIXME) is
- * printed.  These issues should be resolved by some sort of ligature
- * context that encloses use of this engraver, using syntax like:
- * \ligature { e \porrectus c }.
+ * TODO: The following issues are currently not handled by this
+ * engraver: (1) accidentals placement, (2) avoiding line breaking
+ * inbetween porrectus, (3) spacing.  (Han-Wen says: for (2), look at
+ * beam engraver.)  For example, currently only the accidental for the
+ * second note (cp. the above FIXME) is printed.  These issues should
+ * be resolved by some sort of ligature context that encloses use of
+ * this engraver, using syntax like: \ligature { e \~ c }.
  *
  * TODO: Do not allow a series of adjacent porrectus requests, as in:
- * e \porrectus d \porrectus c.
- */
+ * e \~ d \~ c.
+ *
+ * TODO: Junk duplicate (or rather triple) implementation of
+ * create_ledger_line in porrectus.cc, custos.cc and note-head.cc.  */
 
 #include "staff-symbol-referencer.hh"
 #include "porrectus.hh"
@@ -112,9 +113,9 @@ Porrectus_engraver::acknowledge_grob (Grob_info info_l_)
       Note_req *note_req_l_ = dynamic_cast <Note_req *> (info_l_.req_l_);
       if (!note_req_l_)
        return;
-      left_heads_.push (PHead_melodic_tuple (info_l_.elem_l_, note_req_l_,
-                                            now_mom () +
-                                            note_req_l_->length_mom ()));
+      right_heads_.push (PHead_melodic_tuple (info_l_.elem_l_, note_req_l_,
+                                             now_mom () +
+                                             note_req_l_->length_mom ()));
     }
 }
 
@@ -125,41 +126,27 @@ Porrectus_engraver::create_grobs ()
     {
       left_heads_.sort (PHead_melodic_tuple::pitch_compare);
       right_heads_.sort (PHead_melodic_tuple::pitch_compare);
-
-      SCM head_list = SCM_EOL;
-      
       int i = left_heads_.size () - 1;
       int j = right_heads_.size () - 1;
 
       while ((i >= 0) && (j >= 0))
        {
-         head_list =
-           gh_cons (gh_cons (right_heads_[j].head_l_->self_scm (),
-                             left_heads_[i].head_l_->self_scm ()),
-                    head_list);
-
-         past_notes_pq_. insert (left_heads_[i]);
-         left_heads_.del (i);
-         right_heads_.del (j);
-         i--;
-         j--;
-       }
-
-      for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s))
-       {
-         SCM caar = gh_caar (s);
-         SCM cdar = gh_cdar (s);
-
-         Item *left_head = dynamic_cast<Item*> (unsmob_grob (caar));
-         Item *right_head = dynamic_cast<Item*> (unsmob_grob (cdar));
+         Item *left_head = dynamic_cast<Item*> (left_heads_[i].head_l_);
+         Item *right_head = dynamic_cast<Item*> (right_heads_[j].head_l_);
          left_head->set_grob_property("transparent", gh_bool2scm(true));
          right_head->set_grob_property("transparent", gh_bool2scm(true));
 
          Grob *porrectus_p_ = new Item (get_property ("Porrectus"));
-         Porrectus::set_left_head(porrectus_p_, caar);
-         Porrectus::set_right_head(porrectus_p_, cdar);
+         Porrectus::set_left_head(porrectus_p_, left_head);
+         Porrectus::set_right_head(porrectus_p_, right_head);
          porrectus_p_arr_.push (porrectus_p_);
-         announce_grob (porrectus_p_, 0);
+         announce_grob (porrectus_p_, porrectus_req_l_);
+
+         past_notes_pq_. insert (right_heads_[i]);
+         left_heads_.del (i);
+         right_heads_.del (j);
+         i--;
+         j--;
        }
     }
 }
@@ -167,11 +154,11 @@ Porrectus_engraver::create_grobs ()
 void
 Porrectus_engraver::stop_translation_timestep ()
 {
-  for (int i = 0; i < left_heads_.size (); i++)
+  for (int i = 0; i < right_heads_.size (); i++)
     {
-      past_notes_pq_.insert (left_heads_[i]);
+      past_notes_pq_.insert (right_heads_[i]);
     }
-  left_heads_.clear ();
+  right_heads_.clear ();
 
   for (int i = 0; i < porrectus_p_arr_.size (); i++)
     {
@@ -188,10 +175,10 @@ Porrectus_engraver::start_translation_timestep ()
   while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
     past_notes_pq_.delmin ();
 
-  right_heads_.clear ();
+  left_heads_.clear ();
   while (past_notes_pq_.size () &&
         (past_notes_pq_.front ().end_ == now))
-    right_heads_.push (past_notes_pq_.get ());
+    left_heads_.push (past_notes_pq_.get ());
 }
 
 ADD_THIS_TRANSLATOR (Porrectus_engraver);
index bec95d8bd2f58b8626f18fa1082c80a7d1f401ea..a4cd9a720700d8f560ef77e1ab3220ce9d27fe2c 100644 (file)
 #include "direction.hh"
 #include "bezier.hh"
 #include "font-interface.hh"
+#include "paper-def.hh"
 #include "math.h" // rint
 
 void
-Porrectus::set_left_head (Grob *me, SCM left_head)
+Porrectus::set_left_head (Grob *me, Item *left_head)
 {
-  if (left_head == SCM_EOL)
+  if (left_head != 0)
     {
-      warning (_ ("(left_head == SCM_EOL) (ignored)"));
+      me->set_grob_property ("left-head", left_head->self_scm());
+    }
+  else
+    {
+      programming_error (_ ("(left_head == 0)"));
+      me->set_grob_property ("left-head", SCM_EOL);
     }
-  me->set_grob_property ("left-head", left_head);
 }
 
-SCM
+Item *
 Porrectus::get_left_head (Grob *me)
 {
-  SCM left_head = me->get_grob_property ("left-head");
-  return left_head;
+  SCM left_head_scm = me->get_grob_property ("left-head");
+  if (left_head_scm == SCM_EOL)
+    {
+      programming_error (_ ("undefined left_head"));
+      return 0;
+    }
+  else
+    {
+      Item *left_head = dynamic_cast<Item*> (unsmob_grob (left_head_scm));
+      return left_head;
+    }
 }
 
 void
-Porrectus::set_right_head (Grob *me, SCM right_head)
+Porrectus::set_right_head (Grob *me, Item *right_head)
 {
-  if (right_head == SCM_EOL)
+  if (right_head != 0)
+    {
+      me->set_grob_property ("right-head", right_head->self_scm());
+    }
+  else
     {
-      warning (_ ("(right_head == SCM_EOL) (ignored)"));
+      programming_error (_ ("(right_head == 0)"));
+      me->set_grob_property ("right-head", SCM_EOL);
     }
-  me->set_grob_property ("right-head", right_head);
 }
 
-SCM
+Item *
 Porrectus::get_right_head (Grob *me)
 {
-  SCM right_head = me->get_grob_property ("right-head");
-  return right_head;
+  SCM right_head_scm = me->get_grob_property ("right-head");
+  if (right_head_scm == SCM_EOL)
+    {
+      programming_error (_ ("undefined right_head"));
+      return 0;
+    }
+  else
+    {
+      Item *right_head = dynamic_cast<Item*> (unsmob_grob (right_head_scm));
+      return right_head;
+    }
 }
 
 // Uugh.  The following two functions are almost duplicated code from
@@ -148,19 +175,12 @@ Porrectus::brew_molecule (SCM smob)
   if (!stem_direction)
     stem_direction = DOWN;
 
-  SCM left_head_scm = get_left_head (me);
-  SCM right_head_scm = get_right_head (me);
-  if ((left_head_scm == SCM_EOL) || (right_head_scm == SCM_EOL))
-    {
-      warning (_ ("junking lonely porrectus"));
-      return SCM_EOL;
-    }
-
-  Item *left_head = dynamic_cast<Item*> (unsmob_grob (left_head_scm));
-  Item *right_head = dynamic_cast<Item*> (unsmob_grob (right_head_scm));
+  Item *left_head = get_left_head (me);
+  Item *right_head = get_right_head (me);
   if (!left_head || !right_head)
     {
       warning (_ ("junking lonely porrectus"));
+      me->suicide ();
       return SCM_EOL;
     }
 
@@ -169,12 +189,40 @@ Porrectus::brew_molecule (SCM smob)
   Real interval = right_position_f - left_position_f;
 
   Molecule molecule;
+
+  SCM line_thickness_scm = me->get_grob_property ("line-thickness");
+  Real line_thickness;
+  if (gh_number_p (line_thickness_scm))
+    {
+      line_thickness = gh_scm2double (line_thickness_scm);
+    }
+  else
+    {
+      line_thickness = 1.0;
+    }
+  Real thickness =
+    line_thickness * me->paper_l ()->get_var ("stafflinethickness");
+
+  SCM porrectus_width_scm = me->get_grob_property ("porrectus-width");
+  Real porrectus_width;
+  if (gh_number_p (porrectus_width_scm))
+    {
+      porrectus_width = gh_scm2double (porrectus_width_scm);
+    }
+  else
+    {
+      porrectus_width = 2.4;
+    }
+  Real width = porrectus_width * Staff_symbol_referencer::staff_space (me);
+
   if (String::compare_i (style, "vaticana") == 0)
-    molecule = brew_vaticana_molecule (me, solid, add_stem, stem_direction,
-                                      interval);
+    molecule = brew_vaticana_molecule (me, interval,
+                                      solid, width, thickness,
+                                      add_stem, stem_direction);
   else if (String::compare_i (style, "mensural") == 0)
-    molecule = brew_mensural_molecule (me, solid, add_stem, stem_direction,
-                                      interval);
+    molecule = brew_mensural_molecule (me, interval,
+                                      solid, width, thickness,
+                                      add_stem, stem_direction);
   else
     return SCM_EOL;
 
@@ -200,28 +248,27 @@ Porrectus::brew_molecule (SCM smob)
 
 Molecule
 Porrectus::brew_vaticana_molecule (Item *me,
+                                  Real interval,
                                   bool solid,
+                                  Real width,
+                                  Real thickness,
                                   bool add_stem,
-                                  Direction stem_direction,
-                                  Real interval)
+                                  Direction stem_direction)
 {
   Real space = Staff_symbol_referencer::staff_space (me);
-  Real line_thickness = space/6;
-  Real width = 2.4 * space;
   Molecule molecule = Molecule ();
 
   if (interval >= 0.0)
     {
-      warning (_ ("ascending vaticana style porrectus (ignored)"));
+      warning (_ ("ascending vaticana style porrectus"));
     }
 
   if (add_stem)
     {
       bool consider_interval =
-       ((stem_direction == DOWN) && (interval < 0.0)) ||
-       ((stem_direction == UP) && (interval > 0.0));
+       stem_direction * interval > 0.0;
 
-      Interval stem_box_x (-line_thickness/2, +line_thickness/2);
+      Interval stem_box_x (-thickness/2, +thickness/2);
       Interval stem_box_y;
 
       if (consider_interval)
@@ -245,8 +292,8 @@ Porrectus::brew_vaticana_molecule (Item *me,
       molecule.add_molecule(stem);
     }
 
-  Box vertical_edge (Interval (-line_thickness/2, +line_thickness/2),
-                    Interval (-4*line_thickness/2, +4*line_thickness/2));
+  Box vertical_edge (Interval (-thickness/2, +thickness/2),
+                    Interval (-4*thickness/2, +4*thickness/2));
   Molecule left_edge = Lookup::filledbox (vertical_edge);
   Molecule right_edge = Lookup::filledbox (vertical_edge);
   right_edge.translate_axis (width, X_AXIS);
@@ -261,18 +308,18 @@ Porrectus::brew_vaticana_molecule (Item *me,
   bezier.control_[3] = Offset (1.00 * width, interval / 2.0);
 
   Molecule slice;
-  slice = Lookup::slur (bezier, 0.0, line_thickness);
-  slice.translate_axis (-3 * line_thickness/2, Y_AXIS);
+  slice = Lookup::slur (bezier, 0.0, thickness);
+  slice.translate_axis (-3 * thickness/2, Y_AXIS);
   molecule.add_molecule (slice);
   if (solid)
     for (int i = -2; i < +2; i++)
       {
-       slice = Lookup::slur (bezier, 0.0, line_thickness);
-       slice.translate_axis (i * line_thickness/2, Y_AXIS);
+       slice = Lookup::slur (bezier, 0.0, thickness);
+       slice.translate_axis (i * thickness/2, Y_AXIS);
        molecule.add_molecule (slice);
       }
-  slice = Lookup::slur (bezier, 0.0, line_thickness);
-  slice.translate_axis (+3 * line_thickness/2, Y_AXIS);
+  slice = Lookup::slur (bezier, 0.0, thickness);
+  slice.translate_axis (+3 * thickness/2, Y_AXIS);
   molecule.add_molecule (slice);
 
   return molecule;
@@ -280,14 +327,14 @@ Porrectus::brew_vaticana_molecule (Item *me,
 
 Molecule
 Porrectus::brew_mensural_molecule (Item *me,
+                                  Real interval,
                                   bool solid,
+                                  Real width,
+                                  Real thickness,
                                   bool add_stem,
-                                  Direction stem_direction,
-                                  Real interval)
+                                  Direction stem_direction)
 {
   Real space = Staff_symbol_referencer::staff_space (me);
-  Real line_thickness = space/6;
-  Real width = 2.4 * space;
   Molecule molecule = Molecule ();
 
   if (add_stem)
@@ -296,10 +343,9 @@ Porrectus::brew_mensural_molecule (Item *me,
       // brew_vaticana_molecule, but may eventually be changed.
 
       bool consider_interval =
-       ((stem_direction == DOWN) && (interval < 0.0)) ||
-       ((stem_direction == UP) && (interval > 0.0));
+       stem_direction * interval > 0.0;
 
-      Interval stem_box_x (0, line_thickness);
+      Interval stem_box_x (0, thickness);
       Interval stem_box_y;
 
       if (consider_interval)
@@ -325,50 +371,71 @@ Porrectus::brew_mensural_molecule (Item *me,
 
   Real slope = (interval / 2.0) / width;
 
-  Molecule left_edge =
-    brew_horizontal_slope (line_thickness, slope, 3.5 * line_thickness);
-  left_edge.translate_axis (0.25 * line_thickness, Y_AXIS);
-  molecule.add_molecule(left_edge);
-
-  Molecule right_edge =
-    brew_horizontal_slope (line_thickness, slope, 3.5 * line_thickness);
-  right_edge.translate_axis (width - line_thickness, X_AXIS);
-  right_edge.translate_axis (interval / 2.0 * (1.0 - (line_thickness/width)) +
-                            0.25 * line_thickness, Y_AXIS);
-  molecule.add_molecule(right_edge);
-
-  Molecule bottom_edge =
-    Porrectus::brew_horizontal_slope (width, slope, line_thickness);
-  bottom_edge.translate_axis (-3 * line_thickness/2, Y_AXIS);
-  molecule.add_molecule (bottom_edge);
-
-  Molecule top_edge =
-    Porrectus::brew_horizontal_slope (width, slope, line_thickness);
-  top_edge.translate_axis (+3 * line_thickness/2, Y_AXIS);
-  molecule.add_molecule (top_edge);
+  // Compensate optical illusion regarding vertical position of left
+  // and right endings due to slope.
+  Real ypos_correction = -0.1*space * sign(slope);
+  Real slope_correction = 0.2*space * sign(slope);
+  Real corrected_slope = slope + slope_correction/width;
 
   if (solid)
     {
-      Molecule core =
-       Porrectus::brew_horizontal_slope (width, slope, 6 * line_thickness/2);
-      core.translate_axis (-line_thickness/2, Y_AXIS);
-      molecule.add_molecule (core);
+      Molecule solid_head =
+       brew_horizontal_slope (width, corrected_slope, 0.6*space);
+      molecule.add_molecule (solid_head);
     }
-
+  else
+    {
+      Molecule left_edge =
+         brew_horizontal_slope (thickness, corrected_slope, 0.6*space);
+      molecule.add_molecule(left_edge);
+
+      Molecule right_edge =
+         brew_horizontal_slope (thickness, corrected_slope, 0.6*space);
+      right_edge.translate_axis (width-thickness, X_AXIS);
+      right_edge.translate_axis (corrected_slope * (width-thickness), Y_AXIS);
+      molecule.add_molecule(right_edge);
+
+      Molecule bottom_edge =
+         brew_horizontal_slope (width, corrected_slope, thickness);
+      bottom_edge.translate_axis (-0.3*space, Y_AXIS);
+      molecule.add_molecule (bottom_edge);
+
+      Molecule top_edge =
+         brew_horizontal_slope (width, corrected_slope, thickness);
+      top_edge.translate_axis (+0.3*space, Y_AXIS);
+      molecule.add_molecule (top_edge);
+    }
+  molecule.translate_axis (ypos_correction, Y_AXIS);
   return molecule;
 }
 
+/*
+ * Horizontal Slope:
+ *
+ *            /|   ^
+ *           / |   |
+ *          /  |   | thickness
+ *         /   |   |
+ *        /    |   v
+ *       |    /
+ *       |   /
+ * (0,0) x  /slope=dy/dx
+ *       | /
+ *       |/
+ *
+ *       <----->
+ *        width
+ */
 Molecule
-Porrectus::brew_horizontal_slope(Real width, Real slope, Real line_thickness)
+Porrectus::brew_horizontal_slope(Real width, Real slope, Real thickness)
 {
   SCM width_scm = gh_double2scm (width);
   SCM slope_scm = gh_double2scm (slope);
-  SCM line_thickness_scm = gh_double2scm (line_thickness);
+  SCM thickness_scm = gh_double2scm (thickness);
   SCM horizontal_slope = gh_list (ly_symbol2scm ("beam"),
                                  width_scm, slope_scm,
-                                 line_thickness_scm, SCM_UNDEFINED);
+                                 thickness_scm, SCM_UNDEFINED);
   Box b (Interval (0, width),
-        Interval (0, width * slope +
-                  sqrt (sqr(line_thickness/slope) + sqr (line_thickness))));
+        Interval (-thickness/2, thickness/2 + width*slope));
   return Molecule (b, horizontal_slope);
 }
index cc017cbb2e7dca757573cfcdb9bd4bf06733ad4b..642c222e1107e7b151ac2b7855918209fb4391ca 100644 (file)
@@ -72,7 +72,8 @@ System_start_delimiter_engraver::System_start_delimiter_engraver ()
 void
 System_start_delimiter_engraver::initialize ()
 {
-  delim_ = new Spanner (get_property ("SystemStartDelimiter"));
+  SCM delim_name =get_property ("SystemStartDelimiter");
+  delim_ = new Spanner (get_property (delim_name));
 
   delim_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
 
index b756d16a46eae68638da6b48fee7fde7e346aa4d..56bf35e1b407637fc769436ff45388357d9b0cb8 100644 (file)
@@ -29,7 +29,7 @@ System_start_delimiter::staff_bracket (Grob*me,Real height)
                    gh_double2scm (arc_height),
                    gh_double2scm (height),
                    me->get_grob_property ("arch-thick"),
-                   me->get_grob_property ("bracket-thick"),
+                   me->get_grob_property ("thickness"),
                    SCM_UNDEFINED);
 
 /*
@@ -82,25 +82,19 @@ MAKE_SCHEME_CALLBACK (System_start_delimiter,after_line_breaking,1);
 SCM
 System_start_delimiter::after_line_breaking (SCM smob)
 {
-  try_collapse (unsmob_grob (smob));
-  return SCM_UNSPECIFIED;
-}
-
-void
-System_start_delimiter::try_collapse (Grob*me)
-{
+  Grob * me = unsmob_grob (smob);
   SCM   gl = me->get_grob_property ("glyph");
   
   if (scm_ilength (me->get_grob_property ("elements")) <=  1 && gl == ly_symbol2scm ("bar-line"))
     {
       me->suicide ();
     }
-  
+
+  return SCM_UNSPECIFIED;
 }
 
 
 MAKE_SCHEME_CALLBACK (System_start_delimiter,brew_molecule,1);
-
 SCM
 System_start_delimiter::brew_molecule (SCM smob)
 {
@@ -110,8 +104,7 @@ System_start_delimiter::brew_molecule (SCM smob)
   if (!gh_symbol_p (s))
     return SCM_EOL;
   
-  SCM c = me->get_grob_property ((ly_symbol2string (s) + "-collapse-height")
-                                .ch_C ());
+  SCM c = me->get_grob_property ("collapse-height");
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Interval ext = ly_scm2interval (Axis_group_interface::group_extent_callback
index 01e05e9bcfe7ef8b6893dfaab3144dc05a793262..1c86fc7a3b31f6dd881b2fa50d1645d9e1828989 100644 (file)
@@ -64,7 +64,7 @@ InnerChoirStaffContext = \translator {
        \name InnerChoirStaff
        alignmentReference = #0
        \consists "System_start_delimiter_engraver"
-       SystemStartDelimiter \override #'glyph = #'bracket
+       SystemStartDelimiter = #'SystemStartBracket
 
        \accepts "Staff"
        \accepts "RhythmicStaff"
@@ -176,8 +176,7 @@ GrandStaffContext=\translator{
        \consists "Span_bar_engraver"
        \consists "Span_arpeggio_engraver"
        \consists "System_start_delimiter_engraver"
-       SystemStartDelimiter \override #'glyph = #'brace
-       
+       SystemStartDelimiter = #'SystemStartBrace
        Generic_property_list = #generic-grand-staff-properties
        \accepts "Staff"
 }
@@ -205,7 +204,7 @@ InnerStaffGroupContext= \translator {
        \consists "Span_bar_engraver"
        \consists "Span_arpeggio_engraver"
        \consists "Output_property_engraver"    
-       SystemStartDelimiter \override #'glyph = #'bracket
+       SystemStartDelimiter = #'SystemStartBracket
 
        \consists "System_start_delimiter_engraver"
        \accepts "Staff"
@@ -354,7 +353,7 @@ ScoreContext = \translator {
        soloADue = ##t
        splitInterval = #'(0 . 1)
        changeMoment = #`(,(make-moment 0 0) . ,(make-moment 1 512))
-
+       SystemStartDelimiter =#'SystemStartBar
        barAuto = ##t
        voltaVisibility = ##t
        %  name, glyph id, clef position 
index db1b2ae5b2fd9f13398f263b28970e16ff0ed538..b33dd832187e83b8cca33824415b9dcbf0c7b4b2 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.5.10
-Entered-date: 17SEP01
+Version: 1.5.11
+Entered-date: 21SEP01
 Description: @BLURB@
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.5.10.tar.gz 
+       1000k lilypond-1.5.11.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.5.10.tar.gz 
+       1000k lilypond-1.5.11.tar.gz 
 Copying-policy: GPL
 End
index 777fb25bf9eb73b83d5251b7f216f2ce45c06722..31be80813d631474ce721123b1c8f285ad689ce5 100644 (file)
@@ -1,5 +1,5 @@
 %define name lilypond
-%define version 1.5.10
+%define version 1.5.11
 %define release 1mdk
 
 Name: %{name}
index 3e4aca0512c76fa4d78fbc724303b9b7acb06bb6..48b12bd8cf01524feb288251b1e6cf20ec13a0a2 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.5.10
+Version: 1.5.11
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.10.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.11.tar.gz
 Summary: Create and print music notation 
 URL: http://www.lilypond.org/
 BuildRoot: /tmp/lilypond-install
index 84bb9dfe56595c785eb02341334621e9be2538c8..631e774b87ba5bf3bc105608f6eaf1e099216377 100644 (file)
 
 Distribution: SuSE Linux 7.0 (i386)
 Name: lilypond
-Version: 1.5.10
+Version: 1.5.11
 Release: 2
 Copyright:    GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.10.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.11.tar.gz
 # music notation software for.. ?
 Summary: A program for printing sheet music.
 URL: http://www.lilypond.org/
diff --git a/midi2ly/duration-iter.cc b/midi2ly/duration-iter.cc
deleted file mode 100644 (file)
index e69de29..0000000
index 6e1e9b54ae9daeee477a40fbb2891582e3455508..391537af3ad1fdf8813cb0289993a2103c5d854d 100644 (file)
@@ -19,7 +19,6 @@
 #include "rational.hh"
 #include "duration.hh"
 #include "duration-convert.hh"
-#include "duration-iter.hh"
 
 // statics Duration
 int Duration::division_1_i_s = 384 * 4;
diff --git a/midi2ly/include/duration-iter.hh b/midi2ly/include/duration-iter.hh
deleted file mode 100644 (file)
index e69de29..0000000
index 2fca257ec326845f493a6a8f5ebe868e80a12be7..25d6758883fc24335d49649d52e57e26f7c009ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  midi-score-parser.hh -- declare 
+  midi-score-parser.hh -- declare Midi_score_parser
 
   source file of the GNU LilyPond music typesetter
 
index 5a023f14cb363527d2886b8be543bb92608c61aa..bc69608d146b08887e10ae129142a5b87358211b 100644 (file)
@@ -3,9 +3,14 @@ depth = ..
 # Hmm, name dir midi too, then?
 NAME=midi
 
-STEPMAKE_TEMPLATES=c install python-module
+
+# compile fucks up on without autoconf -I flag.
+STEPMAKE_TEMPLATES=c install # python-module
 
 INSTALLATION_FILES=$(outdir)/midi.so
 INSTALLATION_DIR=$(datadir)/python
 
+# do nothing; module ins't used yet.
+
 include $(depth)/make/stepmake.make
+
index 80e6941046159ef5daf8b0e53f8b01f42e9c8f8c..8cda734a5f60da579599df54918199f7184ac0d4 100644 (file)
@@ -168,8 +168,8 @@ bassdux =  \context Voice=three \notes \relative c' {
   d c g' g, 
 %%30
   \context Staff=bass <
-    {\stemUp c2 ~ | c1 ~ | c1 }
-    \context Voice=four {\stemDown c,2 ~ | c1 ~ | c1 }
+    { \voiceOne c2 ~ | c1 ~ | c1 }
+    \context Voice=four { \voiceTwo  c,2 ~ | c1 ~ | c1 }
   >
 }
 
index e673a0d4dc7ed192961d158a57ef3705fba16ae7..98f29a9d6d1f401aea51fffd8049a540a6a514df 100644 (file)
        
        (Porrectus . (
                (style . mensural)
+               (auto-properties . #t)
                (solid . #f)
+               (porrectus-width . 2.4)
+               (line-thickness . 1.0)
                (add-stem . #t)
                (stem-direction . 1)
                (molecule-callback . ,Porrectus::brew_molecule)
        ))
 
        ;; TODO: should split in 3
-       (SystemStartDelimiter . (
+       (SystemStartBrace . (
+               (glyph . brace)
                (molecule-callback . ,System_start_delimiter::brew_molecule)
-               (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
-               ;; really 4.0, but 5 to be on safe side.
-               (brace-collapse-height . 5.0)
-               (bracket-collapse-height . 1)
-               (thickness . 1.6)
+               (collapse-height . 5.0)
+               (font-family . braces)
+               (Y-extent-callback . #f)
+               (meta . ,(grob-description "SystemStartBrace" system-start-delimiter-interface font-interface))
+               ))
+       (SystemStartBracket . (
+               (Y-extent-callback . #f)
+               (molecule-callback . ,System_start_delimiter::brew_molecule)
+               (glyph . bracket)
                (arch-height . 1.5)
                (arch-angle . 50.0)
                (arch-thick . 0.25)
-               (glyph . bar-line)
                (arch-width . 1.5)
-               (bracket-thick . 0.25)
+               (thickness . 0.25)
+               (meta . ,(grob-description "SystemStartBracket" system-start-delimiter-interface ))
+               (bracket-collapse-height . 1)
+       ))
+       (SystemStartBar . (
                (Y-extent-callback . #f)
-               (font-family . braces)
-               ;; if you want to set point-size, you cannot set
-               ;; relative-size, as no font will be found for other
-               ;; sheets than 20
-               ;;(font-design-size . 20)
-               ;;(font-relative-size . #f)
-               (meta . ,(grob-description "SystemStartDelimiter" system-start-delimiter-interface font-interface))
-               ))
+               (molecule-callback . ,System_start_delimiter::brew_molecule)
+               (glyph . bar-line)
+               (thickness . 1.6)
+               (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
+               (meta . ,(grob-description "SystemStartBar" system-start-delimiter-interface ))
+       ))
 
        (TextScript . (
                (molecule-callback . ,Text_item::brew_molecule)
index d47707af49949cb698e1661272d66ecc620096b5..9b8ec528b7d941e10b7a5551a95334fde78bff3c 100644 (file)
@@ -252,6 +252,7 @@ more than this (in staffspace).")
 (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
 (grob-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket .")
 (grob-property-description 'pitches list? "list of musical-pitch.")
+(grob-property-description 'porrectus-width number? "width of the porrectus ligature measured in staff space.")
 (grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
 (grob-property-description 'right-padding number? "space right of accs.")
 (grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")
index b34c79ce2cb154e01f2c277fd1d8f90d40cde2ee..d83944620ffe460533bfb58bef263c7fb3b0de6e 100644 (file)
@@ -630,8 +630,8 @@ bar lines, and draws a single span-bar across them."
     'System_start_delimiter_engraver
     (engraver-description
      "System_start_delimiter_engraver"
-     "creates a SystemStartDelimiter spanner"
-     '(SystemStartDelimiter)
+     "creates a system start delimiter (ie. SystemStart@{Bar,Brace,Bracket@} spanner"
+     '(SystemStartBar SystemStartBrace SystemStartBracket)
      '(
       )))