* 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
=====
@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}
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
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
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.
+++ /dev/null
-/*
- align-note-column-engraver.cc -- implement Align_note_column_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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);
-
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;
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_))
}
- if (beam_p_ && !to_boolean (get_property ("weAreGraceContext")))
+ if (beam_p_)
{
Score_engraver * e = 0;
Translator * t = daddy_grav_l ();
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 <Rhythmic_req *> (info.req_l_);
if (!rhythmic_req)
{
+++ /dev/null
-/*
- grace-align-item.cc -- implement Grace_align_item
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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<Item*> (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"));
-}
+++ /dev/null
-/*
- grace-engraver-group.cc -- implement Grace_engraver_group
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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<Span_req*> (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;
-}
/*
- grace-iterator.cc -- implement Grace_iterator
+ grace-music.cc -- implement Grace_music
source file of the GNU LilyPond music typesetter
*/
+#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<Global_translator*> (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;
}
#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 ()
+++ /dev/null
-/*
- grace-performer-group.cc -- implement Grace_performer_group
-
- source file of the GNU LilyPond music playter
-
- (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
-
- */
-#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);
-}
-
+++ /dev/null
-/*
- grace-position-engraver.cc -- implement Grace_position_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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<Item> 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<Item*> (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<Paper_column*> (unsmob_grob (get_property ("currentMusicalColumn")));
-}
-
-void
-Grace_position_engraver::start_translation_timestep ()
-{
- support_.clear ();
- align_l_ =0;
-}
-
-ADD_THIS_TRANSLATOR (Grace_position_engraver);
-
+++ /dev/null
-/*
- grace-position-performer.cc -- implement Grace_position_performer
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
-
- */
-
-#include "performer.hh"
-#include "audio-item.hh"
-#include "global-translator.hh"
-
-class Grace_position_performer : public Performer
-{
-public:
- Grace_position_performer ();
-
-protected:
- Link_array<Audio_note> graces_;
- Link_array<Audio_note> 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 <Audio_note*> (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 <? notes_[i]->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<Global_translator*> (t);
- }
- while (!global_l);
-
- return global_l;
-}
-
-
-void
-Grace_position_performer::start_translation_timestep ()
-{
- graces_.clear ();
- notes_.clear ();
-}
-
+++ /dev/null
-/*
- grace-align-item.hh -- declare Grace_align_item
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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 */
-
+++ /dev/null
-/*
- grace-engraver-group.hh -- declare Grace_engraver_group
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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<Grob> typeset_us_;
- Array<Grob_info> 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 */
*/
-#ifndef GRACE_ITERATOR_HH
-#define GRACE_ITERATOR_HH
+#ifndef NEWGRACE_ITERATOR_HH
+#define NEWGRACE_ITERATOR_HH
#include "music-wrapper-iterator.hh"
*/
-#ifndef GRACE_MUSIC_HH
-#define GRACE_MUSIC_HH
+#ifndef NGRACE_MUSIC_HH
+#define NGRACE_MUSIC_HH
#include "music-wrapper.hh"
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 */
+++ /dev/null
-/*
- grace-performer-group.hh -- declare Grace_performer_group
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
-
- */
-
-#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<Audio_element> play_us_;
- Array<Audio_element_info> 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 */
{
public:
int number_i_;
+
+ /*
+ Compensate for starting grace notes.
+ */
Cons_list<Midi_event> event_p_list_;
Midi_track ();
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_;
+++ /dev/null
-/*
- new-grace-iterator.hh -- declare New-Grace_iterator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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 */
-
-
+++ /dev/null
-/*
- grace-music.hh -- declare Grace_music
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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 */
-
void print () const;
void process ();
-
Link_array<Audio_staff> audio_staff_l_arr_;
Cons<Audio_element> *audio_elem_p_list_;
Midi_def * midi_l_;
#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:
#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"
Link_array<Item> forced_l_arr_;
Link_array<Grob> 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;
}
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_)
{
void
Local_key_engraver::finalize ()
{
- // TODO: if grace ? signal accidentals to Local_key_engraver the
+
}
void
key_item_p_ =0;
}
- grace_align_l_ = 0;
+
mel_l_arr_.clear ();
arpeggios_.clear ();
tie_l_arr_.clear ();
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<Item*> (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 <Note_req *> (info.req_l_);
if (note_l && Rhythmic_head::has_interface (info.elem_l_))
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");
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 ();
track_l_ = track_l;
index_= 0;
item_l_arr_l_ = &audio_staff_l->audio_item_l_arr_;
+
last_mom_ = 0;
}
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);
}
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_;
+++ /dev/null
-/*
- new-grace-music.cc -- implement New-Grace_music
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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);
+++ /dev/null
-/*
- grace-music.cc -- implement New_grace_music
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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);
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
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.
*/
}
}
+
void
Performance::output_header_track (Midi_stream& midi_stream)
{
#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"));
class Rhythmic_column_engraver :public Engraver
{
Link_array<Grob> rhead_l_arr_;
- Link_array<Grob> grace_slur_endings_;
Grob * stem_l_;
Grob *ncol_p_;
Grob *dotcol_l_;
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 <Item *> (i.elem_l_);
if (item && Stem::has_interface (item))
{
{
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
void
Rhythmic_column_engraver::start_translation_timestep ()
{
- grace_slur_endings_.clear ();
dotcol_l_ =0;
stem_l_ =0;
}
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++)
(c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "grace-iterator.hh"
+
#include "translator-group.hh"
#include "debug.hh"
#include "sequential-music-iterator.hh"
Translator_group * child_report = child_report = iter_p_->report_to_l ();
Translator_group * me_report = report_to_l ();
- if (dynamic_cast<Grace_iterator*> (iter_p_))
- child_report = child_report->daddy_trans_l_;
-
Translator_group * c = child_report;
while (c && c != me_report)
{
{
/*
docme??!!
- */
+
+ uncommented because setting MUSIC_L_ = 0 causes core dumps with
+ grace notes. */
+
// music_l_ = 0;
last_processed_mom_ = m;
#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"));
}
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;
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
protected:
Link_array<Time_scaled_music> time_scaled_music_arr_;
/// when does the scaled music stop? Array order is synced with time_scaled_music_arr_
- Array<Moment> stop_moments_;
+ Array<Rational> stop_moments_;
/// when does the current spanner stop? Array order is synced with time_scaled_music_arr_
- Array<Moment> span_stop_moments_;
+ Array<Rational> span_stop_moments_;
/// The spanners. Array order is synced with time_scaled_music_arr_
Link_array<Spanner> started_span_p_arr_;
if (!dynamic_cast<Request_chord*> (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 <? (now_mom () + *unsmob_moment (s));
+ m = m <? (now_mom () + *unsmob_moment (s)).main_part_;
span_stop_moments_.push (m);
}
void
Tuplet_engraver::acknowledge_grob (Grob_info i)
{
- 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;
-
if (Note_column::has_interface (i.elem_l_))
{
for (int j =0; j <started_span_p_arr_.size (); j++)
Moment tsd;
SCM s = get_property ("tupletSpannerDuration");
if (unsmob_moment (s))
- tsd = *unsmob_moment (s);
+ tsd = unsmob_moment (s)->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])
{
}
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);
--- /dev/null
+
+\include "paper11-init.ly"
% paper13-init.ly
+
\version "1.3.146"
paperThirteen = \paper {
--- /dev/null
+
+\include "paper13-init.ly"
--- /dev/null
+
+\include "paper20-init.ly"
--- /dev/null
+
+\include "paper23-init.ly"
\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
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
%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
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/
-#(set! point-and-click line-column-location)
+% #(set! point-and-click line-column-location)
instrument = "Piano"
(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))
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
- (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
'()
'(
automaticPhrasing
- weAreGraceContext
+
melismaEngraverBusy
associatedVoice
phrasingPunctuation
(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
conversions.append (((1,3,148), conv, '"(align" -> "(axis", "(rows" -> "(columns"'))
+
################################
# END OF CONVERSIONS
################################