From ee513a2f7d18fc8d43e1c291350ed81856b0192d Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 20 Mar 2000 13:53:27 +0100 Subject: [PATCH] release: 1.3.37 =========== * Abstract Align_element into Align_interface. Removed Axis_align_{item,spanner}, Align_element, Super_element, all multiple inheritance in the backend. * new Gade score, INSTALL.texi fixes (thanks, Mats) * Removed Item::hpos_f (), Score_element::{get,set}_real () * comments detailing properties for Axis_group_interface, Side_position_interface, Score_element, Item and Spanner 1.3.36.j --- CHANGES | 25 +++-- Documentation/topdocs/INSTALL.texi | 10 +- Documentation/user/properties.itely | 5 + INSTALL.txt | 16 ++-- VERSION | 4 +- input/test/bb.ly | 0 lily/{align-element.cc => align-interface.cc} | 95 ++++++++++++------- lily/align-note-column-engraver.cc | 3 +- lily/audio-item.cc | 4 +- lily/axis-align-item.cc | 20 ---- lily/axis-align-spanner.cc | 13 --- lily/axis-group-engraver.cc | 14 +-- lily/axis-group-interface.cc | 7 +- lily/axis-group-item.cc | 16 ---- lily/axis-group-spanner.cc | 16 ---- lily/base-span-bar-engraver.cc | 1 - lily/beam.cc | 44 ++++----- lily/break-align-engraver.cc | 18 ++-- lily/break-align-item.cc | 19 ++-- lily/collision.cc | 5 +- lily/cross-staff.cc | 13 +-- lily/dot-column.cc | 8 +- lily/dynamic-engraver.cc | 68 ++++++------- lily/dynamic-performer.cc | 43 +-------- lily/grace-align-item.cc | 8 +- lily/grace-position-engraver.cc | 2 +- lily/graphical-lisp-element.cc | 0 lily/hara-kiri-engraver.cc | 2 +- lily/hara-kiri-vertical-group-spanner.cc | 3 +- .../{align-element.hh => align-interface.hh} | 52 +++++----- lily/include/atom.hh | 0 lily/include/audio-item.hh | 4 +- lily/include/axis-align-item.hh | 28 ------ lily/include/axis-align-spanner.hh | 27 ------ lily/include/axis-group-engraver.hh | 4 +- lily/include/axis-group-interface.hh | 22 ++++- lily/include/axis-group-item.hh | 23 +---- lily/include/axis-group-spanner.hh | 27 +----- lily/include/break-align-item.hh | 7 +- lily/include/collision.hh | 5 +- lily/include/context-specced-music.hh | 6 +- lily/include/dot-column.hh | 4 +- lily/include/dummy.icc | 0 lily/include/grace-align-item.hh | 4 +- lily/include/group-interface.hh | 7 +- lily/include/hara-kiri-engraver.hh | 2 +- .../hara-kiri-vertical-group-spanner.hh | 4 +- lily/include/head-column.hh | 0 lily/include/item.hh | 42 +++----- lily/include/lily-proto.hh | 5 - lily/include/line-group-group-engraver.hh | 2 +- lily/include/line-of-score.hh | 28 +++++- lily/include/note-column.hh | 8 +- lily/include/paper-column.hh | 5 +- lily/include/priority-halign-engraver.hh | 26 +---- lily/include/rest-column-engraver.hh | 0 lily/include/rest-column.hh | 0 lily/include/score-element.hh | 26 ++--- lily/include/side-position-interface.hh | 21 ++++ lily/include/span-bar.hh | 1 - lily/include/spanner.hh | 13 +-- lily/include/super-element.hh | 20 +--- lily/include/todo-performer.hh | 0 lily/include/vertical-align-engraver.hh | 29 ------ lily/item.cc | 23 +++-- lily/line-group-group-engraver.cc | 8 +- lily/line-of-score.cc | 86 ++++++++++++++--- lily/midi-item.cc | 5 +- lily/note-column.cc | 15 +-- lily/paper-column.cc | 12 +-- lily/score-element.cc | 17 +--- lily/score-engraver.cc | 2 +- lily/side-position-interface.cc | 3 +- lily/slur.cc | 6 +- lily/span-bar.cc | 1 - lily/span-dynamic-performer.cc | 14 +-- lily/spanner.cc | 57 ++--------- lily/stem-tremolo.cc | 8 +- lily/super-element.cc | 76 --------------- lily/tuplet-spanner.cc | 6 +- lily/vertical-align-engraver.cc | 34 +++++-- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- mutopia/Coriolan/coriolan-paper.ly | 4 +- mutopia/Coriolan/coriolan-part-paper.ly | 4 +- po/lilypond.pot | 33 ++++--- po/nl.po | 45 ++++----- scm/midi.scm | 49 +++------- scripts/convert-mudela.py | 4 +- 89 files changed, 579 insertions(+), 879 deletions(-) delete mode 100644 input/test/bb.ly rename lily/{align-element.cc => align-interface.cc} (61%) delete mode 100644 lily/axis-align-item.cc delete mode 100644 lily/axis-align-spanner.cc delete mode 100644 lily/axis-group-item.cc delete mode 100644 lily/axis-group-spanner.cc delete mode 100644 lily/graphical-lisp-element.cc rename lily/include/{align-element.hh => align-interface.hh} (50%) delete mode 100644 lily/include/atom.hh delete mode 100644 lily/include/axis-align-item.hh delete mode 100644 lily/include/axis-align-spanner.hh delete mode 100644 lily/include/dummy.icc delete mode 100644 lily/include/head-column.hh delete mode 100644 lily/include/rest-column-engraver.hh delete mode 100644 lily/include/rest-column.hh delete mode 100644 lily/include/todo-performer.hh delete mode 100644 lily/include/vertical-align-engraver.hh delete mode 100644 lily/super-element.cc diff --git a/CHANGES b/CHANGES index 830ce5a288..4b4c02e510 100644 --- a/CHANGES +++ b/CHANGES @@ -1,14 +1,17 @@ -1.3.36.jcn4 + +1.3.36.hwn1 =========== -* Added instrument-equaliser for MIDI output, see scm/midi.scm, and - properties midiMinimumVolume, midiMaximumVolume, ranges [0,1]. +* Abstract Align_element into Align_interface. Removed +Axis_align_{item,spanner}, Align_element, Super_element, all multiple +inheritance in the backend. -* Changed absolute midi volume settings into factor of full scale. +* new Gade score, INSTALL.texi fixes (thanks, Mats) -* Fixed another dynamic-line-spanner bug, it gets hairy. +* Removed Item::hpos_f (), Score_element::{get,set}_real () -* Added warning for spanners with dubiously narrow parents. +* comments detailing properties for Axis_group_interface, +Side_position_interface, Score_element, Item and Spanner 1.3.36.jcn3 =========== @@ -18,16 +21,10 @@ * Bugfix: line-spanner lasts always full duration of (de)crescendi. -1.3.36.jcn2 -=========== - * Bugfix: broken (de)crescendi on a dynamic-line-spanner. * Bugfix: compilation dynamic-engraver. -1.3.36.jcn1 -=========== - * Added and updated a faq about postscript and ghostscript. * Fixed order of slurVerticalDirection verticalDirection in @@ -39,7 +36,9 @@ * Bugfix: volume effect of (de)crescendi was sometimes wrong way round. -.3.35.hwn1 +1.3.36 +====== +1.3.35.hwn1 =========== * textEmptyDimension changed into textNonEmpty, default: off, diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index 0a4e7e79e8..bca8420647 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -55,7 +55,7 @@ disk-space run configure with @code{--disable-debugging}. Although we recommend to use Unix, LilyPond is known to run on Windows NT/95/98 as well. See Section Windows NT/95,es. -@item EGCS 1.1 or newer. Check out @uref{ftp://ftp.gnu.org/pub/gcc/}. +@item EGCS 1.1 or newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/}. @item Python 1.5, Check out @@ -64,16 +64,16 @@ Check out @item GUILE 1.3.4, check out @uref{http://www.gnu.org/software/guile/guile.html,http://www.gnu.org/software/guile/guile.html}. @item GNU make. -Check out @uref{ftp://ftp.gnu.org/make/,ftp://ftp.gnu.org/make/}. +Check out @uref{ftp://ftp.gnu.org/gnu/make/,ftp://ftp.gnu.org/gnu/make/}. @item Flex (version 2.5.4 or newer). -Check out @uref{ftp://ftp.gnu.org/flex/,ftp://ftp.gnu.org/flex/}. +Check out @uref{ftp://ftp.gnu.org/gnu/flex/,ftp://ftp.gnu.org/gnu/flex/}. @item Bison (version 1.25 or newer). -Check out @uref{ftp://ftp.gnu.org/bison/,ftp://ftp.gnu.org/bison/}. +Check out @uref{ftp://ftp.gnu.org/gnu/bison/,ftp://ftp.gnu.org/gnu/bison/}. @item Texinfo (version 4.0 or newer). -Check out @uref{ftp://ftp.gnu.org/pub/texinfo/,ftp://ftp.gnu.org/pub/texinfo/}. +Check out @uref{ftp://ftp.gnu.org/gnu/texinfo/,ftp://ftp.gnu.org/gnu/texinfo/}. Most documentation is in texinfo. @item The geometry package for LaTeX is needed to use ly2dvi. diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index 101274a2b8..3b92694c79 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -149,6 +149,11 @@ c''16 \property Staff.fontSize = -2 c''16 automatic collision resolution. The value is the shift amount expressed in @code{note_width}, as set in the paper section. +@item @code{collisionMergeDotted}@indexcode{collisionMergeDotted} @propertytype{boolean} + +Merge noteheads in collisions, even if they have a different number of +dots. This normal notation for polyphonic guitar music. + @mudelafile[verbatim]{force-hshift.sly} diff --git a/INSTALL.txt b/INSTALL.txt index 37dcaa182f..75215d77dc 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -48,7 +48,7 @@ Prerequisites * Although we recommend to use Unix, LilyPond is known to run on Windows NT/95/98 as well. See Section Windows NT/95,es. - * EGCS 1.1 or newer. Check out `ftp://ftp.gnu.org/pub/gcc/'. + * EGCS 1.1 or newer. Check out `ftp://ftp.gnu.org/gnu/gcc/'. * Python 1.5, Check out `ftp://ftp.python.org' or `ftp://ftp.cwi.nl/pub/python'. @@ -57,17 +57,17 @@ Prerequisites http://www.gnu.org/software/guile/guile.html (http://www.gnu.org/software/guile/guile.html). - * GNU make. Check out ftp://ftp.gnu.org/make/ - (ftp://ftp.gnu.org/make/). + * GNU make. Check out ftp://ftp.gnu.org/gnu/make/ + (ftp://ftp.gnu.org/gnu/make/). - * Flex (version 2.5.4 or newer). Check out ftp://ftp.gnu.org/flex/ - (ftp://ftp.gnu.org/flex/). + * Flex (version 2.5.4 or newer). Check out + ftp://ftp.gnu.org/gnu/flex/ (ftp://ftp.gnu.org/gnu/flex/). - * Bison (version 1.25 or newer). Check out ftp://ftp.gnu.org/bison/ - (ftp://ftp.gnu.org/bison/). + * Bison (version 1.25 or newer). Check out + ftp://ftp.gnu.org/gnu/bison/ (ftp://ftp.gnu.org/gnu/bison/). * Texinfo (version 4.0 or newer). Check out - ftp://ftp.gnu.org/pub/texinfo/ (ftp://ftp.gnu.org/pub/texinfo/). + ftp://ftp.gnu.org/gnu/texinfo/ (ftp://ftp.gnu.org/gnu/texinfo/). Most documentation is in texinfo. * The geometry package for LaTeX is needed to use ly2dvi. Available diff --git a/VERSION b/VERSION index 524e3309b6..b0b101c703 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=36 -MY_PATCH_LEVEL=jcn4 +PATCH_LEVEL=37 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/bb.ly b/input/test/bb.ly deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/align-element.cc b/lily/align-interface.cc similarity index 61% rename from lily/align-element.cc rename to lily/align-interface.cc index a8b34c0693..6908147504 100644 --- a/lily/align-element.cc +++ b/lily/align-interface.cc @@ -1,16 +1,16 @@ -/* - align-elem.cc -- implement Align_elem - +/* + align-interface.cc -- implement Align_interface + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include "align-element.hh" -#include "interval.hh" -#include "direction.hh" -#include "debug.hh" +#include "align-interface.hh" #include "dimension-cache.hh" +#include "score-element.hh" +#include "group-interface.hh" #include "axis-group-interface.hh" /* @@ -18,35 +18,28 @@ not compute anything, but a side effect of a->do_side_processing () is that the elements are placed correctly. */ Real -Align_element::alignment_callback (Dimension_cache const *c) +Align_interface::alignment_callback (Dimension_cache const *c) { Axis ax = c->axis (); Score_element * sc = c->element_l ()->parent_l (ax); - Align_element * a = dynamic_cast (sc); - if (a && a->get_elt_property ("alignment-done") == SCM_UNDEFINED) + + if (sc && sc->get_elt_property ("alignment-done") == SCM_UNDEFINED) { - a->do_side_processing (ax); + Align_interface (sc).do_side_processing (ax); } return 0.0; } -void -Align_element::add_element (Score_element* s) -{ - s->add_offset_callback (alignment_callback, axis ()); - axis_group (this).add_element (s); -} - /* Hairy function to put elements where they should be. Can be tweaked from the outside by setting minimum-space and extra-space in its children */ void -Align_element::do_side_processing (Axis a) +Align_interface::do_side_processing (Axis a) { - set_elt_property ("alignment-done", SCM_BOOL_T); + elt_l_->set_elt_property ("alignment-done", SCM_BOOL_T); - SCM d = get_elt_property ("stacking-dir"); + SCM d = elt_l_->get_elt_property ("stacking-dir"); Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER; if (!stacking_dir) stacking_dir = DOWN; @@ -56,10 +49,10 @@ Align_element::do_side_processing (Axis a) Link_array elems; Link_array all_elts - = Group_interface__extract_elements (this, (Score_element*) 0, "elements"); + = Group_interface__extract_elements ( elt_l_, (Score_element*) 0, "elements"); for (int i=0; i < all_elts.size(); i++) { - Interval y = all_elts[i]->extent(a) + all_elts[i]->relative_coordinate (this, a); + Interval y = all_elts[i]->extent(a) + all_elts[i]->relative_coordinate (elt_l_, a); if (!y.empty_b()) { Score_element *e =dynamic_cast(all_elts[i]); @@ -90,7 +83,7 @@ Align_element::do_side_processing (Axis a) Interval threshold = Interval (0, Interval::infinity ()); - SCM thr = get_elt_property ("threshold"); + SCM thr = elt_l_->get_elt_property ("threshold"); if (gh_pair_p (thr)) { threshold[SMALLER] = gh_scm2double (gh_car (thr)); @@ -116,10 +109,20 @@ Align_element::do_side_processing (Axis a) } +Axis +Align_interface::axis ()const +{ + return Axis (gh_scm2int (gh_car (elt_l_->get_elt_property ("axes")))); +} + + +/* + should use generic Scm funcs. + */ int -Align_element::get_count (Score_element*s)const +Align_interface::get_count (Score_element*s)const { - SCM e = get_elt_property ("elements"); + SCM e = elt_l_->get_elt_property ("elements"); int c =0; while (gh_pair_p (e)) { @@ -131,19 +134,39 @@ Align_element::get_count (Score_element*s)const return c; } -Axis -Align_element::axis () const +void +Align_interface::add_element (Score_element* s) +{ + s->add_offset_callback (alignment_callback, axis ()); + Axis_group_interface (elt_l_).add_element (s); + +} + +Align_interface::Align_interface (Score_element const*s) +{ + elt_l_ = (Score_element*)s; +} + +void +Align_interface::set_interface () { - return Axis (gh_scm2int (gh_car (get_elt_property ("axes")))); + Axis_group_interface (elt_l_).set_interface (); + + Group_interface (elt_l_, "interfaces").add_thing (ly_symbol2scm ("Alignment")); } void -Align_element::set_axis (Axis a) +Align_interface::set_axis (Axis a) { - axis_group (this).set_axes (a, a); + Axis_group_interface (elt_l_).set_axes (a,a ); } -Align_element::Align_element () +bool +Align_interface::has_interface_b () { - axis_group (this).set_interface (); + SCM memq = scm_memq (ly_symbol2scm ("Alignment"), + elt_l_->get_elt_property ("interfaces")); + + return (memq != SCM_BOOL_F); } + diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 5bde41d6bf..a184e36131 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -9,6 +9,7 @@ #include "engraver.hh" #include "grace-align-item.hh" +#include "align-interface.hh" #include "note-column.hh" #include "local-key-item.hh" #include "warn.hh" @@ -104,7 +105,7 @@ Align_note_column_engraver::process_acknowledged () if (now_column_l_) { - align_item_p_->add_element (now_column_l_); + Align_interface (align_item_p_).add_element (now_column_l_); now_column_l_ =0; } } diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 5d78ec4bd5..60b15abb5c 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -45,9 +45,9 @@ Audio_key::Audio_key (Key_def const& k) key_ = k; } -Audio_dynamic::Audio_dynamic (Real volume) +Audio_dynamic::Audio_dynamic (int volume) { - volume_ = volume; + volume_i_ = volume; } Audio_tempo::Audio_tempo (int per_minute_4_i) diff --git a/lily/axis-align-item.cc b/lily/axis-align-item.cc deleted file mode 100644 index d0301c907b..0000000000 --- a/lily/axis-align-item.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* - axis-align-item.cc -- implement Axis_align_item - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ - -#include "axis-align-item.hh" - -Axis_align_item::Axis_align_item () -{ -} - -void -Axis_align_item::do_print () const -{ - Axis_group_item::do_print (); -} diff --git a/lily/axis-align-spanner.cc b/lily/axis-align-spanner.cc deleted file mode 100644 index b369c85122..0000000000 --- a/lily/axis-align-spanner.cc +++ /dev/null @@ -1,13 +0,0 @@ -/* - axis-align-spanner.cc -- implement Axis_align_spanner - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ -#include "axis-align-spanner.hh" - -Axis_align_spanner::Axis_align_spanner() -{ -} diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 50b76990e5..cf9208793a 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -7,7 +7,7 @@ */ #include "axis-group-engraver.hh" -#include "axis-group-spanner.hh" +#include "spanner.hh" #include "paper-column.hh" #include "axis-group-interface.hh" @@ -20,16 +20,18 @@ void Axis_group_engraver::do_creation_processing () { staffline_p_ = get_spanner_p (); - axis_group (staffline_p_).set_axes (Y_AXIS, Y_AXIS); + Axis_group_interface (staffline_p_).set_interface (); + Axis_group_interface (staffline_p_).set_axes (Y_AXIS, Y_AXIS); staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); announce_element (Score_element_info (staffline_p_, 0)); } -Axis_group_spanner* +Spanner* Axis_group_engraver::get_spanner_p () const { - return new Axis_group_spanner; + return new Spanner; } + void Axis_group_engraver::do_removal_processing () { @@ -51,8 +53,8 @@ Axis_group_engraver::process_acknowledged () for (int i=0; i < elts_.size (); i++) { Score_element *par = elts_[i]->parent_l (Y_AXIS); - if (!par || !axis_group (par).has_interface_b ()) - axis_group (staffline_p_).add_element (elts_[i]); + if (!par || !Axis_group_interface (par).has_interface_b ()) + Axis_group_interface (staffline_p_).add_element (elts_[i]); } elts_.clear (); } diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index d00b7a1cea..f15c84ca5c 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -12,13 +12,12 @@ #include "dimension-cache.hh" Axis_group_interface::Axis_group_interface (Score_element*s) - : Group_interface (s) { elt_l_ = s; } Axis_group_interface -axis_group (Score_element*s) +Axis_group_interface (Score_element*s) { return Axis_group_interface (s); } @@ -37,7 +36,7 @@ Axis_group_interface::add_element (Score_element *e) e->set_parent (elt_l_, a); } - Group_interface::add_element (e); + Group_interface (elt_l_).add_element (e); elt_l_->add_dependency (e); } @@ -116,7 +115,7 @@ Axis_group_interface::get_children () { Score_element* e = unsmob_element (gh_car (ep)); if (e) - childs.concat (axis_group (e).get_children ()); + childs.concat (Axis_group_interface (e).get_children ()); } return childs; diff --git a/lily/axis-group-item.cc b/lily/axis-group-item.cc deleted file mode 100644 index e3dfe358fe..0000000000 --- a/lily/axis-group-item.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* - axis-group-item.cc -- implement Axis_group_interface - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ - -#include "axis-group-item.hh" -#include "axis-group-interface.hh" - -Axis_group_item ::Axis_group_item () -{ - axis_group (this).set_interface (); -} diff --git a/lily/axis-group-spanner.cc b/lily/axis-group-spanner.cc deleted file mode 100644 index 00266e0cf7..0000000000 --- a/lily/axis-group-spanner.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* - axis-group-spanner.cc -- implement Axis_group_spanner - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ - -#include "axis-group-spanner.hh" -#include "axis-group-interface.hh" - -Axis_group_spanner::Axis_group_spanner() -{ - axis_group (this).set_interface (); -} diff --git a/lily/base-span-bar-engraver.cc b/lily/base-span-bar-engraver.cc index d233d514ca..78df27dc2e 100644 --- a/lily/base-span-bar-engraver.cc +++ b/lily/base-span-bar-engraver.cc @@ -10,7 +10,6 @@ #include "lily-guile.hh" #include "span-bar.hh" #include "base-span-bar-engraver.hh" -#include "axis-align-spanner.hh" Base_span_bar_engraver::Base_span_bar_engraver() { diff --git a/lily/beam.cc b/lily/beam.cc index d641c8912c..23a62f4a5c 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -350,19 +350,19 @@ Beam::calc_position_and_height (Real* y, Real* dy) const } Array ideals; - Real x0 = first_visible_stem ()->hpos_f (); + Real x0 = first_visible_stem ()->relative_coordinate (0, X_AXIS); for (int i=0; i < stem_count (); i++) { Stem* s = stem (i); if (s->invisible_b ()) continue; - ideals.push (Offset (s->hpos_f () - x0, + ideals.push (Offset (s->relative_coordinate (0, X_AXIS) - x0, s->calc_stem_info ().idealy_f_)); } Real dydx; minimise_least_squares (&dydx, y, ideals); // duh, takes references - Real dx = last_visible_stem ()->hpos_f () - x0; + Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0; *dy = dydx * dx; } @@ -378,7 +378,7 @@ Beam::suspect_slope_b (Real y, Real dy) const Real lengthened = paper_l ()->get_var ("beam_lengthened"); Real steep = paper_l ()->get_var ("beam_steep_slope"); - Real dx = last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f (); + Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - first_visible_stem ()->relative_coordinate (0, X_AXIS); Real dydx = dy && dx ? dy/dx : 0; if (((y - first_ideal > lengthened) && (dydx > steep)) @@ -404,8 +404,8 @@ Beam::calc_slope_damping_f (Real dy) const if (damping) { - Real dx = last_visible_stem ()->hpos_f () - - first_visible_stem ()->hpos_f (); + Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) + - first_visible_stem ()->relative_coordinate (0, X_AXIS); Real dydx = dy && dx ? dy/dx : 0; dydx = 0.6 * tanh (dydx) / damping; return dydx * dx; @@ -421,9 +421,9 @@ Beam::calc_stem_y_f (Stem* s, Real y, Real dy) const int stem_multiplicity = (s->flag_i () - 2) >? 0; Real interbeam_f = paper_l ()->interbeam_f (beam_multiplicity); - Real x0 = first_visible_stem ()->hpos_f (); - Real dx = last_visible_stem ()->hpos_f () - x0; - Real stem_y = (dy && dx ? (s->hpos_f () - x0) / dx * dy : 0) + y; + Real x0 = first_visible_stem ()->relative_coordinate (0, X_AXIS); + Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0; + Real stem_y = (dy && dx ? (s->relative_coordinate (0, X_AXIS) - x0) / dx * dy : 0) + y; /* knee */ Direction dir = directional_element(this).get (); @@ -590,8 +590,8 @@ Beam::set_beaming (Beaming_info_list *beaming) Molecule Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const { - if ((next && !(next->hpos_f () > here->hpos_f ())) || - (prev && !(prev->hpos_f () < here->hpos_f ()))) + if ((next && !(next->relative_coordinate (0, X_AXIS) > here->relative_coordinate (0, X_AXIS))) || + (prev && !(prev->relative_coordinate (0, X_AXIS) < here->relative_coordinate (0, X_AXIS)))) programming_error ("Beams are not left-to-right"); Real staffline_f = paper_l ()->get_var ("stafflinethickness"); @@ -605,9 +605,9 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const Real stemdx = staffline_f; Real dx = visible_stem_count () ? - last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f () + last_visible_stem ()->relative_coordinate (0, X_AXIS) - first_visible_stem ()->relative_coordinate (0, X_AXIS) : 0.0; - Real dy = get_real ("height"); + Real dy = gh_scm2double (get_elt_property ("height")); Real dydx = dy && dx ? dy/dx : 0; Molecule leftbeams; @@ -636,7 +636,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const Half beam should be one note-width, but let's make sure two half-beams never touch */ - Real w = here->hpos_f () - prev->hpos_f (); + Real w = here->relative_coordinate (0, X_AXIS) - prev->relative_coordinate (0, X_AXIS); w = w/2 beam_count (RIGHT) - next->beam_count (LEFT); int rwholebeams= here->beam_count (RIGHT) beam_count (LEFT) ; - Real w = next->hpos_f () - here->hpos_f (); + Real w = next->relative_coordinate (0, X_AXIS) - here->relative_coordinate (0, X_AXIS); Molecule a = lookup_l ()->beam (dydx, w + stemdx, thick); a.translate_axis( - stemdx/2, X_AXIS); int j = 0; @@ -717,19 +717,19 @@ Beam::do_brew_molecule () const Real x0,dx; if (visible_stem_count ()) { - x0 = first_visible_stem ()->hpos_f (); - dx = last_visible_stem ()->hpos_f () - x0; + x0 = first_visible_stem ()->relative_coordinate (0, X_AXIS); + dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0; } else { - x0 = stem (0)->hpos_f (); - dx = stem_top ()->hpos_f () - x0; + x0 = stem (0)->relative_coordinate (0, X_AXIS); + dx = stem_top ()->relative_coordinate (0, X_AXIS) - x0; } - Real dy = get_real ("height"); + Real dy = gh_scm2double (get_elt_property ("height")); Real dydx = dy && dx ? dy/dx : 0; - Real y = get_real ("y-position"); + Real y = gh_scm2double (get_elt_property ("y-position")); for (int j=0; j hpos_f ()-x0; + Real x = i->relative_coordinate (0, X_AXIS)-x0; sb.translate (Offset (x, x * dydx + y)); mol.add_molecule (sb); } diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 82f6dd904d..ec8495d9ba 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -9,7 +9,7 @@ #include "engraver.hh" #include "protected-scm.hh" #include "break-align-item.hh" -#include "axis-group-item.hh" +#include "align-interface.hh" #include "axis-group-interface.hh" class Break_align_engraver : public Engraver @@ -34,7 +34,7 @@ void Break_align_engraver::add_column (SCM smob) { Score_element * e = unsmob_element (smob); - align_l_->add_element (e); + Align_interface (align_l_).add_element (e); typeset_element (e); } @@ -103,21 +103,25 @@ Break_align_engraver::acknowledge_element (Score_element_info inf) SCM name = ly_str02scm (inf.elem_l_->name()); SCM s = scm_assoc (name, column_alist_); - Axis_group_item * group = 0; + Item * group = 0; + if (s != SCM_BOOL_F) { Score_element *e = unsmob_element (gh_cdr(s)); - group = dynamic_cast (e); + group = dynamic_cast (e); } else { - group = new Axis_group_item; - axis_group(group).set_axes (X_AXIS,X_AXIS); + group = new Item; + + Axis_group_interface (group).set_interface (); + Axis_group_interface (group).set_axes (X_AXIS,X_AXIS); + group->set_elt_property ("origin", name); group->set_parent (align_l_, Y_AXIS); announce_element (Score_element_info (group, 0)); column_alist_ = scm_assoc_set_x (column_alist_, name, group->self_scm_); } - axis_group (group).add_element (item_l); + Axis_group_interface (group).add_element (item_l); } } diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index c0c2ac4807..ebaf7f3aee 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -17,12 +17,7 @@ #include "paper-def.hh" #include "paper-column.hh" #include "group-interface.hh" - -/* - Handle spacing for prefatory matter. - - TODO: rewrite this. It is kludgy -*/ +#include "align-interface.hh" void Break_align_item::before_line_breaking () @@ -40,7 +35,7 @@ Break_align_item::before_line_breaking () for (int i=0; i < all_elems.size(); i++) { - Interval y = all_elems[i]->extent(axis ()); + Interval y = all_elems[i]->extent(X_AXIS); if (!y.empty_b()) elems.push (dynamic_cast (all_elems[i])); } @@ -105,10 +100,12 @@ Break_align_item::before_line_breaking () scm_set_car_x (first_pair, gh_double2scm (-dists[0])); elems[0]->set_elt_property ("minimum-space", first_pair); - - Axis_align_item::before_line_breaking (); + /* + Force callbacks for alignment to be called + */ + Real unused = elems[0]->relative_coordinate (this, X_AXIS); Real pre_space = elems[0]->relative_coordinate (column_l (), X_AXIS); Real xl = elems[0]->extent (X_AXIS)[LEFT]; @@ -156,7 +153,9 @@ Break_align_item::before_line_breaking () Break_align_item::Break_align_item () { set_elt_property ("stacking-dir" , gh_int2scm (RIGHT)); - set_axis (X_AXIS); + + Align_interface (this).set_interface (); + Align_interface (this).set_axis (X_AXIS); add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS); } diff --git a/lily/collision.cc b/lily/collision.cc index f423d2a4a2..c25f45d05c 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -15,13 +15,14 @@ Collision::Collision() { - axis_group (this).set_axes (X_AXIS, Y_AXIS); + Axis_group_interface (this).set_interface (); + Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS); } void Collision::add_column (Note_column* ncol_l) { - axis_group (this).add_element (ncol_l); + Axis_group_interface (this).add_element (ncol_l); add_dependency (ncol_l); } diff --git a/lily/cross-staff.cc b/lily/cross-staff.cc index c7855b5836..e187466121 100644 --- a/lily/cross-staff.cc +++ b/lily/cross-staff.cc @@ -1,6 +1,6 @@ #include "cross-staff.hh" #include "item.hh" -#include "align-element.hh" +#include "align-interface.hh" #include "spanner.hh" #include "warn.hh" @@ -9,10 +9,11 @@ calc_interstaff_dist (Item const *item, Spanner const *span) { Real interstaff = 0.0; Score_element *common = item->common_refpoint (span, Y_AXIS); - Align_element * align = dynamic_cast (common); - if (align && align->axis() == Y_AXIS) + Align_interface align(common); + + if (align.has_interface_b () && align.axis() == Y_AXIS) { - SCM threshold = align->get_elt_property ("threshold"); + SCM threshold = common->get_elt_property ("threshold"); if (!gh_pair_p (threshold) || !scm_equal_p (gh_car (threshold), gh_cdr (threshold))) warning (_ ("minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken")); @@ -30,9 +31,9 @@ calc_interstaff_dist (Item const *item, Spanner const *span) note_refpoint = note_refpoint->parent_l (Y_AXIS); int span_prio = - align->get_count ((Score_element*) dynamic_cast (span_refpoint)); + align.get_count ((Score_element*) dynamic_cast (span_refpoint)); int item_prio = - align->get_count ((Score_element*) dynamic_cast (note_refpoint)); + align.get_count ((Score_element*) dynamic_cast (note_refpoint)); /* our staff is lower -> interstaff *= -1 diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 29a5789a22..2dc724e9f6 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -16,6 +16,7 @@ #include "axis-group-interface.hh" +// todo: dots and elements duplicate each other. void Dot_column::add_dots (Dots *d) { @@ -23,7 +24,7 @@ Dot_column::add_dots (Dots *d) gi.add_element (d); add_dependency (d); - axis_group (this).add_element (d); + Axis_group_interface (this).add_element (d); } void @@ -51,9 +52,10 @@ Dot_column::Dot_column () { Group_interface gi (this, "dots"); gi.set_interface (); - directional_element (this).set (RIGHT); - axis_group (this).set_axes(X_AXIS,X_AXIS); + + Axis_group_interface (this).set_interface (); + Axis_group_interface (this).set_axes(X_AXIS,X_AXIS); } /* diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 4f6f3c9cfb..8309597e50 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -32,8 +32,6 @@ * direction of text-dynamic-request if not equalt to direction of line-spanner - - * FIXME: this has gotten a bit too hairy. */ class Dynamic_line_spanner : public Spanner @@ -49,8 +47,8 @@ Dynamic_line_spanner::Dynamic_line_spanner () { set_elt_property ("transparent", SCM_BOOL_T); side_position (this).set_axis (Y_AXIS); - axis_group (this).set_interface (); - axis_group (this).set_axes (X_AXIS, Y_AXIS); + Axis_group_interface (this).set_interface (); + Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS); } void @@ -69,7 +67,7 @@ void Dynamic_line_spanner::add_element (Score_element* e) { e->set_parent (this, Y_AXIS); - axis_group (this).add_element (e); + Axis_group_interface (this).add_element (e); } /** @@ -89,7 +87,7 @@ class Dynamic_engraver : public Engraver Dynamic_line_spanner* finished_line_spanner_; Moment last_request_mom_; - Array pending_column_arr_; + Note_column* pending_column_; Link_array pending_element_arr_; void typeset_all (); @@ -128,6 +126,7 @@ Dynamic_engraver::Dynamic_engraver () finished_line_spanner_ = 0; span_start_req_l_ = 0; cresc_p_ =0; + pending_column_ = 0; text_req_l_ = 0; span_req_l_drul_[START] = 0; @@ -140,6 +139,12 @@ Dynamic_engraver::do_post_move_processing () text_req_l_ = 0; span_req_l_drul_[START] = 0; span_req_l_drul_[STOP] = 0; + + /* ugr; we must attach the Dynamic_line_spanner to something + to be sure that the linebreaker will not be confused + */ + // if (line_spanner_) + // line_spanner_->add_column (LEFT, get_staff_info ().command_pcol_l ()); } bool @@ -173,9 +178,8 @@ Dynamic_engraver::do_process_music () && pending_element_arr_.size ()) { line_spanner_ = new Dynamic_line_spanner; - for (int i = 0; i < pending_column_arr_.size (); i++) - line_spanner_->add_column (pending_column_arr_[i]); - pending_column_arr_.clear (); + assert (pending_column_); + line_spanner_->add_column (pending_column_); announce_element (Score_element_info (line_spanner_, text_req_l_ ? text_req_l_ : span_req_l_drul_[START])); @@ -190,21 +194,12 @@ Dynamic_engraver::do_process_music () } if (span_req_l_drul_[START] || span_req_l_drul_[STOP] || text_req_l_) - { - last_request_mom_ = now_mom (); - } - /* - TODO: This should be optionised: - * break when group of dynamic requests ends - * break now (only if no cresc. in progress) - * continue through piece */ + last_request_mom_ = now_mom (); else { - /* - During a (de)crescendo, pending request will not be cleared, - and a line-spanner will always be created, as \< \! are already - two requests. +#if 0 + /* Maybe always creating a line-spanner for a (de)crescendo (see below) is not a good idea: @@ -217,7 +212,15 @@ Dynamic_engraver::do_process_music () Urg, but line-spanner must always have at least same duration as (de)crecsendo, b.o. line-breaking. */ + if (now_mom () > last_request_mom_) +#else + /* + During a (de)crescendo, pending request will not be cleared, + and a line-spanner will always be created, as \< \! are already + two requests. + */ if (now_mom () > last_request_mom_ && !span_start_req_l_) +#endif { for (int i = 0; i < pending_element_arr_.size (); i++) { @@ -247,14 +250,8 @@ Dynamic_engraver::do_process_music () e->set_elt_property ("minimum-space", s); } pending_element_arr_.clear (); - if (line_spanner_) - { - for (int i = 0; i < pending_column_arr_.size (); i++) - line_spanner_->add_column (pending_column_arr_[i]); - pending_column_arr_.clear (); - finished_line_spanner_ = line_spanner_; - line_spanner_ = 0; - } + finished_line_spanner_ = line_spanner_; + line_spanner_ = 0; } } @@ -287,7 +284,7 @@ Dynamic_engraver::do_process_music () else { assert (!finished_cresc_p_); - cresc_p_->set_bound (RIGHT, get_staff_info ().musical_pcol_l ()); + cresc_p_->set_bound(RIGHT, get_staff_info ().musical_pcol_l ()); finished_cresc_p_ = cresc_p_; cresc_p_ = 0; span_start_req_l_ = 0; @@ -329,7 +326,7 @@ Dynamic_engraver::do_process_music () + "Spanner", SCM_UNDEFINED); } - cresc_p_->set_bound (LEFT, get_staff_info ().musical_pcol_l ()); + cresc_p_->set_bound(LEFT, get_staff_info ().musical_pcol_l ()); /* @@ -403,6 +400,13 @@ Dynamic_engraver::typeset_all () typeset_element (text_p_); text_p_ = 0; } + + /* + TODO: This should be optionised: + * break when group of dynamic requests ends + * break now + * continue through piece */ + // if (line_spanner_ && last_request_mom_ < now_mom ()) if (finished_line_spanner_) { side_position (finished_line_spanner_).add_staff_support (); @@ -423,7 +427,7 @@ Dynamic_engraver::acknowledge_element (Score_element_info i) } else { - pending_column_arr_.push (n); + pending_column_ = n; } } } diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index c9614b89de..7fbca0dd69 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -71,49 +71,10 @@ Dynamic_performer::do_process_music () (ly_symbol2scm ("dynamic-absolute-volume"), ly_quote_scm (ly_str02scm (text_script_req_l_->text_str_.ch_C ())), SCM_UNDEFINED)); - Real volume = gh_scm2double (ly_eval_str ("dynamic-default-volume")); + int volume = gh_scm2int (ly_eval_str ("dynamic-default-volume")); if (gh_number_p (s)) - volume = gh_scm2double (s); - - /* - urg, code duplication:: staff_performer - */ - s = get_property ("midiInstrument"); - - if (!gh_string_p(s)) - s = get_property ("instrument"); - - if (!gh_string_p(s)) - s = ly_str02scm ("piano"); + volume = gh_scm2int (s); - - /* - properties override default equaliser setting - */ - SCM min = get_property ("midiMinimumVolume"); - SCM max = get_property ("midiMaximumVolume"); - if (gh_number_p (min) || gh_number_p (max)) - { - Interval iv (0, 1); - if (gh_number_p (min)) - iv[MIN] = gh_scm2double (min); - if (gh_number_p (max)) - iv[MAX] = gh_scm2double (max); - volume = iv[MIN] + iv.length () * volume; - } - else - { - s = scm_eval (gh_list (ly_symbol2scm ("instrument-equaliser"), - s, SCM_UNDEFINED)); - if (gh_pair_p (s)) - { - Interval iv; - iv[MIN] = gh_scm2double (gh_car (s)); - iv[MAX] = gh_scm2double (gh_cdr (s)); - volume = iv[MIN] + iv.length () * volume; - } - } - audio_p_ = new Audio_dynamic (volume); Audio_element_info info (audio_p_, text_script_req_l_); announce_element (info); diff --git a/lily/grace-align-item.cc b/lily/grace-align-item.cc index 0ddf8481b7..0745e3fe64 100644 --- a/lily/grace-align-item.cc +++ b/lily/grace-align-item.cc @@ -8,6 +8,7 @@ */ #include "grace-align-item.hh" +#include "align-interface.hh" #include "lookup.hh" #include "paper-column.hh" #include "paper-def.hh" @@ -15,7 +16,8 @@ Grace_align_item::Grace_align_item () { set_elt_property ("stacking-dir", gh_int2scm (RIGHT)); - set_axis (X_AXIS); + Align_interface (this).set_interface(); + Align_interface (this).set_axis (X_AXIS); } void @@ -28,10 +30,6 @@ Grace_align_item::before_line_breaking () gh_cons (gh_double2scm (nhw* 1.5), gh_double2scm (infinity_f))); column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T); - - - Axis_align_item::before_line_breaking (); - // translate_axis (-0.5* nhw, X_AXIS); // ugh. } diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc index 735ba6b69a..3805612e1c 100644 --- a/lily/grace-position-engraver.cc +++ b/lily/grace-position-engraver.cc @@ -93,7 +93,7 @@ Grace_position_engraver::do_pre_move_processing () warning (_("Unattached grace notes. Attaching to last musical column.")); align_l_->set_parent (0, X_AXIS); - axis_group(last_musical_col_l_).add_element (align_l_); + Axis_group_interface (last_musical_col_l_).add_element (align_l_); } last_musical_col_l_ = get_staff_info ().musical_pcol_l (); diff --git a/lily/graphical-lisp-element.cc b/lily/graphical-lisp-element.cc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/hara-kiri-engraver.cc b/lily/hara-kiri-engraver.cc index a0a2e0cf50..1d2e281c21 100644 --- a/lily/hara-kiri-engraver.cc +++ b/lily/hara-kiri-engraver.cc @@ -10,7 +10,7 @@ #include "hara-kiri-engraver.hh" #include "rhythmic-head.hh" -Axis_group_spanner* +Spanner* Hara_kiri_engraver::get_spanner_p () const { return new Hara_kiri_group_spanner; diff --git a/lily/hara-kiri-vertical-group-spanner.cc b/lily/hara-kiri-vertical-group-spanner.cc index ba10c73d46..9f09ea2d90 100644 --- a/lily/hara-kiri-vertical-group-spanner.cc +++ b/lily/hara-kiri-vertical-group-spanner.cc @@ -16,7 +16,6 @@ Hara_kiri_group_spanner::Hara_kiri_group_spanner() { set_elt_property ("items-worth-living", SCM_EOL); - axis_group (this).set_axes(Y_AXIS,Y_AXIS); } void @@ -35,7 +34,7 @@ Hara_kiri_group_spanner::after_line_breaking () if (gh_pair_p (worth)) return; - Link_array childs = axis_group (this).get_children (); + Link_array childs = Axis_group_interface (this).get_children (); for (int i = 0; i < childs.size (); i++) { Score_element* s = childs[i]; diff --git a/lily/include/align-element.hh b/lily/include/align-interface.hh similarity index 50% rename from lily/include/align-element.hh rename to lily/include/align-interface.hh index 19a4e9dcc9..0809620234 100644 --- a/lily/include/align-element.hh +++ b/lily/include/align-interface.hh @@ -1,18 +1,22 @@ /* - align-item.hh -- declare Align_elem - + align-interface.hh -- declare Align_interface + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_ALIGN_ITEM_HH -#define VERTICAL_ALIGN_ITEM_HH +#ifndef ALIGN_INTERFACE_HH +#define ALIGN_INTERFACE_HH -#include "score-element.hh" +#include "axes.hh" +#include "lily-proto.hh" -/** +/* + TODO: rewrite this comment. + + Order elements top to bottom/left to right/right to left etc.. TODO: implement padding. @@ -29,20 +33,20 @@ Which side to align? -1: left side, 0: centered (around center_l_ if not nil, or around center of width), 1: right side - - -*/ -class Align_element : public virtual Score_element { -public: - Axis axis () const; - - Align_element (); + */ +struct Align_interface { + Score_element * elt_l_; + + Align_interface (Score_element const*); + static Real alignment_callback (Dimension_cache const *); + void do_side_processing (Axis a); void set_axis (Axis); + Axis axis () const; + void add_element (Score_element*); int get_count (Score_element*)const; - void add_element (Score_element *); - static Real alignment_callback (Dimension_cache const *); -protected: - virtual void do_side_processing (Axis); - + void set_interface (); + bool has_interface_b (); }; -#endif // VERTICAL_ALIGN_ITEM_HH + +#endif /* ALIGN_INTERFACE_HH */ + diff --git a/lily/include/atom.hh b/lily/include/atom.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index 9b59283804..fd465f9f4c 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -40,9 +40,9 @@ private: class Audio_dynamic : public Audio_item { public: - Audio_dynamic (Real volume); + Audio_dynamic (int volume); - Real volume_; + int volume_i_; }; class Audio_key : public Audio_item diff --git a/lily/include/axis-align-item.hh b/lily/include/axis-align-item.hh deleted file mode 100644 index 7a7d4022ec..0000000000 --- a/lily/include/axis-align-item.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - axis-align-item.hh -- declare Axis_align_item - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ - -#ifndef AXIS_ALIGN_ITEM_HH -#define AXIS_ALIGN_ITEM_HH - -#include "align-element.hh" -#include "axis-group-item.hh" - -/* - UGH. FIXME: multiple inheritance. - */ -class Axis_align_item : public virtual Align_element, public virtual Axis_group_item -{ -public: - Axis_align_item (); -protected: - virtual void do_print ()const; - -}; -#endif /* AXIS_ALIGN_ITEM_HH */ - diff --git a/lily/include/axis-align-spanner.hh b/lily/include/axis-align-spanner.hh deleted file mode 100644 index 0352968aee..0000000000 --- a/lily/include/axis-align-spanner.hh +++ /dev/null @@ -1,27 +0,0 @@ -/* - vertical-align-spanner.hh -- declare Vertical_align_spanner - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_ALIGN_SPANNER_HH -#define VERTICAL_ALIGN_SPANNER_HH - -#include "spanner.hh" -#include "align-element.hh" -#include "axis-group-spanner.hh" - -/* - FIXME: multiple inheritance - */ -class Axis_align_spanner : public virtual Align_element, public virtual Axis_group_spanner -{ -public: - VIRTUAL_COPY_CONS(Score_element); - Axis_align_spanner (); - virtual void do_print() const {} -}; -#endif // VERTICAL_ALIGN_SPANNER_HH diff --git a/lily/include/axis-group-engraver.hh b/lily/include/axis-group-engraver.hh index f2f99b0411..f790997d85 100644 --- a/lily/include/axis-group-engraver.hh +++ b/lily/include/axis-group-engraver.hh @@ -19,14 +19,14 @@ class Axis_group_engraver : public Engraver { protected: - Axis_group_spanner *staffline_p_; + Spanner *staffline_p_; Link_array elts_; virtual void do_creation_processing(); virtual void do_removal_processing(); virtual void acknowledge_element (Score_element_info); virtual void process_acknowledged (); - virtual Axis_group_spanner* get_spanner_p () const; + virtual Spanner* get_spanner_p () const; public: VIRTUAL_COPY_CONS(Translator); diff --git a/lily/include/axis-group-interface.hh b/lily/include/axis-group-interface.hh index 9ceee2fcb1..f1382da9be 100644 --- a/lily/include/axis-group-interface.hh +++ b/lily/include/axis-group-interface.hh @@ -12,10 +12,27 @@ #include "group-interface.hh" -struct Axis_group_interface : Group_interface +/** + Treat a group of elements as a union. This sets the parent of any S + added to ELT_L_ to ELT_L_. + + Properties: + + axes -- list of axis (number) in which this group works + + transparent -- an Axis_group is transparent by default + + elements -- contains list of pointers to other elements + + interfaces -- Axis_group is added to this list. +*/ +struct Axis_group_interface { + Score_element *elt_l_; Axis_group_interface (Score_element*); + static Interval group_extent_callback (Dimension_cache const*); + void add_element (Score_element*); void set_axes (Axis,Axis); bool axis_b (Axis)const; @@ -24,8 +41,5 @@ struct Axis_group_interface : Group_interface void set_interface (); }; -Axis_group_interface -axis_group (Score_element*); - #endif /* AXIS_GROUP_INTERFACE_HH */ diff --git a/lily/include/axis-group-item.hh b/lily/include/axis-group-item.hh index aa2e6392bc..09c7cfafd0 100644 --- a/lily/include/axis-group-item.hh +++ b/lily/include/axis-group-item.hh @@ -1,22 +1 @@ -/* - axis-item.hh -- declare Axis_group_item - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef AXIS_ITEM_HH -#define AXIS_ITEM_HH - -#include "item.hh" - -class Axis_group_item : public virtual Item -{ -public: - Axis_group_item (); - VIRTUAL_COPY_CONS(Score_element); -}; - -#endif // AXIS_ITEM_HH +#error diff --git a/lily/include/axis-group-spanner.hh b/lily/include/axis-group-spanner.hh index 9d48108c2e..65296f8106 100644 --- a/lily/include/axis-group-spanner.hh +++ b/lily/include/axis-group-spanner.hh @@ -1,27 +1,2 @@ -/* - axis-group-spanner.hh -- declare Axis_group_spanner - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef AXIS_GROUP_SPANNER_HH -#define AXIS_GROUP_SPANNER_HH - -#include "spanner.hh" - -/** - An element which groups a line in a certain direction. The most - useful example of this is the Vertical_group_spanner -*/ -class Axis_group_spanner : public virtual Spanner - -{ -public: - Axis_group_spanner (); - VIRTUAL_COPY_CONS(Score_element); -}; - -#endif // SPAN_AXIS_GROUP_HH +#error diff --git a/lily/include/break-align-item.hh b/lily/include/break-align-item.hh index 791e104f00..c9a5aa1632 100644 --- a/lily/include/break-align-item.hh +++ b/lily/include/break-align-item.hh @@ -10,12 +10,11 @@ #ifndef BREAK_ALIGN_ITEM_HH #define BREAK_ALIGN_ITEM_HH -#include "axis-align-item.hh" +#include "item.hh" /// align breakable items (clef, bar, etc.) -class Break_align_item : public Axis_align_item { - - +class Break_align_item : public Item +{ protected: virtual void before_line_breaking (); public: diff --git a/lily/include/collision.hh b/lily/include/collision.hh index f64db66504..64052db5e0 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -10,7 +10,7 @@ #ifndef COLLISION_HH #define COLLISION_HH #include "lily-proto.hh" -#include "axis-group-item.hh" +#include "item.hh" #include "tuple.hh" //junkme, use SCM conses. @@ -24,7 +24,8 @@ typedef Tuple Shift_tup; multistaff support (see Chlapik: equal noteheads should be on the same hpos.) */ -class Collision : public Axis_group_item { +class Collision : public Item +{ protected: Array automatic_shift (); Array forced_shift (); diff --git a/lily/include/context-specced-music.hh b/lily/include/context-specced-music.hh index 56206a3bdf..abcf2c40f3 100644 --- a/lily/include/context-specced-music.hh +++ b/lily/include/context-specced-music.hh @@ -15,11 +15,7 @@ class Context_specced_music : public Music_wrapper { public: - /** The kind of translation needed for this music. This doesn't - make sense for simple (ie non-list) music, but it does no harm - here. Yes, it did harm Music_sequence: you can forget to copy it. - - */ + /// The kind of translation needed for this music. String translator_type_str_; /// what identification for the translation unit diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 9679bf32a4..4c3a211557 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -10,13 +10,13 @@ #ifndef DOT_COLUMN_HH #define DOT_COLUMN_HH -#include "axis-group-item.hh" +#include "item.hh" /** Group dots. This is needed because, the dots have to be aligned per voice */ -class Dot_column : public Axis_group_item +class Dot_column : public Item { static int compare (Dots * const&,Dots * const&); void add_dots (Dots*); diff --git a/lily/include/dummy.icc b/lily/include/dummy.icc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/grace-align-item.hh b/lily/include/grace-align-item.hh index f3bb2af3c4..ed16719bca 100644 --- a/lily/include/grace-align-item.hh +++ b/lily/include/grace-align-item.hh @@ -11,9 +11,9 @@ #define GRACE_ALIGN_ITEM_HH -#include "axis-align-item.hh" +#include "item.hh" -class Grace_align_item : public Axis_align_item +class Grace_align_item : public Item { public: VIRTUAL_COPY_CONS (Score_element); diff --git a/lily/include/group-interface.hh b/lily/include/group-interface.hh index 509fcdf25b..72bc892258 100644 --- a/lily/include/group-interface.hh +++ b/lily/include/group-interface.hh @@ -15,15 +15,14 @@ #include "lily-guile.hh" #include "smobs.hh" -/* - rename to list interface? - */ - /** Look at Score element ELT as thing which has a list property called NAME_. Normally the list would contain Score_elements, but sometimes it can be different things. + + todo: reename as list_interface? */ + struct Group_interface { Score_element * elt_l_; diff --git a/lily/include/hara-kiri-engraver.hh b/lily/include/hara-kiri-engraver.hh index 82992a29a8..93eeb8feb7 100644 --- a/lily/include/hara-kiri-engraver.hh +++ b/lily/include/hara-kiri-engraver.hh @@ -15,7 +15,7 @@ class Hara_kiri_engraver : public Axis_group_engraver { protected: - virtual Axis_group_spanner*get_spanner_p ()const; + virtual Spanner*get_spanner_p ()const; virtual void acknowledge_element (Score_element_info); public: VIRTUAL_COPY_CONS(Translator); diff --git a/lily/include/hara-kiri-vertical-group-spanner.hh b/lily/include/hara-kiri-vertical-group-spanner.hh index e3e34c2a00..aeb77bf9b8 100644 --- a/lily/include/hara-kiri-vertical-group-spanner.hh +++ b/lily/include/hara-kiri-vertical-group-spanner.hh @@ -10,14 +10,14 @@ #ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH #define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH -#include "axis-group-spanner.hh" +#include "spanner.hh" /** As Vertical_group_spanner, but keep track of interesting items. If we don't contain any interesting items after linebreaking, then gracefully commit suicide. Objective: don't disgrace Lily by typesetting empty lines in orchestral scores. */ -class Hara_kiri_group_spanner : public Axis_group_spanner +class Hara_kiri_group_spanner : public Spanner { public: Hara_kiri_group_spanner (); diff --git a/lily/include/head-column.hh b/lily/include/head-column.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/item.hh b/lily/include/item.hh index c4b3dfbad3..0f2c951ca4 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -24,31 +24,27 @@ NB. This doesn't mean an Item has to initialize the output field before spacing calculation. - - @signature - visibility_lambda :: int -> (bool . bool) - - @in - break direction - - @out - (transparent, empty) cons - - */ -class Item : public virtual Score_element { - void do_break (); - void try_visibility_lambda (); -public: - /* - ugh. + Element properties + + visibility-lambda -- a function that takes the break + direction and returns a (transparent, empty) cons + + breakable -- boolean indicating if this is a breakable item (clef, + barline, key sig, etc.) + */ +class Item : public Score_element +{ Drul_array broken_to_drul_; - + void do_break (); + void try_visibility_lambda (); public: + VIRTUAL_COPY_CONS(Score_element); + Item(); + Item (Item const &); - /// I am really to be broken? bool breakable_b () const; bool broken_b () const; @@ -57,18 +53,10 @@ public: Item * find_broken_piece (Direction) const; Score_element * find_broken_piece (Line_of_score*) const; - Item(); - Real hpos_f() const; - virtual Line_of_score * line_l() const; virtual Paper_column * column_l () const; - - static int left_right_compare (Item const *, Item const*); - - Item (Item const &); protected: virtual void do_breakable_col_processing(); - void copy_breakable_items(); }; diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 8309d245a9..1b85d39f98 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -34,10 +34,6 @@ struct Audio_tie; struct Audio_time_signature; struct Auto_beam_engraver; struct Axis_align_item; -struct Axis_group; -struct Axis_group_element; -struct Axis_group_item; -struct Axis_group_spanner; struct Bar; struct Bar_column; struct Bar_column_engraver; @@ -273,7 +269,6 @@ struct Tremolo_req; struct Tuplet_spanner; struct Unfolded_repeat_iterator; struct Vertical_brace; -struct Vertical_spanner; struct Volta_spanner; struct Moment; diff --git a/lily/include/line-group-group-engraver.hh b/lily/include/line-group-group-engraver.hh index 72a10c72a5..b5db361da4 100644 --- a/lily/include/line-group-group-engraver.hh +++ b/lily/include/line-group-group-engraver.hh @@ -20,7 +20,7 @@ */ class Line_group_engraver_group : public Engraver_group_engraver { protected: - Axis_group_spanner *staffline_p_; + Spanner *staffline_p_; virtual void create_line_spanner (); virtual void do_creation_processing(); diff --git a/lily/include/line-of-score.hh b/lily/include/line-of-score.hh index 994a50b20d..a5a0174d19 100644 --- a/lily/include/line-of-score.hh +++ b/lily/include/line-of-score.hh @@ -8,13 +8,34 @@ #define SCORELINE_HH #include "column-x-positions.hh" -#include "axis-group-spanner.hh" -#include "super-element.hh" +#include "spanner.hh" /// the columns of a score that form one line. FIXME: multiple inheritance -class Line_of_score : public Axis_group_spanner, public Super_element +class Line_of_score : public Spanner { public: + + +/* + imported the following from Super_element + + The toplevel element. The Paper_score contains this element, and any + element shoud be a dependency for the super element. + + It is the entry point for the "constraint solver"/ dependency + tracker. Every XXXX_processing () call traverses the entire + dependency graph, and calls the appropriate + Score_element::do_XXX_processing function on each Score_element it encounters. + + + FIXME: remove this class, to eliminate multiple inheritance. Merge + with Line_of_score ? */ + void space_processing (); + void pre_processing(); + void breakable_col_processing(); + void post_processing(); + void output_all (); + int rank_i_; Line_of_score(); @@ -30,7 +51,6 @@ public: void add_column (Paper_column*); protected: - virtual void do_print() const; VIRTUAL_COPY_CONS(Score_element); }; diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index df0876b598..0d81e99399 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -11,15 +11,15 @@ #define NOTE_COLUMN_HH #include "item.hh" -#include "axis-group-item.hh" /** a struct for treating a group of noteheads (noteheads, stem - (chord) and scripts) as a single entity. */ -class Note_column : public Axis_group_item { + (chord) and scripts) as a single entity. +*/ +class Note_column : public Item +{ protected: virtual void after_line_breaking () ; public: - static int shift_compare (Note_column *const &, Note_column*const&); /** The relative position of the "voice" containing this diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index 16b0585057..e0510bc7f8 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -10,7 +10,7 @@ #ifndef P_COL_HH #define P_COL_HH -#include "axis-group-item.hh" +#include "item.hh" #include "rod.hh" #include "spring.hh" @@ -27,7 +27,8 @@ \end{itemize} */ -class Paper_column : public Axis_group_item { +class Paper_column : public Item +{ public: VIRTUAL_COPY_CONS(Score_element); Drul_array > minimal_dists_arr_drul_; diff --git a/lily/include/priority-halign-engraver.hh b/lily/include/priority-halign-engraver.hh index a3209d8b13..09c7cfafd0 100644 --- a/lily/include/priority-halign-engraver.hh +++ b/lily/include/priority-halign-engraver.hh @@ -1,25 +1 @@ -/* - score-halign-engraver.hh -- declare Score_horizontal_align_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef FSCORE_HALIGN_GRAV_HH -#define FSCORE_HALIGN_GRAV_HH - -#include "engraver.hh" - -class Priority_horizontal_align_engraver : public Engraver { - Break_align_item * halign_p_; -public: - VIRTUAL_COPY_CONS(Translator); - - Priority_horizontal_align_engraver(); -protected: - virtual void acknowledge_element (Score_element_info); - virtual void do_pre_move_processing(); -}; -#endif // Priority_HALIGN_GRAV_HH +#error diff --git a/lily/include/rest-column-engraver.hh b/lily/include/rest-column-engraver.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/rest-column.hh b/lily/include/rest-column.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index 9bcbd2e33c..8fde243cd8 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -17,24 +17,24 @@ typedef void (Score_element::*Score_element_method_pointer) (void); -/** Both Spanner and Item are Score_element's. Most Score_element's depend - on other Score_element's, eg, Beam needs to know and set direction of - Stem. So the Beam has to be calculated *before* Stem. This is - accomplished with the dependencies fields of struct Score_element, - which are implemented in the Directed_graph_node class: all elements - form an acyclic graph. +/** + Basic output object. - (elem) + Element Properties: + transparent -- boolean: if true, do not print anything black. -Element Properties: + dependencies -- list of score-element pointers that indicate who to + compute first. -Boolean (true iff defined) + interfaces -- list of symbols indicating the interfaces supported + by this object. - break_helper_only -- if defined try to junk this after calcing breakpoints. - - transparent -- do not calc. output + extra-offset -- pair of reals (a cons) forcing an extra offset + before outputting + glyph -- afm character name to output. + */ class Score_element { /** @@ -170,6 +170,8 @@ public: /** Set this if anyone points to me, or if I point to anyone. + + JUNKME. */ bool used_b_; diff --git a/lily/include/side-position-interface.hh b/lily/include/side-position-interface.hh index 12495db3af..839c088c2c 100644 --- a/lily/include/side-position-interface.hh +++ b/lily/include/side-position-interface.hh @@ -13,6 +13,27 @@ #include "spanner.hh" #include "item.hh" + +/** + Position victim object (ELT_L_) next to other objects (the support). + + side-support -- list of score elements + + direction -- where to put the victim object (left or right?) + + side-relative-direction -- if set: get the direction from a different object, and multiply by this. + + direction-source -- in case side-relative-direction is set, where + to get the direction + + minimum-space -- minimum distance that the victim should move + (after padding) + + padding -- add this much extra space between victim and support + + TODO: move out unrelated callbacks. + + */ struct Side_position_interface { Score_element * elt_l_; diff --git a/lily/include/span-bar.hh b/lily/include/span-bar.hh index bc93e8fe3d..93213fa0b2 100644 --- a/lily/include/span-bar.hh +++ b/lily/include/span-bar.hh @@ -29,7 +29,6 @@ public: VIRTUAL_COPY_CONS(Score_element); void add_bar (Score_element*); - void set_align (Align_element *); protected: void evaluate_empty (); diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 130604b863..b67d63d7dc 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -20,13 +20,10 @@ class Axis_group_spanner; Examples - \begin{itemize} - \item (de)crescendo - \item slur - \item beam - \item bracket - \end{itemize} - + * (de)crescendo + * slur + * beam + * bracket Spanner should know about the items which it should consider: e.g. slurs should be steep enough to "enclose" all those items. This @@ -34,7 +31,7 @@ class Axis_group_spanner; length of stems of notes they encompass. */ -class Spanner : public virtual Score_element { +class Spanner : public Score_element { Drul_array spanned_drul_; public: diff --git a/lily/include/super-element.hh b/lily/include/super-element.hh index 8c574bb683..3ae4480ba4 100644 --- a/lily/include/super-element.hh +++ b/lily/include/super-element.hh @@ -10,25 +10,7 @@ #ifndef Super_element_HH #define Super_element_HH +#error #include "score-element.hh" -/** The toplevel element. The Paper_score contains this element, and any - element shoud be a dependency for the super element. - - It is the entry point for the "constraint solver"/ dependency - tracker. Every XXXX_processing () call traverses the entire - dependency graph, and calls the appropriate - Score_element::do_XXX_processing function on each Score_element it encounters. - - - FIXME: remove this class, to eliminate multiple inheritance. Merge - with Line_of_score ? */ -class Super_element : public virtual Score_element { -public: - void space_processing (); - void pre_processing(); - void breakable_col_processing(); - void post_processing(); - void output_all (); -}; #endif // Super_element_HH diff --git a/lily/include/todo-performer.hh b/lily/include/todo-performer.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/vertical-align-engraver.hh b/lily/include/vertical-align-engraver.hh deleted file mode 100644 index 286395fceb..0000000000 --- a/lily/include/vertical-align-engraver.hh +++ /dev/null @@ -1,29 +0,0 @@ -/* - vertical-align-engraver.hh -- declare Vertical_align_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_ALIGN_GRAV_HH -#define VERTICAL_ALIGN_GRAV_HH - -#include "engraver.hh" -class Axis_align_spanner; -class Vertical_align_engraver : public Engraver { - Axis_align_spanner * valign_p_; - bool qualifies_b (Score_element_info) const; -public: - VIRTUAL_COPY_CONS(Translator); - - Vertical_align_engraver(); -protected: - - virtual void acknowledge_element (Score_element_info); - virtual void do_creation_processing(); - virtual void do_removal_processing(); -}; - -#endif // VERTICAL_ALIGN_GRAV_HH diff --git a/lily/item.cc b/lily/item.cc index d9abade41b..45cea7a7c4 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -19,6 +19,17 @@ Item::Item () broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0; } +/** + Item copy ctor. Copy nothing: everything should be a elt property + or a special purpose poitner (such as broken_to_drul_[]) */ +Item::Item (Item const &s) + : Score_element (s) +{ + broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0; +} + + + bool Item::breakable_b () const { @@ -29,12 +40,6 @@ Item::breakable_b () const return (i) ? i->breakable_b () : to_boolean (get_elt_property( "breakable")); } -Real -Item::hpos_f() const -{ - return relative_coordinate (0, X_AXIS); -} - Line_of_score * Item::line_l() const { @@ -163,12 +168,6 @@ Item::column_l () const return dynamic_cast (parent_l (X_AXIS))->column_l (); } -Item::Item (Item const &s) - : Score_element (s) -{ - broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0; -} - Direction Item::break_status_dir () const { diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index 99dc54a202..e08fae2289 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -7,7 +7,6 @@ */ #include "staff-symbol.hh" -#include "axis-group-spanner.hh" #include "command-request.hh" #include "bar.hh" #include "debug.hh" @@ -26,7 +25,7 @@ void Line_group_engraver_group::typeset_element (Score_element *elem) { if (!elem->parent_l (Y_AXIS)) - axis_group (staffline_p_).add_element (elem); + Axis_group_interface (staffline_p_).add_element (elem); Engraver_group_engraver::typeset_element (elem); } @@ -53,8 +52,9 @@ Line_group_engraver_group::do_creation_processing() void Line_group_engraver_group::create_line_spanner () { - staffline_p_ = new Axis_group_spanner ; - axis_group (staffline_p_).set_axes (Y_AXIS,Y_AXIS); + staffline_p_ = new Spanner ; + Axis_group_interface (staffline_p_).set_interface (); + Axis_group_interface (staffline_p_).set_axes (Y_AXIS,Y_AXIS); } diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index 478a07289d..89d6de0dd4 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -6,21 +6,23 @@ (c) 1996--2000 Han-Wen Nienhuys */ +#include "axis-group-interface.hh" +#include "debug.hh" #include "line-of-score.hh" +#include "main.hh" +#include "paper-column.hh" #include "paper-def.hh" #include "paper-outputter.hh" -#include "paper-column.hh" #include "paper-score.hh" +#include "string.hh" #include "warn.hh" -#include "main.hh" -#include "debug.hh" -#include "axis-group-interface.hh" Line_of_score::Line_of_score() { set_elt_property ("columns", SCM_EOL); - axis_group (this).set_axes (Y_AXIS,X_AXIS); + Axis_group_interface (this).set_interface (); + Axis_group_interface (this).set_axes (Y_AXIS,X_AXIS); } @@ -67,15 +69,9 @@ Line_of_score::add_column (Paper_column*p) { set_elt_property ("columns", gh_cons (p->self_scm_, get_elt_property ("columns"))); - axis_group (this).add_element (p); + Axis_group_interface (this).add_element (p); } -void -Line_of_score::do_print() const -{ - Spanner::do_print(); - Axis_group_spanner::do_print (); -} void Line_of_score::output_line (bool last_line) @@ -87,7 +83,7 @@ Line_of_score::output_line (bool last_line) translate_axis (- i[MAX], Y_AXIS); pscore_l_->outputter_l_->start_line (i.length ()); - Super_element::output_all (); + output_all (); if (last_line) pscore_l_->outputter_l_->stop_last_line(); else @@ -99,3 +95,67 @@ Line_of_score::compare (Line_of_score* const &p1,Line_of_score* const &p2) { return p1->rank_i_ - p2->rank_i_; } + + + +/** + for administration of what was done already + */ +enum Score_element_status { + ORPHAN=0, // not yet added to pstaff + VIRGIN, // added to pstaff + PREBROKEN, + PREBROKEN_SECOND, + PRECALCING, + PRECALCED, // calcs before spacing done + SPACING, + SPACED, + BROKEN, + BROKEN_SECOND, + POSTCALCING, // busy calculating. This is used to trap cyclic deps. + POSTCALCED, // after spacing calcs done + BREWING, + BREWED, +}; + +void +Line_of_score::pre_processing () +{ + calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking); +} + +void +Line_of_score::space_processing () +{ + calculate_dependencies (SPACED, SPACING, &Score_element::do_space_processing); +} + +/* for break processing, use only one status, because copies have to + have correct status. (Previously, + Score_element::handle_[pre]broken_dependencies assigned to status_i_ + */ +void +Line_of_score::breakable_col_processing () +{ + calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing); + // calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents); +} + + +void +Line_of_score::post_processing () +{ + // calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND, + // &Score_element::handle_broken_dependents); + calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking); +} + +void +Line_of_score::output_all () +{ + calculate_dependencies (BREWED, BREWING, &Score_element::output_processing); +} + + + + diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 730a8658fb..b822a6655e 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -476,11 +476,8 @@ Midi_dynamic::str () const 07 MSB 27 LSB */ - static Real const full_scale = 127; - str += to_str ((char)0x07); - int volume = (int)(audio_l_->volume_*full_scale); - str += to_str ((char)volume); + str += to_str ((char)audio_l_->volume_i_); return str; } diff --git a/lily/note-column.cc b/lily/note-column.cc index 3b9a26e89b..909629921c 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -42,7 +42,8 @@ Note_column::Note_column() { set_elt_property ("rests", SCM_EOL); set_elt_property ("note-heads", SCM_EOL); - axis_group (this).set_axes (X_AXIS, Y_AXIS); + Axis_group_interface (this).set_interface (); + Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS); } Stem * @@ -92,7 +93,7 @@ Note_column::set_stem (Stem * stem_l) set_elt_property ("stem", stem_l->self_scm_); add_dependency (stem_l); - axis_group (this).add_element (stem_l); + Axis_group_interface (this).add_element (stem_l); } @@ -110,7 +111,7 @@ Note_column::add_head (Rhythmic_head *h) Group_interface gi (this, "note-heads"); gi.add_element (nh); } - axis_group (this).add_element (h); + Axis_group_interface (this).add_element (h); } /** @@ -133,7 +134,7 @@ Note_column::translate_rests (int dy_i) void Note_column::set_dotcol (Dot_column *d) { - axis_group (this).add_element (d); + Axis_group_interface (this).add_element (d); } /* @@ -172,12 +173,12 @@ Note_column::after_line_breaking () beam_y = gh_scm2double (s); - Real x0 = b->first_visible_stem ()->hpos_f (); - Real dx = b->last_visible_stem ()->hpos_f () - x0; + Real x0 = b->first_visible_stem ()->relative_coordinate (0, X_AXIS); + Real dx = b->last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0; Real dydx = beam_dy && dx ? beam_dy/dx : 0; Direction d = stem_l ()->get_direction (); - Real beamy = (stem_l ()->hpos_f () - x0) * dydx + beam_y; + Real beamy = (stem_l ()->relative_coordinate (0, X_AXIS) - x0) * dydx + beam_y; s = get_elt_property ("rests"); Score_element * se = unsmob_element (gh_car (s)); diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 14f1340464..2f225d0718 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -109,25 +109,20 @@ Paper_column::line_l() const return line_l_; } - - - Paper_column* Paper_column::column_l () const { return (Paper_column*)(this); } - - - Paper_column::Paper_column (Moment w) { SCM when = (new Moment (w))->smobify_self (); scm_unprotect_object (when); set_elt_property ("when", when); - - axis_group (this).set_axes (X_AXIS, X_AXIS); + + Axis_group_interface (this).set_interface (); + Axis_group_interface (this).set_axes (X_AXIS, X_AXIS); line_l_=0; rank_i_ = -1; @@ -156,3 +151,4 @@ Paper_column::musical_b () const } return s != Moment(0); } + diff --git a/lily/score-element.cc b/lily/score-element.cc index a2d31ab4a5..4f1870886a 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -81,19 +81,6 @@ Score_element::~Score_element() delete dim_cache_[Y_AXIS]; } - -Real -Score_element::get_real (String s) const -{ - return gh_scm2double (get_elt_property (s)); -} - -void -Score_element::set_real (String s, Real r) -{ - set_elt_property (s, gh_double2scm (r)); -} - // should also have one that takes SCM arg. SCM Score_element::get_elt_property (String nm) const @@ -569,6 +556,10 @@ Score_element::fixup_refpoint () { Score_element * newparent = parent->find_broken_piece (line_l ()); set_parent (newparent, ax); + if (!newparent) + { + programming_error ("Orphaned score-element."); + } } if (Item * i = dynamic_cast (this)) diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 15d490bca6..bb6f642427 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -152,7 +152,7 @@ Score_engraver::typeset_all() } } if (!elem_p->parent_l(Y_AXIS)) - axis_group (scoreline_l_).add_element (elem_p); + Axis_group_interface (scoreline_l_).add_element (elem_p); } elem_p_arr_.clear(); } diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 7f556f0836..c76b0a09b8 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -233,7 +233,8 @@ Side_position_interface::set_axis (Axis a) if (elt_l_->get_elt_property ("side-support") == SCM_UNDEFINED) elt_l_->set_elt_property ("side-support" ,SCM_EOL); - elt_l_->add_offset_callback (aligned_side, a); + if (!elt_l_->has_offset_callback_b (aligned_side, a)) + elt_l_->add_offset_callback (aligned_side, a); } diff --git a/lily/slur.cc b/lily/slur.cc index b5ce992237..7a0f91f941 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -320,12 +320,12 @@ Slur::encompass_offset (Note_column const* col) const if (!stem_l) { warning (_ ("Slur over rest?")); - o[X_AXIS] = col->hpos_f (); + o[X_AXIS] = col->relative_coordinate (0, X_AXIS); o[Y_AXIS] = col->extent (Y_AXIS)[dir]; return o; } Direction stem_dir = directional_element (stem_l).get (); - o[X_AXIS] = stem_l->hpos_f (); + o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS); /* Simply set x to middle of notehead @@ -444,7 +444,7 @@ Slur::set_extremities () */ else { - dx_f_drul_[d] = stem_l->hpos_f () + dx_f_drul_[d] = stem_l->relative_coordinate (0, X_AXIS) - get_bound (d)->relative_coordinate (0, X_AXIS); /* side attached to beamed stem diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 7ed3c4a6c7..d16081928e 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -11,7 +11,6 @@ #include "dimensions.hh" #include "paper-def.hh" #include "molecule.hh" -#include "align-element.hh" #include "warn.hh" #include "group-interface.hh" diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 0b7771e1e0..b4807e3a9d 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -72,10 +72,10 @@ void Span_dynamic_performer::do_process_music () { if (finished_dynamic_tuple_arr_.size () > 1 - && finished_dynamic_tuple_arr_.top ().audio_l_->volume_) + && finished_dynamic_tuple_arr_.top ().audio_l_->volume_i_) { - Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_; - Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_ + Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_i_; + Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_i_ - start_volume; /* urg. @@ -90,11 +90,11 @@ Span_dynamic_performer::do_process_music () */ if (!dv || sign (dv) != finished_dir_) { - // urg. 10%: about one volume step - dv = (Real)finished_dir_ * 0.1; + // urg. about one volume step + dv = (int)finished_dir_ * 13; if (!start_volume) start_volume = finished_dynamic_tuple_arr_.top - ().audio_l_->volume_ - dv; + ().audio_l_->volume_i_ - dv; } Moment start_mom = finished_dynamic_tuple_arr_[0].mom_; Moment dt = finished_dynamic_tuple_arr_.top ().mom_ - start_mom; @@ -103,7 +103,7 @@ Span_dynamic_performer::do_process_music () Audio_dynamic_tuple* a = &finished_dynamic_tuple_arr_[i]; Real volume = start_volume + dv * (Real)(a->mom_ - start_mom) / (Real)dt; - a->audio_l_->volume_ = volume; + a->audio_l_->volume_i_ = (int)volume; } finished_dynamic_tuple_arr_.clear (); } diff --git a/lily/spanner.cc b/lily/spanner.cc index 6e32dccc66..222a391496 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -18,63 +18,21 @@ #include "line-of-score.hh" #include "break-align-item.hh" - void -Spanner::do_break_processing () +Spanner::do_break_processing() { //break_into_pieces - Item * left = spanned_drul_[LEFT]; - Item * right = spanned_drul_[RIGHT]; - - if (left == right) - { - warning (_f ("Spanner `%s' has equal left and right spanpoints", - classname (this))); - } - - /* - Check if our parent in X-direction spans equally wide - or wider than we do. - */ - for (int a = X_AXIS; a < NO_AXES; a ++) - { - if (Spanner* parent = dynamic_cast (parent_l ((Axis)a))) - { -#if 1 - /* - Urg, should use instantiate-compare, or maybe mysterious - column_width/contains functions? - */ - if (spanned_drul_[LEFT] && spanned_drul_[RIGHT] - && parent->spanned_drul_[LEFT] && parent->spanned_drul_[RIGHT]) - { - if (parent->spanned_drul_[LEFT]->column_l ()->rank_i () - > spanned_drul_[LEFT]->column_l ()->rank_i () > 0 - || parent->spanned_drul_[RIGHT]->column_l ()->rank_i () - < spanned_drul_[RIGHT]->column_l ()->rank_i ()) - { - warning (_f ("Spanner `%s' is not fully contained in parent spanner `%s'.", - classname (this), classname (parent))); - } - } -#else - /* - column_width (), contains ()? - */ - if (!parent->column_width ().contains (this->column_width ())) - { - warning (_f ("Spanner `%s' is not fully contained in parent spanner `%s'.", - classname (this), classname (parent))); - } -#endif - } - } if (line_l () || broken_b ()) return; + + Item * left = spanned_drul_[LEFT]; + Item * right = spanned_drul_[RIGHT]; if (left == right) { + warning (_ ("Left spanpoint is right spanpoint")); + /* FIXME: this is broken. */ @@ -167,8 +125,7 @@ Spanner::set_bound(Direction d, Item*i) if (spanned_drul_[Direction(-d)] == spanned_drul_[d] && i) - warning (_f ("Spanner `%s' has equal left and right spanpoints", - classname (this))); + warning (_f ("Spanner `%s' has equal left and right spanpoints", classname (this))); } diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index d945dc2463..855aa46d03 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -60,8 +60,8 @@ Stem_tremolo::do_brew_molecule () const SCM s = beam->get_elt_property ("height"); if (gh_number_p (s)) dy = gh_scm2double (s); - Real dx = beam->last_visible_stem ()->hpos_f () - - beam->first_visible_stem ()->hpos_f (); + Real dx = beam->last_visible_stem ()->relative_coordinate (0, X_AXIS) + - beam->first_visible_stem ()->relative_coordinate (0, X_AXIS); dydx = dx ? dy/dx : 0; } else @@ -99,7 +99,7 @@ Stem_tremolo::do_brew_molecule () const { // ugh, rather calc from Stem_tremolo_req int beams_i = stem->beam_count(RIGHT) >? stem->beam_count (LEFT); - mol.translate (Offset(stem->hpos_f () - hpos_f (), + mol.translate (Offset(stem->relative_coordinate (0, X_AXIS) - relative_coordinate (0, X_AXIS), stem->stem_end_position () * half_space - directional_element (beam).get () * beams_i * interbeam_f)); } @@ -121,7 +121,7 @@ Stem_tremolo::do_brew_molecule () const else whole_note_correction = 0; - mol.translate (Offset (stem->hpos_f () - hpos_f () + + mol.translate (Offset (stem->relative_coordinate (0, X_AXIS) - relative_coordinate (0, X_AXIS) + whole_note_correction, dy)); } diff --git a/lily/super-element.cc b/lily/super-element.cc deleted file mode 100644 index ee544eafae..0000000000 --- a/lily/super-element.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* - super-elem.cc -- implement Super_elem - - source file of the LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include "super-element.hh" -#include "line-of-score.hh" -#include "paper-score.hh" -#include "string.hh" -#include "paper-outputter.hh" - - -/** - for administration of what was done already - */ -enum Score_element_status { - ORPHAN=0, // not yet added to pstaff - VIRGIN, // added to pstaff - PREBROKEN, - PREBROKEN_SECOND, - PRECALCING, - PRECALCED, // calcs before spacing done - SPACING, - SPACED, - BROKEN, - BROKEN_SECOND, - POSTCALCING, // busy calculating. This is used to trap cyclic deps. - POSTCALCED, // after spacing calcs done - BREWING, - BREWED, -}; - -void -Super_element::pre_processing () -{ - calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking); -} - -void -Super_element::space_processing () -{ - calculate_dependencies (SPACED, SPACING, &Score_element::do_space_processing); -} - -/* for break processing, use only one status, because copies have to - have correct status. (Previously, - Score_element::handle_[pre]broken_dependencies assigned to status_i_ - */ -void -Super_element::breakable_col_processing () -{ - calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing); - // calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents); -} - - -void -Super_element::post_processing () -{ - // calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND, - // &Score_element::handle_broken_dependents); - calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking); -} - -void -Super_element::output_all () -{ - calculate_dependencies (BREWED, BREWING, &Score_element::output_processing); -} - - - - diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index ab38ee1514..1669899c18 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -157,15 +157,15 @@ Tuplet_spanner::calc_position_and_height (Real *offset, Real * dy) const *offset = - d * infinity_f; - Real x0 = column_arr[0]->hpos_f (); - Real x1 = column_arr.top ()->hpos_f (); + Real x0 = column_arr[0]->relative_coordinate (0, X_AXIS); + Real x1 = column_arr.top ()->relative_coordinate (0, X_AXIS); Real factor = column_arr.size () > 1 ? 1/(x1 - x0) : 1.0; for (int i = 0; i < column_arr.size (); i++) { Real notey = column_arr[i]->extent (Y_AXIS)[d]; - Real x = column_arr[i]->hpos_f () - x0; + Real x = column_arr[i]->relative_coordinate (0, X_AXIS) - x0; Real tuplety = *dy * x * factor; if (notey * d > (*offset + tuplety) * d) diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 2c2d48d9ad..b4244c668e 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -8,11 +8,26 @@ #include "translator-group.hh" #include "axis-group-engraver.hh" #include "paper-column.hh" -#include "vertical-align-engraver.hh" -#include "axis-align-spanner.hh" -#include "axis-group-spanner.hh" +#include "align-interface.hh" #include "span-bar.hh" #include "axis-group-interface.hh" +#include "engraver.hh" +#include "spanner.hh" + +class Vertical_align_engraver : public Engraver { + Spanner * valign_p_; + bool qualifies_b (Score_element_info) const; +public: + VIRTUAL_COPY_CONS(Translator); + + Vertical_align_engraver(); +protected: + + virtual void acknowledge_element (Score_element_info); + virtual void do_creation_processing(); + virtual void do_removal_processing(); +}; + Vertical_align_engraver::Vertical_align_engraver() { @@ -22,9 +37,11 @@ Vertical_align_engraver::Vertical_align_engraver() void Vertical_align_engraver::do_creation_processing() { - valign_p_ =new Axis_align_spanner; - valign_p_->set_axis (Y_AXIS); - valign_p_->set_elt_property ("stacking-dir", gh_int2scm (DOWN)); + valign_p_ =new Spanner; //Axis_align_spanner + Align_interface (valign_p_).set_interface (); + Align_interface (valign_p_).set_axis (Y_AXIS); + valign_p_->set_elt_property ("stacking-dir", + gh_int2scm (DOWN)); valign_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); announce_element (Score_element_info (valign_p_ , 0)); @@ -67,10 +84,11 @@ Vertical_align_engraver::acknowledge_element (Score_element_info i) { if (qualifies_b (i)) { - valign_p_->add_element (i.elem_l_); + Align_interface(valign_p_).add_element (i.elem_l_); } /* - ? huh + Add make sure spanbars (whose size depends on vertical alignment) + depend on the vertical alignment element */ else if (dynamic_cast(i.elem_l_) && i.origin_trans_l_arr (this).size ()) { diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 5bcf0d68f4..6bc5df8a5f 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.36 -Entered-date: 17MAR00 +Version: 1.3.37 +Entered-date: 20MAR00 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.36.tar.gz + 1000k lilypond-1.3.37.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.36.tar.gz + 1000k lilypond-1.3.37.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index c9f2186c30..8a680e8cb7 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.36 +Version: 1.3.37 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.36.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.37.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/mutopia/Coriolan/coriolan-paper.ly b/mutopia/Coriolan/coriolan-paper.ly index 00b14e605d..2b3b88b76d 100644 --- a/mutopia/Coriolan/coriolan-paper.ly +++ b/mutopia/Coriolan/coriolan-paper.ly @@ -40,8 +40,8 @@ } \translator { \ScoreContext - %% URG: this changes dynamics too - %%textStyle = #"italic" + %textEmptyDimension = ##t + textStyle = #"italic" timeSignatureStyle = #"C" } \translator { \OrchestralScoreContext } diff --git a/mutopia/Coriolan/coriolan-part-paper.ly b/mutopia/Coriolan/coriolan-part-paper.ly index eb422ae2be..7ec5642f26 100644 --- a/mutopia/Coriolan/coriolan-part-paper.ly +++ b/mutopia/Coriolan/coriolan-part-paper.ly @@ -47,8 +47,8 @@ } \translator { \ScoreContext skipBars = ##t - %% URG: this changes dynamics too - %%textStyle = #"italic" + %textEmptyDimension = ##t + textStyle = #"italic" timeSignatureStyle = #"C" } } diff --git a/po/lilypond.pot b/po/lilypond.pot index 04626f5079..10301acea2 100644 --- a/po/lilypond.pot +++ b/po/lilypond.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-03-20 16:31+0100\n" +"POT-Creation-Date: 2000-03-15 19:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -207,7 +207,7 @@ msgstr "" msgid "unknown clef type" msgstr "" -#: collision.cc:101 +#: collision.cc:99 msgid "Too many clashing notecolumns. Ignoring them." msgstr "" @@ -236,19 +236,19 @@ msgstr "" msgid "NaN" msgstr "" -#: dynamic-engraver.cc:285 span-dynamic-performer.cc:116 +#: dynamic-engraver.cc:244 span-dynamic-performer.cc:114 msgid "can't find start of (de)crescendo" msgstr "" -#: dynamic-engraver.cc:304 +#: dynamic-engraver.cc:263 msgid "already have a crescendo" msgstr "" -#: dynamic-engraver.cc:305 +#: dynamic-engraver.cc:264 msgid "already have a decrescendo" msgstr "" -#: dynamic-engraver.cc:380 +#: dynamic-engraver.cc:339 msgid "unterminated (de)crescendo" msgstr "" @@ -272,7 +272,7 @@ msgstr "" msgid "no Grace context available" msgstr "" -#: grace-position-engraver.cc:93 +#: grace-position-engraver.cc:91 msgid "Unattached grace notes. Attaching to last musical column." msgstr "" @@ -545,20 +545,20 @@ msgstr "" msgid "Braces don't match" msgstr "" -#: paper-column.cc:49 +#: paper-column.cc:48 msgid "Must set spring between differing columns" msgstr "" -#: paper-def.cc:70 +#: paper-def.cc:69 #, c-format msgid "unknown paper variable: `%s'" msgstr "" -#: paper-def.cc:74 +#: paper-def.cc:73 msgid "not a real variable" msgstr "" -#: paper-def.cc:184 +#: paper-def.cc:180 #, c-format msgid "paper output to %s..." msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "too many notes for rest collision" msgstr "" -#: score-engraver.cc:141 +#: score-engraver.cc:139 #, c-format msgid "unbound spanner `%s'" msgstr "" @@ -704,14 +704,13 @@ msgstr "" msgid "Slur over rest?" msgstr "" -#: spanner.cc:31 spanner.cc:170 -#, c-format -msgid "Spanner `%s' has equal left and right spanpoints" +#: spanner.cc:34 +msgid "Left spanpoint is right spanpoint" msgstr "" -#: spanner.cc:56 spanner.cc:66 +#: spanner.cc:128 #, c-format -msgid "Spanner `%s' is not fully contained in parent spanner `%s'." +msgid "Spanner `%s' has equal left and right spanpoints" msgstr "" #: stem-engraver.cc:124 diff --git a/po/nl.po b/po/nl.po index 561428ed2a..56a2d4a944 100644 --- a/po/nl.po +++ b/po/nl.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"POT-Creation-Date: 2000-03-20 16:31+0100\n" +"POT-Creation-Date: 2000-03-15 19:34+0100\n" "Content-Type: text/plain; charset=\n" "Date: 1998-05-26 11:26:28+0200\n" "From: \n" @@ -205,7 +205,7 @@ msgstr "ongeldige inversie toon: geen onderdeel van accoord: %s" msgid "unknown clef type" msgstr "onbekend type sleutel" -#: collision.cc:101 +#: collision.cc:99 msgid "Too many clashing notecolumns. Ignoring them." msgstr "Te veel botsende nootkolommen. Negeer ze." @@ -236,19 +236,19 @@ msgstr "kan geheugen controle niet zetten!" msgid "NaN" msgstr "NaN" -#: dynamic-engraver.cc:285 span-dynamic-performer.cc:116 +#: dynamic-engraver.cc:244 span-dynamic-performer.cc:114 msgid "can't find start of (de)crescendo" msgstr "kan start van (de)crescendo niet vinden" -#: dynamic-engraver.cc:304 +#: dynamic-engraver.cc:263 msgid "already have a crescendo" msgstr "heb al een crescendo" -#: dynamic-engraver.cc:305 +#: dynamic-engraver.cc:264 msgid "already have a decrescendo" msgstr "heb al een decrescendo" -#: dynamic-engraver.cc:380 +#: dynamic-engraver.cc:339 msgid "unterminated (de)crescendo" msgstr "onbeëindigd (de)crescendo" @@ -273,7 +273,7 @@ msgstr "Geen doenbare regelafbreuk gevonden" msgid "no Grace context available" msgstr "geen Grace context voor handen" -#: grace-position-engraver.cc:93 +#: grace-position-engraver.cc:91 msgid "Unattached grace notes. Attaching to last musical column." msgstr "Losse grace noten. Maak ze vast aan vorige muziekale kolom." @@ -335,7 +335,6 @@ msgstr "vals:" #: local-key-engraver.cc:83 time-signature-engraver.cc:29 #: translator-group.cc:416 translator-group.cc:425 -#, c-format msgid "can't find: `%s'" msgstr "kan niet vinden: `%s'" @@ -537,7 +536,6 @@ msgid "Interpretation context with empty type" msgstr "Vertolk context met leeg type" #: music-output-def.cc:84 -#, c-format msgid "can't find `%s' context" msgstr "kan `%s' context niet vinden" @@ -569,20 +567,20 @@ msgstr "Ontleden..." msgid "Braces don't match" msgstr "Haakjes paren niet" -#: paper-column.cc:49 +#: paper-column.cc:48 msgid "Must set spring between differing columns" msgstr "Moet veertje zetten tussen verschillende kolommen" -#: paper-def.cc:70 +#: paper-def.cc:69 #, c-format msgid "unknown paper variable: `%s'" msgstr "onbekende papier veranderlijke: `%s'" -#: paper-def.cc:74 +#: paper-def.cc:73 msgid "not a real variable" msgstr "niet een reële veranderlijke" -#: paper-def.cc:184 +#: paper-def.cc:180 #, c-format msgid "paper output to %s..." msgstr "papier uitvoer naar %s..." @@ -645,7 +643,6 @@ msgid "Huh? Not a Request: `%s'" msgstr "Huh? Geen Request: `%s'" #: request-iterator.cc:20 -#, c-format msgid "Junking music: `%s'" msgstr "Schroot muziek: `%s'" @@ -657,7 +654,7 @@ msgstr "te veel botsende rusten" msgid "too many notes for rest collision" msgstr "te veel noten voor bosting met rusten" -#: score-engraver.cc:141 +#: score-engraver.cc:139 #, c-format msgid "unbound spanner `%s'" msgstr "ongebonden spanner `%s'" @@ -712,7 +709,6 @@ msgid "unterminated slur" msgstr "onbeëindigde bindingsboog" #: slur-engraver.cc:77 -#, c-format msgid "can't find both ends of %s" msgstr "kan niet beide uiteinden vinden van %s" @@ -728,16 +724,15 @@ msgstr "Zet bindingsboog over rust. Negeer." msgid "Slur over rest?" msgstr "Boogje over rust?" -#: spanner.cc:31 spanner.cc:170 +#: spanner.cc:34 +msgid "Left spanpoint is right spanpoint" +msgstr "Linker spanpunt is rechter spanpunt" + +#: spanner.cc:128 #, c-format msgid "Spanner `%s' has equal left and right spanpoints" msgstr "Spanner `%s' heeft gelijke linker en rechter spanpunten" -#: spanner.cc:56 spanner.cc:66 -#, c-format -msgid "Spanner `%s' is not fully contained in parent spanner `%s'." -msgstr "Spanner `%s' is niet volledig opgenomen in parent spanner `%s'." - #: stem-engraver.cc:124 #, c-format msgid "Adding note head to incompatible stem (type = %d)" @@ -759,7 +754,6 @@ msgstr "" "%s: TFM bestand heeft %u parameters, wat meer is dan de %u die ik aan kan" #: tfm.cc:70 -#, c-format msgid "can't find ascii character: `%d'" msgstr "kan teken niet vinden: `%s'" @@ -807,12 +801,10 @@ msgid "Already contains: `%s'" msgstr "Bevat reeds: `%s'" #: translator-group.cc:210 -#, c-format msgid "can't find or create `%s' called `%s'" msgstr "kan niet vinden of scheppen `%s' genaamd `%s'" #: translator-group.cc:322 -#, c-format msgid "can't find or create: `%s'" msgstr "kan niet vinden of scheppen: `%s'" @@ -1094,9 +1086,6 @@ msgstr "% Automatisch gegenereerd" msgid "% from input file: " msgstr "% van invoerbestand: " -#~ msgid "Left spanpoint is right spanpoint" -#~ msgstr "Linker spanpunt is rechter spanpunt" - #~ msgid "(search path: `%s'" #~ msgstr "(zoekpad: `%s')" diff --git a/scm/midi.scm b/scm/midi.scm index 5cd17d315d..0e42d834a2 100644 --- a/scm/midi.scm +++ b/scm/midi.scm @@ -5,21 +5,19 @@ ;;; (c) 2000 Jan Nieuwenhuizen - (define absolute-volume-alist '()) (set! absolute-volume-alist (append '( - ("sf" . 1.00) - ("ffff" . 0.91) - ("fff" . 0.81) - ("ff" . 0.71) - ("f" . 0.61) - ("mf" . 0.50) - ("mp" . 0.40) - ("p" . 0.30) - ("pp" . 0.20) - ("ppp" . 0.10) + ("sf" . 115) + ("fff" . 102) + ("ff" . 90) + ("f" . 77) + ("mf" . 64) + ("mp" . 51) + ("p" . 38) + ("pp" . 26) + ("ppp" . 13) ) absolute-volume-alist)) @@ -28,31 +26,6 @@ (if entry (cdr entry)))) -(define instrument-equaliser-alist '()) -(set! instrument-equaliser-alist - (append - '( - ("flute" . (0 . 1)) - ("oboe" . (0 . 1)) - ("clarinet" . (0 . 1)) - ("bassoon" . (0 . 1)) - ("french horn" . (0 . 1)) - ("trumpet" . (0 . 1)) - ("timpani" . (0 . 1)) - ("violin" . (0 . 1)) - ("viola" . (0 . 1)) - ("cello" . (0 . 1)) - ("contrabass" . (0 . 1)) - ) - instrument-equaliser-alist)) - -(define (instrument-equaliser s) - (let ((entry (assoc s absolute-volume-alist))) - (if entry - (cdr entry)))) - -(define instrument-equaliser-alist '()) - -;; 90 == 90/127 == 0.71 is supposed to be the default value +;; 90 is supposed to be the default value ;; urg: we should set this at start of track -(define dynamic-default-volume 0.71) +(define dynamic-default-volume 90) diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py index 7714a5695c..5970042939 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-mudela.py @@ -281,7 +281,7 @@ if 1: def conv(str): str = re.sub ('SkipBars','skipBars', str) str = re.sub ('fontsize','fontSize', str) - str = re.sub ('midi_instrument','midiInstrument', x) + str = re.sub ('midi_instrument','midiInstrument', str) return str @@ -293,7 +293,7 @@ if 1: def conv(str): str = re.sub ('tieydirection','tieVerticalDirection', str) str = re.sub ('slurydirection','slurVerticalDirection', str) - str = re.sub ('ydirection','verticalDirection', x) + str = re.sub ('ydirection','verticalDirection', str) return str -- 2.39.2