From 2804f8f79e01dc606ce067bffda2d966524e6e36 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 4 Feb 2002 10:47:16 +0100 Subject: [PATCH] release: 1.5.30 --- ChangeLog | 53 +++++++++++++++++++++++++ Documentation/user/ly2dvi.itexi | 6 +++ Documentation/user/refman.itely | 17 ++++++-- Documentation/user/tutorial.itely | 2 +- VERSION | 2 +- input/bugs/divisi-staff.ly | 28 +++++++++++++ lily/a2-engraver.cc | 2 +- lily/accidental-engraver.cc | 9 ++--- lily/arpeggio-engraver.cc | 2 +- lily/auto-beam-engraver.cc | 2 +- lily/auto-change-iterator.cc | 2 +- lily/axis-group-engraver.cc | 2 +- lily/bar-engraver.cc | 2 +- lily/bar-number-engraver.cc | 2 +- lily/beam-engraver.cc | 43 +++++++------------- lily/break-align-engraver.cc | 6 +-- lily/breathing-sign-engraver.cc | 2 +- lily/change-iterator.cc | 2 +- lily/chord-name-engraver.cc | 2 +- lily/chord-tremolo-engraver.cc | 4 +- lily/clef-engraver.cc | 4 +- lily/collision-engraver.cc | 2 +- lily/completion-note-heads-engraver.cc | 11 ++--- lily/custos-engraver.cc | 2 +- lily/dot-column-engraver.cc | 2 +- lily/dynamic-engraver.cc | 13 ++++-- lily/engraver.cc | 13 +++--- lily/extender-engraver.cc | 2 +- lily/figured-bass-engraver.cc | 4 +- lily/fingering-engraver.cc | 2 +- lily/grob-info.cc | 10 ++--- lily/hyphen-engraver.cc | 2 +- lily/include/engraver.hh | 2 +- lily/include/grob-info.hh | 10 +---- lily/include/timing-translator.hh | 5 ++- lily/include/translator-group.hh | 7 +++- lily/instrument-name-engraver.cc | 2 +- lily/key-engraver.cc | 4 +- lily/line-group-group-engraver.cc | 2 +- lily/lyric-engraver.cc | 2 +- lily/mark-engraver.cc | 2 +- lily/multi-measure-rest-engraver.cc | 2 +- lily/note-head-line-engraver.cc | 3 +- lily/note-heads-engraver.cc | 4 +- lily/note-name-engraver.cc | 2 +- lily/part-combine-music-iterator.cc | 2 +- lily/percent-repeat-engraver.cc | 6 +-- lily/phrasing-slur-engraver.cc | 2 +- lily/piano-pedal-engraver.cc | 10 +++-- lily/porrectus-engraver.cc | 2 +- lily/rest-collision-engraver.cc | 2 +- lily/rest-engraver.cc | 4 +- lily/rhythmic-column-engraver.cc | 4 +- lily/score-engraver.cc | 5 +-- lily/script-column-engraver.cc | 2 +- lily/script-engraver.cc | 2 +- lily/separating-line-group-engraver.cc | 6 +-- lily/slur-engraver.cc | 2 +- lily/spacing-engraver.cc | 2 +- lily/span-arpeggio-engraver.cc | 2 +- lily/span-bar-engraver.cc | 2 +- lily/staff-symbol-engraver.cc | 2 +- lily/stanza-number-engraver.cc | 2 +- lily/stem-engraver.cc | 4 +- lily/system-start-delimiter-engraver.cc | 2 +- lily/text-engraver.cc | 2 +- lily/text-spanner-engraver.cc | 2 +- lily/tie-engraver.cc | 28 ++++++------- lily/time-signature-engraver.cc | 14 +------ lily/timing-translator.cc | 2 +- lily/translator-group.cc | 37 ++++++++++++----- lily/tuplet-engraver.cc | 2 +- lily/vertical-align-engraver.cc | 2 +- lily/volta-engraver.cc | 2 +- ly/engraver-init.ly | 2 +- ly/performer-init.ly | 4 +- make/out/lilypond.lsm | 8 ++-- make/out/lilypond.mandrake.spec | 2 +- make/out/lilypond.redhat.spec | 4 +- make/out/lilypond.suse.spec | 4 +- mf/feta-bolletjes.mf | 2 +- scm/grob-description.scm | 11 ++++- scm/interface-description.scm | 2 +- scm/lily.scm | 2 +- 84 files changed, 300 insertions(+), 201 deletions(-) create mode 100644 input/bugs/divisi-staff.ly diff --git a/ChangeLog b/ChangeLog index e8e1505545..90166e4d2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,56 @@ +2002-02-04 Han-Wen + + * VERSION: 1.5.30 released + + * lily/dynamic-engraver.cc: add doco about DynamicLineSpanner + + * Documentation/user/refman.itely (Dynamics): add a note about + DynamicLineSpanner. + + * scm/grob-description.scm: add a 'translator-type? object + property, so that \property Foo.Bar =\turnOff doesn't cause + type check warning. + + * lily/translator-group.cc (add_fresh_group_translator): make + new add-translator functions to make distinction between fresh and + used group-translators. Fixes problem with scripts on auto-changing voice + + * lily/timing-engraver.cc: make Timing_engraver instantiatable, + add to Score_performer. Fixes bar checks in MIDI + + * lily/tie-engraver.cc (create_grobs): Use pitches to compare note + heads. Fixes many quirks with ties. + + * lily/engraver.cc (announce_grob): Use SCM argument. Store cause + in the grob property #'cause, instead of using Grob_info. + + * ly/engraver-init.ly (StaffContext): move Dot_column_engraver to + staff context, fixing dot alignment on collisions. + + * lily/beam-engraver.cc (try_music): remove can't find beam start + warning, so that skipTypesetting won't complain. + +2002-02-01 Mats Bengtsson + + * Documentation/user/refman.itely (Paper size): Documentation fix, + papersize + + * lily/text-engraver.cc: Bugfix: textNonEmpty works again + + * scm/grob-description.scm: \breathe: Use feta font comma by default + +2002-01-23 Mats Bengtsson + + * input/template/piano-dynamics.ly (pedal): Simplified + +2002-01-18 Mats Bengtsson + + * ly/engraver-init.ly: avoid warnings on \skip in lyrics + +2002-01-10 Mats Bengtsson + + * lilypond-mode.el (LilyPond-command-query): ignore case. + 2002-02-01 Han-Wen Nienhuys * VERSION: 1.5.29 released diff --git a/Documentation/user/ly2dvi.itexi b/Documentation/user/ly2dvi.itexi index 9f91398699..5b32295a53 100644 --- a/Documentation/user/ly2dvi.itexi +++ b/Documentation/user/ly2dvi.itexi @@ -141,6 +141,12 @@ the @code{\paper} block. @item pagenumber If set to @code{no}, no page numbers will be printed. + + + + @item fontenc + The font encoding, should be set identical to the @code{font-encoding} + property in the score. @end table @unnumberedsubsec Environment variables diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 9bc3526865..f34b6ba4eb 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1199,7 +1199,10 @@ c'4 \breathe d4 @refbugs - Currently, only tick marks are supported, not comma style breath marks. +The current layout of the default comma style breath marks +could be improved and more optional symbols should be added to the +font. + @c . {Tempo} @@ -1553,9 +1556,15 @@ For everyday use, we recommend the identifiers @code{\cresc}, @cindex diminuendo Dynamics are grobs of @internalsref{DynamicText} and -@internalsref{Hairpin}. They are put together on -@internalsref{DynamicLineSpanner} to align them vertically. - +@internalsref{Hairpin}. Vertical positioning of these symbols is handled +by the @internalsref{DynamicLineSpanner} grob. If you want to adjust +padding or vertical direction of the dynamics, you must set properties +for the @internalsref{DynamicLineSpanner} grob. Predefined identifiers +to set the vertical direction are \dynamicUp and \dynamicDown. + +@cindex direction, of dynamics +@cindex @code{\dynamicDown} +@cindex @code{\dynamicUp} @c . {Repeats} @node Repeats diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index c4690beb7a..170a298ab9 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -258,7 +258,7 @@ We continue with the introduction of the remaining musical constructs. @c maybe legend here? -Rests are entered just like notes with the name ``@code{r}'': +Normal rests are entered just like notes with the name ``@code{r}'': @quotation @example diff --git a/VERSION b/VERSION index 5577b6f77f..4b265d335f 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=29 +PATCH_LEVEL=30 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/input/bugs/divisi-staff.ly b/input/bugs/divisi-staff.ly new file mode 100644 index 0000000000..1c5673dac7 --- /dev/null +++ b/input/bugs/divisi-staff.ly @@ -0,0 +1,28 @@ +% +% space after barline on 1st staff due to time sig. +% + +\score{ + \notes\relative c'\context GrandStaff{ + +c4 d e f | +g a b c | \break + +<{ +d c b a | + g f e d} + \context Staff=lower{ +% \property Staff.TimeSignature = \turnOff + +b' a g f | + e d c b |}> \break + +c1 +} +\paper{ + \translator{ + \GrandStaffContext + \consists "Instrument_name_engraver" + } +} +} diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc index a08d9e0765..a7f1acb4a3 100644 --- a/lily/a2-engraver.cc +++ b/lily/a2-engraver.cc @@ -55,7 +55,7 @@ A2_engraver::create_grobs () { text_p_ = new Item (get_property ("TextScript")); Side_position_interface::set_axis (text_p_, Y_AXIS); - announce_grob (text_p_, 0); + announce_grob(text_p_, SCM_EOL); Direction dir = UP; SCM text = SCM_EOL; diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index ee82be6f1c..9134f01ec0 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -205,7 +205,7 @@ Accidental_engraver::create_grobs () if (gh_number_p (c0)) Staff_symbol_referencer::set_position (key_item_p_, gh_scm2int (c0)); - announce_grob (key_item_p_, 0); + announce_grob(key_item_p_, SCM_EOL); } @@ -317,15 +317,14 @@ Accidental_engraver::acknowledge_grob (Grob_info info) } -/* - ugh. repeated deep_copy generates lots of garbage. - */ void Accidental_engraver::process_music () { +#if 0 SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); - +#endif + SCM sig = get_property ("keySignature"); /* Detect key sig changes. */ diff --git a/lily/arpeggio-engraver.cc b/lily/arpeggio-engraver.cc index d280240411..b236e8b8d8 100644 --- a/lily/arpeggio-engraver.cc +++ b/lily/arpeggio-engraver.cc @@ -91,7 +91,7 @@ Arpeggio_engraver::create_grobs () { Side_position_interface::add_support (arpeggio_, supports_[i]); } - announce_grob (arpeggio_, arpeggio_req_); + announce_grob(arpeggio_, arpeggio_req_->self_scm()); } } diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index e17e98d2e1..17af904533 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -235,7 +235,7 @@ Auto_beam_engraver::create_beam_p () Beam::add_stem (beam_p, (*stem_l_arr_p_)[i]); } - announce_grob (beam_p, 0); + announce_grob(beam_p, SCM_EOL); return beam_p; } diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index c0879f90a9..56f1891905 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -49,7 +49,7 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type, Translator_group * dest = it->report_to_l ()->find_create_translator_l (to_type, to_id); current->remove_translator_p (last); - dest->add_group_translator (last); + dest->add_used_group_translator (last); } else { diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 260742c627..f22d068ffa 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -49,7 +49,7 @@ Axis_group_engraver::initialize () staffline_p_->set_bound (LEFT,it); - announce_grob (staffline_p_, 0); + announce_grob(staffline_p_, SCM_EOL); } Spanner* diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index cb9c6e216a..630d4ce14e 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -53,7 +53,7 @@ Bar_engraver::create_bar () if (scm_equal_p (gl, bar_p_->get_grob_property ("glyph")) != SCM_BOOL_T) bar_p_->set_grob_property ("glyph", gl); - announce_grob (bar_p_, 0); + announce_grob(bar_p_, SCM_EOL); } } diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 3ab788c928..2c6d4d6c26 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -99,7 +99,7 @@ Bar_number_engraver::create_items () text_p_ = new Item (b); Side_position_interface::set_axis (text_p_,Y_AXIS); - announce_grob (text_p_, 0); + announce_grob(text_p_, SCM_EOL); } ENTER_DESCRIPTION(Bar_number_engraver, diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 9ebcd6ea26..dc2f5654b9 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -22,9 +22,6 @@ class Beam_engraver : public Engraver { Drul_array reqs_drul_; - - Link_array stems_; - Spanner *finished_beam_p_; Spanner *beam_p_; @@ -47,7 +44,7 @@ protected: virtual void stop_translation_timestep (); virtual void start_translation_timestep (); virtual void finalize (); - virtual void create_grobs (); + virtual void acknowledge_grob (Grob_info); virtual bool try_music (Music*); virtual void process_music (); @@ -88,12 +85,6 @@ Beam_engraver::try_music (Music *m) Direction d =c->get_span_dir (); - if (d == STOP && !beam_p_) - { - m->origin ()->warning (_ ("can't find start of beam")); - return false; - } - if (d == STOP) { SCM m = get_property ("automaticMelismata"); @@ -137,12 +128,6 @@ Beam_engraver::process_music () { top_engraver ()->forbid_breaks (); } -} - - -void -Beam_engraver::create_grobs () -{ if (reqs_drul_[START]) { if (beam_p_) @@ -163,12 +148,12 @@ Beam_engraver::create_grobs () /* urg, must copy to Auto_beam_engraver too */ - announce_grob (beam_p_, reqs_drul_[START]); + announce_grob(beam_p_, reqs_drul_[START]->self_scm()); } - reqs_drul_[STOP] = 0; - reqs_drul_[START] = 0; + } + void Beam_engraver::typeset_beam () { @@ -182,8 +167,6 @@ Beam_engraver::typeset_beam () delete finished_beam_info_p_; finished_beam_info_p_ =0; finished_beam_p_ = 0; - - reqs_drul_[STOP] = 0; } } @@ -191,14 +174,18 @@ void Beam_engraver::start_translation_timestep () { reqs_drul_ [START] =0; - if (beam_p_) { - SCM m = get_property ("automaticMelismata"); - SCM b = get_property ("noAutoBeaming"); - if (to_boolean (m) && to_boolean (b)) { - set_melisma (true); + reqs_drul_[STOP] = 0; + + if (beam_p_) + { + SCM m = get_property ("automaticMelismata"); + SCM b = get_property ("noAutoBeaming"); + if (to_boolean (m) && to_boolean (b)) + { + set_melisma (true); + } + subdivide_beams_ = to_boolean(get_property("subdivideBeams")); } - subdivide_beams_ = gh_scm2bool(get_property("subdivideBeams")); - } } void diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index fbe2bdcf40..e1bd2e212b 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -100,7 +100,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) { align_l_ = new Item (get_property ("BreakAlignment")); Break_align_interface::set_interface (align_l_); - announce_grob (align_l_,0); + announce_grob (align_l_, SCM_EOL); SCM edge_sym = ly_symbol2scm ("Left_edge_item"); Item * edge = new Item (get_property ("LeftEdge")); @@ -121,7 +121,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) */ align_l_->set_grob_property ("self-alignment-X", edge->self_scm ()); - announce_grob (edge, 0); + announce_grob(edge, SCM_EOL); column_alist_ = scm_assoc_set_x (column_alist_, edge_sym, edge->self_scm ()); } @@ -143,7 +143,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) group->set_grob_property ("break-align-symbol", align_name); group->set_parent (align_l_, Y_AXIS); - announce_grob (group, 0); + announce_grob(group, SCM_EOL); column_alist_ = scm_assoc_set_x (column_alist_, align_name, group->self_scm ()); } diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index a8d47464ae..439e09bee3 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -65,7 +65,7 @@ Breathing_sign_engraver::create_grobs () Breathing_sign::set_interface (breathing_sign_p_); - announce_grob (breathing_sign_p_, breathing_sign_req_l_); + announce_grob(breathing_sign_p_, breathing_sign_req_l_->self_scm()); breathing_sign_req_l_ = 0; } } diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index ac4b81f787..cdae5724b4 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -65,7 +65,7 @@ Change_iterator::process (Moment m) Translator_group * dest = report_to_l ()->find_create_translator_l (to_type, to_id); current->remove_translator_p (last); - dest->add_group_translator (last); + dest->add_used_group_translator (last); } else { diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index cfa35c2621..4064e85a52 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -91,7 +91,7 @@ Chord_name_engraver::create_grobs () { chord_name_p_ = new Item (get_property ("ChordName")); chord_name_p_->set_grob_property ("chord", chord_); - announce_grob (chord_name_p_, 0); + announce_grob(chord_name_p_, SCM_EOL); SCM s = get_property ("chordChanges"); if (to_boolean (s) && ly_car (last_chord_) != SCM_EOL && gh_equal_p (chord_, last_chord_)) diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 98c42bb9f4..04e156f2a4 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -112,7 +112,7 @@ Chord_tremolo_engraver::process_music () Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); beam_start_location_ = mp; - announce_grob (beam_p_, repeat_); + announce_grob(beam_p_, repeat_->self_scm()); } else if (!sequential_body_b_ && !stem_tremolo_) { @@ -122,7 +122,7 @@ Chord_tremolo_engraver::process_music () stem_tremolo_ = new Item (get_property ("StemTremolo")); Stem_tremolo::set_interface (stem_tremolo_); - announce_grob (stem_tremolo_, repeat_); + announce_grob(stem_tremolo_, repeat_->self_scm()); stem_tremolo_->set_grob_property ("tremolo-flags", gh_int2scm (flags)); diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 92dab534a1..7de41f9f49 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -92,7 +92,7 @@ Clef_engraver::create_clef () if (!clef_p_) { Item *c= new Item (get_property ("Clef")); - announce_grob (c, 0); + announce_grob(c, SCM_EOL); Staff_symbol_referencer::set_interface (c); @@ -115,7 +115,7 @@ Clef_engraver::create_clef () g->set_grob_property ("direction", gh_int2scm (sign (gh_scm2int (oct)))); octavate_p_ = g; - announce_grob (octavate_p_, 0); + announce_grob(octavate_p_, SCM_EOL); } } diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 33ad2b1505..ff947053d2 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -39,7 +39,7 @@ Collision_engraver::create_grobs () Axis_group_interface::set_interface (col_p_); Axis_group_interface::set_axes (col_p_, X_AXIS, Y_AXIS); - announce_grob (col_p_,0); + announce_grob (col_p_, SCM_EOL); } for (int i=0; i< note_column_l_arr_.size (); i++) diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index edf7677141..23748de4ac 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -201,12 +201,13 @@ Completion_heads_engraver::process_music () if (scratch_note_reqs_.size()) { req = scratch_note_reqs_[i]; - req->set_mus_property ("pitch", - note_req_l_arr_[i]->get_mus_property ("pitch")); + SCM pits = note_req_l_arr_[i]->get_mus_property ("pitch"); + req->set_mus_property ("pitch",pits); } + note_p->set_grob_property ("duration-log", gh_int2scm (note_dur.duration_log ())); - + int dots= note_dur.dot_count (); if (dots) { @@ -220,7 +221,7 @@ Completion_heads_engraver::process_music () d->set_grob_property ("dot-count", gh_int2scm (dots)); d->set_parent (note_p, Y_AXIS); - announce_grob (d,0); + announce_grob (d, SCM_EOL); dot_p_arr_.push (d); } @@ -241,7 +242,7 @@ Completion_heads_engraver::process_music () note_p->set_grob_property ("note-character", ly_str02scm (s)); } - announce_grob (note_p,req); + announce_grob (note_p,req->self_scm ()); note_p_arr_.push (note_p); } diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index faec3cd556..272373a0c0 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -125,7 +125,7 @@ Custos_engraver::create_custos () SCM basicProperties = get_property ("Custos"); Item* custos = new Item (basicProperties); - announce_grob (custos, 0); + announce_grob(custos, SCM_EOL); custos_arr_.push (custos); return custos; diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 8233c3ec0b..22609e6e66 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -65,7 +65,7 @@ Dot_column_engraver::acknowledge_grob (Grob_info info) if (!dotcol_) { dotcol_ = new Item (get_property ("DotColumn")); - announce_grob (dotcol_, 0); + announce_grob(dotcol_, SCM_EOL); } Dot_column::add_head (dotcol_, info.grob_l_); diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index a021d21fdf..3fe710acac 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -145,7 +145,7 @@ Dynamic_engraver::process_music () Music * rq = accepted_spanreqs_drul_[START]; if (script_req_l_) rq = script_req_l_ ; - announce_grob (line_spanner_, rq); + announce_grob(line_spanner_, rq->self_scm()); } @@ -179,7 +179,7 @@ Dynamic_engraver::process_music () Axis_group_interface::add_element (line_spanner_, script_p_); - announce_grob (script_p_, script_req_l_); + announce_grob(script_p_, script_req_l_->self_scm()); } if (accepted_spanreqs_drul_[STOP]) @@ -276,7 +276,7 @@ Dynamic_engraver::process_music () add_bound_item (line_spanner_, cresc_p_->get_bound (LEFT)); - announce_grob (cresc_p_, accepted_spanreqs_drul_[START]); + announce_grob(cresc_p_, accepted_spanreqs_drul_[START]->self_scm()); } } } @@ -409,7 +409,12 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) } } ENTER_DESCRIPTION(Dynamic_engraver, -/* descr */ "", +/* descr */ " +This engraver creates hairpins, dynamic texts, and their vertical +alignments. The symbols are collected onto a DynamicLineSpanner grob +which takes care of vertical positioning. +", + /* creats*/ "DynamicLineSpanner DynamicText Hairpin TextSpanner", /* acks */ "note-column-interface", /* reads */ "", diff --git a/lily/engraver.cc b/lily/engraver.cc index 55929a854b..449ebd0ce0 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -21,20 +21,17 @@ Engraver::announce_grob (Grob_info inf) } void -Engraver::announce_grob (Grob* e, Music *m) +Engraver::announce_grob (Grob* e, SCM cause) { /* TODO: junk grob-info, and make a cause grob-property to store `causes' generically. */ - if (m && store_locations_global_b - && m->origin ()->location_str ().length_i ()) - { - e->set_grob_property ("origin", m->get_mus_property ("origin")); - } - - Grob_info i (e, m ? m->self_scm () : SCM_UNDEFINED); + if (unsmob_music (cause) || unsmob_grob (cause)) + e->set_grob_property ("cause", cause); + + Grob_info i (e); if (!i.origin_trans_l_) i.origin_trans_l_ = this; daddy_grav_l ()->announce_grob (i); diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index af30c3ed0f..3d78b8b772 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -113,7 +113,7 @@ Extender_engraver::process_music () Lyric_extender::set_textitem (extender_p_, LEFT, last_lyric_l_); - announce_grob (extender_p_, req_l_); + announce_grob(extender_p_, req_l_->self_scm()); } } diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc index de933b472d..624490ac57 100644 --- a/lily/figured-bass-engraver.cc +++ b/lily/figured-bass-engraver.cc @@ -59,13 +59,13 @@ Figured_bass_engraver::process_music () if (rest_req_) { figure_ = new Item (get_property ("BassFigure")); - announce_grob (figure_, rest_req_); // todo + announce_grob(figure_, rest_req_->self_scm()); // todo figure_->set_grob_property ("text" , ly_str02scm ("-")); } else if (figures_.size ()) { figure_ = new Item (get_property ("BassFigure")); - announce_grob (figure_, figures_[0]); // todo + announce_grob(figure_, figures_[0]->self_scm()); // todo SCM flist = SCM_EOL; for (int i = 0; i < figures_.size (); i++) { diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index 4adba9d571..45196adb9f 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -206,7 +206,7 @@ Fingering_engraver::make_script (Direction d, Music *r,Axis a, int i) */ fingering->set_grob_property ("no-spacing-rods" , SCM_BOOL_F); - announce_grob (fingering, r); + announce_grob (fingering, r->self_scm()); fingerings_.push (fingering); } diff --git a/lily/grob-info.cc b/lily/grob-info.cc index 93fb16aeee..4cc90129c4 100644 --- a/lily/grob-info.cc +++ b/lily/grob-info.cc @@ -5,16 +5,15 @@ (c) 1997--2002 Han-Wen Nienhuys */ - +#include "grob.hh" #include "grob-info.hh" #include "request.hh" #include "translator.hh" #include "translator-group.hh" -Grob_info::Grob_info (Grob*s_l, SCM c) +Grob_info::Grob_info (Grob*s_l) { grob_l_ = s_l; - cause_ = c; origin_trans_l_ = 0; } @@ -22,14 +21,15 @@ Grob_info::Grob_info (Grob*s_l, SCM c) Grob_info::Grob_info () { grob_l_ = 0; - cause_ = SCM_EOL; origin_trans_l_ = 0; } Music* Grob_info::music_cause () + { - return unsmob_music (cause_); + SCM cause = grob_l_->get_grob_property ("cause"); + return unsmob_music (cause); } Link_array diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 2143ea9d9a..1697c82849 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -105,7 +105,7 @@ Hyphen_engraver::create_grobs () hyphen_p_ = new Spanner (get_property ("LyricHyphen")); Hyphen_spanner (hyphen_p_).set_textitem (LEFT, last_lyric_l_); - announce_grob (hyphen_p_, req_l_); + announce_grob(hyphen_p_, req_l_->self_scm()); } } diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index be00c3b1f5..a4b2f73a46 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -45,7 +45,7 @@ protected: /** Announce element. Default: pass on to daddy. Utility */ - virtual void announce_grob (Grob*, Music*); + virtual void announce_grob (Grob*, SCM cause); virtual void announce_grob (Grob_info); virtual void process_music (); diff --git a/lily/include/grob-info.hh b/lily/include/grob-info.hh index 17fda7ff0c..bba4bc1248 100644 --- a/lily/include/grob-info.hh +++ b/lily/include/grob-info.hh @@ -16,8 +16,6 @@ /** Data container for broadcasts. - - TODO: Store this in element info! */ struct Grob_info { Translator * origin_trans_l_; @@ -25,17 +23,11 @@ struct Grob_info { Grob * grob_l_; - /* - Notice that CAUSE is not GC protected ; this might be a cause for - GC errors if you don't use music or grobs as a cause. - */ - SCM cause_; public: Music * music_cause (); Link_array origin_trans_l_arr (Translator*) const; - Grob_info (Grob*, SCM); + Grob_info (Grob*); Grob_info (); }; - #endif // STAFFELEMINFO_HH diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 6770e770c1..3490638d0b 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -18,8 +18,9 @@ class Timing_translator : public virtual Translator { public: - VIRTUAL_COPY_CONS (Translator); - Timing_translator (); + // VIRTUAL_COPY_CONS (Translator); + TRANSLATOR_DECLARATIONS(Timing_translator); + protected: virtual void initialize (); diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 092cbab5e1..6621344a95 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -33,10 +33,11 @@ class Translator_group : public virtual Translator { int iterator_count_; friend class Interpretation_context_handle; + SCM add_translator (SCM, Translator*); + protected: ~Translator_group (); public: - SCM add_translator (SCM, Translator*); void execute_single_pushpop_property (SCM prop, SCM sym, SCM val); SCM internal_get_property (SCM name_sym) const; @@ -49,7 +50,9 @@ public: VIRTUAL_COPY_CONS (Translator); Translator_group (Translator_group const &); Translator_group (); - void add_group_translator (Translator *trans_p); + void add_fresh_group_translator (Translator *trans_p); + void add_fresh_simple_translator (Translator *trans_p); + void add_used_group_translator (Translator *trans_p); /// Score_register = 0, Staff_registers = 1, etc) Translator_group* ancestor_l (int l=1); diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index 11758a82c8..18fc78f86f 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -70,7 +70,7 @@ Instrument_name_engraver::create_text (SCM txt) if (delim_) text_->set_parent (delim_, Y_AXIS); - announce_grob (text_,0); + announce_grob (text_, SCM_EOL); } } diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 566516d297..83777ae87f 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -71,7 +71,9 @@ Key_engraver::create_key (bool def) Staff_symbol_referencer::set_interface (item_p_); Key_item::set_interface (item_p_); - announce_grob (item_p_,keyreq_l_); + + + announce_grob(item_p_, keyreq_l_ ? keyreq_l_->self_scm() : SCM_EOL); } if (!def) diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index 583ab3a36e..9c52630751 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -50,7 +50,7 @@ Line_group_engraver_group::initialize () = unsmob_grob (get_property ("currentCommandColumn")); staffline_p_->set_bound (LEFT,it); - Engraver::announce_grob (staffline_p_,0); + Engraver::announce_grob (staffline_p_, SCM_EOL); } void diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 2364bd48df..279fc1f141 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -73,7 +73,7 @@ Lyric_engraver::create_grobs () text_p_->translate_axis (0.66, X_AXIS); - announce_grob (text_p_, req_l_); + announce_grob(text_p_, req_l_->self_scm()); req_l_ = 0; } } diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index bb9453a128..b5075d8469 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -91,7 +91,7 @@ Mark_engraver::create_items (Request *rq) Side_position_interface::set_axis (text_p_, Y_AXIS); - announce_grob (text_p_, rq); + announce_grob(text_p_, rq->self_scm()); } diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 035f5f8924..ba7cdafbc7 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -103,7 +103,7 @@ Multi_measure_rest_engraver::process_music () Multi_measure_rest::set_interface (mmrest_p_); Staff_symbol_referencer::set_interface (mmrest_p_); - announce_grob (mmrest_p_, busy_span_req_l_); + announce_grob(mmrest_p_, busy_span_req_l_->self_scm()); start_measure_i_ = gh_scm2int (get_property ("currentBarNumber")); } diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index c37e613432..c8533b8e48 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -120,7 +120,8 @@ Note_head_line_engraver::create_grobs () line_->set_parent (Staff_symbol_referencer::staff_symbol_l (last_head_), Y_AXIS); - announce_grob (line_, last_req_); + SCM c = last_req_? last_req_->self_scm () : SCM_EOL; + announce_grob(line_, c); last_req_ = 0; follow_ = false; diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index aec4c756c8..b6fd727f5b 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -83,7 +83,7 @@ Note_heads_engraver::process_music () d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ())); d->set_parent (note_p, Y_AXIS); - announce_grob (d,0); + announce_grob (d, SCM_EOL); dot_p_arr_.push (d); } @@ -104,7 +104,7 @@ Note_heads_engraver::process_music () note_p->set_grob_property ("note-character", ly_str02scm (s)); } - announce_grob (note_p,req); + announce_grob (note_p,req->self_scm()); note_p_arr_.push (note_p); } } diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index 076cff6789..90eb585df2 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -50,7 +50,7 @@ Note_name_engraver::create_grobs () { Item * t = new Item (get_property ("NoteName")); t->set_grob_property ("text", ly_str02scm (s.ch_C ())); - announce_grob (t, req_l_arr_[0]); + announce_grob(t, req_l_arr_[0]->self_scm()); texts_.push (t); } } diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index 86ad4b3675..7c6b0d6c70 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -103,7 +103,7 @@ Part_combine_music_iterator::change_to (Music_iterator *it, String to_type, Translator_group * dest = it->report_to_l ()->find_create_translator_l (to_type, to_id); current->remove_translator_p (last); - dest->add_group_translator (last); + dest->add_used_group_translator (last); } else { diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index f818eb9e33..6c9b69272c 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -146,7 +146,7 @@ Percent_repeat_engraver::process_music () if (repeat_sign_type_ == BEAT) { beat_slash_ = new Item (get_property ("RepeatSlash")); - announce_grob (beat_slash_, repeat_); + announce_grob(beat_slash_, repeat_->self_scm()); } else if (repeat_sign_type_ == MEASURE) { @@ -155,13 +155,13 @@ Percent_repeat_engraver::process_music () perc_p_ = new Spanner (get_property ("PercentRepeat")); SCM col =get_property ("currentCommandColumn"); perc_p_->set_bound (LEFT, unsmob_grob (col)); - announce_grob (perc_p_, repeat_); + announce_grob(perc_p_, repeat_->self_scm()); } else if (repeat_sign_type_ == DOUBLE_MEASURE) { double_percent_ = new Item (get_property ("DoublePercentRepeat")); - announce_grob (double_percent_, repeat_); + announce_grob(double_percent_, repeat_->self_scm()); /* forbid breaks on a % line. Should forbid all breaks, really. diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index dc3e3f35de..f51f9473b8 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -155,7 +155,7 @@ Phrasing_slur_engraver::create_grobs () } start_phrasing_slur_l_arr.push (phrasing_slur); requests_arr_.push (phrasing_slur_req_l); - announce_grob (phrasing_slur, phrasing_slur_req_l); + announce_grob(phrasing_slur, phrasing_slur_req_l->self_scm()); } } for (int i=0; i < start_phrasing_slur_l_arr.size (); i++) diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index a4f5389949..36fcd1a732 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -170,10 +170,12 @@ Piano_pedal_engraver::create_grobs () p->item_p_ = new Item (get_property (propname.ch_C ())); p->item_p_->set_grob_property ("text", s); - announce_grob (p->item_p_, - p->req_l_drul_[START] - ? p->req_l_drul_[START] - : p->req_l_drul_[STOP]); + + Music * c = p->req_l_drul_[START] + ? p->req_l_drul_[START] + : p->req_l_drul_[STOP]; + announce_grob (p->item_p_, c ? c->self_scm() : SCM_EOL); + } p->req_l_drul_[START] = 0; p->req_l_drul_[STOP] = 0; diff --git a/lily/porrectus-engraver.cc b/lily/porrectus-engraver.cc index 15f86571f7..e900701dbf 100644 --- a/lily/porrectus-engraver.cc +++ b/lily/porrectus-engraver.cc @@ -122,7 +122,7 @@ Porrectus_engraver::create_grobs () Porrectus::set_left_head(porrectus_p_, left_head); Porrectus::set_right_head(porrectus_p_, right_head); porrectus_p_arr_.push (porrectus_p_); - announce_grob (porrectus_p_, porrectus_req_l_); + announce_grob(porrectus_p_, porrectus_req_l_->self_scm()); past_notes_pq_. insert (right_heads_[i]); left_heads_.del (i); diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index 4e73f1dc46..7bdfbbf927 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -40,7 +40,7 @@ Rest_collision_engraver::create_grobs () rest_collision_p_ = new Item (get_property ("RestCollision")); Rest_collision::set_interface (rest_collision_p_); - announce_grob (rest_collision_p_, 0); + announce_grob(rest_collision_p_, SCM_EOL); for (int i=0; i< note_column_l_arr_.size (); i++) Rest_collision::add_column (rest_collision_p_,note_column_l_arr_[i]); } diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index b64d874fac..72582135c2 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -84,10 +84,10 @@ Rest_engraver::create_grobs () Rhythmic_head::set_dots (rest_p_, dot_p_); dot_p_->set_parent (rest_p_, Y_AXIS); dot_p_->set_grob_property ("dot-count", gh_int2scm (dots)); - announce_grob (dot_p_,0); + announce_grob (dot_p_, SCM_EOL); } - announce_grob (rest_p_, rest_req_l_); + announce_grob(rest_p_, rest_req_l_->self_scm()); } } diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 55462e76a9..32b3061e7e 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -86,12 +86,12 @@ Rhythmic_column_engraver::create_grobs () { note_column_ = new Item (get_property ("NoteColumn")); Note_column::set_interface (note_column_); - announce_grob (note_column_, 0); + announce_grob(note_column_, SCM_EOL); spacing_ = new Item (get_property ("NoteSpacing")); spacing_->set_grob_property ("left-items", gh_cons (note_column_->self_scm (), SCM_EOL)); - announce_grob (spacing_, 0); + announce_grob(spacing_, SCM_EOL); if (last_spacing_) { diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 76ecf79872..69e6ca905e 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -46,10 +46,10 @@ Score_engraver::make_columns () command_column_l_->set_grob_property ("breakable", SCM_BOOL_T); - Grob_info i1 (command_column_l_, SCM_EOL); + Grob_info i1 (command_column_l_); i1.origin_trans_l_ = this; - Grob_info i2 (musical_column_l_, SCM_EOL); + Grob_info i2 (musical_column_l_); i2.origin_trans_l_ = this; announce_grob (i1); @@ -124,7 +124,6 @@ Score_engraver::one_time_step () process_music (); announces (); } - stop_translation_timestep (); check_removal (); diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index df4ca98b88..50cbee9c91 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -72,7 +72,7 @@ Script_column_engraver::create_grobs () if (!scol_p_ && script_l_arr_.size () > 1) { scol_p_ = new Item (get_property ("ScriptColumn")); - announce_grob (scol_p_, 0); + announce_grob(scol_p_, SCM_EOL); } if (scol_p_) diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 1d0977a487..7b38dbddf2 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -108,7 +108,7 @@ Script_engraver::process_music () script_p_arr_.push (p); - announce_grob (p, l); + announce_grob (p, l->self_scm()); } } diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index b09b79f3d7..8c38cc0c26 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -69,7 +69,7 @@ Separating_line_group_engraver::initialize () { sep_span_p_ = new Spanner (get_property ("SeparatingGroupSpanner")); - announce_grob (sep_span_p_, 0); + announce_grob(sep_span_p_, SCM_EOL); sep_span_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); } @@ -120,7 +120,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) if (ib) p_ref_->set_grob_property ("breakable", SCM_BOOL_T); - announce_grob (p_ref_, 0); + announce_grob(p_ref_, SCM_EOL); if (p_ref_ == break_malt_p_) { @@ -128,7 +128,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) current_spacings_.staff_spacing_ = it; it->set_grob_property ("left-items", gh_cons (break_malt_p_->self_scm (), SCM_EOL)); - announce_grob (it, 0); + announce_grob(it, SCM_EOL); if (int i = last_spacings_.note_spacings_.size ()) { diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 90977e6a55..9bf8e6a29e 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -164,7 +164,7 @@ Slur_engraver::create_grobs () } start_slur_l_arr.push (slur); requests_arr_.push (slur_req_l); - announce_grob (slur, slur_req_l); + announce_grob(slur, slur_req_l->self_scm()); } } for (int i=0; i < start_slur_l_arr.size (); i++) diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 678b8da55b..874f6b5e04 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -80,7 +80,7 @@ Spacing_engraver::initialize () spacing_p_ =new Spanner (get_property ("SpacingSpanner")); Spacing_spanner::set_interface (spacing_p_); spacing_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob (spacing_p_, 0); + announce_grob(spacing_p_, SCM_EOL); } void diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index e3165de03a..0753b2c245 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -65,7 +65,7 @@ Span_arpeggio_engraver::create_grobs () && to_boolean (get_property ("connectArpeggios"))) { span_arpeggio_ = new Item (get_property ("Arpeggio")); - announce_grob (span_arpeggio_, 0); + announce_grob(span_arpeggio_, SCM_EOL); } } diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index e3b4778e4e..5faef20a88 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -60,7 +60,7 @@ Span_bar_engraver::acknowledge_grob (Grob_info i) Span_bar::set_interface (spanbar_p_); spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS); - announce_grob (spanbar_p_,0); + announce_grob (spanbar_p_, SCM_EOL); } } } diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index b12d73b3ae..dff7448e12 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -47,7 +47,7 @@ Staff_symbol_engraver::initialize () span_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob (span_p_, 0); + announce_grob(span_p_, SCM_EOL); } void diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index a80f0141ef..3978459c16 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -84,7 +84,7 @@ Stanza_number_engraver::create_text (SCM txt) { text_ = new Item (get_property ("StanzaNumber")); text_->set_grob_property ("text", txt); - announce_grob (text_,0); + announce_grob (text_, SCM_EOL); } } diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 3d7d879bb8..cdf1a6b5d4 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -91,7 +91,7 @@ Stem_engraver::acknowledge_grob (Grob_info i) tremolo_p_ = new Item (get_property ("StemTremolo")); Stem_tremolo::set_interface (tremolo_p_); - announce_grob (tremolo_p_, tremolo_req_l_); + announce_grob(tremolo_p_, tremolo_req_l_->self_scm()); /* The number of tremolo flags is the number of flags of the tremolo-type minus the number of flags of the note @@ -109,7 +109,7 @@ Stem_engraver::acknowledge_grob (Grob_info i) /* We announce the cause of the head as cause of the stem. The stem needs a rhythmic structure to fit it into a beam. */ - announce_grob (stem_p_, i.music_cause ()); + announce_grob(stem_p_, i.music_cause ()->self_scm()); } if (Stem::flag_i (stem_p_) != duration_log) diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 2b509be6ac..fe40a06b84 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -77,7 +77,7 @@ System_start_delimiter_engraver::initialize () delim_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob (delim_,0); + announce_grob (delim_, SCM_EOL); } void diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index e795c9e677..3a463407f2 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -134,7 +134,7 @@ Text_engraver::create_grobs () */ text->set_grob_property ("no-spacing-rods" , SCM_BOOL_F); - announce_grob (text, r); + announce_grob (text, r->self_scm ()); texts_.push (text); } } diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 043a9affa0..f8c520b1cb 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -125,7 +125,7 @@ Text_spanner_engraver::create_grobs () Grob *e = unsmob_grob (get_property ("currentMusicalColumn")); span_->set_bound (LEFT, e); - announce_grob (span_, req_drul_[START]); + announce_grob (span_, req_drul_[START]->self_scm()); req_drul_[START] = 0; } } diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index aa2bee3ae6..efae25603f 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -26,13 +26,6 @@ TODO: Remove the dependency on musical info. We should tie on the basis of position and duration-log of the heads (not of the reqs). - - TODO: figure this out: currently, this engravers ties note heads - that have the same Y-position (and does not look at pitch). This - means that we will fuck up with a clef-change. How should - clef-changes during ties be handled, or should they not? - - */ class Tie_engraver : public Engraver { @@ -104,10 +97,13 @@ Tie_engraver::acknowledge_grob (Grob_info i) } int -head_position_compare (Grob *const&a,Grob *const&b) +head_pitch_compare (Grob *const&a,Grob *const&b) { - return sign (gh_scm2double (a->get_grob_property ("staff-position")) - - gh_scm2double (b->get_grob_property ("staff-position"))); + Music *m1 =unsmob_music (a->get_grob_property ("cause")); + Music *m2 =unsmob_music (b->get_grob_property ("cause")); + + return Pitch::compare (* unsmob_pitch (m1->get_mus_property ("pitch")), + * unsmob_pitch (m2->get_mus_property ("pitch"))); } void @@ -115,8 +111,8 @@ Tie_engraver::create_grobs () { if (req_l_) { - now_heads_.sort (&head_position_compare); - stopped_heads_.sort (&head_position_compare); + now_heads_.sort (&head_pitch_compare); + stopped_heads_.sort (&head_pitch_compare); SCM head_list = SCM_EOL; @@ -126,7 +122,7 @@ Tie_engraver::create_grobs () while (i >= 0 && j >=0) { int comp - = head_position_compare (now_heads_[i], stopped_heads_[j]); + = head_pitch_compare (now_heads_[i], stopped_heads_[j]); if (comp) { @@ -164,7 +160,7 @@ Tie_engraver::create_grobs () Tie::set_head (p,RIGHT, dynamic_cast (unsmob_grob (ly_cdr (pair)))); tie_p_arr_.push (p); - announce_grob (p, req_l_); + announce_grob(p, req_l_->self_scm()); } else for (SCM s = head_list; gh_pair_p (s); s = ly_cdr (s)) { @@ -175,7 +171,7 @@ Tie_engraver::create_grobs () Tie::set_head (p, RIGHT, dynamic_cast (unsmob_grob (ly_cdar (s)))); tie_p_arr_.push (p); - announce_grob (p, req_l_); + announce_grob(p, req_l_->self_scm()); } if (tie_p_arr_.size () > 1 && !tie_column_p_) @@ -184,7 +180,7 @@ Tie_engraver::create_grobs () Tie_column::set_interface (tie_column_p_); for (int i = tie_p_arr_.size (); i--;) Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]); - announce_grob (tie_column_p_, 0); + announce_grob(tie_column_p_, SCM_EOL); } } } diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index f352b498f0..5e85cf3c5b 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -1,5 +1,5 @@ /* - time_signature-reg.cc -- implement Time_signature_engraver + time-signature-engraver.cc -- implement Time_signature_engraver source file of the GNU LilyPond music typesetter @@ -9,11 +9,8 @@ #include "time-signature.hh" #include "command-request.hh" #include "engraver.hh" - - #include "engraver-group-engraver.hh" - /** generate time_signatures. */ @@ -27,7 +24,6 @@ protected: virtual void create_grobs (); public: TRANSLATOR_DECLARATIONS(Time_signature_engraver); - }; @@ -51,13 +47,10 @@ Time_signature_engraver::create_grobs () time_signature_p_->set_grob_property ("fraction",fr); if (time_signature_p_) - announce_grob (time_signature_p_, 0); + announce_grob(time_signature_p_, SCM_EOL); } - } - - void Time_signature_engraver::stop_translation_timestep () { @@ -67,9 +60,6 @@ Time_signature_engraver::stop_translation_timestep () time_signature_p_ =0; } } - - - ENTER_DESCRIPTION(Time_signature_engraver, diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 2504cd7398..edd5505bc4 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -19,7 +19,6 @@ void Timing_translator::stop_translation_timestep () { - Translator *t = this; Global_translator *global_l =0; do @@ -155,3 +154,4 @@ Timing_translator::start_translation_timestep () daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy ()); } +ENTER_DESCRIPTION (Timing_translator, "","","","","" ); diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 5ddf433ef9..bd9d1d1002 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -62,28 +62,45 @@ Translator_group::check_removal () } } - SCM Translator_group::add_translator (SCM list, Translator *t) { + /* + Must append, since list ordering must be preserved. + */ list = gh_append2 (list, gh_cons (t->self_scm (), SCM_EOL)); t->daddy_trans_l_ = this; t->output_def_l_ = output_def_l_; - if (Translator_group*tg = dynamic_cast (t)) - { - unsmob_translator_def (tg->definition_)->apply_property_operations (tg); - } - - t->initialize (); + return list; } + void -Translator_group::add_group_translator (Translator *t) +Translator_group::add_fresh_simple_translator (Translator*t) +{ + simple_trans_list_ = add_translator (simple_trans_list_, t); + t->initialize (); +} + +void +Translator_group::add_used_group_translator (Translator *t) { trans_group_list_ = add_translator (trans_group_list_,t); } +void +Translator_group::add_fresh_group_translator (Translator*t) +{ + Translator_group*tg = dynamic_cast (t); + assert (tg); + + trans_group_list_ = add_translator (trans_group_list_,t); + unsmob_translator_def (tg->definition_)->apply_property_operations (tg); + t->initialize (); + +} + bool Translator_group::removable_b () const @@ -132,7 +149,7 @@ Translator_group::find_create_translator_l (String n, String id) if (i == path.size () -1) new_group->id_str_ = id; - current->add_group_translator (new_group); + current->add_fresh_group_translator (new_group); current = new_group; } @@ -233,7 +250,7 @@ Translator_group::get_default_interpreter () t = unsmob_translator_def (this->definition_); } Translator_group *tg = t->instantiate (output_def_l_); - add_group_translator (tg); + add_fresh_group_translator (tg); if (!tg->is_bottom_translator_b ()) return tg->get_default_interpreter (); diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index dc42574c38..f3a73c8e10 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -89,7 +89,7 @@ Tuplet_engraver::create_grobs () glep->set_grob_property ("text", t); } - announce_grob (glep, time_scaled_music_arr_ [i]); + announce_grob(glep, time_scaled_music_arr_ [i]->self_scm()); } } diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 3faa77f3d0..444168570f 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -35,7 +35,7 @@ Vertical_align_engraver::initialize () { valign_p_ =new Spanner (get_property ("VerticalAlignment")); valign_p_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob (valign_p_ , 0); + announce_grob(valign_p_ , SCM_EOL); } void diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index d83272ba2b..411cbc07da 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -147,7 +147,7 @@ Volta_engraver::create_grobs () volta_span_p_ = new Spanner (get_property ("VoltaBracket")); Volta_spanner::set_interface (volta_span_p_); - announce_grob (volta_span_p_,0); + announce_grob (volta_span_p_, SCM_EOL); volta_span_p_->set_grob_property ("text", start_str_); } } diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 26cd85e811..8acac587da 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -20,6 +20,7 @@ StaffContext=\translator { \consists "Separating_line_group_engraver" SeparatingGroupSpanner \override #'spacing-procedure = #Separating_group_spanner::set_spacing_rods_and_seqs + \consists "Dot_column_engraver" \consists "Clef_engraver" \consists "Key_engraver" @@ -128,7 +129,6 @@ VoiceContext = \translator { \consists "Breathing_sign_engraver" % \consists "Rest_engraver" - \consists "Dot_column_engraver" \consists "Stem_engraver" \consists "Beam_engraver" \consists "Auto_beam_engraver" diff --git a/ly/performer-init.ly b/ly/performer-init.ly index 97c6638c15..cd7700b55a 100644 --- a/ly/performer-init.ly +++ b/ly/performer-init.ly @@ -115,8 +115,10 @@ ScoreContext = \translator { \accepts ChoirStaff \accepts RhythmicStaff \accepts ChordNames - \consists "Swallow_performer" + \consists "Timing_translator" + \consists "Swallow_performer" + dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume instrumentEqualizer = #default-instrument-equalizer } diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index fa64366d99..54b32e4d41 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.5.29 -Entered-date: 01FEB02 +Version: 1.5.30 +Entered-date: 04FEB02 Description: @BLURB@ 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.5.29.tar.gz + 1000k lilypond-1.5.30.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.5.29.tar.gz + 1000k lilypond-1.5.30.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.mandrake.spec b/make/out/lilypond.mandrake.spec index 4cd140015d..c6b505226e 100644 --- a/make/out/lilypond.mandrake.spec +++ b/make/out/lilypond.mandrake.spec @@ -1,5 +1,5 @@ %define name lilypond -%define version 1.5.29 +%define version 1.5.30 %define release 1mdk Name: %{name} diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index 85fcdfba5a..1a0a60da4c 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.5.29 +Version: 1.5.30 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.29.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.30.tar.gz Summary: Create and print music notation URL: http://www.lilypond.org/ BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index 6381982af8..83a1b979bf 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ Distribution: SuSE Linux 7.0 (i386) Name: lilypond -Version: 1.5.29 +Version: 1.5.30 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.29.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.30.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index b0e2cab0f2..9e24390594 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -354,7 +354,7 @@ def draw_slash(expr hwid_hash) = enddef; fet_beginchar("Whole slashhead","0slash","wholeslashhead") - draw_slash(staff_space#); + draw_slash(staff_space#); fet_endchar; fet_beginchar("Half slashhead","1slash","halfslashhead") diff --git a/scm/grob-description.scm b/scm/grob-description.scm index bf5f35f9dc..ea731b477c 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -18,7 +18,9 @@ )) -;;; WARNING: the meta field should be the last one. +;;; WARNING: the meta field should be the last one. + +;; TODO: junk the meta field in favor of something more compact? (define all-grob-descriptions `( (Accidentals . ( @@ -803,5 +805,12 @@ (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions)) + + ; (display (map pair? all-grob-descriptions)) + +;; make sure that \property Foo.Bar =\turnOff doesn't complain + +(map (lambda (x) (set-object-property! (car x) 'translator-type? list?)) + all-grob-descriptions) diff --git a/scm/interface-description.scm b/scm/interface-description.scm index ce5f960c3f..62ac4dfbca 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -6,7 +6,7 @@ ;;;; Jan Nieuwenhuizen - ; should include default value? +; should include default value? ;;; FIXME: naming. diff --git a/scm/lily.scm b/scm/lily.scm index 0025dacb7c..a336564877 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -155,7 +155,6 @@ "pdftex.scm" "c++.scm" "grob-property-description.scm" - "translator-property-description.scm" "context-description.scm" "interface-description.scm" "beam.scm" @@ -169,6 +168,7 @@ "basic-properties.scm" "chord-name.scm" "grob-description.scm" + "translator-property-description.scm" "script.scm" "drums.scm" "midi.scm" -- 2.39.5