]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 0.1.38.jcn1: biem pats
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 29 Dec 1997 10:13:08 +0000 (11:13 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 29 Dec 1997 10:13:08 +0000 (11:13 +0100)
pl 38.jcn2
- added to beams.ly
- open-up beam spacing for mult > 3
- fixed hang/sit to overlap iso aligne with staffline
- fixed inter beam spacing, paper*.ly
- scsii-menuetto.ly fixes
- init/property.ly
- property settings for beam quantiseing and damping

pl 38.jcn1
- provisionary multiple-beam fix

16 files changed:
NEWS
VERSION
init/feta16.ly
init/feta20.ly
init/lily-init.ly
init/paper16.ly
init/paper20.ly
init/property.ly [new file with mode: 0644]
input/beams.ly
input/scsii-menuetto.ly
lily/beam-grav.cc
lily/beam.cc
lily/include/beam.hh
mi2mu/TODO
tex/feta16.tex
tex/feta20.tex

diff --git a/NEWS b/NEWS
index 650f5ba4dbff8d300f8bedac077c7541e129cdb0..a25644017fcdfe21726c8dbfc0d4554e1269d49a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+pl 38.jcn2
+       - added to beams.ly
+       - open-up beam spacing for mult > 3
+       - fixed hang/sit to overlap iso aligne with staffline
+       - fixed inter beam spacing, paper*.ly
+       - scsii-menuetto.ly fixes
+       - init/property.ly
+       - property settings for beam quantiseing and damping
+
+pl 38.jcn1
+       - provisionary multiple-beam fix
+
 pl 38
        - bf: \> \! \ff (crescendo overlap)
        - misc feta-fixes, flageolet sign.
diff --git a/VERSION b/VERSION
index 72f3a0458727570d2045be3b35b58a1617bf9a70..5432edf03e46188eb379f21b896bc2706fabd5fa 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 1
 TOPLEVEL_PATCH_LEVEL = 38
-TOPLEVEL_MY_PATCH_LEVEL = jcn1
+TOPLEVEL_MY_PATCH_LEVEL = jcn2
 
 # use the above to send patches, always empty for released version:
 # please don't move these comments up; the patch should fail if 
index bd6b9a8cd565d0d523260ef11dc9679d5b16e330..ca8ce0a267c60805e6588a091595bd5900565a6d 100644 (file)
@@ -1,5 +1,5 @@
 % Creator: mf-to-table.py version 0.4
-% Automatically generated on Wed Dec 24 16:30:21 1997
+% Automatically generated on Mon Dec 29 10:52:00 1997
 % Do not edit
 % input from out/feta16.log
 % name=\symboltables {
index a54e367be951786c3aa2da160c9939f091fcc4ef..7c855c23d3098878e47fd4d69fde1e1826777639 100644 (file)
@@ -1,5 +1,5 @@
 % Creator: mf-to-table.py version 0.4
-% Automatically generated on Wed Dec 24 16:30:29 1997
+% Automatically generated on Mon Dec 29 10:52:03 1997
 % Do not edit
 % input from out/feta20.log
 % name=\symboltables {
index c1753b3263510b23723f67fdd1f68603630d0b37..b47910ac6984743041d96a2175248e2ac2d21aa1 100644 (file)
@@ -16,7 +16,6 @@ Wordwrap = 0.0
 \include "paper16.ly"
 \include "paper20.ly"
 
-
 default_paper = \paper{
        \paper_sixteen
 }
@@ -29,21 +28,8 @@ left = -1
 right = 1
 up = 1
 down = -1
+% zillie spellink?
 center=0
 
-
-stemup = {
-       \skip 1*0;
-       % Stupid hack to make < { \stemup } > work
-       \property Voice.ydirection = \up 
-       }
-stemboth= {
-       \skip 1*0;
-       \property Voice.ydirection = \center
-}
-stemdown = {   
-       \skip 1*0;
-       \property Voice.ydirection = \down
-}
-
+\include "property.ly"
 
index 854324b424cc20491a612063815c57775b0dc055..98ee62688de10b0728ac4a71b4ea97936d09f601 100644 (file)
@@ -26,8 +26,13 @@ paper_sixteen = \paper {
        arithmetic_basicspace = 2.;
         arithmetic_multiplier = 4.8\pt;
    
-       %
-       interbeam = 2.667\pt;
+       % three beams span two interlines, including stafflines:
+       % 2 interbeam + beam_thickness = 2 interline - staffline_thickness
+       % ( beam_thickness = 0.48 interline for now...)
+       % interbeam = interline - (beam_thickness + staffline_thickness) / 2
+       % interbeam = 2.84;
+       % ugh: interline *in fact* is rule_thickness + "interline"?
+       interbeam = 3.14;
 
        gourlay_energybound = 100000.;
        gourlay_maxmeasures = 14.;
index fdfee8404b7128d3ced1daa9af09b348280cdef2..e4bd6bfb00c8fbf46b32e9a7849e6b9f87831bce 100644 (file)
@@ -19,7 +19,14 @@ paper_twenty = \paper {
         arithmetic_multiplier = 6.\pt;
        
        %
-       interbeam = 3.333\pt;
+       % three beams span two interlines, including stafflines:
+       % 2 interbeam + beam_thickness = 2 interline - staffline_thickness
+       % ( beam_thickness = 0.48 interline for now...)
+       % interbeam = interline - (beam_thickness + staffline_thickness) / 2
+       % interbeam = 3.6;
+       % ugh: interline *in fact* is rule_thickness + "interline"?
+       interbeam = 3.9;
+
        gourlay_energybound = 100000.;
        gourlay_maxmeasures = 12.;
        
diff --git a/init/property.ly b/init/property.ly
new file mode 100644 (file)
index 0000000..4faeb4c
--- /dev/null
@@ -0,0 +1,94 @@
+% property.ly
+% list of properties that lily recognises
+% and some shorthands (ugh)
+
+%{
+
+PROPERTIES
+
+name                   value   effect                  shorthand
+
+[Voice]
+ydirection             -1      force stem down         \stemdown
+ydirection             0       stem direction free     \stemboth
+ydirection             1       force stem up           \stemup
+
+[Score?]
+beamslopedamping       0       no damping              \beamslopeproportional  
+beamslopedamping       1       damping1)               \beamslopedamped
+beamslopedamping       100000  zero slope              \beamslopezero
+
+[Score?]
+beamquantisation       0       no quantisations        \beamposfree
+beamquantisation       1       quantise pos and slope  \beamposnormal
+beamquantisation       2       quantise avoide wedge2) \beampostraditional
+
+
+[Staff?]
+instrument             ascii   midi instrument table lookup
+
+
+1) after beam slope damping table suggested in [Wanske]
+2) [Wanske] as well as [Ross] suggests that beams sloped upward must not 
+   start sitting on a staffline, and beams sloped downward must not hang 
+   from a staffline (similar for beam-ends).  This would create a wedge
+   that is traditionally being avoided because it could easily be filled-up 
+   with ink.
+   However, avoiding these wedges restricts the freedom of beams quite a lot 
+   while they don't seem to be a problem in modern printing.
+   In no piece of sheetmusic engraved after 1953 (Baerenreiter) i've seen 
+   these wedges being avoided.
+
+%}
+
+%hmm, (these) abbrevs suck, imo
+% i guess they're meant as some form of doco
+% that's what i use them for...
+% should compile a list with recognised properties!
+stemup = {
+       \skip 1*0;
+       % Stupid hack to make < { \stemup } > work
+       \property Voice.ydirection = \up 
+       }
+stemboth= {
+       \skip 1*0;
+       \property Voice.ydirection = \center
+}
+stemdown = {   
+       \skip 1*0;
+       \property Voice.ydirection = \down
+}
+
+% ugh, cluttering global namespace...
+none=0
+free=0
+normal=1
+traditional=2
+infinity=10000
+
+beamslopeproportional = {
+       \property Score.beamslopedamping = \none
+}
+
+beamslopedamped = {
+       \property Score.beamslopedamping = \normal
+}
+
+beamslopezero = {
+       \property Score.beamslopedamping = \infinity
+}
+
+% this sucks, you'd want to pass an array, at least
+% (or embedded code: you still can't dictate the slope / stemlength)
+beamposfree = {
+       \property Score.beamquantisation = \none
+}
+
+beamposnormal = {
+       \property Score.beamquantisation = \normal
+}
+
+beampostraditional = {
+       \property Score.beamquantisation = \traditional
+}
+
index 6e897a84751b40a90d1eb9126ecb570ed02b37ca..9453f0da6f5427bf8dd29b8ab8e103cca83d3e65 100644 (file)
@@ -10,7 +10,7 @@ TestedFeatures =       "beams and beamflags";
 \version "0.1.7";
 
 \score{
-       \melodic \multi 3 < 
+       \melodic \multi 3 < 
                { \octave c'; 
                        \meter 8/4;
                        \duration8;
@@ -23,6 +23,7 @@ TestedFeatures =       "beams and beamflags";
                        \stemup [c c'' a' f']
                        \duration128;
                        \stemup [c c'' a' f']
+                       r32
 
                        \duration 8;
                        \stemup ['g 'g 'g 'g]
@@ -34,6 +35,7 @@ TestedFeatures =       "beams and beamflags";
                        \stemup ['g 'g 'g 'g]
                        \duration 128;
                        \stemup ['g 'g 'g 'g]
+                       r32
                }
        
        { \octave c'; 
@@ -48,6 +50,7 @@ TestedFeatures =       "beams and beamflags";
                        \stemdown [a' 'a c e]
                        \duration128;
                        \stemdown [a' 'a c e]
+                       r32
 
                        \octave c;
                        \duration 8;
@@ -60,7 +63,27 @@ TestedFeatures =      "beams and beamflags";
                        \stemdown [d'' d'' d'' d'']
                        \duration 128;
                        \stemdown [d'' d'' d'' d'']
+                       r32
+               } >
+               {
+                       % ugh, "duration mode"
+                       \duration 8;
+                       [g8 g] [a a] [b b] [c' c']
+                       \duration 16;
+                       [g16 g g g] [a a a a] [b b b b] [c' c' c' c']
+                       \meter 4/4;
+                       \duration 32;
+                       [g32 g g g g g g g] [a a a a a a a a] 
+                       [b b b b b b b b] [c' c' c' c' c' c' c' c']
+                       \duration 64;
+                       \meter 2/4;
+                       [g64 g g g g g g g g g g g g g g g]
+                       [c' c' c' c' c' c' c' c' c' c' c' c' c' c' c' c']
                }
-       >}
+       }
+       \paper{
+               gourlay_maxmeasures = 1.;
+       }
+}
 
 
index 889c56e12454630cb0f6949b08187bfa5afd51de..febd0720e60f75d64a8de632a845be94f957cc9b 100644 (file)
@@ -28,6 +28,7 @@ copyright =    "public domain";
 %              % because piece is set very tightly
 
 IImenuetto = \melodic{
+       \property Voice.beamslopedamping = \infinity
        \clef"alto";
        \property Staff.instrument = cello
        \meter 3/4;
@@ -39,13 +40,15 @@ IImenuetto = \melodic{
 %%2
        \textstyle "finger";            % ugh.
        
-       < [ bes8^"1" e8 c8_"2"_"4" >
-               a8 bes8-. g8-. ] a4-.^"4" |
+       < [ bes8^"1"( e8 c8_"2"_"4" >
+               )a8 bes8-. g8-. ] a4-.^"4" |
 
 %%3
+       \property Voice.beamslopedamping = \normal
        < d4 'bes4-. > g4-. [ f8-. e8-. ] |
+       \property Voice.beamslopedamping = \infinity
 %%4
-       < [ f8 'a > e8 d8 cis8-. 'b8-. 'a8-. ]
+       < [ f8( 'a > e8 )d8 cis8-. 'b8-. 'a8-. ]
 %%5
        < a2 f2 d2 > bes!4-. |
 %%6
@@ -61,16 +64,21 @@ IImenuetto = \melodic{
 %%9
        \clef "violin";
        < e'2 a2 \f >
+       \property Voice.beamslopedamping = \normal
        [ d'8( e'16 )f'16 ] |
+       \property Voice.beamslopedamping = \infinity
 %%10
-       < [ e'8 g8 > d' cis'_"2" e' a ()  g8 ] |
+       < [ e'8( g8 > d' cis'_"2" )e' a ()  g8 ] |
 %%11
        \multi 2 <  
                {\stemup a4()  d'4 cis'4-. }
                { \stemdown f2 e4 } > |
        \stemboth
 %%12
-       < [ g'8^"4" d8 > f' e' f' d'^"3"()   c' ] |
+       % oeps: slur gets attached at d8 iso g'8!
+%      < [ g'8^"4"( d8 > f' e' )f' d'^"3"()   c' ] |
+       % wrong still...
+       < { [ g'8^"4"( f' e' )f' d'^"3"()   c' ] } { [ d8 ] } > |
 %%13
        \clef "alto";
        \multi 2 <
@@ -85,9 +93,9 @@ IImenuetto = \melodic{
 %%16
        [ f( e8 )f a8-. g8-. bes8-. ] |
 %%17
-       < a2^"0" fis2_"3" > bes4 |
+       < a2^"0"^\trill fis2_"3" > bes4 |
 %%18
-       < { [ c'8 ()  bes8 c' a8 ] } es8 > fis4 |
+       < { [ c'8 ()  bes8 c' a8 ] } es8 > fis4^\trill |
 %%19
        < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d8 > a8 ] |
 %%20
@@ -101,7 +109,9 @@ IImenuetto = \melodic{
 %%22
        < { [ g8 ()  f8 g8 e8 ] }  cis8  > < f4 d4 > |
 %%23
-       [ 'g8 g8 ] < e4. 'a4. > d8-\upbow |
+       \property Voice.beamslopedamping = \normal
+       [ 'g8 g8 ] < e4.^\trill 'a4. > d8-\upbow |
+       \property Voice.beamslopedamping = \infinity
 %%24
        \textstyle "roman";             % ugh
        < d2.^"fine" 'a2. 'd2._"3 mins."> 
index c86597b17ee769ee151409b8daf3734c1baa406c..ffa1cda9e2958eb7b6945e6e628da17f7c40ebc1 100644 (file)
@@ -68,6 +68,19 @@ Beam_engraver::do_process_requests()
        plet_spanner_p_->spec_p_  = defp;
        announce_element (Score_elem_info(plet_spanner_p_,0));
       }
+
+      Scalar prop = get_property ("beamslopedamping");
+      if (prop.isnum_b ()) 
+      {
+       beam_p_->damping_i_ = prop;
+      }
+
+      prop = get_property ("beamquantisaton");
+      if (prop.isnum_b ()) 
+      {
+       beam_p_->quantisation_ = (Beam::Quantise)(int)prop;
+      }
+     
     announce_element (Score_elem_info (beam_p_, span_reqs_drul_[LEFT]));
   }
 }
index 0f9a9817200d3215a6e471bff30af3d1900400fe..aba565e760a48d8aec784e34ac597eb6368ebf4b 100644 (file)
@@ -34,6 +34,7 @@
 
 IMPLEMENT_IS_TYPE_B1 (Beam, Spanner);
 
+// ugh, hardcoded
 const int MINIMUM_STEMLEN[6] = {
   0, // just in case
   5, 
@@ -47,6 +48,9 @@ Beam::Beam ()
 {
   slope_f = 0;
   left_y = 0.0;
+  damping_i_ = 1;
+  quantisation_ = NORMAL;
+  multiple_i_ = 0;
 }
 
 void
@@ -232,7 +236,8 @@ Beam::solve_slope ()
     This neat trick is by Werner Lemberg, damped = tanh (slope_f) corresponds
     with some tables in [Wanske]
     */
-  slope_f = 0.6 * tanh (slope_f);
+  if (damping_i_)
+    slope_f = 0.6 * tanh (slope_f) / damping_i_;
 
   quantise_yspan ();
 
@@ -255,6 +260,10 @@ Beam::quantise_yspan ()
       - beam_thickness + staffline_thickness
     + n * interline
     */
+
+  if (!quantisation_)
+    return;
+
   Real interline_f = paper ()->interline_f ();
   Real internote_f = interline_f / 2;
   Real staffline_thickness = paper ()->rule_thickness ();
@@ -299,6 +308,9 @@ Beam::quantise_left_y (Beam::Pos pos, bool extend_b)
    if extend then stems must not get shorter
    */
 
+  if (!quantisation_)
+    return;
+
   Real interline_f = paper ()->interline_f ();
   Real internote_f = interline_f / 2;
   Real staffline_thickness = paper ()->rule_thickness ();
@@ -306,11 +318,11 @@ Beam::quantise_left_y (Beam::Pos pos, bool extend_b)
 
   const int QUANTS = 6;
   Real qy[QUANTS] = {
-    -staffline_thickness,
+    0,
     beam_thickness / 2,
-    beam_thickness + staffline_thickness / 2,
+    beam_thickness,
     interline_f / 2 + beam_thickness / 2 + staffline_thickness / 2,
-    interline_f - staffline_thickness,
+    interline_f,
     interline_f + beam_thickness / 2,
   };
   /* 
@@ -385,6 +397,8 @@ Beam::set_stemlens ()
   Real staffline_thickness = paper ()->rule_thickness ();
   Real beam_thickness = 0.48 * (interline_f - staffline_thickness);
   Real interbeam_f = paper ()->interbeam_f ();
+  if (multiple_i_ > 3)
+    interbeam_f += 2.0 * staffline_thickness / 4;
   Real xspan_f = stems.top ()->hpos_f () - stems[0]->hpos_f ();
   /*
    ugh, y values are in "internote" dimension
@@ -394,7 +408,7 @@ Beam::set_stemlens ()
 
   Pos left_pos = NONE;
 
-  if (yspan_f < staffline_thickness / 2)
+  if ((yspan_f < staffline_thickness / 2) || (quantisation_ == NORMAL))
     left_pos = (Pos)(STRADDLE | SIT | HANG);
   else
     left_pos = (Pos) (sign (slope_f) > 0 ? STRADDLE | HANG 
@@ -467,6 +481,7 @@ Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur)
       Stem *s = stems[j];
       s->beams_left_i_ = b[i];
       s->beams_right_i_ = b[i+1];
+      multiple_i_ = multiple_i_ >? (b[i] >? b[i+1]);
     }
 }
 
@@ -478,9 +493,12 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
 {
   assert (!next || next->hpos_f () > here->hpos_f ());
   assert (!prev || prev->hpos_f () < here->hpos_f ());
-  //    Real dy=paper ()->internote_f ()*2;
-  Real dy = paper ()->interbeam_f ();
-  Real stemdx = paper ()->rule_thickness ();
+  Real staffline_thickness = paper ()->rule_thickness ();
+  Real interbeam_f = paper ()->interbeam_f ();
+  if (multiple_i_ > 3)
+    interbeam_f += 2.0 * staffline_thickness / 4;
+  Real dy = interbeam_f;
+  Real stemdx = staffline_thickness;
   Real sl = slope_f*paper ()->internote_f ();
   paper ()->lookup_l ()->beam (sl, 20 PT);
 
index 130df73d5d41f1a8e1933f867c3d6979a08fdc92..7106cbf0d586e757f1ea2098d1092d2555247353 100644 (file)
@@ -16,6 +16,8 @@
 class Beam:  public Directional_spanner {
 public:
   enum Pos { NONE, SIT = 1, STRADDLE = 2, HANG = 4, INTER = 8 };
+  // ugh, silly C++
+  enum Quantise { NUN, NORMAL, TRADITIONAL };
 
   Link_array<Stem> stems;
   /// the slope of the beam in posns / point (dimension)   
@@ -23,7 +25,12 @@ public:
 
   /// position of leftmost end of beam  
   Real left_y;
-   
+  /// should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams
+  int damping_i_;
+  /// should beam pos / slope be quantised? 0: no, 1: yes, 2: traditional
+  Quantise quantisation_;
+  /// maximum number of beams (for opening-up of beam-spacing)
+  int multiple_i_;
 
   /* *************** */
   DECLARE_MY_RUNTIME_TYPEINFO;
index e5221769554046fdbae1a4416b2f52a10f172a0a..2f0b77f11ef54fae5ab8ff25f758f832485b32cd 100644 (file)
@@ -6,6 +6,8 @@ grep for TODO and ugh/ugr
 
 IMPORTANT
 
+       * if multiple channels per track: output each to separate voice
+
        * get rid of (last few?) midi-specifics in mudela-*
 
        * find / remove trend (tempo) of mudela columns
index 5f416ef4b220520f314cd9426d311df5e2056251..f7a8acd462710d872dfb05b4f99e3c08e0133990 100644 (file)
@@ -1,5 +1,5 @@
 % Creator: mf-to-table.py version 0.4
-% Automatically generated on Wed Dec 24 16:30:21 1997
+% Automatically generated on Mon Dec 29 10:52:00 1997
 % Do not edit
 % input from out/feta16.log
 % name
index e97dbdeccc5b7a944d158fa3547def1074364278..21be64fb9d4f77aeffedbecd6b64a44fa7c2418d 100644 (file)
@@ -1,5 +1,5 @@
 % Creator: mf-to-table.py version 0.4
-% Automatically generated on Wed Dec 24 16:30:29 1997
+% Automatically generated on Mon Dec 29 10:52:03 1997
 % Do not edit
 % input from out/feta20.log
 % name