]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.90 release/1.3.90
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 24 Sep 2000 16:55:08 +0000 (18:55 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 24 Sep 2000 16:55:08 +0000 (18:55 +0200)
===========

* Changed lilypond to LilyPond in ly2dvi, Mudela to LilyPond source.

* Website fixes: Changed \interline to \staffspace in manual, removed offending
  braces from mudela-book.tely.

* Fixed slur attachment correction bug.

* Made some fixes to Coriolan.

1.3.89.h

49 files changed:
CHANGES
DEDICATION
Documentation/user/GNUmakefile
NEWS
VERSION
flower/file-path.cc
input/bugs/addlyrics.ly [deleted file]
input/bugs/bar-break.ly [deleted file]
input/bugs/bug1.ly [deleted file]
input/bugs/cross-staff-tuplet.ly [deleted file]
input/bugs/different-time.ly
input/bugs/f.ly [deleted file]
input/bugs/hang.ly [deleted file]
input/bugs/lyric-warning.ly [deleted file]
input/bugs/notreich.ly [deleted file]
input/bugs/shorthand-trickery.ly [deleted file]
input/bugs/staccato-quantisation.ly [deleted file]
input/bugs/volta.ly
input/bugs/weird-x-staff-tuplet.ly [deleted file]
input/scarlatti-paper.ly
input/scarlatti-properties.ly
input/test/auto-change.ly
lily/auto-change-iterator.cc
lily/beam.cc
lily/include/auto-change-iterator.hh
lily/include/beam.hh
lily/include/lily-proto.hh
lily/include/music-iterator.hh
lily/include/musical-request.hh
lily/include/simultaneous-music-iterator.hh
lily/include/slur.hh
lily/include/staff-symbol.hh
lily/note-heads-engraver.cc
lily/rest-engraver.cc
lily/sequential-music-iterator.cc
lily/side-position-interface.cc
lily/simultaneous-music-iterator.cc
lily/slur.cc
lily/stem.cc
lily/text-engraver.cc
ly/engraver.ly
ly/property.ly
make/out/lilypond.lsm
make/out/lilypond.spec
mutopia/E.Satie/gnossienne-4.ly
scm/basic-properties.scm
scm/lily.scm
scm/paper.scm
scm/slur.scm

diff --git a/CHANGES b/CHANGES
index 8e8ce43ea2bd83c756a5027d9082cfd021985ee2..dc84c63d28bca0da45d57da9cefd361b765562c3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,11 +8,25 @@
 
 * Fixed slur attachment correction bug.
 
-* Added some comments about brokenness of non-empty text, ie text that has
-  a width.
-
 * Made some fixes to Coriolan.
 
+1.3.89.hwn1
+===========
+
+* Only open files, not directories 
+
+* bugfix: textNonEmpty.
+
+* Look ahead in auto-change iterator for rests. This means rests
+before the note leading to an automatic staff switch are switched as
+well (improves the looks of scarlatti-test).  Associated fixes and
+additions for  Music_iterator::skip () and friends.
+
+* Bugfix: only quantise staccato inside the staff. 
+
+* cleanups for beam and stem. Removed global GUILE namespace calls
+from Beam and Stem.
+
 1.3.89
 ======
 
index 03d11e0b40b5849bc3d00b97a52fee29ce607db1..f6647fe0f1d23df1b2aa14c2782d5affefa540ae 100644 (file)
@@ -5,10 +5,9 @@
                         met through music. 
 
 
-       Those deserving special mentioning (in no particular order):
-Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn,
-Maartje, Suzanne, Ilse (gee, again?) and last (but certainly not
-least) Janneke!
+       Those deserving special mentioning (in no particular order): Esther,
+Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, Maartje, Suzanne,
+Ilse (gee, again?), Irene and last (but certainly not least) Janneke!
 
        HWN
 
index a045e99d94fd7561b58886dda0e4951203e1b822..6b7186af4beebaf159f9423fd5a19721005a81c7 100644 (file)
@@ -6,7 +6,9 @@ depth=../..
 
 LATEX_FILES =$(wildcard *.latex)
 
-DVI_FILES = $(addprefix $(outdir)/,$(LATEX_FILES:.latex=.dvi)   $(TELY_FILES:.tely=.dvi))
+
+# todo: add latex.
+DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
 
 EXTRA_DIST_FILES= $(LATEX_FILES)    $(wildcard *.itexi *.itely)
 
diff --git a/NEWS b/NEWS
index f2da758e4516e273c10cb6c9adb8c80380da20a0..277bd59a82db862a2c43843d03446503cc7a91ef 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
 
 * Point and click functionality using emacs and Xdvi.
 
+* Automatic part combining for orchestral scores.
+
 * Improved design and implementation: Complete rewrite of the
 internals: LilyPond is smaller, cleaner, more flexible, etc.
 
@@ -10,6 +12,9 @@ internals: LilyPond is smaller, cleaner, more flexible, etc.
  - Improved speed (undone for now, by .73 + .74), 
    with comparable memory footprint
 
+ - More tweakability using less memory with new property push
+  mechanism.
+
  - Improved robustness: Lily almost never crashes.
 
 * Piano pedal support
diff --git a/VERSION b/VERSION
index c3a40bd4431d14f659a130b67b4609703d9de7dc..ce0904ffd5f55d94b10839cf29775ee0ea3b8b57 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=89
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=90
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 10df133946ee45fe911d512d60a349332c912dc5..501554ea656580ef87c357412fa29bd5ad406dea 100644 (file)
@@ -2,7 +2,10 @@
    path.cc - manipulation of paths and filenames.
 */
 
+
 #include <stdio.h>
+#include <errno.h>
+#include <sys/stat.h>
 
 #include "config.h"
 #include "file-path.hh"
@@ -98,6 +101,17 @@ File_path::find (String nm) const
       path += nm;
 
       DEBUG_OUT << path << "? ";
+
+      /*
+       Check if directory. TODO: encapsulate for autoconf
+       */
+      struct stat sbuf;
+      if (stat (path.ch_C(), &sbuf) == ENOENT)
+       continue;
+      
+      if (!(sbuf.st_mode & __S_IFREG))
+       continue;
+
       FILE *f = fopen (path.ch_C(), "r"); // ugh!
       if (f)
        {
diff --git a/input/bugs/addlyrics.ly b/input/bugs/addlyrics.ly
deleted file mode 100644 (file)
index f38a604..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-% Generated by mudela-book.py; options are nofly
-\include "paper16.ly"
-\paper  { linewidth = 390.000000 \pt; } 
-
-% copied from file `lyric-combine.ly'
-\header{
-filename =      "twinkle-pop.ly";
-%title =        "Ah, vous dirais-je, maman ";
-description =   "twinkle twinkle in pop-song-settings";
-composer =      "traditional";
-enteredby =     "HWN, chords by Johan Vromans";
-copyright =     "public domain";
-}
-
-\version "1.3.59";
-
-m =\notes  \relative c'' {
-       \property Staff.automaticMelismata = ##t
-       \autoBeamOff
-       g4  r8 \times 2/3 { g'8( f )e } r8 \grace { [d16 c b] } e4
-       \emptyText
-       d8.^"melisma"   \melisma c16
-       \melismaEnd
-       b }
-
-noisebeat =\notes \relative c'' {g16 g g g }
-noise =  { \noisebeat \noisebeat \noisebeat  \noisebeat \noisebeat \noisebeat }
-textI =  \lyrics  { la2 __ la -- la __ la la la la la  }
-textII =  \lyrics  { da -- da __ da -- da da da da da  }
-
-\score {
-    \notes < \context Staff = SA \m
-      \context Lyrics = LA { s1 }
-      \context Staff = SB { s1 }
-      \context Lyrics = LB { s1 }
-      \context Staff = SC \noise
-      
-      \addlyrics
-         \context Staff = SB \m
-         < \context Lyrics = LA \textI
-           \context Lyrics = LB \textII
-         >
-         
-    >
-}
-
-
diff --git a/input/bugs/bar-break.ly b/input/bugs/bar-break.ly
deleted file mode 100644 (file)
index 94fd0db..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-\score
-{
-  \context StaffGroup = a < 
-    \context PianoStaff = b <
-      \context Staff = "c" \notes\relative c'' { b4 b \bar "empty"; \break b b }
-      \context Staff = "d" \notes\relative c'' { b4 b b b }
-    >
-  >
-
-  \paper {
-       indent=100.0\mm;
-       linewidth=150.0\mm;
-    \translator {
-      \StaffContext
-        \consists "Instrument_name_engraver";
-       numberOfStaffLines  = #1
-        marginScriptPadding = #30  % urg: this is in PT
-       instrument = #"Foo"
-       instr = #"Bar"
-    }
-    \translator {
-      \StaffGroupContext
-        \consists "Instrument_name_engraver";
-        marginScriptPadding = #10  % urg: this is in PT
-       instrument = #"Piano\n(For rehearsal only)"
-      }
-  }
-}
diff --git a/input/bugs/bug1.ly b/input/bugs/bug1.ly
deleted file mode 100644 (file)
index 124fa81..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-\score {
-  \notes \relative c'' {
-    c4 <d4 \context Staff = "another" e4> f
-  }
-}
diff --git a/input/bugs/cross-staff-tuplet.ly b/input/bugs/cross-staff-tuplet.ly
deleted file mode 100644 (file)
index 10f689b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-\score { \context PianoStaff \notes <
-\context Staff = up <{ c4 }
- \times 2/3 { [c8 c\translator Staff = down c]  }>
-        \context Staff = down c4
-        
-        >
-
-        }
-        
index 9733e50271fb8b7fcce5a7566dded87317ce8d17..927fd1af096c409b920d1d845b781492ef3dada4 100644 (file)
@@ -1,3 +1,6 @@
+%
+% irregular spacing.
+
 \score{
     \context PianoStaff <
         \context Staff = upper \notes\relative c''{
diff --git a/input/bugs/f.ly b/input/bugs/f.ly
deleted file mode 100644 (file)
index 2a7ee47..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-\score {\notes c4 }
diff --git a/input/bugs/hang.ly b/input/bugs/hang.ly
deleted file mode 100644 (file)
index efcd426..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\score{
-       <
-       \context Staff = flauti <
-               \context Voice=one \partcombine Voice
-                       \context Thread=one \notes\relative c''
-                               {
-                                       %c1
-                                       c2 c2
-                               }
-                       \context Thread=two \notes\relative c''
-                               {
-                               }
-               >
-       >
-       \paper{
-               
-       }
-}
diff --git a/input/bugs/lyric-warning.ly b/input/bugs/lyric-warning.ly
deleted file mode 100644 (file)
index 15e127b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-% f.ly:4:20: warning: Must stop before this music ends:
-
-
-\score { \notes {
- \addlyrics { c4 } { f4}
-}}
diff --git a/input/bugs/notreich.ly b/input/bugs/notreich.ly
deleted file mode 100644 (file)
index cef3c9c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-% GENERATED AUTOMATICALLY
-
-\header {
-  title = "Not Clapping Music" ;
-  instrument = "For four hands";
-  composer = "Not Steve Reich";
-  year = "1972";
-}
-
-
-beaming = \notes \repeat unfold 13 {  \repeat unfold 3 { [ s2 ] } \bar ":|:"; }
-
-\score {
-       \notes <
-%              \property Score.midiInstrument = "woodblock"
-               \property Score.midiInstrument = "melodic tom"
-               \context RhythmicStaff = SA 
-                 \context Voice = VA <
-                 \time 12/8 ;
-                      { c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 r }  \beaming
-                       s8^"No accents whatsoever"
-                       { s1.  \mark "8$\\times$"; }
-
-
-                 > 
-               \context RhythmicStaff = SB
-                  \context Voice = VA < { c8 c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 r c8 r c8 c8 r c8 c8 r c8 c8 c8 c8 r c8 c8 r c8 c8 r c8 c8 c8 r r c8 c8 r c8 c8 r c8 c8 c8 r c8 c8 c8 r c8 c8 r c8 c8 c8 r c8 r c8 r c8 c8 r c8 c8 c8 r c8 r c8 r c8 c8 r c8 c8 c8 r c8 r c8 c8 c8 c8 r c8 c8 c8 r c8 r c8 c8 r c8 r c8 c8 c8 r c8 r c8 c8 r c8 r c8 c8 c8 r c8 r c8 c8 r c8 c8 c8 c8 c8 r c8 r c8 c8 r c8 c8 r }  \beaming >
-       >
-       \paper{ \translator { \ScoreContext \consists Mark_engraver; }}
-       \midi {\tempo 4 = 130;}
-       } 
diff --git a/input/bugs/shorthand-trickery.ly b/input/bugs/shorthand-trickery.ly
deleted file mode 100644 (file)
index 6ad3025..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-%
-% Example of shorthand trickery 
-% \property Context.foo = bar
-%
-foo = \property Staff.foo = #"bar"
-%
-%
-%
-
-one = \context Voice\notes\relative c {
-       a1 b c
-}
-
-
-two = \context Voice\notes {
-       a1\foo
-       b
-       < c\foo e >
-}
-
-\score{
-       \context OtherStaff=one <
-               \one
-               \two
-       >
-       \paper{
-               \translator {
-                       \StaffContext
-                       \name "OtherStaff";
-               }
-               \translator {
-                       \ScoreContext
-                       \accepts "OtherStaff";
-               }
-       }
-}
diff --git a/input/bugs/staccato-quantisation.ly b/input/bugs/staccato-quantisation.ly
deleted file mode 100644 (file)
index a8fd4cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-\score { \notes \context Staff {
-\stemup
-f'-. g-. a-. b-. c-. d-. e-.
-}}
index 48889cf91a22095b5e11509ec22a71db8cba21cb..c7d9f933c7ab75320dbe9151cad3829a7eac9d4a 100644 (file)
@@ -17,7 +17,7 @@ voice4 = \notes {
 }
 voicedefault = \notes {
  \property Staff.timeSignatureStyle="C"
- \time 4/4; \key f; 
+ \time 4/4; \key f \major;  
  \tempo 4 = 200;
 }
 \score{
diff --git a/input/bugs/weird-x-staff-tuplet.ly b/input/bugs/weird-x-staff-tuplet.ly
deleted file mode 100644 (file)
index 51d57cc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-\score { \context PianoStaff \notes <
-
-{ \times 2/3 { [c8 c\translator Staff = down c]  }}
-        \context Staff = down c4
-        
-        >
-
-        }
-        
index 8ed8e1e2a79bfec9b04d124da421923dd6f2638a..983c51bfdb5d9ef6eb6ff1f818cff42b2dcb4d7d 100644 (file)
@@ -11,8 +11,8 @@
        forced_stem_shorten3=0.;
        \translator{
                \PianoStaffContext
-               maxVerticalAlign=42.\pt;
-               minVerticalAlign=42.\pt;
+               maxVerticalAlign=8.4;
+               minVerticalAlign=8.4;
        }
        \translator{\StaffContext
        timeSignatureStyle="C";}
index 651de9a37b7c97dde0392acdbf16022feed10948..53b117680d7751e0c0fb738f7030efb6fbff4c21 100644 (file)
@@ -7,8 +7,12 @@ rh=\property Thread.noteHeadStyle=##f
 lh=\property Thread.noteHeadStyle = #'diamond
 n=\property Thread.fontSize=#0  
 sm=\property Thread.fontSize=#-1 
-su=\property Voice.verticalDirection=#1  
-sd=\property Voice.verticalDirection=#-1
+% su=\property Voice.verticalDirection=#1  
+% sd=\property Voice.verticalDirection=#-1
+
+su=\property Voice.basicStemProperties \push #'direction = #1
+sd=\property Voice.basicStemProperties \push #'direction = #-1  
+
 zs=\property Voice.forceHorizontalShift=#0.0
 ls=\property Voice.forceHorizontalShift=#-0.6
 sls=\property Voice.forceHorizontalShift=#-0.22
index 3a27cbe163512fd67a715548abd5a694c28c4830..5d3d34f8e4a36556e77b1c802b8fee8bbe68da56 100644 (file)
@@ -2,7 +2,7 @@
 \score {
        \notes \context PianoStaff <
        \context Staff = "up" {
-               \autochange Staff \relative c' { g4 a  b c d e f g }
+               \autochange Staff \context Voice = VA < \relative c' { g4 a  b c d r4 a g } >
        }
        \context Staff = "down" {
                \clef bass; 
index cd4a350c85267b0d02cccd0afa940ce8417c2d43..cf291348c0695d8c6ea984aa44d0a01dee467c7e 100644 (file)
@@ -66,21 +66,58 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type,
 
 }
 
-Pitch_interrogate_req* spanish_inquisition; // nobody expects it
+/*
+  Look ahead to find first pitches to determine staff position.
+  WARNING: this means that
 
-void
-Auto_change_iterator::process (Moment m)
+  \autochange Staff \notes { .... \context Staff = otherstaff { .. } .. }
+
+  will confuse the autochanger, since it will not notice that the
+  music for OTHERSTAFF is not his.
+
+  PRECONDITION: this->ok() holds.
+*/
+Array<Musical_pitch>
+Auto_change_iterator::pending_pitch (Moment m) const
 {
-  Music_wrapper_iterator::process (m);
+  Music_iterator * iter = child_iter_p_ ->clone ();
+  Array<Musical_pitch> ps;
+  while (1)
+    {
+      SCM muses = iter->get_music (m);
+      for (SCM s = muses; gh_pair_p (s); s=gh_cdr (s))
+       if (Note_req* nr = dynamic_cast<Note_req*> (unsmob_music (gh_car (s))))
+         {
+           ps.push (nr->pitch_);
+         }
+
+      if (ps.size ())
+       break;
+
+      iter->skip (m);
+      if (!iter->ok())
+       break;
+      
+      m = iter->pending_moment ();
+    }
 
-  if (!spanish_inquisition)
-    spanish_inquisition = new Pitch_interrogate_req;
+  delete iter;
+  return ps;
+}
 
-  Music_iterator *it = try_music (spanish_inquisition);
+void
+Auto_change_iterator::process (Moment m)
+{
+  /*
+    first we get the pitches, then we do the real work.
+    Music_wrapper_iterator::process() might process (and throw away)
+    pitches we need.  */
+  Array<Musical_pitch> ps = pending_pitch (m);
 
-  if (it && spanish_inquisition->pitch_arr_.size ())
+  Music_wrapper_iterator::process (m);
+  if (ps.size ())
     {
-      Musical_pitch p = spanish_inquisition->pitch_arr_[0];
+      Musical_pitch p = ps[0];
       Direction s = Direction (sign(p.steps ()));
       if (s != where_dir_)
        {
@@ -88,11 +125,9 @@ Auto_change_iterator::process (Moment m)
          String to_id =  (s >= 0) ?  "up" : "down";
          Auto_change_music const * auto_mus = dynamic_cast<Auto_change_music const* > (music_l_);
 
-         change_to (it, auto_mus->what_str_, to_id);     
+         change_to (child_iter_p_, auto_mus->what_str_, to_id);          
        }
     }
-
-  spanish_inquisition->pitch_arr_.clear ();
 }
 
 Auto_change_iterator::Auto_change_iterator( )
index 124dc7f9c06f70fa03f4f8d58492e2e480def09b..10bf8d82e8f3e3878f0eeb3822a54c4b45ff9421 100644 (file)
@@ -94,9 +94,6 @@ Beam::before_line_breaking (SCM smob)
   return SCM_EOL;
 }
 
-/*
- FIXME
- */
 Direction
 Beam::get_default_dir (Score_element*me) 
 {
@@ -124,14 +121,13 @@ Beam::get_default_dir (Score_element*me)
 
     } while (flip(&d) != DOWN);
   
+  SCM func = me->get_elt_property ("dir-function");
+  SCM s = gh_call2 (func,
+                   gh_cons (gh_int2scm (count[UP]),
+                            gh_int2scm (count[DOWN])),
+                   gh_cons (gh_int2scm (total[UP]),
+                            gh_int2scm (total[DOWN])));
 
-  SCM s = scm_eval2 (gh_list (ly_symbol2scm ("beam-dir-algorithm"),
-                            ly_quote_scm (gh_cons (gh_int2scm (count[UP]),
-                                                   gh_int2scm (count[DOWN]))),
-                            ly_quote_scm (gh_cons (gh_int2scm (total[UP]),
-                                                   gh_int2scm (total[DOWN]))),
-                            SCM_UNDEFINED),
-                    SCM_EOL);
   if (gh_number_p (s) && gh_scm2int (s))
     return to_dir (s);
   
@@ -244,9 +240,7 @@ Beam::set_stem_shorten (Score_element*m)
 
   int multiplicity = get_multiplicity (me);
 
-  // grace stems?
-  SCM shorten = scm_eval2 (ly_symbol2scm ("beamed-stem-shorten"), SCM_EOL);
-
+  SCM shorten = me->get_elt_property ("beamed-stem-shorten");
   if (shorten == SCM_EOL)
     return;
 
@@ -452,10 +446,10 @@ Beam::calc_stem_y_f (Score_element*me,Item* s, Real y, Real dy)
 
   Real staffspace = me->paper_l ()->get_var ("staffspace");
   
-  SCM space_proc = me->get_elt_property ("beam-space-function");
+  SCM space_proc = me->get_elt_property ("space-function");
   SCM space = gh_call1 (space_proc, gh_int2scm (beam_multiplicity));
 
-  Real thick = gh_scm2double (me->get_elt_property ("beam-thickness")) *staffspace;
+  Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace;
   Real interbeam_f = gh_scm2double (space) * staffspace;
 
   // ugh -> use commonx
@@ -556,8 +550,14 @@ Real
 Beam::quantise_dy_f (Score_element*me,Real dy) 
 {
   Array<Real> a;
-  for (SCM s = scm_eval2 (ly_symbol2scm ("beam-height-quants"), SCM_EOL);
-       s !=SCM_EOL; s = gh_cdr (s))
+
+  SCM proc = me->get_elt_property ("height-quants");
+  SCM quants = gh_call2 (proc, me->self_scm (),
+                        gh_double2scm (me->paper_l ()->get_var ("stafflinethickness")
+                                       / me->paper_l ()->get_var ("staffspace")));
+  
+  
+  for (SCM s = quants; gh_pair_p (s); s = gh_cdr (s))
     a.push (gh_scm2double (gh_car (s)));
   
   if (a.size () <= 1)
@@ -587,15 +587,20 @@ Beam::quantise_y_f (Score_element*me,Real y, Real dy, int quant_dir)
   int multiplicity = get_multiplicity (me);
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  SCM quants = scm_eval2 (gh_list (ly_symbol2scm ("beam-vertical-position-quants"),
-                                 gh_int2scm (multiplicity),
-                                 gh_double2scm (dy/staff_space),
-                                 SCM_UNDEFINED),
-                         SCM_EOL);
+  Real thick = me->paper_l ()->get_var ("stafflinethickness");
+
 
+  SCM proc = me->get_elt_property ("vertical-position-quant-function");
+  SCM quants = scm_apply (proc,
+                         me->self_scm (),
+                         gh_list (gh_int2scm (multiplicity),
+                                  gh_double2scm (dy/staff_space),
+                                  gh_double2scm (thick/staff_space),
+                                  SCM_EOL, SCM_UNDEFINED));
+  
   Array<Real> a;
 
-  for (; quants != SCM_EOL; quants = gh_cdr (quants))
+  for (; gh_pair_p (quants); quants = gh_cdr (quants))
     a.push (gh_scm2double (gh_car (quants)));
 
   if (a.size () <= 1)
@@ -635,8 +640,7 @@ Beam::set_beaming (Score_element*me,Beaming_info_list *beaming)
 /*
   beams to go with one stem.
 
-  BURP
-  clean  me up.
+  FIXME: clean me up.
   */
 Molecule
 Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev) 
@@ -650,10 +654,10 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev)
   int multiplicity = get_multiplicity (me);
   Real staffspace =me->paper_l ()->get_var ("staffspace");
 
-  SCM space_proc = me->get_elt_property ("beam-space-function");
+  SCM space_proc = me->get_elt_property ("space-function");
   SCM space = gh_call1 (space_proc, gh_int2scm (multiplicity));
 
-  Real thick = gh_scm2double (me->get_elt_property ("beam-thickness")) *staffspace;
+  Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace;
   Real interbeam_f = gh_scm2double (space) * staffspace;
     
   Real bdy = interbeam_f;
@@ -669,16 +673,13 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev)
   Molecule leftbeams;
   Molecule rightbeams;
 
-  /*
-    UGH: make a property of this.
-  */
   Real nw_f;
   if (!Stem::first_head (here))
     nw_f = 0;
   else {
     int t = Stem::type_i (here); 
 
-    SCM proc = me->get_elt_property ("beam-flag-width-function");
+    SCM proc = me->get_elt_property ("flag-width-function");
     SCM result = gh_call1 (proc, gh_int2scm (t));
     nw_f = gh_scm2double (result) * staffspace;
   }
@@ -720,7 +721,7 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev)
       int j = 0;
       Real gap_f = 0;
 
-      SCM gap = me->get_elt_property ("beam-gap");
+      SCM gap = me->get_elt_property ("gap");
       if (gh_number_p (gap))
        {
          int gap_i = gh_scm2int ( (gap));
index 72b463c7efa39bd7ee6aea96f5ec4f420ddeb72b..ac3c8dbd6d752055c911a588021452793846d5d0 100644 (file)
@@ -22,7 +22,11 @@ public:
 protected:
   virtual void process (Moment);  
 
+
+  Array<Musical_pitch> pending_pitch (Moment)const;
 private:
+
+  
   Direction where_dir_;
   void change_to (Music_iterator* , String, String);
 };
index cd917f8d60c4d0f2add069551df003347a41a0df..3ed32fae68a1cdd4928890ba64e511ecd93649b9 100644 (file)
 
    height -- real  (dy)
 
-   damping -- amount of beam slope damping. (int)
-   should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams 
-
-
-   molecule-callback --
 
-   beam-thickness -- weight of beams, in staffspace
+   Read-only
+   =========
+   
+   flag-width-function --
 
-   beam-space-function -- function of type multiplicity -> real (in staffspace)
+   damping -- amount of beam slope damping. (int)
+     should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams 
 
    default-neutral-direction -- which direction to choose if we're in
      the middle of the staff
    
-   after-line-breaking-callback --
+   thickness -- weight of beams, in staffspace
+
+   space-function -- function of type multiplicity -> real (in staffspace)
 
+   beamed-stem-shorten --
+
+   height-quants --
+
+   vertical-position-quant-function --
+
+   dir-function --
+   
    damping -- damping factor (real).
 
    outer-stem-length-limit -- catch suspect beam slopes, set slope to zero if
      outer stem is lengthened more than this (in staffspace)
 
    slope-limit -- set slope to zero if slope is running away steeper than this.
-
 */
 class Beam
 {
index d0de6ff36ba6834d7bd273dc8f3e07ba00b77b3f..b1673f79f1ffb24e5818334d7df02ff40003f4b0 100644 (file)
@@ -132,7 +132,7 @@ class Performance;
 class Performer;
 class Performer_group_performer;
 class Piano_bar_engraver;
-class Pitch_interrogate_req;
+
 class Pitch_squash_engraver;
 class Property_iterator;
 class Rational;
index 1709a5d8e81bec1c212171f594cd8b45438904fd..43d39505d7687b9d3dfb6e432b0eb04da4e46bbe 100644 (file)
   ok () -- events left ?
 
   pending_mom () -- time tag of the next event to be processed.
+    PRECONDITION: this->ok() holds.
   
-  process (M) -- process all at M (Precondition: no events exist before
-    M).  Side-effects:
+  process (M) -- process all at M (Precondition: no events exist
+    before M, this->ok() holds).  Side-effects:
     
     * This removes all events at M from the pending queue.
 
@@ -43,7 +44,7 @@
 
   TODO:
 
-  merge pending_moment and process.
+  merge pending_moment and process?
   
 */
 class Music_iterator
@@ -55,8 +56,6 @@ public:
   VIRTUAL_COPY_CONS (Music_iterator);
 
   Moment music_length_mom () const;
-
-  
   Music_iterator ();
   Music_iterator (Music_iterator const&);
   virtual ~Music_iterator ();
index 7b431130276a424bcc8eaac9e7eb026a3d1be5ab..ee5728441c41752f5e6f4828c3c9f0f66c84a084 100644 (file)
@@ -157,25 +157,6 @@ public:
   VIRTUAL_COPY_CONS (Music);
 };
 
-/**
-   What pitches have ben acked ?
- */
-class Pitch_interrogate_req : public Request
-{
-public:
-  Array<Musical_pitch> pitch_arr_;
-  VIRTUAL_COPY_CONS (Music);
-};
-
-/**
-   What rhythms have ben acked ?
- */
-class Rhythm_interrogate_req : public Request
-{
-public:
-  Array<Duration> duration_arr_;
-  VIRTUAL_COPY_CONS (Music);
-};
 
 
 /**
index e5ecdcd14bf386ee75bbb5e50b25c3441b3c7ee9..1198a7dc84b1527585b67f452c13b3d55c3e9040 100644 (file)
@@ -29,6 +29,7 @@ public:
   virtual Moment pending_moment () const;
   virtual bool ok () const;
   virtual SCM get_music (Moment)const;
+  virtual void skip (Moment);
 
 protected:
   virtual void process (Moment);
index 349b549dad355254ec9b8562d7c84f6ed6cf58f2..44e4ffaccf0d3c92b12f1c01fc139f37c072d7d0 100644 (file)
 
    y-free -- ? 
    
- */
+   control-points --
+
+
+   
+   Read-only
+   =========
+   
+   extremity-rules --
+
+   extremity-offset-alist --
+
+   thickness --
+
+*/
 class Slur
 {
 public:
index f78c4542bc2737fff8c5a3f35cb3c949ae3c63f3..b854b76dfd5f58739f585f43d32f23fac3db617f 100644 (file)
@@ -15,6 +15,8 @@
 /**
   This spanner draws the lines of a pstaff.
   The bottom line is position 0.
+
+  TODO: add stafflinethickness as parameter.
   */
 class Staff_symbol 
 {
index c7ad380cac8c99bc6bb37cae0f7fc575a3dac54b..30ccf6e490b1c577a404a6a305e981cb2189541e 100644 (file)
@@ -68,18 +68,6 @@ Note_heads_engraver::do_try_music (Music *m)
     {
       return now_mom () < note_end_mom_;
     }
-  else if (Pitch_interrogate_req *p = dynamic_cast<Pitch_interrogate_req*> (m))
-    {
-      for (int i= note_req_l_arr_.size (); i--;)
-       p->pitch_arr_.push (note_req_l_arr_[i]->pitch_); // GUH UGH UGHUGH.
-      return true;
-    }
-  else if (Rhythm_interrogate_req *r = dynamic_cast<Rhythm_interrogate_req*> (m))
-    {
-      for (int i= note_req_l_arr_.size (); i--;)
-       r->duration_arr_.push (note_req_l_arr_[i]->duration_); // GUH UGH UGHUGH.
-      return true;
-    }
   return false;
   
 }
index 23ff6e776bef31628581a19dec2c6de147d8f62d..40cba4eb9102d4d3a7a1559b87518d887d76fa62 100644 (file)
@@ -99,12 +99,6 @@ Rest_engraver::do_try_music (Music *m)
       rest_req_l_ = r;
       return true;
     }  
-  else if (Rhythm_interrogate_req *r = dynamic_cast<Rhythm_interrogate_req*> (m))
-    {
-      if (rest_req_l_)
-       r->duration_arr_.push (rest_req_l_->duration_); // GUH UGH UGHUGH.
-      return true;
-    }
   return false;
 }
 
index bfeb3cd9254c92f01d42cf0d7fbb5971907a2e86..de480844e5b105677b42830671a8caa56cf1f37c 100644 (file)
@@ -32,14 +32,7 @@ Sequential_music_iterator::Sequential_music_iterator (Sequential_music_iterator
 
 Sequential_music_iterator::~Sequential_music_iterator()
 {
-  if (iter_p_)
-    {
-#if 0
-      if (iter_p_->ok () )
-       music_l_->origin ()->warning (_ ("Must stop before this music ends"));
-#endif
-      delete iter_p_;
-    }
+  delete iter_p_;
 }
 
 void
@@ -81,25 +74,19 @@ Sequential_music_iterator::descend_to_child ()
 
 
 /*
+  Retrieve all music (starting at HERE), until a music with length L >
+  0 is found.  From the precondition, we know that UNTIL is later than
+  the earliest event. Hence we know
   
-  
-  Hier staat in feite: haal alle muziek op (startend op tijd HERE) tot
-  je iets met lengte L > 0 tegenkomt.  Aangezien de preconditie is dat
-  UNTIL het eerstvolgende event is, weet je (per definitie)
-
   L >= (UNTIL - HERE)
 
-  en iets wat hierna komt (op tijd T) komt dus na tijd
+  so something that comes after this thing with L > 0 happens after
 
   HERE + L >= HERE + (UNTIL - HERE) = UNTIL
 
-  Dus als je een L>0 tegenkomt, wil je de rest niet meer. Aangezien
-  alles wat tot nu toe hebt gespaard op HERE begint, is dat precies wat
-  je nodig hebt.
-
-  Misschien kan je deze comment erbij stoppen, en moeten we de
-  eigenschappen van het muziek datatype wat formaliseren, zodat deze
-  redenering helderder is.
+  Hence all events after the one with L>0 are uninteresting, so we
+  ignore them.
+  
 */
 
 SCM
@@ -142,7 +129,6 @@ Sequential_music_iterator::get_music (Moment until)const
 void
 Sequential_music_iterator::skip (Moment until)
 {
-  SCM curs = cursor_;
   while (1)
     {
       Moment l =iter_p_->music_length_mom ();
@@ -156,12 +142,12 @@ Sequential_music_iterator::skip (Moment until)
       delete iter_p_;
       iter_p_ =0;
 
-      curs = gh_cdr (curs);
+      cursor_ = gh_cdr (cursor_);
 
-      if (!gh_pair_p (curs))
+      if (!gh_pair_p (cursor_))
        return ;
       else
-       iter_p_ = get_iterator_p (unsmob_music (gh_car (curs)));
+       iter_p_ = get_iterator_p (unsmob_music (gh_car (cursor_)));
     }
 }
 
index e82bf70465d60084707dab3d3db906cd9f261a0c..bfb4ff7d844331814ef0709e6b52ef43aa46f20c 100644 (file)
@@ -148,7 +148,10 @@ directed_round (Real f, Direction d)
 
 /*
   Callback that quantises in staff-spaces, rounding in the direction
-  of the elements "direction" elt property. */
+  of the elements "direction" elt property.
+
+  Only rounds when we're inside the staff, as determined by
+  Staff_symbol_referencer::staff_radius() */
 Real
 Side_position::quantised_position (Score_element *me, Axis )
 {
@@ -158,9 +161,10 @@ Side_position::quantised_position (Score_element *me, Axis )
     {
       Real p = Staff_symbol_referencer::position_f (me);
       Real rp = directed_round (p, d);
-
+      Real rad = Staff_symbol_referencer::staff_radius (me) *2 ;
       int ip = int  (rp);
-      if ((ip % 2) == 0)
+
+      if (abs (ip) < rad && (ip % 2) == 0)
        {
          ip += d;
          rp += d;
index f860241448d502217871bbe109fe6edea643a556..4cc8d0c31623cc8bfa0d82776dfb38095046947a 100644 (file)
 Simultaneous_music_iterator::Simultaneous_music_iterator ()
 {
   separate_contexts_b_ = false;
-  cursor_i_ = 0;
 }
 
 Simultaneous_music_iterator::Simultaneous_music_iterator (Simultaneous_music_iterator const& src)
   : Music_iterator (src)
 {
-  cursor_i_ = src.cursor_i_;
   separate_contexts_b_ = src.separate_contexts_b_;
-  for (Cons<Music_iterator> *p = children_p_list_.head_; p; p = p->next_)
+  for (Cons<Music_iterator> *p = src.children_p_list_.head_; p; p = p->next_)
     {
       Music_iterator *i = p->car_;
       children_p_list_.append (new Killing_cons<Music_iterator> (i->clone (), 0));
@@ -35,12 +33,6 @@ Simultaneous_music_iterator::~Simultaneous_music_iterator ()
   children_p_list_.junk ();
 }
 
-/*
-  Should roll next () into this as well
-
-
-  huh? --hwn
- */
 SCM
 Simultaneous_music_iterator::get_music (Moment m)const
 {
@@ -105,6 +97,23 @@ Simultaneous_music_iterator::process (Moment until)
     }
 }
 
+void
+Simultaneous_music_iterator::skip (Moment until)
+{
+  for (Cons<Music_iterator> **pp = &children_p_list_.head_; *pp;)
+    {
+      Music_iterator * i = (*pp)->car_;
+      if (i->pending_moment() <= until) 
+       {
+         i->skip (until);
+       }
+      if (!i->ok())
+       delete children_p_list_.remove_cons (pp);
+      else
+       pp = &(*pp)->next_;
+    }
+}
+
 Moment
 Simultaneous_music_iterator::pending_moment() const
 {
@@ -132,3 +141,5 @@ Simultaneous_music_iterator::try_music_in_children (Music *m) const
     b =p->car_->try_music (m);
   return b;
 }
+
+
index c0b3e4b9e4295a0e24072f6c3b1a944de8101fcc..a55a77812fe7869426af5efbfb09cb0d22d6adfa 100644 (file)
@@ -133,12 +133,7 @@ Slur::set_extremities (Score_element*me)
     {
       if (!gh_symbol_p (index_cell (me->get_elt_property ("attachment"), dir)))
        {
-         
-         // for (SCM s = get_elt_property ("slur-extremity-rules"); s != SCM_EOL; s = gh_cdr (s))
-
-         // FIXME: global GUILE scope used!
-         for (SCM s = scm_eval2 (ly_symbol2scm ("slur-extremity-rules"),
-                                 SCM_EOL);
+         for (SCM s = me->get_elt_property ("extremity-rules");
               s != SCM_EOL; s = gh_cdr (s))
            {
              SCM r = gh_call2 (gh_caar (s), me->self_scm (),
@@ -289,17 +284,15 @@ Slur::get_attachment (Score_element*me,Direction dir,
        
     }
 
-
-  // FIXME
-  int stemdir = stem ? Stem::get_direction (stem) : 1;
+  SCM alist = me->get_elt_property ("extremity-offset-alist");
+int stemdir = stem ? Stem::get_direction (stem) : 1;
   int slurdir = gh_scm2int (me->get_elt_property ("direction"));
   SCM l = scm_assoc
-    (scm_listify (a,
-                 gh_int2scm (stemdir * dir),
-                 gh_int2scm (slurdir * dir),
-                 SCM_UNDEFINED),
-     scm_eval2 (ly_symbol2scm ("slur-extremity-offset-alist"), SCM_EOL));
-  
+      (scm_listify (a,
+                gh_int2scm (stemdir * dir),
+                gh_int2scm (slurdir * dir),
+                  SCM_UNDEFINED), alist);
+
   if (l != SCM_BOOL_F)
     {
       o += ly_scm2offset (gh_cdr (l)) * ss * dir;
index 68c93dad18b1b2bb2c18ff6c4bb19eea17108a20..56c896838c886411d8cdd8324f1e0e7184e57f21 100644 (file)
@@ -260,8 +260,7 @@ Stem::get_default_stem_end_position (Score_element*me)
     }
   else
     {
-      s = scm_eval2 (ly_symbol2scm ((type_str + "stem-length").ch_C()),
-                    SCM_EOL);
+      s = me->get_elt_property("lengths");
       for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
        a.push (gh_scm2double (gh_car (q)));
                
@@ -271,9 +270,8 @@ Stem::get_default_stem_end_position (Score_element*me)
 
 
   a.clear ();
-  s = scm_eval2 (ly_symbol2scm ((type_str + "stem-shorten").ch_C()),
-                SCM_EOL);
-  for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
+  s = me->get_elt_property ("stem-shorten");
+  for (SCM q = s; gh_pair_p (q); q = gh_cdr (q))
     a.push (gh_scm2double (gh_car (q)));
 
 
@@ -535,11 +533,11 @@ Stem::calc_stem_info (Score_element*me)
   int multiplicity = Beam::get_multiplicity (beam);
 
 
-  SCM space_proc = beam->get_elt_property ("beam-space-function");
+  SCM space_proc = beam->get_elt_property ("space-function");
   SCM space = gh_call1 (space_proc, gh_int2scm (multiplicity));
   Real interbeam_f = gh_scm2double (space) * staff_space;
 
-  Real thick = gh_scm2double (beam->get_elt_property ("beam-thickness"));
+  Real thick = gh_scm2double (beam->get_elt_property ("thickness"));
   Stem_info info; 
   info.idealy_f_ = chord_start_f (me);
 
@@ -551,17 +549,15 @@ Stem::calc_stem_info (Score_element*me)
   
   Array<Real> a;
   SCM s;
-  String type_str = grace_b ? "grace-" : "";
   
-  s = scm_eval2 (ly_symbol2scm ((type_str + "beamed-stem-minimum-length").ch_C()), SCM_EOL);
+  s = me->get_elt_property("beamed-minimum-lengths");
   a.clear ();
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
     a.push (gh_scm2double (gh_car (q)));
 
 
   Real minimum_length = a[multiplicity <? (a.size () - 1)] * staff_space;
-  s = scm_eval2 (ly_symbol2scm ((type_str + "beamed-stem-length").ch_C()),
-                SCM_EOL);
+  s = me->get_elt_property ("beamed-lengths");
 
   a.clear();
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
index ec8cc78071eeb2121e88af32b4426d4cf8abfaae..521b7ac1125a95436be8ac3147bae5d9471d61d5 100644 (file)
@@ -102,25 +102,13 @@ Text_engraver::do_process_music ()
       
       if (r->style_str_.length_i ())
        text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
-      
-      /*
-       Text is empty by default, which means that the only condition
-       for not setting 'no-spacing-rods' should be: boolean && true.
-
-       Anyway, non-empty text has been broken for some time now.
-       */
-
 
-      /// URG this is broken by basicTextScriptProperties which defines
-      /// no-spacing-rods
-      /// FIXME
       SCM nonempty = get_property ("textNonEmpty");
-      if (!to_boolean (nonempty))
+      if (to_boolean (nonempty))
        /*
          empty text: signal that no rods should be applied.  
         */
-       text->set_elt_property ("no-spacing-rods" , SCM_BOOL_T);
-
+       text->set_elt_property ("no-spacing-rods" , SCM_BOOL_F);
                
       announce_element (text, r);
       texts_.push (text);
index 5194f4746063d66347beb15656009e29b3a6d489..d6811d888450c70b427855c23677e0a4d2197ee1 100644 (file)
@@ -164,13 +164,20 @@ GraceContext=\translator {
 
        basicNoteHeadProperties \push #'font-size = #-1
        basicStemProperties \push #'font-size = #-1
+       basicStemProperties \push #'stem-shorten = #'(0)
        basicBeamProperties \push #'font-size = #-1
        basicTextScriptProperties \push #'font-size = #-1
        basicSlurProperties \push #'font-size = #-1
        basicLocalKeyProperties \push #'font-size = #-1
        basicBeamProperties \push #'beam-thickness = #0.3
        basicBeamProperties \push #'beam-space-function = #(lambda (x) 0.5)
-       
+
+       basicStemProperties \push #'lengths = #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
+       basicStemProperties \push #'beamed-lengths =
+               #'(0.0 2.5 2.0 1.5)
+       basicStemProperties \push #'minimum-beamed-lengths
+                = #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5))
+
        weAreGraceContext = ##t   
        graceAccidentalSpace= 1.5 ; % in staff space
 }
@@ -214,11 +221,6 @@ StaffGroupContext= \translator {
        \consists "Output_property_engraver";   
        \consists "System_start_delimiter_engraver";
        systemStartDelimiterGlyph = #'bracket
-       
-
-
-
-
        \name StaffGroup;
        \accepts "Staff";
        \accepts "RhythmicStaff";
@@ -671,19 +673,7 @@ ScoreContext = \translator {
                (before-line-breaking-callback . ,Script_column::before_line_breaking)
                (name . "script column")
        )
-       basicSlurProperties = #`(
-               (interfaces . (slur-interface))
-               (molecule-callback . ,Slur::brew_molecule)
-               (thickness . 1.2)               
-               (spacing-procedure . ,Slur::set_spacing_rods)           
-               (minimum-length . 1.5)
-               (after-line-breaking-callback . ,Slur::after_line_breaking)
-
-               (de-uglify-parameters . ( 1.5  0.8  -2.0))
-               (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5) (beautiful . 0.5)))
-               (y-free . 0.75)
-               (name . "slur")
-       )
+       basicSlurProperties = #default-basic-slur-properties
        basicSpacingSpannerProperties =#`(
                (spacing-procedure . ,Spacing_spanner::set_springs)
 
