]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.20.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 19 Jan 2000 16:45:57 +0000 (17:45 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 19 Jan 2000 16:45:57 +0000 (17:45 +0100)
1.3.20.jcn1
==========

* SCM properties beamHeight and beamVerticalposition now use staff-spaces:
  input/test/beam-control.fly
* Added \context Voice to .fly and .sly; the default \context Staff is almost
  never what you expect
* Fixed decision for .sly/.fly in lilypond-mode.

CHANGES
VERSION
input/test/beam-control.fly [new file with mode: 0644]
lily/beam.cc
lilypond-mode.el
ly/init.fly
ly/init.sly
scm/generic-property.scm

diff --git a/CHANGES b/CHANGES
index 01c0f2c09e67375227c4864fca643a3bac454d2f..e37a5a70e89c7ae476ecad261a770a6bccc3f32e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,12 @@
+1.3.20.jcn1
+==========
+
+* SCM properties beamHeight and beamVerticalposition now use staff-spaces:
+  input/test/beam-control.fly
+* Added \context Voice to .fly and .sly; the default \context Staff is almost
+  never what you expect
+* Fixed decision for .sly/.fly in lilypond-mode.
+
 1.3.19.hwn1
 ==========
 
diff --git a/VERSION b/VERSION
index 3c2e8037c53ad3b11327d8b957106d20f7ccc3a1..a0a9e46b9325c6ccd8d59d85bd33bdab76fb640e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=20
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/test/beam-control.fly b/input/test/beam-control.fly
new file mode 100644 (file)
index 0000000..ba92736
--- /dev/null
@@ -0,0 +1,16 @@
+% beam-control.fly
+
+% from upper staffline to centre
+\property Voice.beamVerticalPosition = #2
+\property Voice.beamHeight = #2
+[c'8 c] 
+
+% from one above centre to centre
+\property Voice.beamVerticalPosition = #2
+\property Voice.beamHeight = #-1
+[c c]
+
+% normal beam-algorithm
+\property Voice.beamHeight = ##f
+\property Voice.beamVerticalPosition = ##f
+[c e] [e c]
index 6fe8f9b5254c54b3f76da16c1eba6fe0f788493c..44714c7d70c457b42f3367d7d8ef29e54dc8eaae 100644 (file)
@@ -284,18 +284,22 @@ Beam::do_post_processing ()
   y *= directional_element (this).get ();
   dy *= directional_element (this).get ();
 
-  /* set or read dy as necessary */
-  SCM s = get_elt_property ("height");
+  Staff_symbol_referencer_interface st (this);
+  Real staff_space = st.staff_space ();
+
+  /* check for user-override of dy */
+  SCM s = remove_elt_property ("Height");
   if (gh_number_p (s))
-    dy = gh_scm2double (s);
-  else
-    set_elt_property ("height", gh_double2scm (dy));
+    {
+      dy = gh_scm2double (s) * staff_space;
+    }
+  set_elt_property ("height", gh_double2scm (dy));
 
-  /* set or read y as necessary */
-  s = get_elt_property ("y-position");
+  /* check for user-override of y */
+  s = remove_elt_property ("verticalPosition");
   if (gh_number_p (s))
     {
-      y = gh_scm2double (s);
+      y = gh_scm2double (s) * staff_space;
       set_stem_length (y, dy);
     }
   else
@@ -307,7 +311,6 @@ Beam::do_post_processing ()
       set_stem_length (y, dy);
       y_shift = check_stem_length_f (y, dy);
 
-      Staff_symbol_referencer_interface st (this);
       Real half_space = st.staff_space () / 2;
       if (y_shift > half_space / 4)
        {
@@ -323,10 +326,10 @@ Beam::do_post_processing ()
          y = quantise_y_f (y, dy, quant_dir);
          set_stem_length (y, dy);
        }
-
-      // UGH. Y is not in staff position unit?
-      set_elt_property ("y-position", gh_double2scm (y)); 
     }
+  // UGH. Y is not in staff position unit?
+  // Ik dacht datwe daar juist van weg wilden?
+  set_elt_property ("y-position", gh_double2scm (y)); 
 }
 
 /*
index e4e6e4d2348fa0fe1a7294759c37f114d815a365..a6c7d67787b83e4d08462cc402511cfbd889a8d5 100644 (file)
   (let ((basename "emacs-lily")
        (suffix (if (string-match "^[\\]score" (buffer-substring start end))
                    ".ly"
-                 (if (> 50 (abs (- start end)))
-                     ".fly")
-                     ".sly")))
+                 (if (< 50 (abs (- start end)))
+                     ".fly"
+                     ".sly"))))
     (write-region start end (concat basename suffix) nil 'nomsg)
     (lily-compile-file lily-command lily-parameters (concat basename suffix))))
 
index 8786d94ed8502d405d96f6c9db06e788d327ff62..6c9992e379dc81b2cd1dd7ec950d7f3e68c9a4d5 100644 (file)
@@ -6,9 +6,9 @@
 \include "declarations.ly"
 
 \score { 
-  \notes\relative c {
+  \context Voice \notes\relative c {
     \maininput
   }
   \paper { }  
-  \midi{ }
+  \midi { }
 }
index ea78a1782eb2f6b88b9cc273830bdadba9e4cc17..afe59cc20e36f02420466175c94d3be5dfe2dc11 100644 (file)
@@ -6,7 +6,7 @@
 \include "declarations.ly"
 
 \score { 
-  \notes\relative c {
+  \context Voice \notes\relative c {
     \maininput
   }
   \paper {
index 533c663b89936ac989759c0a1f0b8fd9bd128958..ff15c7c2a172b7ad6f3b7311e0aa0cc8f1a6cd18 100644 (file)
@@ -6,8 +6,8 @@
         (list 'autoKneeGap number? 'auto-knee-gap)
         (list 'autoInterstaffKneeGap number? 'auto-interstaff-knee-gap)
         (list 'beamDirAlgorithm symbol? 'beam-dir-algorithm)
-        (list 'beamSlope number? 'height)
-        (list 'beamVerticalPosition number? 'y-position)
+        (list 'beamHeight number? 'Height)
+        (list 'beamVerticalPosition number? 'verticalPosition)
         )
        )
   )