From 5b6181075e3615dce049711973d3cd5caa60e5db Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 2 Jul 2001 01:15:57 +0200 Subject: [PATCH] release: 1.5.1 ========== * Added feature to ly2dvi to find feta pfa font files used in a postscript file to make printing of direct postscript a bit easier: lilypond -fps input/trip.ly cat $(ly2dvi -f trip.ps) trip.ps | lpr * Reincluded 1.4.3.jcn2. * Website fixes. * Ly2dvi now leaves .tex and .latex output if latex fails, and cleans the temp dir if anything fails. * Fixes for windows scripts. 1.5.0. --- CHANGES | 11 +++ Documentation/topdocs/README.texi | 2 +- INSTALL.txt | 3 +- README.txt | 4 +- VERSION | 4 +- lily/align-note-column-engraver.cc | 132 -------------------------- lily/audio-staff.cc | 4 +- lily/auto-beam-engraver.cc | 10 -- lily/beam-engraver.cc | 10 +- lily/grace-align-item.cc | 46 --------- lily/grace-engraver-group.cc | 130 ------------------------- lily/grace-iterator.cc | 42 ++++---- lily/grace-music.cc | 16 +++- lily/grace-performer-group.cc | 100 ------------------- lily/grace-position-engraver.cc | 117 ----------------------- lily/grace-position-performer.cc | 124 ------------------------ lily/include/grace-align-item.hh | 25 ----- lily/include/grace-engraver-group.hh | 38 -------- lily/include/grace-iterator.hh | 4 +- lily/include/grace-music.hh | 16 +--- lily/include/grace-performer-group.hh | 36 ------- lily/include/midi-item.hh | 4 + lily/include/midi-walker.hh | 3 +- lily/include/new-grace-iterator.hh | 30 ------ lily/include/new-grace-music.hh | 28 ------ lily/include/performance.hh | 1 - lily/include/simple-music-iterator.hh | 5 + lily/local-key-engraver.cc | 28 +----- lily/lyric-phrasing-engraver.cc | 6 -- lily/midi-item.cc | 7 +- lily/midi-walker.cc | 18 +++- lily/new-grace-iterator.cc | 52 ---------- lily/new-grace-music.cc | 48 ---------- lily/parser.yy | 4 +- lily/performance.cc | 2 +- lily/phrasing-slur-engraver.cc | 4 +- lily/rhythmic-column-engraver.cc | 24 ----- lily/script-engraver.cc | 6 -- lily/sequential-music-iterator.cc | 5 +- lily/simple-music-iterator.cc | 5 +- lily/slur-engraver.cc | 6 +- lily/spacing-engraver.cc | 3 - lily/span-bar.cc | 9 +- lily/tuplet-engraver.cc | 22 ++--- ly/paper11.ly | 2 + ly/paper13-init.ly | 1 + ly/paper13.ly | 2 + ly/paper20.ly | 2 + ly/paper23.ly | 2 + ly/performer-init.ly | 14 +-- make/out/lilypond.lsm | 8 +- make/out/lilypond.redhat.spec | 4 +- make/out/lilypond.suse.spec | 4 +- mutopia/F.Schubert/standchen.ly | 2 +- scm/grob-description.scm | 7 -- scm/translator-description.scm | 34 +------ scripts/convert-ly.py | 1 + 57 files changed, 146 insertions(+), 1131 deletions(-) delete mode 100644 lily/align-note-column-engraver.cc delete mode 100644 lily/grace-align-item.cc delete mode 100644 lily/grace-engraver-group.cc delete mode 100644 lily/grace-performer-group.cc delete mode 100644 lily/grace-position-engraver.cc delete mode 100644 lily/grace-position-performer.cc delete mode 100644 lily/include/grace-align-item.hh delete mode 100644 lily/include/grace-engraver-group.hh delete mode 100644 lily/include/grace-performer-group.hh delete mode 100644 lily/include/new-grace-iterator.hh delete mode 100644 lily/include/new-grace-music.hh delete mode 100644 lily/new-grace-iterator.cc delete mode 100644 lily/new-grace-music.cc create mode 100644 ly/paper11.ly create mode 100644 ly/paper13.ly create mode 100644 ly/paper20.ly create mode 100644 ly/paper23.ly diff --git a/CHANGES b/CHANGES index 8d267e71ae..9d68061afb 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,17 @@ the temp dir if anything fails. * Fixes for windows scripts. +1.5.0.uu1 +========= + +* Hara kiri and span-bar. + +* Junk old grace stuff. + +* Don't crash on grace notes in MIDI output. + + + 1.5.0 ===== diff --git a/Documentation/topdocs/README.texi b/Documentation/topdocs/README.texi index 421369f899..210352eaaf 100644 --- a/Documentation/topdocs/README.texi +++ b/Documentation/topdocs/README.texi @@ -74,7 +74,7 @@ list. @uref{http://mail.gnu.org/mailman/listinfo/lilypond-devel,lilypond-devel@@gnu.org} For discussions about developing lilypond, in particular the unstable series. -@item @uref{http://mail.gnu.org/mailman/listinfo/help-lilypond,help-lilypond@@gnu.org} +@item @uref{http://mail.gnu.org/mailman/listinfo/lilypond-user,lilypond-user@@gnu.org} For discussions about using lilypond, in particular the stable series. @item @uref{http://mail.gnu.org/mailman/listinfo/bug-lilypond,bug-lilypond@@gnu.org} diff --git a/INSTALL.txt b/INSTALL.txt index a9ed703b22..6a8b664b58 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -474,7 +474,8 @@ Debian GNU/Linux unstable gcc-3.0 Flex (2.5.4a-11) in unstable does not produce g++-3.0 compliant C++ code. To compile LilyPond with gcc-3.0 you may do: - CC=gcc-3.0 CXX=g++-3.0 ./configure + + CC=gcc-3.0 CXX=g++-3.0 ./configure --enable-config=gcc-3.0 make conf=gcc-3.0 -C lily out-gcc-3.0/lexer.cc patch -p1 < lexer-gcc-3.0.patch make conf=gcc-3.0 -C lily diff --git a/README.txt b/README.txt index c5ea27a416..ba79af36ac 100644 --- a/README.txt +++ b/README.txt @@ -63,8 +63,8 @@ list, _not_ to us personally. discussions about developing lilypond, in particular the unstable series. - * help-lilypond@gnu.org - (http://mail.gnu.org/mailman/listinfo/help-lilypond) For + * lilypond-user@gnu.org + (http://mail.gnu.org/mailman/listinfo/lilypond-user) For discussions about using lilypond, in particular the stable series. * bug-lilypond@gnu.org diff --git a/VERSION b/VERSION index a05c82245b..acde3f6e1f 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=0 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=1 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc deleted file mode 100644 index b1259ab1dd..0000000000 --- a/lily/align-note-column-engraver.cc +++ /dev/null @@ -1,132 +0,0 @@ -/* - align-note-column-engraver.cc -- implement Align_note_column_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#include "engraver.hh" -#include "grace-align-item.hh" -#include "align-interface.hh" -#include "note-column.hh" -#include "warn.hh" -#include "directional-element-interface.hh" -#include "side-position-interface.hh" -#include "local-key-item.hh" -#include "paper-def.hh" - -/** - Catch notes, and put them in a row. Used for aligning grace notes. - */ -class Align_note_column_engraver: public Engraver -{ - Item * align_item_p_; - Grob * now_column_l_; - Grob * accidental_l_; - - virtual void create_grobs (); - virtual void start_translation_timestep (); - virtual void initialize (); - virtual void finalize (); - virtual void acknowledge_grob (Grob_info); -public: - VIRTUAL_COPY_CONS (Translator); - Align_note_column_engraver (); -}; - -Align_note_column_engraver::Align_note_column_engraver () -{ - align_item_p_ =0; - now_column_l_ =0; - accidental_l_ =0; -} - -void -Align_note_column_engraver::initialize () -{ - align_item_p_ = new Item (get_property ("GraceAlignment")); - Grace_align_item::set_interface (align_item_p_); - Side_position_interface::set_axis (align_item_p_, X_AXIS); - Side_position_interface::set_direction (align_item_p_, LEFT); - - // needed for setting font size. - announce_grob (align_item_p_, 0); -} - -void -Align_note_column_engraver::finalize () -{ - SCM al = get_property ("graceAlignPosition"); - if (isdir_b (al)) - { - Direction d = to_dir (al); - Directional_element_interface::set (align_item_p_,d); - } - - typeset_grob (align_item_p_); - align_item_p_ =0; -} - -void -Align_note_column_engraver::acknowledge_grob (Grob_info inf) -{ - if (Note_column::has_interface (inf.elem_l_)) - { - now_column_l_ =inf.elem_l_; - } - else if (Local_key_item::has_interface (inf.elem_l_)) - { - accidental_l_ = inf.elem_l_; - } -} -void -Align_note_column_engraver::create_grobs () -{ - if (now_column_l_ && accidental_l_) - { - - /* Can't inspect width of Local_key_item, since - - A. it may not be fully built - - B. it has no pscore_l_ field. - - - UGH UGH: separate note-spacing into separate class, and - use that to space grace notes. - */ - SCM grsp = get_property ("graceAccidentalSpace") ; - if (gh_number_p (grsp)) - { - /* - ugh. - */ - Real extra_space = gh_scm2double (grsp); - SCM e = gh_cons (gh_double2scm (-extra_space), - gh_double2scm (0.0)); - now_column_l_->set_grob_property ("extra-space", e); - } - } - - if (now_column_l_ && !align_item_p_) - programming_error ("Align_note_column_engraver:: urg\n"); - else - - if (now_column_l_) - { - Align_interface::add_element (align_item_p_,now_column_l_, Align_interface::alignment_callback_proc); - now_column_l_ =0; - } -} - -void -Align_note_column_engraver::start_translation_timestep () -{ - now_column_l_ =0; - accidental_l_ =0; -} - -ADD_THIS_TRANSLATOR (Align_note_column_engraver); - diff --git a/lily/audio-staff.cc b/lily/audio-staff.cc index 791287ab25..f89ebd62d4 100644 --- a/lily/audio-staff.cc +++ b/lily/audio-staff.cc @@ -23,8 +23,8 @@ void Audio_staff::output (Midi_stream& midi_stream_r, int track_i) { Midi_track midi_track; - midi_track.number_i_ = track_i; - midi_track.channel_i_ = channel_i_; + midi_track.number_i_ = track_i; + midi_track.channel_i_ = channel_i_; for (Midi_walker i (this, &midi_track); i.ok (); i++) i.process (); midi_stream_r << midi_track; diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index b4191f36bc..31e26d349c 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -337,20 +337,10 @@ Auto_beam_engraver::finalize () junk_beam (); } -bool -Auto_beam_engraver::same_grace_state_b (Grob* e) -{ - bool gr = e->get_grob_property ("grace") == SCM_BOOL_T; - SCM wg =get_property ("weAreGraceContext"); - return (to_boolean (wg)) == gr; -} void Auto_beam_engraver::acknowledge_grob (Grob_info info) { - if (!same_grace_state_b (info.elem_l_)) - return; - if (stem_l_arr_p_) { if (Beam::has_interface (info.elem_l_)) diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index e6f08096d6..4445b79643 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -131,7 +131,7 @@ Beam_engraver::process_music () } - if (beam_p_ && !to_boolean (get_property ("weAreGraceContext"))) + if (beam_p_) { Score_engraver * e = 0; Translator * t = daddy_grav_l (); @@ -244,14 +244,6 @@ Beam_engraver::acknowledge_grob (Grob_info info) if (Stem::beam_l (stem_l)) return; - bool stem_grace = stem_l->get_grob_property ("grace") == SCM_BOOL_T; - - SCM wg =get_property ("weAreGraceContext"); - bool wgb= to_boolean (wg); - - if (wgb!= stem_grace) - return; - Rhythmic_req *rhythmic_req = dynamic_cast (info.req_l_); if (!rhythmic_req) { diff --git a/lily/grace-align-item.cc b/lily/grace-align-item.cc deleted file mode 100644 index 3f395c94f8..0000000000 --- a/lily/grace-align-item.cc +++ /dev/null @@ -1,46 +0,0 @@ -/* - grace-align-item.cc -- implement Grace_align_item - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#include "grace-align-item.hh" -#include "align-interface.hh" - -#include "paper-column.hh" -#include "paper-def.hh" - -MAKE_SCHEME_CALLBACK (Grace_align_item,before_line_breaking,1); -SCM -Grace_align_item::before_line_breaking (SCM smob) -{ - Grob*me = unsmob_grob (smob); - - SCM space = me->get_grob_property ("horizontal-space"); - me->set_grob_property ("threshold", - gh_cons (space, - gh_double2scm (infinity_f))); - dynamic_cast (me)->column_l ()->set_grob_property ("contains-grace", SCM_BOOL_T); - - return SCM_UNSPECIFIED; -} - -void -Grace_align_item::set_interface (Grob*me) -{ - me->set_interface (ly_symbol2scm ("grace-align-interface")); - me->set_grob_property ("stacking-dir", gh_int2scm (RIGHT)); - Align_interface::set_interface (me); - Align_interface::set_axis (me,X_AXIS); -} - - - -bool -Grace_align_item::has_interface (Grob*m) -{ - return m&& m->has_interface (ly_symbol2scm ("grace-align-interface")); -} diff --git a/lily/grace-engraver-group.cc b/lily/grace-engraver-group.cc deleted file mode 100644 index 72c1ebdcc6..0000000000 --- a/lily/grace-engraver-group.cc +++ /dev/null @@ -1,130 +0,0 @@ -/* - grace-engraver-group.cc -- implement Grace_engraver_group - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#include "grace-engraver-group.hh" -#include "lily-guile.hh" -#include "grob.hh" -#include "musical-request.hh" - -void -Grace_engraver_group::start () -{ -} -/* - We're really finished with this context. Get rid of everything. - */ -void -Grace_engraver_group::finish () -{ - calling_self_b_ = true; - removal_processing (); // ugr. We'd want to have this done by our parents. - for (int i=0; i < announce_to_top_.size (); i++) - { - Engraver::announce_grob (announce_to_top_[i]); - } - - for (int i=0; i < typeset_us_.size (); i++) - { - Engraver::typeset_grob (typeset_us_[i]); - } - typeset_us_.clear (); - calling_self_b_ = false; -} - -void -Grace_engraver_group::finalize () -{ - Engraver_group_engraver::finalize (); -} - -void -Grace_engraver_group::announce_grob (Grob_info inf) -{ - announce_info_arr_.push (inf); - // do not propagate to top - announce_to_top_.push (inf); - - inf.elem_l_->set_grob_property ("grace", SCM_BOOL_T); -} - -void -Grace_engraver_group::typeset_grob (Grob*e) -{ - typeset_us_.push (e); -} - - -Grace_engraver_group::Grace_engraver_group () -{ - calling_self_b_ = false; -} - -void -Grace_engraver_group::one_time_step () -{ - calling_self_b_ = true; - - if (!to_boolean (get_property (ly_symbol2scm ("skipTypesetting")))) - { - process_music (); - announces (); - } - stop_translation_timestep (); - check_removal (); - calling_self_b_ = false; -} - - -void -Grace_engraver_group::each (Method_pointer method) -{ - if (calling_self_b_) - Engraver_group_engraver::each (method); -} - - -ADD_THIS_TRANSLATOR (Grace_engraver_group); - - -/* - don't let the commands trickle up. - */ -bool -Grace_engraver_group::try_music (Music *m) -{ - bool hebbes_b = try_music_on_nongroup_children (m); - - if (!hebbes_b && pass_to_top_b (m)) - { - hebbes_b = daddy_trans_l_->try_music (m); - } - - return hebbes_b; -} - -bool -Grace_engraver_group::pass_to_top_b (Music *m) const -{ - if (Span_req * sp = dynamic_cast (m)) - { - if (scm_equal_p (sp->get_mus_property ("span-type"), ly_str02scm ("slur")) - == SCM_BOOL_T) - // return true; - return false; - } - return false; -} - -void -Grace_engraver_group::initialize () -{ - calling_self_b_ = true; - Engraver_group_engraver::initialize (); - calling_self_b_ = false; -} diff --git a/lily/grace-iterator.cc b/lily/grace-iterator.cc index f73e610bad..9248e071f8 100644 --- a/lily/grace-iterator.cc +++ b/lily/grace-iterator.cc @@ -1,5 +1,5 @@ /* - grace-iterator.cc -- implement Grace_iterator + grace-music.cc -- implement Grace_music source file of the GNU LilyPond music typesetter @@ -7,47 +7,45 @@ */ +#include "grace-music.hh" #include "grace-iterator.hh" + + #include "global-translator.hh" #include "warn.hh" + Grace_iterator::~Grace_iterator () { // child_iter_p_ = 0; } + void -Grace_iterator::construct_children () +Grace_iterator::process (Moment m ) { - Translator_group * t = report_to_l ()->find_create_translator_l ("Grace", ""); // umgh. - - if (t) - set_translator (t); - Music_wrapper_iterator::construct_children (); + Moment main ; + main.main_part_ = m.grace_mom_; + Music_wrapper_iterator::process (main); } void -Grace_iterator::process (Moment) +Grace_iterator::construct_children () { - Global_translator * t = dynamic_cast (report_to_l ()); - if (t) - { - t->start (); - t->run_iterator_on_me (child_iter_p_); - delete child_iter_p_; - child_iter_p_ = 0; - t->finish (); - } - else - { - warning (_ ("no Grace context available")); - } + Music_wrapper_iterator::construct_children (); } + + Moment Grace_iterator::pending_moment () const { - return 0; + Moment cp =Music_wrapper_iterator::pending_moment(); + + Moment pending; + pending.grace_mom_ = - music_length_.main_part_ + cp.main_part_; + + return pending; } diff --git a/lily/grace-music.cc b/lily/grace-music.cc index 9121df5ff9..9e88f7b835 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -11,15 +11,25 @@ #include "grace-iterator.hh" void -Grace_music::compress (Moment) +Grace_music::compress (Moment m) { - + Music_wrapper::compress (m); } Moment Grace_music::length_mom () const { - return 0; + Moment l = Music_wrapper::length_mom (); + Moment gl; + gl.grace_mom_ = l.main_part_ + l.grace_mom_ ; + return gl; +} + + +Moment +Grace_music::start_mom () const +{ + return Music::start_mom (); } Grace_music::Grace_music () diff --git a/lily/grace-performer-group.cc b/lily/grace-performer-group.cc deleted file mode 100644 index 58a3f1fdde..0000000000 --- a/lily/grace-performer-group.cc +++ /dev/null @@ -1,100 +0,0 @@ -/* - grace-performer-group.cc -- implement Grace_performer_group - - source file of the GNU LilyPond music playter - - (c) 1999--2001 Jan Nieuwenhuizen - - */ -#include "grace-performer-group.hh" -#include "lily-guile.hh" - -#include "audio-element.hh" - -ADD_THIS_TRANSLATOR (Grace_performer_group); - -void -Grace_performer_group::start () -{ -} -/* - We're really finished with this context. Get rid of everything. - */ -void -Grace_performer_group::finish () -{ - calling_self_b_ = true; - removal_processing (); // ugr. We'd want to have this done by our parents.g - for (int i=0; i < announce_to_top_.size (); i++) - { - Performer::announce_element (announce_to_top_[i]); - } - - for (int i=0; i < play_us_.size (); i++) - { - Performer::play_element (play_us_[i]); - } - play_us_.clear (); - calling_self_b_ = false; -} - -void -Grace_performer_group::finalize () -{ - Performer_group_performer::finalize (); -} - -void -Grace_performer_group::announce_element (Audio_element_info info) -{ - announce_info_arr_.push (info); - // do not propagate to top - announce_to_top_.push (info); - - //inf.elem_l_->set_grob_property ("grace", SCM_BOOL_T); - info.elem_l_->grace_b_ = true; -} - -void -Grace_performer_group::play_element (Audio_element*e) -{ - play_us_.push (e); -} - - -Grace_performer_group::Grace_performer_group () -{ - calling_self_b_ = false; -} - -void -Grace_performer_group::one_time_step () -{ - calling_self_b_ = true; - // process_music (); - announces (); - stop_translation_timestep (); - check_removal (); - calling_self_b_ = false; -} - - -void -Grace_performer_group::each (Method_pointer method) -{ - if (calling_self_b_) - Performer_group_performer::each (method); -} - - - - -/* - don't let the commands trickle up. - */ -bool -Grace_performer_group::try_music (Music *m) -{ - return try_music_on_nongroup_children (m); -} - diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc deleted file mode 100644 index 1ea8ce3a4c..0000000000 --- a/lily/grace-position-engraver.cc +++ /dev/null @@ -1,117 +0,0 @@ -/* - grace-position-engraver.cc -- implement Grace_position_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#include "engraver.hh" -#include "grace-align-item.hh" -#include "rhythmic-head.hh" -#include "local-key-item.hh" -#include "paper-column.hh" -#include "note-head.hh" -#include "side-position-interface.hh" -#include "axis-group-interface.hh" - - -class Grace_position_engraver:public Engraver -{ - Paper_column *last_musical_col_l_; -protected: - VIRTUAL_COPY_CONS (Translator); - virtual void acknowledge_grob (Grob_info); - virtual void create_grobs (); - virtual void start_translation_timestep (); - virtual void stop_translation_timestep (); - Item*align_l_; - Link_array support_; -public: - Grace_position_engraver (); -}; - - -Grace_position_engraver::Grace_position_engraver () -{ - align_l_ =0; - last_musical_col_l_ =0; -} - -void -Grace_position_engraver::acknowledge_grob (Grob_info i) -{ - Item *item = dynamic_cast (i.elem_l_); - if (item && Grace_align_item::has_interface (i.elem_l_)) - { - align_l_ = item; - } - else if (item && Note_head::has_interface (i.elem_l_)) - { - if (!to_boolean (item->get_grob_property ("grace"))) - support_.push (item); - } - else if (item && Local_key_item::has_interface (i.elem_l_)) - { - if (!to_boolean (item->get_grob_property ("grace"))) - support_.push (item); - else if (align_l_) - item->add_dependency (align_l_); - } -} - -void -Grace_position_engraver::create_grobs () -{ - if (align_l_) - { - for (int i=0; i < support_.size (); i++) - Side_position_interface::add_support (align_l_,support_[i]); - support_.clear (); - } -} - -void -Grace_position_engraver::stop_translation_timestep () -{ - if (align_l_ && !Side_position_interface::supported_b (align_l_)) - { - /* - We don't have support. Either some moron tried attaching us to a rest, - or we're at the end of the piece. In the latter case, we have a - problem if there are spanners in the grace section, - they will want to be broken into pieces (their line_l () field is nil). - - Solution: attach ourselves to the last musical column known. A little intricate. - - */ - - Grob * elt = align_l_->parent_l (X_AXIS); - if (elt) - return; - - if (last_musical_col_l_) - { - warning (_ ("Unattached grace notes. Attaching to last musical column.")); - - align_l_->set_parent (0, X_AXIS); - Axis_group_interface::add_element (last_musical_col_l_, align_l_); - } - else - { - // tja. - } - } - last_musical_col_l_ = dynamic_cast (unsmob_grob (get_property ("currentMusicalColumn"))); -} - -void -Grace_position_engraver::start_translation_timestep () -{ - support_.clear (); - align_l_ =0; -} - -ADD_THIS_TRANSLATOR (Grace_position_engraver); - diff --git a/lily/grace-position-performer.cc b/lily/grace-position-performer.cc deleted file mode 100644 index 7652ac98c6..0000000000 --- a/lily/grace-position-performer.cc +++ /dev/null @@ -1,124 +0,0 @@ -/* - grace-position-performer.cc -- implement Grace_position_performer - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Jan Nieuwenhuizen - - */ - -#include "performer.hh" -#include "audio-item.hh" -#include "global-translator.hh" - -class Grace_position_performer : public Performer -{ -public: - Grace_position_performer (); - -protected: - Link_array graces_; - Link_array notes_; - - VIRTUAL_COPY_CONS (Translator); - virtual void acknowledge_audio_element (Audio_element_info); - virtual void create_audio_elements (); - virtual void start_translation_timestep (); - Global_translator* global_translator_l (); -}; - -ADD_THIS_TRANSLATOR (Grace_position_performer); - -Grace_position_performer::Grace_position_performer () -{ -} - -void -Grace_position_performer::acknowledge_audio_element (Audio_element_info i) -{ - if (Audio_note * n = dynamic_cast (i.elem_l_)) - { - if (i.elem_l_->grace_b_) - graces_.push (n); - else - notes_.push (n); - } -} - -void -Grace_position_performer::create_audio_elements () -{ - if (graces_.size ()) - { - // we're above grace-engraver-group, so we cannot tell - // grace-iterator. note-performer should add moments. - //Global_translator* global_l = global_translator_l (); - Moment delay_mom = Moment (1, 8); - if (notes_.size ()) - { - Moment shortest_mom = notes_[0]->length_mom_; - for (int i=1; i < notes_.size (); i++) - shortest_mom = shortest_mom length_mom_; - - Moment grace_fraction_rat (1, 2); - SCM prop = get_property ("graceFraction"); - if (unsmob_moment (prop)) - grace_fraction_rat = *unsmob_moment (prop); - - delay_mom = shortest_mom * grace_fraction_rat; - for (int i=0; i < notes_.size (); i++) - { - Audio_note* n = notes_[i]; - n->length_mom_ -= delay_mom; - n->delayed_mom_ = delay_mom; - n->delayed_until_mom_ = now_mom () + delay_mom; - //global_l->add_moment_to_process (n->delayed_until_mom_); - } - notes_.clear (); - } - - Moment grace_length_mom; - for (int i=0; i < graces_.size (); i++) - grace_length_mom += graces_[i]->length_mom_; - - Moment grace_factor_rat = delay_mom / grace_length_mom; - - for (int i=0; i < graces_.size (); i++) - { - Audio_note* n = graces_[i]; - n->length_mom_ *= grace_factor_rat; - if (i) - { - Audio_note* p = graces_[i-1]; - n->delayed_mom_ = p->delayed_mom_ + p->length_mom_; - n->delayed_until_mom_ = now_mom () + n->delayed_mom_; - //global_l->add_moment_to_process (n->delayed_until_mom_); - } - } - graces_.clear (); - } -} - -Global_translator* -Grace_position_performer::global_translator_l () -{ - Translator *t = this; - Global_translator *global_l =0; - do - { - t = t->daddy_trans_l_ ; - global_l = dynamic_cast (t); - } - while (!global_l); - - return global_l; -} - - -void -Grace_position_performer::start_translation_timestep () -{ - graces_.clear (); - notes_.clear (); -} - diff --git a/lily/include/grace-align-item.hh b/lily/include/grace-align-item.hh deleted file mode 100644 index f90650b844..0000000000 --- a/lily/include/grace-align-item.hh +++ /dev/null @@ -1,25 +0,0 @@ -/* - grace-align-item.hh -- declare Grace_align_item - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#ifndef GRACE_ALIGN_ITEM_HH -#define GRACE_ALIGN_ITEM_HH - - -#include "lily-guile.hh" -#include "lily-proto.hh" - -class Grace_align_item -{ -public: - static void set_interface (Grob*); - static bool has_interface (Grob*); - DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM )); -}; -#endif /* GRACE_ALIGN_ITEM_HH */ - diff --git a/lily/include/grace-engraver-group.hh b/lily/include/grace-engraver-group.hh deleted file mode 100644 index a918311208..0000000000 --- a/lily/include/grace-engraver-group.hh +++ /dev/null @@ -1,38 +0,0 @@ -/* - grace-engraver-group.hh -- declare Grace_engraver_group - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#ifndef GRACE_ENGRAVER_GROUP_HH -#define GRACE_ENGRAVER_GROUP_HH - -#include "engraver-group-engraver.hh" -#include "global-translator.hh" - -class Grace_engraver_group : public Engraver_group_engraver, public Global_translator -{ - Link_array typeset_us_; - Array announce_to_top_; - bool calling_self_b_; - bool pass_to_top_b (Music *) const; -public: - VIRTUAL_COPY_CONS (Translator); - Grace_engraver_group (); -protected: - virtual void initialize (); - virtual void announce_grob (Grob_info); - virtual void start (); - virtual void finish (); - virtual void one_time_step (); - virtual void each (Method_pointer); - virtual void finalize () ; - virtual void typeset_grob (Grob*); - virtual bool try_music (Music *m); -}; - - -#endif /* GRACE_ENGRAVER_GROUP_HH */ diff --git a/lily/include/grace-iterator.hh b/lily/include/grace-iterator.hh index f51cbcbc23..2ed8a81452 100644 --- a/lily/include/grace-iterator.hh +++ b/lily/include/grace-iterator.hh @@ -7,8 +7,8 @@ */ -#ifndef GRACE_ITERATOR_HH -#define GRACE_ITERATOR_HH +#ifndef NEWGRACE_ITERATOR_HH +#define NEWGRACE_ITERATOR_HH #include "music-wrapper-iterator.hh" diff --git a/lily/include/grace-music.hh b/lily/include/grace-music.hh index 897146133d..20c6e873a9 100644 --- a/lily/include/grace-music.hh +++ b/lily/include/grace-music.hh @@ -7,8 +7,8 @@ */ -#ifndef GRACE_MUSIC_HH -#define GRACE_MUSIC_HH +#ifndef NGRACE_MUSIC_HH +#define NGRACE_MUSIC_HH #include "music-wrapper.hh" @@ -21,17 +21,7 @@ public: protected: virtual void compress (Moment); virtual Moment length_mom () const; -}; - -class New_grace_music : public Music_wrapper -{ -public: - VIRTUAL_COPY_CONS (Music); - New_grace_music (SCM); - New_grace_music (); -protected: - virtual void compress (Moment); - virtual Moment length_mom () const; + virtual Moment start_mom () const; }; #endif /* GRACE_MUSIC_HH */ diff --git a/lily/include/grace-performer-group.hh b/lily/include/grace-performer-group.hh deleted file mode 100644 index da1275393c..0000000000 --- a/lily/include/grace-performer-group.hh +++ /dev/null @@ -1,36 +0,0 @@ -/* - grace-performer-group.hh -- declare Grace_performer_group - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Jan Nieuwenhuizen - - */ - -#ifndef GRACE_PERFORMER_GROUP_HH -#define GRACE_PERFORMER_GROUP_HH - -#include "performer-group-performer.hh" -#include "global-translator.hh" - -class Grace_performer_group : public Performer_group_performer, public Global_translator -{ - Link_array play_us_; - Array announce_to_top_; - bool calling_self_b_; -public: - VIRTUAL_COPY_CONS (Translator); - Grace_performer_group (); -protected: - virtual void announce_element (Audio_element_info); - virtual void start (); - virtual void finish (); - virtual void one_time_step (); - virtual void each (Method_pointer); - virtual void finalize () ; - virtual void play_element (Audio_element*); - virtual bool try_music (Music *m); -}; - - -#endif /* GRACE_PERFORMER_GROUP_HH */ diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index ef344797cb..f723164f8e 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -194,6 +194,10 @@ class Midi_track : public Midi_chunk { public: int number_i_; + + /* + Compensate for starting grace notes. + */ Cons_list event_p_list_; Midi_track (); diff --git a/lily/include/midi-walker.hh b/lily/include/midi-walker.hh index 342983f5f1..83024f5dca 100644 --- a/lily/include/midi-walker.hh +++ b/lily/include/midi-walker.hh @@ -32,11 +32,12 @@ public: void process (); void operator ++ (int); bool ok () const; + private: void do_start_note (Midi_note* note_p); void do_stop_notes (Moment now_mom); void output_event (Moment now_mom, Midi_item* l); - + Midi_track* track_l_; Audio_staff* staff_l_; int index_; diff --git a/lily/include/new-grace-iterator.hh b/lily/include/new-grace-iterator.hh deleted file mode 100644 index cb621e874e..0000000000 --- a/lily/include/new-grace-iterator.hh +++ /dev/null @@ -1,30 +0,0 @@ -/* - new-grace-iterator.hh -- declare New-Grace_iterator - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#ifndef NEWGRACE_ITERATOR_HH -#define NEWGRACE_ITERATOR_HH - -#include "music-wrapper-iterator.hh" - -class New_grace_iterator : public Music_wrapper_iterator -{ -public: - VIRTUAL_COPY_CONS (Music_iterator); - ~New_grace_iterator (); - virtual void construct_children () ; - virtual void process (Moment); - static SCM constructor_cxx_function; - Moment pending_moment () const; -}; - - - -#endif /* GRACE_ITERATOR_HH */ - - diff --git a/lily/include/new-grace-music.hh b/lily/include/new-grace-music.hh deleted file mode 100644 index aae5ce001d..0000000000 --- a/lily/include/new-grace-music.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - grace-music.hh -- declare Grace_music - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#ifndef NGRACE_MUSIC_HH -#define NGRACE_MUSIC_HH - -#include "music-wrapper.hh" - -class New_grace_music : public Music_wrapper -{ -public: - VIRTUAL_COPY_CONS (Music); - New_grace_music (SCM); - New_grace_music (); -protected: - virtual void compress (Moment); - virtual Moment length_mom () const; - virtual Moment start_mom () const; -}; - -#endif /* GRACE_MUSIC_HH */ - diff --git a/lily/include/performance.hh b/lily/include/performance.hh index af26a91ede..376e10ec54 100644 --- a/lily/include/performance.hh +++ b/lily/include/performance.hh @@ -29,7 +29,6 @@ public: void print () const; void process (); - Link_array audio_staff_l_arr_; Cons *audio_elem_p_list_; Midi_def * midi_l_; diff --git a/lily/include/simple-music-iterator.hh b/lily/include/simple-music-iterator.hh index d5f4683d9b..9f6348e00a 100644 --- a/lily/include/simple-music-iterator.hh +++ b/lily/include/simple-music-iterator.hh @@ -11,6 +11,11 @@ #include "music-iterator.hh" +/* + Iterator for atomic music objects: events are generated at the + beginning and at the end of the music. + + */ class Simple_music_iterator : public Music_iterator { protected: diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 94e7980d04..fb491fdf4c 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -12,7 +12,7 @@ #include "rhythmic-head.hh" #include "timing-translator.hh" #include "engraver-group-engraver.hh" -#include "grace-align-item.hh" + #include "staff-symbol-referencer.hh" #include "side-position-interface.hh" #include "engraver.hh" @@ -56,14 +56,12 @@ public: Link_array forced_l_arr_; Link_array tie_l_arr_; Local_key_engraver (); - - Item * grace_align_l_; }; Local_key_engraver::Local_key_engraver () { key_item_p_ =0; - grace_align_l_ =0; + last_keysig_ = SCM_EOL; } @@ -196,11 +194,6 @@ Local_key_engraver::create_grobs () daddy_trans_l_->set_property ("localKeySignature", localsig); } - if (key_item_p_ && grace_align_l_) - { - Side_position_interface::add_support (grace_align_l_,key_item_p_); - grace_align_l_ =0; - } if (key_item_p_) { @@ -221,7 +214,7 @@ Local_key_engraver::create_grobs () void Local_key_engraver::finalize () { - // TODO: if grace ? signal accidentals to Local_key_engraver the + } void @@ -236,7 +229,7 @@ Local_key_engraver::stop_translation_timestep () key_item_p_ =0; } - grace_align_l_ = 0; + mel_l_arr_.clear (); arpeggios_.clear (); tie_l_arr_.clear (); @@ -247,19 +240,6 @@ Local_key_engraver::stop_translation_timestep () void Local_key_engraver::acknowledge_grob (Grob_info info) { - SCM wg= get_property ("weAreGraceContext"); - - bool selfgr = gh_boolean_p (wg) &&gh_scm2bool (wg); - bool he_gr = to_boolean (info.elem_l_->get_grob_property ("grace")); - - Item * item = dynamic_cast (info.elem_l_); - if (he_gr && !selfgr && item && Grace_align_item::has_interface (item)) - { - grace_align_l_ = item; - } - if (he_gr != selfgr) - return; - Note_req * note_l = dynamic_cast (info.req_l_); if (note_l && Rhythmic_head::has_interface (info.elem_l_)) diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index b23e2d786e..90a092ebdd 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -182,12 +182,6 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) if (Note_head::has_interface (h)) { /* caught a note head ... do something with it */ - /* ... but not if it's a grace note ... */ - bool grace= to_boolean (i.elem_l_->get_grob_property ("grace")); - SCM wg = get_property ("weAreGraceContext"); - bool wgb = to_boolean (wg); - if (grace != wgb) - return; /* what's its Voice context name? */ String voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "Voice"); diff --git a/lily/midi-item.cc b/lily/midi-item.cc index bf046d4644..e095fbc125 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -91,10 +91,15 @@ Midi_event::Midi_event (Moment delta_mom, Midi_item* midi_p) midi_p_ = midi_p; } +/* + ugh. midi output badly broken since grace note hackage. + */ String Midi_event::str () const { - int delta_i = delta_mom_ * Moment (384 * 4); // ugh. + Rational rat_dt = (delta_mom_.main_part_ * Rational (384) + + delta_mom_.grace_mom_ * Rational (100))*Rational (4); + int delta_i = int (rat_dt); String delta_str = Midi_item::i2varint_str (delta_i); String midi_str = midi_p_->str (); diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index d9637672fb..078dada743 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -31,6 +31,7 @@ Midi_walker::Midi_walker (Audio_staff* audio_staff_l, Midi_track* track_l) track_l_ = track_l; index_= 0; item_l_arr_l_ = &audio_staff_l->audio_item_l_arr_; + last_mom_ = 0; } @@ -116,7 +117,18 @@ void Midi_walker::output_event (Moment now_mom, Midi_item* l) { Moment delta_t = now_mom - last_mom_ ; - last_mom_ += delta_t; + last_mom_ = now_mom; + + /* + this is not correct, but at least it doesn't crash when you + start with graces + */ + if (delta_t < Moment(0)) + { + delta_t = Moment (0); + } + + track_l_->add (delta_t, l); } @@ -126,10 +138,6 @@ Midi_walker::process () Audio_item* audio_p = (*item_l_arr_l_)[index_]; do_stop_notes (audio_p->audio_column_l_->at_mom ()); - /* - THIS IS A MEMORY LEAK. FIXME. - where's the leak? Everything goet to Midi_track, in a killing_cons. - */ if (Midi_item* midi_p = Midi_item::midi_p (audio_p)) { midi_p->channel_i_ = track_l_->channel_i_; diff --git a/lily/new-grace-iterator.cc b/lily/new-grace-iterator.cc deleted file mode 100644 index 99cd02e6ac..0000000000 --- a/lily/new-grace-iterator.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - new-grace-music.cc -- implement New-Grace_music - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#include "new-grace-music.hh" -#include "new-grace-iterator.hh" - -#include "grace-iterator.hh" -#include "global-translator.hh" -#include "warn.hh" - - -New_grace_iterator::~New_grace_iterator () -{ - // child_iter_p_ = 0; -} - - -void -New_grace_iterator::process (Moment m ) -{ - Moment main ; - main.main_part_ = m.grace_mom_; - Music_wrapper_iterator::process (main); -} - -void -New_grace_iterator::construct_children () -{ - Music_wrapper_iterator::construct_children (); -} - - - -Moment -New_grace_iterator::pending_moment () const -{ - Moment cp =Music_wrapper_iterator::pending_moment(); - - Moment pending; - pending.grace_mom_ = - music_length_.main_part_ + cp.main_part_; - - return pending; -} - - -IMPLEMENT_CTOR_CALLBACK (New_grace_iterator); diff --git a/lily/new-grace-music.cc b/lily/new-grace-music.cc deleted file mode 100644 index d93708ce0f..0000000000 --- a/lily/new-grace-music.cc +++ /dev/null @@ -1,48 +0,0 @@ -/* - grace-music.cc -- implement New_grace_music - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 Han-Wen Nienhuys - - */ - -#include "new-grace-music.hh" -#include "new-grace-iterator.hh" - -void -New_grace_music::compress (Moment m) -{ - Music_wrapper::compress (m); -} - -Moment -New_grace_music::length_mom () const -{ - Moment l = Music_wrapper::length_mom (); - Moment gl; - gl.grace_mom_ = l.main_part_ + l.grace_mom_ ; - return gl; -} - - -Moment -New_grace_music::start_mom () const -{ - return Music::start_mom (); -} - -New_grace_music::New_grace_music () -{ - set_mus_property ("iterator-ctor", - New_grace_iterator::constructor_cxx_function); -} - -New_grace_music::New_grace_music (SCM p) - : Music_wrapper (p) -{ - set_mus_property ("iterator-ctor", - New_grace_iterator::constructor_cxx_function); -} - -ADD_MUSIC (New_grace_music); diff --git a/lily/parser.yy b/lily/parser.yy index 95caa860e0..46db204f92 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -834,11 +834,11 @@ Composite_music: Music* seq = new Sequential_music (SCM_EOL); seq->set_mus_property ("elements", ms); - $$ = new New_grace_music (SCM_EOL); + $$ = new Grace_music (SCM_EOL); $$->set_mus_property ("element", seq->self_scm ()); scm_unprotect_object (seq->self_scm ()); #else - $$ = new New_grace_music (SCM_EOL); + $$ = new Grace_music (SCM_EOL); $$->set_mus_property ("element", $2->self_scm ()); scm_unprotect_object ($2->self_scm ()); #endif diff --git a/lily/performance.cc b/lily/performance.cc index 5aa7abaa53..55122e302a 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -57,7 +57,6 @@ Performance::output (Midi_stream& midi_stream) progress_indication ("[" + to_str (i)) ; /* - Aargh, let's hear it for the MIDI standard. MIDI players tend to ignore instrument settings on channel 10, the percussion channel by default. */ @@ -71,6 +70,7 @@ Performance::output (Midi_stream& midi_stream) } } + void Performance::output_header_track (Midi_stream& midi_stream) { diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index 319c266883..ed78313be5 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -111,9 +111,7 @@ Phrasing_slur_engraver::finalize () #endif } phrasing_slur_l_stack_.clear (); - SCM wg = get_property ("weAreGraceContext"); - bool wgb = to_boolean (wg); - if (!wgb) + for (int i=0; i < requests_arr_.size (); i++) { requests_arr_[i]->origin ()->warning (_ ("unterminated phrasing slur")); diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index f5287f998c..1ebea18a43 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -19,7 +19,6 @@ class Rhythmic_column_engraver :public Engraver { Link_array rhead_l_arr_; - Link_array grace_slur_endings_; Grob * stem_l_; Grob *ncol_p_; Grob *dotcol_l_; @@ -81,25 +80,12 @@ Rhythmic_column_engraver::create_grobs () stem_l_ = 0; } - SCM wg = get_property ("weAreGraceContext"); - bool wegrace = to_boolean (wg); - - if (!wegrace) - for (int i=0; i < grace_slur_endings_.size (); i++) - Slur::add_column (grace_slur_endings_[i], ncol_p_); - grace_slur_endings_.clear (); } } void Rhythmic_column_engraver::acknowledge_grob (Grob_info i) { - SCM wg = get_property ("weAreGraceContext"); - bool wegrace = to_boolean (wg); - if (wegrace != to_boolean (i.elem_l_->get_grob_property ("grace")) - && !Slur::has_interface (i.elem_l_)) - return ; - Item * item = dynamic_cast (i.elem_l_); if (item && Stem::has_interface (item)) { @@ -113,15 +99,6 @@ Rhythmic_column_engraver::acknowledge_grob (Grob_info i) { dotcol_l_ = item; } - else if (Slur::has_interface (i.elem_l_)) - { - /* - end slurs starting on grace notes - */ - - if (to_boolean (i.elem_l_->get_grob_property ("grace"))) - grace_slur_endings_.push (i.elem_l_); - } } void @@ -137,7 +114,6 @@ Rhythmic_column_engraver::stop_translation_timestep () void Rhythmic_column_engraver::start_translation_timestep () { - grace_slur_endings_.clear (); dotcol_l_ =0; stem_l_ =0; } diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 256acd3dc4..70844dc5b6 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -116,12 +116,6 @@ Script_engraver::process_music () void Script_engraver::acknowledge_grob (Grob_info inf) { - bool them_grace = to_boolean (inf.elem_l_->get_grob_property ("grace")); - bool us_grace = to_boolean (get_property ("weAreGraceContext")); - - if (us_grace != them_grace) - return; - if (Stem::has_interface (inf.elem_l_)) { for (int i=0; i < script_p_arr_.size (); i++) diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 0f0f82d898..e02847f991 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -5,7 +5,7 @@ (c) 1997--2001 Han-Wen Nienhuys */ -#include "grace-iterator.hh" + #include "translator-group.hh" #include "debug.hh" #include "sequential-music-iterator.hh" @@ -164,9 +164,6 @@ Sequential_music_iterator::descend_to_child () Translator_group * child_report = child_report = iter_p_->report_to_l (); Translator_group * me_report = report_to_l (); - if (dynamic_cast (iter_p_)) - child_report = child_report->daddy_trans_l_; - Translator_group * c = child_report; while (c && c != me_report) { diff --git a/lily/simple-music-iterator.cc b/lily/simple-music-iterator.cc index 002f070009..6db86ee0d9 100644 --- a/lily/simple-music-iterator.cc +++ b/lily/simple-music-iterator.cc @@ -43,7 +43,10 @@ Simple_music_iterator::skip (Moment m) { /* docme??!! - */ + + uncommented because setting MUSIC_L_ = 0 causes core dumps with + grace notes. */ + // music_l_ = 0; last_processed_mom_ = m; diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 6f57a925c3..6eb8973f77 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -119,10 +119,8 @@ Slur_engraver::finalize () #endif } slur_l_stack_.clear (); - SCM wg = get_property ("weAreGraceContext"); - bool wgb = to_boolean (wg); - if (!wgb) - for (int i=0; i < requests_arr_.size (); i++) + + for (int i=0; i < requests_arr_.size (); i++) { requests_arr_[i]->origin ()->warning (_ ("unterminated slur")); } diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index b02847bf66..edeb8ebb9e 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -93,9 +93,6 @@ Spacing_engraver::finalize () void Spacing_engraver::acknowledge_grob (Grob_info i) { - if (to_boolean (i.elem_l_->get_grob_property ("grace"))) - return; - if (to_boolean (i.elem_l_->get_grob_property ("non-rhythmic"))) return; diff --git a/lily/span-bar.cc b/lily/span-bar.cc index b564cf1790..015f6b2e25 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -62,9 +62,16 @@ Span_bar::brew_molecule (SCM smobbed_me) refp = staff_bar->common_refpoint (refp, Y_AXIS); } - // evaluate glyph Span_bar::evaluate_glyph(me); SCM glyph = me->get_grob_property (ly_symbol2scm ("glyph")); + + /* + glyph may not be a string, when ME is killed by Hara Kiri in + between. + */ + if (!gh_string_p (glyph)) + return SCM_EOL; + String glyph_str = ly_scm2string (glyph); // compose span_bar_mol diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 992ce31672..65b38e8a48 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -25,9 +25,9 @@ public: protected: Link_array time_scaled_music_arr_; /// when does the scaled music stop? Array order is synced with time_scaled_music_arr_ - Array stop_moments_; + Array stop_moments_; /// when does the current spanner stop? Array order is synced with time_scaled_music_arr_ - Array span_stop_moments_; + Array span_stop_moments_; /// The spanners. Array order is synced with time_scaled_music_arr_ Link_array started_span_p_arr_; @@ -48,12 +48,12 @@ Tuplet_engraver::try_music (Music *r) if (!dynamic_cast (el)) { time_scaled_music_arr_.push (c); - Moment m = now_mom () + c->length_mom (); + Rational m = now_mom ().main_part_ + c->length_mom ().main_part_; stop_moments_.push (m); SCM s = get_property ("tupletSpannerDuration"); if (unsmob_moment (s)) - m = m get_grob_property ("grace")); - SCM wg = get_property ("weAreGraceContext"); - bool wgb = to_boolean (wg); - if (grace != wgb) - return; - if (Note_column::has_interface (i.elem_l_)) { for (int j =0; j main_part_; for (int i= started_span_p_arr_.size (); i--;) { - if (now >= span_stop_moments_[i]) + if (now.main_part_ >= span_stop_moments_[i]) { if (started_span_p_arr_[i]) { @@ -131,10 +125,10 @@ Tuplet_engraver::start_translation_timestep () } if (tsd) - span_stop_moments_[i] += tsd; + span_stop_moments_[i] += tsd.main_part_; } - if (now >= stop_moments_[i]) + if (now.main_part_ >= stop_moments_[i]) { started_span_p_arr_.del (i); stop_moments_.del (i); diff --git a/ly/paper11.ly b/ly/paper11.ly new file mode 100644 index 0000000000..313d25a0e4 --- /dev/null +++ b/ly/paper11.ly @@ -0,0 +1,2 @@ + +\include "paper11-init.ly" diff --git a/ly/paper13-init.ly b/ly/paper13-init.ly index cdccec434e..d053f1e440 100644 --- a/ly/paper13-init.ly +++ b/ly/paper13-init.ly @@ -1,5 +1,6 @@ % paper13-init.ly + \version "1.3.146" paperThirteen = \paper { diff --git a/ly/paper13.ly b/ly/paper13.ly new file mode 100644 index 0000000000..7ecec51bbb --- /dev/null +++ b/ly/paper13.ly @@ -0,0 +1,2 @@ + +\include "paper13-init.ly" diff --git a/ly/paper20.ly b/ly/paper20.ly new file mode 100644 index 0000000000..4511cff2ad --- /dev/null +++ b/ly/paper20.ly @@ -0,0 +1,2 @@ + +\include "paper20-init.ly" diff --git a/ly/paper23.ly b/ly/paper23.ly new file mode 100644 index 0000000000..61dfc7fc1b --- /dev/null +++ b/ly/paper23.ly @@ -0,0 +1,2 @@ + +\include "paper23-init.ly" diff --git a/ly/performer-init.ly b/ly/performer-init.ly index 8cfa8204bd..6ab401df96 100644 --- a/ly/performer-init.ly +++ b/ly/performer-init.ly @@ -25,28 +25,20 @@ VoiceContext = \translator { \consists "Dynamic_performer" \consists "Span_dynamic_performer" \consists "Piano_pedal_performer" - \consists "Grace_position_performer" - \accepts Thread - \accepts Grace + \consists "Note_performer" + \consists "Tie_performer" } \translator { \VoiceContext } ThreadContext = \translator { \type "Performer_group_performer" \name Thread - \consists "Note_performer" - \consists "Tie_performer" } \translator { \ThreadContext } \translator { - \type "Grace_performer_group" + \type "Performer_group_performer" \name Grace - \consists "Note_performer" - \consists "Tie_performer" - \consists "Swallow_performer" - - weAreGraceContext = #t } \translator diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 406f128e38..3d2ba15999 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.5.0 -Entered-date: 29JUN01 +Version: 1.5.1 +Entered-date: 03JUL01 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.0.tar.gz + 1000k lilypond-1.5.1.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.5.0.tar.gz + 1000k lilypond-1.5.1.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index e79cb62513..30b417e5a4 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.0 +Version: 1.5.1 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.0.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.1.tar.gz Summary: Create and print music notation URL: http://www.cs.uu.nl/~hanwen/lilypond BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index ba89252f43..4effed481d 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.0 +Version: 1.5.1 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.0.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.1.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/mutopia/F.Schubert/standchen.ly b/mutopia/F.Schubert/standchen.ly index 561b345fe1..b18bcd5388 100644 --- a/mutopia/F.Schubert/standchen.ly +++ b/mutopia/F.Schubert/standchen.ly @@ -1,5 +1,5 @@ -#(set! point-and-click line-column-location) +% #(set! point-and-click line-column-location) instrument = "Piano" diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 4ee94ca851..916afa7884 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -221,13 +221,6 @@ (meta . ,(grob-description "Fingering" finger-interface font-interface text-script-interface text-interface side-position-interface)) )) - (GraceAlignment . ( - (axes . (0)) - (horizontal-space . 1.2) - (padding . 1.0) - (before-line-breaking-callback . ,Grace_align_item::before_line_breaking) - (meta . ,(grob-description "GraceAlignment" axis-group-interface align-interface grace-alignment-interface)) - )) (HaraKiriVerticalGroup . ( (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback)) diff --git a/scm/translator-description.scm b/scm/translator-description.scm index b56382bfe9..f53a0a0ebe 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -129,17 +129,6 @@ up for the musicexpr called @code{one}, down for the musicexpr called unirhythm ))) - (cons - 'Align_note_column_engraver - (engraver-description - "Align_note_column_engraver" - "Generate object to put grace notes from left to right." - '(GraceAlignment) - '( - graceAlignPosition - graceAccidentalSpace - ))) - (cons 'Arpeggio_engraver (engraver-description @@ -291,23 +280,6 @@ If omitted, then dots appear on top of the notes. - (cons - 'Grace_position_engraver - (engraver-description - "Grace_position_engraver" - "Attach a grace note alignment to a note-column " - '() - '( - ))) - - (cons - 'Grace_engraver_group - (engraver-description - "Grace_engraver_group" - "An engraver that creates a `shielded' context-tree with separate notion of time" - '() - '( - ))) (cons @@ -357,7 +329,7 @@ If omitted, then dots appear on top of the notes. '() '( automaticPhrasing - weAreGraceContext + melismaEngraverBusy associatedVoice phrasingPunctuation @@ -775,11 +747,13 @@ everything in the second thread. (define context-description-alist '( (Grace . " - The context for handling grace notes. It is instantiated + The context for handling grace notes. It used to be instantiated automatically when you use @code{\grace}. Basically, it is an `embedded' miniature of the Score context. Since this context needs special interaction with the rest of LilyPond, you should not explicitly instantiate it. + + DEPRECATED. ") (LyricsVoice . " Corresponds to a voice with lyrics. Handles the printing of a diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 6209e86e8b..4a2236a7aa 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -826,6 +826,7 @@ if 1: conversions.append (((1,3,148), conv, '"(align" -> "(axis", "(rows" -> "(columns"')) + ################################ # END OF CONVERSIONS ################################ -- 2.39.2