From 568c43c935ce3958d9de8b3b2970bb06be8c3bae Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 12 May 2000 16:00:04 +0200 Subject: [PATCH] release: 1.3.50 =========== * Junked Shift_tuple from collision; Now it uses SCM. * Bugfix of documentation and test-file of tuplet. * Bugfix type string of repeated music is copied. This fixes declared tremolos. * Junked various cruft from lily.scm * Use interfaces symbols instead of C++ class-name for assigning generic element properties. * Junked Dictionary from Piano_pedal_engraver and Piano_pedal_performer. * Introduced boolean element property no-spacing-rods: ignore this item for hard constraints. * Bugfix: added sanitised TeX fragment in faq.texi * Bugfix: merge equal Bar_reqs 1.3.48. --- CHANGES | 30 ++++++++------ Documentation/user/properties.itely | 2 +- VERSION | 4 +- flower/include/tuple.hh | 1 + input/bugs/repbar.ly | 37 ----------------- input/bugs/slur.ly | 5 +++ input/test/pedal.ly | 4 +- input/test/tuplet.ly | 63 +++++++---------------------- lily/beam.cc | 4 +- lily/breathing-sign.cc | 4 +- lily/chord-name.cc | 3 +- lily/clef-item.cc | 7 ---- lily/collision-engraver.cc | 19 +++++++-- lily/collision.cc | 46 +++++++++++---------- lily/include/collision-engraver.hh | 28 ------------- lily/include/collision.hh | 7 +--- lily/note-column.cc | 1 + lily/piano-pedal-engraver.cc | 11 ++--- lily/property-engraver.cc | 53 +++++++++++++----------- lily/repeated-music.cc | 2 +- lily/score-element-callback.cc | 3 +- lily/score-element.cc | 18 --------- lily/slur.cc | 11 +---- lily/spacing-spanner.cc | 6 +-- lily/span-bar-engraver.cc | 10 ++--- lily/timing-engraver.cc | 2 +- make/out/lilypond.lsm | 8 ++-- make/out/lilypond.spec | 4 +- scm/generic-property.scm | 57 ++++++++++++++------------ scm/lily.scm | 42 +------------------ 30 files changed, 174 insertions(+), 318 deletions(-) delete mode 100644 input/bugs/repbar.ly create mode 100644 input/bugs/slur.ly delete mode 100644 lily/include/collision-engraver.hh diff --git a/CHANGES b/CHANGES index 3335da4946..2be8dd6bfb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,22 +1,28 @@ ---- ../lilypond-1.3.49/CHANGES Thu May 11 15:31:37 2000 -++ b/CHANGES Thu May 11 22:01:01 2000 -@@ -1,3 +1,13 @@ -1.3.49.hwn1 + +1.3.49.hwn2 =========== +* Junked Shift_tuple from collision; Now it uses SCM. + +* Bugfix of documentation and test-file of tuplet. + +* Bugfix type string of repeated music is copied. This fixes declared +tremolos. + +* Junked various cruft from lily.scm + +* Use interfaces symbols instead of C++ class-name for assigning generic +element properties. + * Junked Dictionary from Piano_pedal_engraver and -Piano_pedal_performer. Marked kerning as TODO. +Piano_pedal_performer. * Introduced boolean element property no-spacing-rods: ignore this item for hard constraints. +* Bugfix: added sanitised TeX fragment in faq.texi - 1.3.48.uu1 - ========== - 1.3.49.jcn1 -========== - -* Made silly faq.texi fixes (time to get my verbatim patch in :-) +* Bugfix: merge equal Bar_reqs 1.3.48.uu1 ========== @@ -136,7 +142,7 @@ puts alignment in function again * Fixed StaffGroup + GrandStaff combination. -* Music is now mandatory as the first tihng in a \score{} block +* Music is now mandatory as the first thing in a \score{} block 1.3.45 ====== diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index 52af602fee..4bb6362dfd 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -368,7 +368,7 @@ number respectively. Setting it to false will prevent printing of the associated element. Setting the property to 'if-no-beam will make it print only if there is no beam associated with this tuplet bracket. -[fixme examples] +@mudelafile[verbatim]{tuplet.ly} @item @code{tupletInvisible}@indexcode{tupletInvisible} @propertytype{boolean} diff --git a/VERSION b/VERSION index 308d07ced0..c03a84f994 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=49 -MY_PATCH_LEVEL=hwn1 +PATCH_LEVEL=50 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/include/tuple.hh b/flower/include/tuple.hh index 251eca1afd..1adf194f1a 100644 --- a/flower/include/tuple.hh +++ b/flower/include/tuple.hh @@ -9,6 +9,7 @@ #ifndef TUPLET_HH #define TUPLET_HH +#error template diff --git a/input/bugs/repbar.ly b/input/bugs/repbar.ly deleted file mode 100644 index f51ae90b81..0000000000 --- a/input/bugs/repbar.ly +++ /dev/null @@ -1,37 +0,0 @@ -foo = \notes { \context Voice { \relative c'' { -\repeat volta 3 { e c d e } \break -\repeat volta 3 { e c d e } -} -} -} -\score { -\context PianoStaff < -\context Staff = one \foo -\context Staff = two \foo -> -\midi{} -\paper{} -} -foo = \notes { \context Voice { \relative c'' { -\repeat volta 3 { e c d e } \break -\repeat volta 3 { e c d e } -} -} -} -\score { -\context PianoStaff < -\context Staff = one \foo -\context Staff = two \foo -> - \paper { linewidth = 17.0\cm; - \translator { - \OrchestralScoreContext - minVerticalAlign = 2.5*\staffheight; - } - \translator { - \StaffContext - \consists Instrument_name_engraver; - } - } -\midi{} -} diff --git a/input/bugs/slur.ly b/input/bugs/slur.ly new file mode 100644 index 0000000000..c2a8552d1d --- /dev/null +++ b/input/bugs/slur.ly @@ -0,0 +1,5 @@ + + \score { + \notes \relative c' { + c2( c \break c c c c \break c +}} diff --git a/input/test/pedal.ly b/input/test/pedal.ly index 40410a32f6..a30ab93a09 100644 --- a/input/test/pedal.ly +++ b/input/test/pedal.ly @@ -1,7 +1,7 @@ \score{ \context Staff \notes\relative c'{ -c\sustaindown d e f\sustainup g\sustaindown b c -c,\sustainup\sustaindown d e f \sustainup g\sustaindown b c +c4\sustaindown d e f\sustainup g\sustaindown b c +c, [d16 \sustainup \sustaindown c c c] [e e \sustainup \sustaindown e e ] f4 \sustainup g\sustaindown b c \property Staff.stopStartSustain = #"-P" \property Staff.startSustain = #"P" c,\sustainup\sustaindown d e f \sustainup g\sustaindown b c diff --git a/input/test/tuplet.ly b/input/test/tuplet.ly index 68e2768fd3..d39c302143 100644 --- a/input/test/tuplet.ly +++ b/input/test/tuplet.ly @@ -1,50 +1,15 @@ +\version "1.3.47" + \score { - \context Voice \notes\relative c { - \property Voice.textEmptyDimension = 1 - \property Voice.textScriptPadding = 10 - \property Voice.tupletVisibility = 0 - \times2/3{c'4^"tupletVisibility = 0" d e} \times2/3{[f8 g a]} - \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 1 - \times2/3{c,4^"tupletVisibility = 1" d e} \times2/3{[f8 g a]} - \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 2 - \times2/3{c,4^"tupletVisibility = 2" d e} \times2/3{[f8 g a]} - \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 3 - \times2/3{c,4^"tupletVisibility = 3" d e} \times2/3{[f8 g a]} - \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 4 - \times2/3{c,4^"tupletVisibility = 4" d e} \times2/3{[f8 g a]} - \times2/3{b16 c d} c8 | \break - - \property Voice.tupletDirection = \down - \property Voice.tupletVisibility = 0 - \times2/3{c,4^"tupletDirection = down" d e} - \times2/3{[[f8 g a]]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 1 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 2 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 3 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 4 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 |\break - - \property Voice.tupletDirection = \up - \property Voice.tupletVisibility = 0 - \times2/3{c,4^"tupletDirection = up" d e} - \times2/3{[[f8 g a]]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 1 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 2 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 3 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - \property Voice.tupletVisibility = 4 - \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | - - } - \paper { } - \midi { } -} \ No newline at end of file + \context Voice \notes\relative c'' { + + \times 2/3 { [c8 c c] } + \times 2/3 { c8 [c c] } + + \property Voice .tupletBracketVisibility = #'if-no-beam + \times 2/3 { [c8 c c] } + \property Voice .tupletDirection = #1 + \property Voice .tupletNumberVisibility = ##f + \times 2/3 { c8 [c c] } +} +} diff --git a/lily/beam.cc b/lily/beam.cc index 027a08d70f..e19a82270b 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -13,13 +13,11 @@ * less hairy code * move paper vars to scm - remove *-hs variables. - */ -#include // tanh. +#include // tanh. #include "directional-element-interface.hh" #include "beaming.hh" #include "dimensions.hh" diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index 2c1f515249..64e588f727 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -8,9 +8,9 @@ TODO: --> see breathing-sign-engraver.cc */ + #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" - #include "breathing-sign.hh" #include "string.hh" #include "molecule.hh" @@ -32,6 +32,8 @@ Breathing_sign::do_brew_molecule () const Staff_symbol_referencer_interface si (this); Real space = si.staff_space(); + + // todo: cfg'able. Interval i1(0, space / 6), i2(-space / 2, space / 2); Box b(i1, i2); diff --git a/lily/chord-name.cc b/lily/chord-name.cc index 3bc56b107e..7a05a08844 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -25,8 +25,9 @@ "text" ("style" . "text") */ + /* - UGH. remove Dictionary< > + UGH. remove Dictionary< > and use Scheme_hash_table */ Molecule Chord_name::ly_word2molecule (SCM word) const diff --git a/lily/clef-item.cc b/lily/clef-item.cc index f0a8b8566f..21d97d8075 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -10,14 +10,7 @@ #include "clef-item.hh" #include "string.hh" #include "molecule.hh" -#include "paper-def.hh" -#include "lookup.hh" #include "text-item.hh" -#include "paper-score.hh" -#include "dimension-cache.hh" -#include "side-position-interface.hh" -#include "warn.hh" -#include "line-of-score.hh" void Clef_item::before_line_breaking () diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 16d0bf30ea..eebb06122b 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -7,16 +7,29 @@ */ #include "note-column.hh" -#include "collision-engraver.hh" #include "collision.hh" #include "dimension-cache.hh" +#include "engraver.hh" + +class Collision_engraver : public Engraver { + Collision* col_p_; + Link_array note_column_l_arr_; + +protected: + virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); + virtual void do_pre_move_processing(); +public: + VIRTUAL_COPY_CONS(Translator); + Collision_engraver(); +}; + void Collision_engraver::process_acknowledged () { - if (col_p_ || note_column_l_arr_.size () < 2) - return ; + return ; if (!col_p_) { col_p_ = new Collision; diff --git a/lily/collision.cc b/lily/collision.cc index c25f45d05c..32ee0d69f6 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -26,28 +26,29 @@ Collision::add_column (Note_column* ncol_l) add_dependency (ncol_l); } -/* - UGH. junk Shift_tup . - */ - void Collision::before_line_breaking () { - Array autos (automatic_shift ()); - Array hand (forced_shift ()); + SCM autos (automatic_shift ()); + SCM hand (forced_shift ()); Link_array done; Real wid = paper_l ()->get_var ("collision_note_width"); - for (int i=0; i < hand.size (); i++) + for (; gh_pair_p (hand); hand =gh_cdr (hand)) { - hand[i].e1_->translate_axis (hand[i].e2_ *wid, X_AXIS); - done.push (hand[i].e1_); + Score_element * s = unsmob_element (gh_caar (hand)); + Real amount = gh_scm2double (gh_cdar (hand)); + + s->translate_axis (amount *wid, X_AXIS); + done.push (s); } - - for (int i=0; i < autos.size (); i++) + for (; gh_pair_p (autos); autos =gh_cdr (autos)) { - if (!done.find_l (autos[i].e1_)) - autos[i].e1_->translate_axis (autos[i].e2_ * wid, X_AXIS); + Score_element * s = unsmob_element (gh_caar (autos)); + Real amount = gh_scm2double (gh_cdar (autos)); + + if (!done.find_l (s)) + s->translate_axis (amount * wid, X_AXIS); } } @@ -57,13 +58,12 @@ Collision::before_line_breaking () This should be done better, probably. */ -Array< Shift_tup > +SCM Collision::automatic_shift () { Drul_array > clash_groups; Drul_array > shifts; - Array tups; - + SCM tups = SCM_EOL; SCM s = get_elt_property ("elements"); for (; gh_pair_p (s); s = gh_cdr (s)) @@ -151,8 +151,8 @@ Collision::automatic_shift () Note_head * nu_l= cu_l->first_head(); Note_head * nd_l = cd_l->first_head(); - int downpos = cd_l->head_positions_interval ()[BIGGER]; - int uppos = cu_l->head_positions_interval ()[SMALLER]; + int downpos = cd_l->head_positions_interval ()[BIGGER]; + int uppos = cu_l->head_positions_interval ()[SMALLER]; bool merge = downpos == uppos @@ -179,17 +179,18 @@ Collision::automatic_shift () do { for (int i=0; i < clash_groups[d].size (); i++) - tups.push (Shift_tup (clash_groups[d][i], offsets[d][i])); + tups = gh_cons (gh_cons (clash_groups[d][i]->self_scm_, gh_double2scm (offsets[d][i])), + tups); } while (flip (&d) != UP); return tups; } -Array +SCM Collision::forced_shift () { - Array tups; + SCM tups = SCM_EOL; SCM s = get_elt_property ("elements"); for (; gh_pair_p (s); s = gh_cdr (s)) @@ -199,7 +200,8 @@ Collision::forced_shift () SCM force = se->remove_elt_property ("force-hshift"); if (gh_number_p (force)) { - tups. push (Shift_tup (se, gh_scm2double (force))); + tups = gh_cons (gh_cons (se->self_scm_, force), + tups); } } return tups; diff --git a/lily/include/collision-engraver.hh b/lily/include/collision-engraver.hh deleted file mode 100644 index ec46aead22..0000000000 --- a/lily/include/collision-engraver.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - collision-engraver.hh -- declare Collision_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef COLLISION_GRAV_HH -#define COLLISION_GRAV_HH - -#include "engraver.hh" - -class Collision_engraver : public Engraver { - Collision* col_p_; - Link_array note_column_l_arr_; - -protected: - virtual void acknowledge_element (Score_element_info); - virtual void process_acknowledged (); - virtual void do_pre_move_processing(); -public: - VIRTUAL_COPY_CONS(Translator); - Collision_engraver(); - -}; -#endif // COLLISION_GRAV_HH diff --git a/lily/include/collision.hh b/lily/include/collision.hh index 64052db5e0..7a7b5379f2 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -11,10 +11,7 @@ #define COLLISION_HH #include "lily-proto.hh" #include "item.hh" -#include "tuple.hh" -//junkme, use SCM conses. -typedef Tuple Shift_tup; /** Resolve conflicts between various Note_columns (chords). @@ -27,8 +24,8 @@ typedef Tuple Shift_tup; class Collision : public Item { protected: - Array automatic_shift (); - Array forced_shift (); + SCM automatic_shift (); + SCM forced_shift (); virtual void before_line_breaking (); public: diff --git a/lily/note-column.cc b/lily/note-column.cc index 909629921c..1f424860fe 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -44,6 +44,7 @@ Note_column::Note_column() set_elt_property ("note-heads", SCM_EOL); Axis_group_interface (this).set_interface (); Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS); + Group_interface (this, "interfaces").add_thing (ly_symbol2scm ("Note_column")); } Stem * diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 3fdbf0352a..be57de3d8b 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -18,6 +18,7 @@ #include "staff-symbol-referencer.hh" #include "text-item.hh" #include "sustain-pedal.hh" + /* TODO: * it would be really cool if an engraver could be initialised with a @@ -27,13 +28,12 @@ Piano_pedal_engraver::"sustain" Piano_pedal_engraver::"una-chorda" - - */ /* Would it? The semantics are unclear, and real benefits are muddy - too. --hwn */ + too. --hwn +*/ @@ -199,11 +199,6 @@ Piano_pedal_engraver::do_process_music () Side_position_interface si (p->item_p_); si.set_axis (Y_AXIS); - /* Hmm, - If set to empty, it can't be centred - Howto centre non-fat text? - p->item_p_->set_empty (X_AXIS); - */ p->item_p_->set_elt_property ("no-spacing-rods" , SCM_BOOL_T); p->item_p_->set_elt_property ("self-alignment-X", gh_int2scm (0)); p->item_p_->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS); diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index 07eff6b441..b60416ef42 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -12,13 +12,14 @@ #include "protected-scm.hh" #include "dictionary.hh" #include "score-element.hh" +#include "scm-hash.hh" class Property_engraver : public Engraver { /* UGH. Junk Dictionary */ - Dictionary prop_dict_; // junkme + Scheme_hash_table prop_dict_; // junkme void apply_properties (SCM, Score_element*); protected: @@ -32,24 +33,29 @@ void Property_engraver::do_creation_processing () { SCM plist = get_property ("Generic_property_list"); - for (; SCM_NIMP (plist); plist = gh_cdr (plist)) + for (; gh_pair_p (plist); plist = gh_cdr (plist)) { SCM elt_props = gh_car (plist); - prop_dict_[ly_scm2string (gh_car (elt_props))] = gh_cdr (elt_props); + prop_dict_.set (gh_car (elt_props), gh_cdr (elt_props)); } } void Property_engraver::acknowledge_element (Score_element_info i) { - if (prop_dict_.elem_b (i.elem_l_->name())) - { - SCM p = prop_dict_[i.elem_l_->name()]; - apply_properties (p,i.elem_l_); + SCM ifs = i.elem_l_->get_elt_property ("interfaces"); + SCM props; + for (; gh_pair_p (ifs); ifs = gh_cdr (ifs)) + { + if (prop_dict_.try_retrieve (gh_car (ifs), &props)) + { + apply_properties (props,i.elem_l_); + } } - if (prop_dict_.elem_b ("all")) + + if (prop_dict_.try_retrieve (ly_symbol2scm ("all"), &props)) { - apply_properties (prop_dict_["all"], i.elem_l_); + apply_properties (props, i.elem_l_); } } @@ -83,7 +89,8 @@ Property_engraver::apply_properties (SCM p, Score_element *e) == SCM_BOOL_T) // defined and right type: do it e->set_elt_property (ly_symbol2string (elt_prop_sym), val); else - /* + + /* we don't print a warning if VAL == #f, because we would get lots of warnings when we restore stuff to default, eg. @@ -92,20 +99,20 @@ Property_engraver::apply_properties (SCM p, Score_element *e) should not cause "type error: slurDash expects number not boolean" - */ + */ if (val != SCM_BOOL_F) - { // not the right type: error message. - SCM errport = scm_current_error_port (); - warning (_("Wrong type for property")); - scm_display (prop_sym, errport); - scm_puts (", type predicate: ", errport); - scm_display (type_p, errport); - scm_puts (", value found: ", errport); - scm_display (val, errport); - scm_puts (" type: ", errport); - scm_display (ly_type (val), errport); - scm_puts ("\n", errport); - } + { // not the right type: error message. + SCM errport = scm_current_error_port (); + warning (_("Wrong type for property")); + scm_display (prop_sym, errport); + scm_puts (", type predicate: ", errport); + scm_display (type_p, errport); + scm_puts (", value found: ", errport); + scm_display (val, errport); + scm_puts (" type: ", errport); + scm_display (ly_type (val), errport); + scm_puts ("\n", errport); + } } } diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index bf6b9908d5..acdccf98f1 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -29,7 +29,7 @@ Repeated_music::Repeated_music (Repeated_music const &s) repeats_i_ = s.repeats_i_; fold_b_ = s.fold_b_; volta_fold_b_ = s.volta_fold_b_; - + type_ = s.type_; repeat_body_p_ = s.repeat_body_p_ ? s.repeat_body_p_->clone () : 0; alternatives_p_ = s.alternatives_p_ ? dynamic_cast (s.alternatives_p_->clone ()):0; diff --git a/lily/score-element-callback.cc b/lily/score-element-callback.cc index f0cf1234ff..9e81fe5aa0 100644 --- a/lily/score-element-callback.cc +++ b/lily/score-element-callback.cc @@ -43,7 +43,8 @@ void start_callback_smobs() } -SCM smobify_callback (Score_element_callback cb ) +SCM +smobify_callback (Score_element_callback cb ) { SCM z; diff --git a/lily/score-element.cc b/lily/score-element.cc index c8307754ce..891f67e092 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -209,24 +209,6 @@ Score_element::add_processing() return; status_i_ ++; -#if 0 - /* - UGH. UGH. UGH. - */ - if (get_elt_property ("self-alignment-X") != SCM_UNDEFINED - && !dim_cache_[X_AXIS]->off_callback_l_) - { - add_offset_callback (Side_position_interface::aligned_on_self,X_AXIS); - } - - if (get_elt_property ("self-alignment-Y") != SCM_UNDEFINED - && !dim_cache_[X_AXIS]->off_callback_l_) - - { - add_offset_callback (Side_position_interface::aligned_on_self, Y_AXIS); - } -#endif - do_add_processing(); } diff --git a/lily/slur.cc b/lily/slur.cc index 9b16216728..13b2c7b7c8 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -223,14 +223,6 @@ Slur::Slur () set_elt_property ("note-columns", SCM_EOL); set_elt_property ("control-points", SCM_EOL); - -#if 0 - /* - I still don't understand the merits of this Group_interface. - */ - Group_interface c (this, "control-points"); - c.set_interface (); -#endif } void @@ -240,8 +232,7 @@ Slur::add_column (Note_column*n) warning (_ ("Putting slur over rest. Ignoring.")); else { - Group_interface gi (this, "note-columns"); - gi.add_element (n); + Group_interface (this, "note-columns").add_element (n); add_dependency (n); } } diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 4379429a68..d8cf62c2ac 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -24,10 +24,6 @@ Spacing_spanner::Spacing_spanner () } /* - cut 'n paste from spring-spacer.cc - - generate springs between columns. - The algorithm is partly taken from : @@ -36,6 +32,8 @@ Spacing_spanner::Spacing_spanner () Science, The Ohio State University, 1987. TOO HAIRY. + + TODO: write comments */ Array diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index 10d2c345a8..6b9db20f74 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -62,13 +62,9 @@ Span_bar_engraver::acknowledge_element (Score_element_info i) spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS); spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS); - /* - UGH. UGH UUHGK GUHG G - */ - String visnam = String(name()) + "-visibility"; - - spanbar_p_->set_elt_property ("visibility-lambda", - scm_eval (ly_symbol2scm (visnam.ch_C()))); + SCM v = bar_l_arr_[0]->get_elt_property ("visibility-lambda"); + if (gh_procedure_p (v)) + spanbar_p_->set_elt_property ("visibility-lambda",v); spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS); announce_element (Score_element_info (spanbar_p_,0)); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index aa5a4e6973..00965fe582 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -27,7 +27,7 @@ Timing_engraver::do_try_music (Music*m) { if (Bar_req * b= dynamic_cast (m)) { - if (bar_req_l_ && bar_req_l_->equal_b (b)) // huh? + if (bar_req_l_ && !bar_req_l_->equal_b (b)) // huh? return false; bar_req_l_ = b; diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index eb1af95717..d435d4218d 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.49 -Entered-date: 11MAY00 +Version: 1.3.50 +Entered-date: 12MAY00 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.49.tar.gz + 1000k lilypond-1.3.50.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.49.tar.gz + 1000k lilypond-1.3.50.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index ec14eb22b0..8d9bad92f0 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.49 +Version: 1.3.50 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.49.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.50.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/scm/generic-property.scm b/scm/generic-property.scm index 57ef8859ba..ac38879b55 100644 --- a/scm/generic-property.scm +++ b/scm/generic-property.scm @@ -1,7 +1,7 @@ ; ; Format: -; (cons "Type name" +; (cons 'Type name ; (list PROPERTYDESCRIPTIONS)) ; ; where @@ -15,7 +15,7 @@ (define generic-beam-properties - (cons "Beam" + (cons 'Beam (list (list 'beamSlopeDamping number? 'damping) (list 'autoKneeGap number? 'auto-knee-gap) @@ -29,7 +29,7 @@ (define generic-stem-properties - (cons "Stem" + (cons 'Stem (list (list 'stemVerticalDirection dir? 'direction) (list 'verticalDirection dir? 'direction) @@ -42,14 +42,15 @@ ) (define generic-dot-properties - (cons "Dots" (list + (cons 'Dots + (list (list 'dotDirection dir? 'direction) (list 'verticalDirection dir? 'direction) ) )) (define generic-script-properties - (cons "Script" (list + (cons 'Script (list (list 'articulationScriptVerticalDirection dir? 'direction) (list 'articulationScriptPadding number? 'padding) @@ -59,7 +60,7 @@ (define generic-text-properties - (cons "Text_item" (list + (cons 'Text_item (list (list 'textStyle string? 'style) (list 'textScriptPadding number? 'padding) (list 'textVerticalAlignment dir? 'self-alignment-Y) @@ -69,18 +70,18 @@ )) (define generic-sustain-pedal-properties - (cons "Sustain_pedal" (list + (cons 'Sustain_pedal (list (list 'textScriptPadding number? 'padding) (list 'sustainPedalPadding number? 'padding)))) (define generic-chord-name-properties - (cons "Chord_name" (list + (cons 'Chord_name (list (list 'textScriptWordSpace number? 'word-space) (list 'chordNameWordSpace number? 'word-space) (list 'chordNameStyle string? 'style)))) (define generic-crescendo-properties - (cons "Crescendo" (list + (cons 'Crescendo (list (list 'dynamicDirection dir? 'direction) (list 'verticalDirection dir? 'direction) (list 'dynamicPadding number? 'padding) @@ -88,7 +89,7 @@ ))) (define generic-dynamic-line-spanner-properties - (cons "Dynamic_line_spanner" (list + (cons 'Dynamic_line_spanner (list (list 'dynamicDirection dir? 'direction) (list 'verticalDirection dir? 'direction) (list 'dynamicPadding number? 'padding) @@ -96,75 +97,78 @@ ))) (define generic-volta-spanner-properties - (cons "Volta_spanner" (list + (cons 'Volta_spanner (list (list 'voltaVerticalDirection dir? 'direction) (list 'voltaPadding number? 'padding) (list 'voltaMinimumSpace number? 'minimum-space) ))) (define generic-bar-properties - (cons "Staff_bar" (list + (cons 'Staff_bar (list (list 'barSize number? 'bar-size)) ) ) ; don't do this yet. Depends on whennn the staff is really announced (define generic-staff-symbol-properties - (cons "Staff_symbol" (list + (cons 'Staff_symbol (list ) ) ) (define generic-breathing-sign-properties - (cons "Breathing_sign" + (cons 'Breathing_sign (list (list 'breathingSignVerticalDirection dir? 'direction) (list 'verticalDirection dir? 'direction) ))) (define generic-clef-properties - (cons "Clef_item" + (cons 'Clef_item (list (list 'clefStyle string? 'style)) ) ) (define generic-All-properties - (cons "all" (list (list 'fontSize number? 'fontsize)))) + (cons 'all (list (list 'fontSize number? 'fontsize)))) (define generic-notehead-properties - (cons "Note_head" (list (list 'noteHeadStyle symbol? 'style)))) + (cons 'Note_head + (list (list 'noteHeadStyle symbol? 'style)))) (define generic-rest-properties - (cons "Rest" (list (list 'restStyle string? 'reststyle)))) + (cons 'Rest + (list (list 'restStyle string? 'reststyle)))) (define generic-rest-collision-properties - (cons "Rest_collision" (list (list 'maximumRestCount number? 'maximum-rest-count)))) + (cons 'Rest_collision + (list (list 'maximumRestCount number? 'maximum-rest-count)))) (define generic-tie-properties - (cons "Tie" (list + (cons 'Tie (list (list 'tieVerticalDirection dir? 'direction) (list 'verticalDirection dir? 'direction) (list 'tieDash number? 'dashed) ))) (define generic-tie-column-properties - (cons "Tie_column" (list + (cons 'Tie_column (list (list 'tieVerticalDirection dir? 'direction) (list 'verticalDirection dir? 'direction) ))) (define generic-note-column-properties - (cons "Note_column" + (cons 'Note_column (list (list 'horizontalNoteShift number? 'horizontal-shift) (list 'forceHorizontalShift number? 'force-hshift) ))) (define generic-collision-properties - (cons "Collision" + (cons 'Collision (list (list 'collisionMergeDotted boolean? 'merge-differently-dotted) ) @@ -172,14 +176,14 @@ ) (define generic-slur-properties - (cons "Slur" + (cons 'Slur (list (list 'slurVerticalDirection dir? 'direction) (list 'verticalDirection dir? 'direction) (list 'slurDash number? 'dashed)))) (define generic-timesig-properties - (cons "Time_signature" + (cons 'Time_signature (list (list 'timeSignatureStyle string? 'style)))) @@ -187,8 +191,9 @@ (or (boolean? s) (symbol? s))) (define generic-tuplet-spanner-properties - (cons "Tuplet_spanner" + (cons 'Tuplet_spanner (list + (list 'tupletDirection dir? 'direction) (list 'tupletNumberVisibility symbol-or-boolean? 'tuplet-number-visibility) (list 'tupletBracketVisibility symbol-or-boolean? 'tuplet-bracket-visibility) )) diff --git a/scm/lily.scm b/scm/lily.scm index d2e5b83c01..fec2be9cfe 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -7,7 +7,7 @@ ; ; This file contains various routines in Scheme that are easier to -; do here than in C++. At present it is a unorganised mess. Sorry. +; do here than in C++. At present it is an unorganised mess. Sorry. ; @@ -90,9 +90,6 @@ (define (end-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f))) -;; Score_span_bars are only visible at start of line -;; i.e. if break_dir == RIGHT == 1 -(define Span_bar_engraver-visibility begin-of-line-invisible) (define mark-visibility end-of-line-invisible) ;; Spacing constants for prefatory matter. @@ -937,31 +934,7 @@ (define (scm-as-output) (eval (as-scm 'all-definitions))) - -; Russ McManus, -; -; I use the following, which should definitely be provided somewhere -; in guile, but isn't, AFAIK: -; -; - -(define (hash-table-for-each fn ht) - (do ((i 0 (+ 1 i))) - ((= i (vector-length ht))) - (do ((alist (vector-ref ht i) (cdr alist))) - ((null? alist) #t) - (fn (car (car alist)) (cdr (car alist)))))) - -(define (hash-table-map fn ht) - (do ((i 0 (+ 1 i)) - (ret-ls '())) - ((= i (vector-length ht)) (reverse ret-ls)) - (do ((alist (vector-ref ht i) (cdr alist))) - ((null? alist) #t) - (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls))))) - - - + (define (index-cell cell dir) (if (equal? dir 1) (cdr cell) @@ -992,14 +965,3 @@ ) ) - -(define (slur-ugly ind ht) - (if (and -; (< ht 4.0) - (< ht (* 4 ind)) - (> ht (* 0.4 ind)) - (> ht (+ (* 2 ind) -4)) - (< ht (+ (* -2 ind) 8))) - #f - (cons ind ht) - )) -- 2.39.5