From 2f7d8073cb6167570088c86c047030dd57a2d9e7 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 21 Jan 2000 00:53:58 +0100 Subject: [PATCH] release: 1.3.21 =========== * Fix disappearing clefs when clefs are not printed with a barline. 1.3.20.j --- CHANGES | 8 ++- VERSION | 4 +- flower/include/scalar.hh | 49 --------------- flower/scalar.cc | 109 ---------------------------------- input/test/beam-control.fly | 12 ++-- lily/beam.cc | 14 ++--- lily/include/score-element.hh | 16 +++++ lily/item.cc | 21 ++----- make/out/lilypond.lsm | 8 +-- make/out/lilypond.spec | 4 +- scm/generic-property.scm | 4 +- 11 files changed, 49 insertions(+), 200 deletions(-) diff --git a/CHANGES b/CHANGES index e37a5a70e8..b1c73c7276 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,11 @@ -1.3.20.jcn1 +1.3.19.hwn2 +=========== +* Fix disappearing clefs when clefs are not printed with a barline. + +1.3.20.jcn2 ========== -* SCM properties beamHeight and beamVerticalposition now use staff-spaces: +* SCM properties beamHeight and beamVerticalposition now use half-spaces: input/test/beam-control.fly * Added \context Voice to .fly and .sly; the default \context Staff is almost never what you expect diff --git a/VERSION b/VERSION index a0a9e46b93..5c90fcb688 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=20 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=21 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/include/scalar.hh b/flower/include/scalar.hh index 4fecbd16e2..e69de29bb2 100644 --- a/flower/include/scalar.hh +++ b/flower/include/scalar.hh @@ -1,49 +0,0 @@ -/* - scalar.hh -- declare Scalar - - source file of the Flower Library - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef SCALAR_HH -#define SCALAR_HH - -#include "string.hh" -#include "real.hh" -#include "protected-scm.hh" - -#error -/// Perl -like scalar type. -struct Scalar -{ - Protected_scm scm_; -public: - Scalar (Real r); - Scalar (int i); - Scalar (long l); - Scalar (char c); - Scalar (char const *c); - Scalar (String s); - Scalar (Rational); - operator Rational(); - Scalar(); - bool isnum_b() const; - bool isdir_b() const; - bool isint_b() const; - operator Real(); - operator int(); - bool to_bool () const; - Rational to_rat () const; - int to_i () const; - Real to_f () const; - - - /** perl -like string to bool conversion. - */ - operator bool() const; -}; - -#endif // SCALAR_HH - diff --git a/flower/scalar.cc b/flower/scalar.cc index 1f3f772386..e69de29bb2 100644 --- a/flower/scalar.cc +++ b/flower/scalar.cc @@ -1,109 +0,0 @@ -#if 0 -/* - scalar.cc -- implement Scalar - - source file of the Flower Library - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include -#include - -#include "rational.hh" - -Scalar::Scalar (Rational r) -{ - (*this) = r.str (); -} - -Scalar::operator Rational () -{ - return to_rat (); -} - -Rational -Scalar::to_rat () const -{ - int p = index_i ('/'); - if (p == -1) - return this->to_i (); - - String s2 = right_str (length_i ()-p-1); - String s1 = left_str (p); - - return Rational (s1.value_i (), s2.value_i ()); -} - -bool -Scalar::isdir_b () const -{ - int conv = length_i (); - if (conv) - { - long l =0; - conv = sscanf (strh_.ch_C (), "%ld", &l); - conv = conv && (l >= -1 && l <= 1); - } - return conv; -} - -bool -Scalar::isnum_b () const -{ - int conv = false; - if (length_i ()) - { - long l =0; - conv = sscanf (strh_.ch_C (), "%lf", &l); - } - return length_i () && conv; -} - -Scalar::operator Real() -{ - return to_f (); -} - -Real -Scalar::to_f () const -{ - assert (isnum_b ()); - return value_f (); -} - -Scalar::operator int () -{ - return to_i (); -} - -int -Scalar::to_i () const -{ - if (!length_i ()) - return 0; // ugh - - assert (isnum_b()); - return value_i (); -} - -Scalar::operator bool () const -{ - return to_bool (); -} - -bool -Scalar::to_bool () const -{ - if (!length_i ()) - return false; - if (*this == "0") - return false; - String u (*this); - if (u.upper_str () == "FALSE") - return false; - return true; -} - - -#endif diff --git a/input/test/beam-control.fly b/input/test/beam-control.fly index ba927360c0..761628da71 100644 --- a/input/test/beam-control.fly +++ b/input/test/beam-control.fly @@ -1,13 +1,13 @@ % beam-control.fly -% from upper staffline to centre -\property Voice.beamVerticalPosition = #2 -\property Voice.beamHeight = #2 +% from upper staffline (position 4) to centre (position 0) +\property Voice.beamVerticalPosition = #4 +\property Voice.beamHeight = #-4 [c'8 c] -% from one above centre to centre -\property Voice.beamVerticalPosition = #2 -\property Voice.beamHeight = #-1 +% from center to one above centre (position 2) +\property Voice.beamVerticalPosition = #0 +\property Voice.beamHeight = #2 [c c] % normal beam-algorithm diff --git a/lily/beam.cc b/lily/beam.cc index 44714c7d70..e3d816526d 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -285,22 +285,21 @@ Beam::do_post_processing () dy *= directional_element (this).get (); Staff_symbol_referencer_interface st (this); - Real staff_space = st.staff_space (); + Real half_space = st.staff_space () / 2; /* check for user-override of dy */ - SCM s = remove_elt_property ("Height"); + SCM s = remove_elt_property ("height-hs"); if (gh_number_p (s)) { - dy = gh_scm2double (s) * staff_space; + dy = gh_scm2double (s) * half_space; } set_elt_property ("height", gh_double2scm (dy)); /* check for user-override of y */ - s = remove_elt_property ("verticalPosition"); + s = remove_elt_property ("y-position-hs"); if (gh_number_p (s)) { - y = gh_scm2double (s) * staff_space; - set_stem_length (y, dy); + y = gh_scm2double (s) * half_space; } else { @@ -311,7 +310,6 @@ Beam::do_post_processing () set_stem_length (y, dy); y_shift = check_stem_length_f (y, dy); - Real half_space = st.staff_space () / 2; if (y_shift > half_space / 4) { y += y_shift; @@ -324,11 +322,11 @@ Beam::do_post_processing () if (abs (y_shift) > half_space / 2) quant_dir = sign (y_shift) * directional_element (this).get (); y = quantise_y_f (y, dy, quant_dir); - set_stem_length (y, dy); } } // UGH. Y is not in staff position unit? // Ik dacht datwe daar juist van weg wilden? + set_stem_length (y, dy); set_elt_property ("y-position", gh_double2scm (y)); } diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index a223d5657d..f37990f7ee 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -72,6 +72,22 @@ public: */ SCM get_elt_property (String nm) const; void set_elt_property (String, SCM val); + + /** + UGH! JUNKME ? + + This gets messy because it changes state + + calling + + Bar::proc () + { + s->remove_elt_property ("foo") + } + + twice may do weird things if Bar::foo has a default set. + + */ SCM remove_elt_property (String nm); void Score_element::set_real (String, Real); diff --git a/lily/item.cc b/lily/item.cc index 2b70a03e97..d9abade41b 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -76,8 +76,8 @@ Item::try_visibility_lambda () { SCM args = scm_listify (gh_int2scm (break_status_dir ()), SCM_UNDEFINED); SCM result = gh_apply (vis, args); - int trans = gh_scm2bool (gh_car (result)); - int empty = gh_scm2bool (gh_cdr (result)); + bool trans = gh_scm2bool (gh_car (result)); + bool empty = gh_scm2bool (gh_cdr (result)); if (empty) { @@ -148,26 +148,15 @@ Item::find_broken_piece (Direction d) const Item * me = (Item *) (this); if (!d) return me; - else + else if (breakable_b ()) { me->do_break (); return dynamic_cast (broken_to_drul_[d]); } + else + return 0; } - - - -#if 0 -int -Item::left_right_compare(Item const *l, Item const *r) -{ - Paper_column *p1 = l->column_l (); - Paper_column* p2 = r->column_l (); - return p1->rank_i () - p2->rank_i (); -} -#endif - Paper_column * Item::column_l () const { diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index bd84b1790d..fad40f07db 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.20 -Entered-date: 17JAN00 +Version: 1.3.21 +Entered-date: 21JAN00 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.20.tar.gz + 1000k lilypond-1.3.21.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.20.tar.gz + 1000k lilypond-1.3.21.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 1c835c173e..46e30bc200 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.20 +Version: 1.3.21 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.20.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.21.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # get Packager from (undocumented?) ~/.rpmmacros! diff --git a/scm/generic-property.scm b/scm/generic-property.scm index ff15c7c2a1..fcf6fcbfb6 100644 --- a/scm/generic-property.scm +++ b/scm/generic-property.scm @@ -6,8 +6,8 @@ (list 'autoKneeGap number? 'auto-knee-gap) (list 'autoInterstaffKneeGap number? 'auto-interstaff-knee-gap) (list 'beamDirAlgorithm symbol? 'beam-dir-algorithm) - (list 'beamHeight number? 'Height) - (list 'beamVerticalPosition number? 'verticalPosition) + (list 'beamHeight number? 'height-hs) + (list 'beamVerticalPosition number? 'y-position-hs) ) ) ) -- 2.39.5