@@ -797,7 +787,15 @@ ScoreContext = \translator {
                (before-line-breaking-callback . ,Stem::before_line_breaking)
                (molecule-callback . ,Stem::brew_molecule)
                (thickness . 0.8)
+               (beamed-lengths . (0.0 2.5 2.0 1.5))
+               (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
+               
+;;  Stems in unnatural (forced) direction should be shortened,
+;;  according to [Roush & Gourlay].  Their suggestion to knock off
+;;  a whole staffspace seems a bit drastical: we'll do half.
 
+               (lengths . (3.5 3.5 3.5 4.5 5.0))
+               (stem-shorten . (0.5))
                ; if stem is on middle line, choose this direction.
                (default-neutral-direction . 1)
                (name . "stem")
index cfed38993a5430c0ec5d12728bd242468b654fad..0ac31ec8c632622e91d65a7790decad9f36447a4 100644 (file)
@@ -10,13 +10,16 @@ SEE THE REFERENCE MANUAL FOR EXPLANATIONS.
 
 \version "1.3.59";
 
-%hmm, (these) abbrevs suck, imo
-% i guess they're meant as some form of doco
-% that's what i use them for...
 
+%{
 stemup =        \property Voice.verticalDirection = \up 
 stemboth=      \property Voice.verticalDirection = \center
 stemdown =     \property Voice.verticalDirection = \down
+%}
+
+stemup = \property Voice.basicStemProperties \push #'direction = #1
+stemdown = \property Voice.basicStemProperties \push #'direction = #-1 
+stemboth= \property basicStemProperties \pop #'direction
 
 slurup   = \property Voice.slurVerticalDirection = \up 
 slurboth = \property Voice.slurVerticalDirection = \center
index 546aa7ca7f0106e3a30daa974300acddab488576..cbe2f20c30368d9e53df991fcb90d5a705137aea 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.89
-Entered-date: 23SEP00
+Version: 1.3.90
+Entered-date: 24SEP00
 Description: 
 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.3.89.tar.gz 
+       1000k lilypond-1.3.90.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.89.tar.gz 
+       1000k lilypond-1.3.90.tar.gz 
 Copying-policy: GPL
 End
index 47166fb29e3c13f3ef350f080378f69c9e971e22..188340f524b1cec94a5742b8503a14df20cbcb81 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.89
+Version: 1.3.90
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.89.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.90.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index f3a510c59be7ff9e7eedd142b939f618222d7f27..5b10edcb16d4239da733502e412894d26519f41e 100644 (file)
@@ -61,41 +61,41 @@ basloopje = \notes\relative c{
   d,8( a' d f a d f d a f d )a
 }
 
-accompany = \notes \relative c{
+accompany = \notes \relative c {
   % snapnie, hoevaak relative c heeft ze nodig?
 \notes\relative c \basloopje
 \notes\relative c \basloopje
 \notes\relative c \basloopje
-  \transpose bes \notes\relative c{ \basloopje }
-  \transpose bes \notes\relative c{ \basloopje }
-  \notes\relative c \basloopje
-  \transpose bes \notes\relative c{ \basloopje }
-  \transpose bes \notes\relative c{ \basloopje }
-  \transpose a \notes\relative c{ \basloopje }
-  \transpose bes \notes\relative c{ \basloopje }
-  \transpose a \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
 \notes\relative c \basloopje
+ \basloopje
+ \basloopje
+ \basloopje
+  \transpose bes  \basloopje 
+  \transpose bes  \basloopje 
+   \basloopje
+  \transpose bes  \basloopje 
+  \transpose bes  \basloopje 
+  \transpose a  \basloopje 
+  \transpose bes  \basloopje 
+  \transpose a  \basloopje 
+ \basloopje
+ \basloopje
   % huh? d'
-  \transpose d' \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
 \notes\relative c \basloopje
-  \transpose d' \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
 \notes\relative c \basloopje
-  \transpose e' \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
 \notes\relative c \basloopje
-  \transpose bes \notes\relative c{ \basloopje }
-  \transpose a \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
 \notes\relative c \basloopje
-  \transpose d' \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
-  \transpose d' \notes\relative c{ \basloopje }
 \notes\relative c \basloopje
 \notes\relative c \basloopje
-  \transpose e' \notes\relative c{ \basloopje }
+  \transpose d'  \basloopje 
+ \basloopje
+ \basloopje
+  \transpose d'  \basloopje 
+ \basloopje
+ \basloopje
+  \transpose e'  \basloopje 
+ \basloopje
+ \basloopje
+  \transpose bes  \basloopje 
+  \transpose a  \basloopje 
+ \basloopje
+ \basloopje
+  \transpose d'  \basloopje 
+ \basloopje
+  \transpose d'  \basloopje 
+ \basloopje
+ \basloopje
+  \transpose e'  \basloopje 
   < e1*6/4 b' e> ~ < e b' e> 
 }
 
@@ -104,15 +104,16 @@ accompany = \notes \relative c{
                \context Staff=up < 
                        \global
                        \context Voice=foo {
-                       \property Voice.verticalDirection = #1
-                       \property Voice.scriptVerticalDirection = #1
+                       \stemup
+                       \property Voice.basicScriptProperties \push #'direction = #1
+                       
                        \melody 
                        }
                >
                \context Staff=down <
                        \global
                        \clef bass;
-                       \autochange Staff \accompany
+                       \autochange Staff \context Voice \accompany
                >
        >
 
index 469cc1e3fea762aa7a3c828f15bc9f389731fd58..3dadb920c01d054832691d0f6eef98c325962dbc 100644 (file)
 
 (define mark-visibility end-of-line-invisible)
 
-; ugh: should calculate from beam-thickness.
-; result in staff-space
 
-;beam_thickness = 0.52 * (\staffspace - \stafflinethickness);
-;interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0;
-;interbeam4 = (3.0 * \staffspace - \beam_thickness) / 3.0;
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;                  BEAMS
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define (default-beam-space-function multiplicity)
   (if (<= multiplicity 3) 0.816 0.844)
    ))
 
 
+; This is a mess : global namespace pollution. We should wait
+;  till guile has proper toplevel environment support.
+
+
+;; Beams should be prevented to conflict with the stafflines, 
+;; especially at small slopes
+;;    ----------------------------------------------------------
+;;                                                   ########
+;;                                        ########
+;;                             ########
+;;    --------------########------------------------------------
+;;       ########
+;;
+;;       hang       straddle   sit        inter      hang
+
+;; inter seems to be a modern quirk, we don't use that
+
+  
+;; Note: quanting period is take as quants.top () - quants[0], 
+;; which should be 1 (== 1 interline)
+(define (mean a b) (* 0.5 (+ a  b)))
+(define (default-beam-dy-quants beam stafflinethick)
+  (let ((thick (ly-get-elt-property beam 'thickness))
+       )
+    
+    (list 0 (mean thick stafflinethick) (+ thick stafflinethick) 1)
+    ))
+
+;; two popular veritcal beam quantings
+;; see params.ly: #'beam-vertical-quants
+
+; (todo: merge these 2 funcs ? )
+
+(define (default-beam-y-quants beam multiplicity dy staff-line)
+  (let* ((beam-straddle 0)
+        (thick (ly-get-elt-property beam 'thickness))
+        (beam-sit (/ (+ thick staff-line) 2))
+        (beam-hang (- 1 (/ (- thick staff-line) 2)))
+        (quants (list beam-hang))
+        )
+    
+    (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2)))
+       (set! quants (cons beam-sit quants)))
+    (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
+       (set! quants (cons beam-straddle quants)))
+    ;; period: 1 (interline)
+    (append quants (list (+ 1 (car quants))))))
+
+(define (beam-traditional-y-quants beam multiplicity dy staff-line)
+  (let* ((beam-straddle 0)
+       (thick (ly-get-elt-property beam 'thickness))
+       (beam-sit (/ (+ thick staff-line) 2))
+       (beam-hang (- 1 (/ (- thick staff-line) 2)))
+       (quants '())
+       )
+    (if (>= dy (/ staff-line -2))
+       (set! quants (cons beam-hang quants)))
+    (if (and (<= multiplicity 1) (<= dy (/ staff-line 2)))
+       (set! quants (cons beam-sit quants)))
+    (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
+       (set! quants (cons beam-straddle quants)))
+    ;; period: 1 (interline)
+    (append quants (list (+ 1 (car quants))))))
+
+
+;; There are several ways to calculate the direction of a beam
+;;
+;; * majority: number count of up or down notes
+;; * mean    : mean centre distance of all notes
+;; * median  : mean centre distance weighted per note
+
+(define (dir-compare up down)
+  (sign (- up down)))
+
+;; arguments are in the form (up . down)
+(define (beam-dir-majority count total)
+  (dir-compare (car count) (cdr count)))
+
+(define (beam-dir-mean count total)
+  (dir-compare (car total) (cdr total)))
+
+(define (beam-dir-median count total)
+  (if (and (> (car count) 0)
+          (> (cdr count) 0))
+      (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count)))
+      (dir-compare (car count) (cdr count))))
+           
+
+
+;; [Ross] states that the majority of the notes dictates the
+;; direction (and not the mean of "center distance")
+;;
+;; But is that because it really looks better, or because he wants
+;; to provide some real simple hands-on rules?
+;;     
+;; We have our doubts, so we simply provide all sensible alternatives.
+
+
+
+
+
+;; array index multiplicity, last if index>size
+;; beamed stems
+
+
+;; TODO
+;;  - take #forced stems into account (now done in C++)?
+;;  - take y-position of chord or beam into account
+
+;;;;;;;;;;;;;;;;;;;;;;;
+
+
+;
+; todo: clean this up a bit: the list is getting rather long.
+; 
 (define basic-beam-properties
   `(
     (interfaces . (beam-interface))
     (molecule-callback . ,Beam::brew_molecule)
-    (beam-thickness . 0.42) ; staff-space, should use stafflinethick?
+    (thickness . 0.42) ; in staff-space, should use stafflinethick?
     (before-line-breaking-callback . ,Beam::before_line_breaking)
     (after-line-breaking-callback . ,Beam::after_line_breaking)
     (default-neutral-direction . 1)
+    (dir-function . ,beam-dir-majority)
+    (height-quants .  ,default-beam-dy-quants)
+    (vertical-position-quant-function . ,default-beam-y-quants)
+    (beamed-stem-shorten . (0.5))
     (outer-stem-length-limit . 0.2)
     (slope-limit . 0.2)
-    (beam-flag-width-function . ,default-beam-flag-width-function)
-    (beam-space-function . ,default-beam-space-function)
+    (flag-width-function . ,default-beam-flag-width-function)
+    (space-function . ,default-beam-space-function)
     (damping . 1)
-    (name . "beam")            
+    (name . "beam")
     )
   )
index e4385c0eef5a451b22bfa76bf875eaf3dc3743fd..81afc034bf89a101fcc7caa6cd73b470f59ac749 100644 (file)
 (define (sign x)
   (if (= x 0)
       1
-      (inexact->exact (/ x (abs x)))))
+      (if (< x 0) -1 1)))
 
 ;;;; AsciiScript as
 (define (as-scm action-name)
index 9e8146da48a73b1fac413f19173dd68620da5ad0..5712e0a15a82631066e1dbd26586f613eeaa0c06 100644 (file)
@@ -7,125 +7,3 @@
 ;;; All dimensions are measured in staff-spaces
 
 
-; This is a mess : global namespace pollution. We should wait
-;  till guile has proper toplevel environment support.
-
-
-;; Beams should be prevented to conflict with the stafflines, 
-;; especially at small slopes
-;;    ----------------------------------------------------------
-;;                                                   ########
-;;                                        ########
-;;                             ########
-;;    --------------########------------------------------------
-;;       ########
-;;
-;;       hang       straddle   sit        inter      hang
-
-;; inter seems to be a modern quirk, we don't use that
-
-(define staff-line 0.10)
-(define beam-thickness (* 0.52 (- 1 staff-line)))
-(define beam-straddle 0)
-(define beam-sit (/ (+ beam-thickness staff-line) 2))
-(define beam-hang (- 1 (/ (- beam-thickness staff-line) 2)))
-
-;; Note: quanting period is take as quants.top () - quants[0], 
-;; which should be 1 (== 1 interline)
-
-(define beam-normal-dy-quants
-  (list 0 (/ (+ beam-thickness staff-line) 2) (+ beam-thickness staff-line) 1))
-
-;; two popular veritcal beam quantings
-;; see params.ly: #'beam-vertical-quants
-(define (beam-normal-y-quants multiplicity dy)
-  (let ((quants (list beam-hang)))
-    (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2)))
-       (set! quants (cons beam-sit quants)))
-    (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
-       (set! quants (cons beam-straddle quants)))
-    ;; period: 1 (interline)
-    (append quants (list (+ 1 (car quants))))))
-
-(define (beam-traditional-y-quants multiplicity dy)
-  (let ((quants '()))
-    (if (>= dy (/ staff-line -2))
-       (set! quants (cons beam-hang quants)))
-    (if (and (<= multiplicity 1) (<= dy (/ staff-line 2)))
-       (set! quants (cons beam-sit quants)))
-    (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
-       (set! quants (cons beam-straddle quants)))
-    ;; period: 1 (interline)
-    (append quants (list (+ 1 (car quants))))))
-
-
-;; There are several ways to calculate the direction of a beam
-;;
-;; * majority: number count of up or down notes
-;; * mean    : mean centre distance of all notes
-;; * median  : mean centre distance weighted per note
-
-(define (dir-compare up down)
-  (if (= up down)
-      0
-      (if (> up down)
-         1
-         -1)))
-
-;; (up . down)
-(define (beam-dir-majority count total)
-  (dir-compare (car count) (cdr count)))
-
-(define (beam-dir-mean count total)
-  (dir-compare (car total) (cdr total)))
-
-(define (beam-dir-median count total)
-  (if (and (> (car count) 0)
-          (> (cdr count) 0))
-      (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count)))
-      (dir-compare (car count) (cdr count))))
-           
-
-;;; Default variables and settings
-
-(define beam-height-quants beam-normal-dy-quants)
-(define beam-vertical-position-quants beam-normal-y-quants)
-
-
-;; [Ross] states that the majority of the notes dictates the
-;; direction (and not the mean of "center distance")
-;;
-;; But is that because it really looks better, or because he wants
-;; to provide some real simple hands-on rules?
-;;     
-;; We have our doubts, so we simply provide all sensible alternatives.
-(define beam-dir-algorithm beam-dir-majority)
-
-
-;; array index flag-2 (what a name!!), last if index>size
-;; unbeamed stems
-(define stem-length '(3.5 3.5 3.5 4.5 5.0))
-(define grace-length-factor 0.8)
-(define grace-stem-length
-  (map (lambda (x) (* grace-length-factor x)) stem-length))
-
-;; array index multiplicity, last if index>size
-;; beamed stems
-(define beamed-stem-shorten '(0.5))
-(define beamed-stem-length '(0.0 2.5 2.0 1.5))
-(define grace-beamed-stem-length '(0.0 2.5 2.0 1.5))
-(define beamed-stem-minimum-length '(0.0 1.5 1.25 1.0))
-(define grace-beamed-stem-minimum-length
-  (map (lambda (x) (* grace-length-factor x)) beamed-stem-minimum-length))
-
-;;  Stems in unnatural (forced) direction should be shortened,
-;;  according to [Roush & Gourlay].  Their suggestion to knock off
-;;  a whole staffspace seems a bit drastical: we'll do half.
-
-;; TODO
-;;  - take #forced stems into account (now done in C++)?
-;;  - take y-position of chord or beam into account
-
-(define stem-shorten '(0.5))
-(define grace-stem-shorten '(0.0))
-
index 27f26ee0efb19aa4eefae3b5792fa8365e52fde6..f3f010acb3230b91e54381cc74a32ee4e6d3b112 100644 (file)
@@ -23,7 +23,7 @@
 ;;    'head 'along-side-stem 'stem 'loose-end
 ;;
 
-(define slur-extremity-rules
+(define default-slur-extremity-rules
   (list
 
    ;; (cons (lambda (slur dir) (begin (display "before sanity check") (newline))#f) #f)
@@ -83,7 +83,7 @@
 ;; head: Default position is centered in X, on outer side of head Y
 ;; along-side-stem: Default position is on stem X, on outer side of head Y
 ;; stem: Default position is on stem X, at stem end Y
-(define slur-extremity-offset-alist
+(define default-slur-extremity-offset-alist
   '(
     ((head 1 1) . (-0.25 . 0.25))
     ((head 1 -1) . (-0.25 . -0.25))
     ((loose-end -1 -1) . (-4 . 0))
     ((loose-end -1 1) . (-4 . 0))
     ))
+
+
+(define default-basic-slur-properties
+  `(
+   (interfaces . (slur-interface))
+   (molecule-callback . ,Slur::brew_molecule)
+   (thickness . 1.2)           
+   (spacing-procedure . ,Slur::set_spacing_rods)               
+   (minimum-length . 1.5)
+   (after-line-breaking-callback . ,Slur::after_line_breaking)
+   (extremity-rules . ,default-slur-extremity-rules)
+   (extremity-offset-alist . ,default-slur-extremity-offset-alist)
+   (de-uglify-parameters . ( 1.5  0.8  -2.0))
+   (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5) (beautiful . 0.5)))
+   (y-free . 0.75)
+   (name . "slur")
+   )
+  )