\remove Bar_number_engraver
}
\context {
- \type "Engraver_group_engraver"
+ \type "Engraver_group"
\name Dynamics
\consists "Output_property_engraver"
minimumVerticalExtent = #'(-1 . 1)
-\version "2.6.0"
+\version "2.7.6"
\header {
texidoc = "The notation problem, creating a certain symbol,
%
MyStaff =\context {
- \type "Engraver_group_engraver"
+ \type "Engraver_group"
\name Staff
\description "Handles clefs, bar lines, keys, accidentals. It can contain
MyVoice = \context {
- \type "Engraver_group_engraver"
+ \type "Engraver_group"
\name Voice
\description "
-\version "2.6.0"
+\version "2.7.6"
\header {
\denies Staff
}
\context {
- \type Engraver_group_engraver
+ \type Engraver_group
\consists Clef_engraver
\consists Time_signature_engraver
\consists Separating_line_group_engraver
used contemporary pieces with many time signature changes. "
}
-\version "2.6.0"
+\version "2.7.6"
\layout {
raggedright = ##T
}
\layout{
\context {
- \type "Engraver_group_engraver"
+ \type "Engraver_group"
\consists "Time_signature_engraver"
\consists "Axis_group_engraver"
\name "TimeSig"
+++ /dev/null
-/*
- engraver-group-engraver.cc -- implement Engraver_group
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "engraver-group-engraver.hh"
-
-#include "warn.hh"
-#include "paper-score.hh"
-#include "grob.hh"
-#include "context.hh"
-#include "translator-dispatch-list.hh"
-
-void
-Engraver_group::announce_grob (Grob_info info)
-{
- announce_infos_.push (info);
-
- Engraver_group *dad_eng
- = context_->get_parent_context ()
- ? dynamic_cast<Engraver_group *> (context_->get_parent_context ()->implementation ())
- : 0;
- if (dad_eng)
- dad_eng->announce_grob (info);
-}
-
-void
-Engraver_group::acknowledge_grobs ()
-{
- if (!announce_infos_.size ())
- return;
-
- SCM name_sym = ly_symbol2scm ("name");
- SCM meta_sym = ly_symbol2scm ("meta");
-
- for (int j = 0; j < announce_infos_.size (); j++)
- {
- Grob_info info = announce_infos_[j];
-
- SCM meta = info.grob ()->internal_get_property (meta_sym);
- SCM nm = scm_assoc (name_sym, meta);
- if (scm_is_pair (nm))
- nm = scm_cdr (nm);
- else
- continue;
-
- SCM acklist = scm_hashq_ref (acknowledge_hash_table_, nm, SCM_BOOL_F);
- Engraver_dispatch_list *dispatch
- = Engraver_dispatch_list::unsmob (acklist);
-
- if (acklist == SCM_BOOL_F)
- {
- SCM ifaces
- = scm_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta));
- acklist = Engraver_dispatch_list::create (get_simple_trans_list (),
- ifaces);
-
- dispatch
- = Engraver_dispatch_list::unsmob (acklist);
-
- scm_hashq_set_x (acknowledge_hash_table_, nm, acklist);
- }
-
- if (dispatch)
- dispatch->apply (info);
- }
-}
-
-/*
- Ugh. This is slightly expensive. We could/should cache the value of
- the group count?
-*/
-int
-Engraver_group::pending_grob_count () const
-{
- int count = announce_infos_.size ();
- for (SCM s = context_->children_contexts ();
- scm_is_pair (s); s = scm_cdr (s))
- {
- Context *c = unsmob_context (scm_car (s));
- Engraver_group *group
- = dynamic_cast<Engraver_group *> (c->implementation ());
-
- if (group)
- count += group->pending_grob_count ();
- }
- return count;
-}
-
-void
-Engraver_group::do_announces ()
-{
- do
- {
- for (SCM s = context ()->children_contexts ();
- scm_is_pair (s); s = scm_cdr (s))
- {
- Context *c = unsmob_context (scm_car (s));
- Engraver_group *group
- = dynamic_cast<Engraver_group *> (c->implementation ());
- if (group)
- group->do_announces ();
- }
-
- while (1)
- {
- precomputed_translator_foreach (PROCESS_ACKNOWLEDGED);
- if (announce_infos_.size () == 0)
- break;
-
- acknowledge_grobs ();
- announce_infos_.clear ();
- }
- }
- while (pending_grob_count () > 0);
-}
-
-Engraver_group::Engraver_group ()
-{
- acknowledge_hash_table_ = SCM_EOL;
- acknowledge_hash_table_ = scm_c_make_hash_table (61);
-}
-
-#include "translator.icc"
-
-ADD_TRANSLATOR_GROUP (Engraver_group,
- /* doc */ "A group of engravers taken together",
- /* create */ "",
- /* accept */ "",
- /* read */ "",
- /* write */ "");
-
-void
-Engraver_group::derived_mark () const
-{
- scm_gc_mark (acknowledge_hash_table_);
-}
--- /dev/null
+/*
+ engraver-group-engraver.cc -- implement Engraver_group
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "engraver-group-engraver.hh"
+
+#include "warn.hh"
+#include "paper-score.hh"
+#include "grob.hh"
+#include "context.hh"
+#include "translator-dispatch-list.hh"
+
+void
+Engraver_group::announce_grob (Grob_info info)
+{
+ announce_infos_.push (info);
+
+ Engraver_group *dad_eng
+ = context_->get_parent_context ()
+ ? dynamic_cast<Engraver_group *> (context_->get_parent_context ()->implementation ())
+ : 0;
+ if (dad_eng)
+ dad_eng->announce_grob (info);
+}
+
+void
+Engraver_group::acknowledge_grobs ()
+{
+ if (!announce_infos_.size ())
+ return;
+
+ SCM name_sym = ly_symbol2scm ("name");
+ SCM meta_sym = ly_symbol2scm ("meta");
+
+ for (int j = 0; j < announce_infos_.size (); j++)
+ {
+ Grob_info info = announce_infos_[j];
+
+ SCM meta = info.grob ()->internal_get_property (meta_sym);
+ SCM nm = scm_assoc (name_sym, meta);
+ if (scm_is_pair (nm))
+ nm = scm_cdr (nm);
+ else
+ continue;
+
+ SCM acklist = scm_hashq_ref (acknowledge_hash_table_, nm, SCM_BOOL_F);
+ Engraver_dispatch_list *dispatch
+ = Engraver_dispatch_list::unsmob (acklist);
+
+ if (acklist == SCM_BOOL_F)
+ {
+ SCM ifaces
+ = scm_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta));
+ acklist = Engraver_dispatch_list::create (get_simple_trans_list (),
+ ifaces);
+
+ dispatch
+ = Engraver_dispatch_list::unsmob (acklist);
+
+ scm_hashq_set_x (acknowledge_hash_table_, nm, acklist);
+ }
+
+ if (dispatch)
+ dispatch->apply (info);
+ }
+}
+
+/*
+ Ugh. This is slightly expensive. We could/should cache the value of
+ the group count?
+*/
+int
+Engraver_group::pending_grob_count () const
+{
+ int count = announce_infos_.size ();
+ for (SCM s = context_->children_contexts ();
+ scm_is_pair (s); s = scm_cdr (s))
+ {
+ Context *c = unsmob_context (scm_car (s));
+ Engraver_group *group
+ = dynamic_cast<Engraver_group *> (c->implementation ());
+
+ if (group)
+ count += group->pending_grob_count ();
+ }
+ return count;
+}
+
+void
+Engraver_group::do_announces ()
+{
+ do
+ {
+ for (SCM s = context ()->children_contexts ();
+ scm_is_pair (s); s = scm_cdr (s))
+ {
+ Context *c = unsmob_context (scm_car (s));
+ Engraver_group *group
+ = dynamic_cast<Engraver_group *> (c->implementation ());
+ if (group)
+ group->do_announces ();
+ }
+
+ while (1)
+ {
+ precomputed_translator_foreach (PROCESS_ACKNOWLEDGED);
+ if (announce_infos_.size () == 0)
+ break;
+
+ acknowledge_grobs ();
+ announce_infos_.clear ();
+ }
+ }
+ while (pending_grob_count () > 0);
+}
+
+Engraver_group::Engraver_group ()
+{
+ acknowledge_hash_table_ = SCM_EOL;
+ acknowledge_hash_table_ = scm_c_make_hash_table (61);
+}
+
+#include "translator.icc"
+
+ADD_TRANSLATOR_GROUP (Engraver_group,
+ /* doc */ "A group of engravers taken together",
+ /* create */ "",
+ /* accept */ "",
+ /* read */ "",
+ /* write */ "");
+
+void
+Engraver_group::derived_mark () const
+{
+ scm_gc_mark (acknowledge_hash_table_);
+}
+++ /dev/null
-/*
- performer-group-performer.cc -- implement Performer_group
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
- Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "performer-group-performer.hh"
-
-#include "context.hh"
-#include "audio-element.hh"
-#include "warn.hh"
-
-ADD_TRANSLATOR_GROUP (Performer_group,
- /* doc */ "",
- /* create */ "",
- /* accept */ "",
- /* read */ "",
- /* write */ "");
-
-void
-Performer_group::announce_element (Audio_element_info info)
-{
- announce_infos_.push (info);
- Translator_group *t
- = context ()->get_parent_context ()->implementation ();
-
- if (Performer_group *eg = dynamic_cast<Performer_group *> (t))
- eg->announce_element (info);
-}
-
-void
-Performer_group::acknowledge_audio_elements ()
-{
- for (int j = 0; j < announce_infos_.size (); j++)
- {
- Audio_element_info info = announce_infos_[j];
-
- for (SCM p = get_simple_trans_list (); scm_is_pair (p); p = scm_cdr (p))
- {
- Translator *t = unsmob_translator (scm_car (p));
- Performer *eng = dynamic_cast<Performer *> (t);
- if (eng && eng != info.origin_trans_)
- eng->acknowledge_audio_element (info);
- }
- }
-}
-
-void
-performer_each (SCM list, Performer_method method)
-{
- for (SCM p = list; scm_is_pair (p); p = scm_cdr (p))
- {
- Performer *e = dynamic_cast<Performer *> (unsmob_translator (scm_car (p)));
- if (e)
- (e->*method) ();
- }
-}
-
-void
-Performer_group::do_announces ()
-{
- while (1)
- {
- performer_each (get_simple_trans_list (),
- &Performer::create_audio_elements);
-
- if (!announce_infos_.size ())
- break;
-
- acknowledge_audio_elements ();
- announce_infos_.clear ();
- }
-}
-
-void
-Performer_group::play_element (Audio_element *e)
-{
- Context *c = context_->get_parent_context ();
- if (c)
- {
- Performer_group *pgp = dynamic_cast<Performer_group *> (c->implementation ());
- pgp->play_element (e);
- }
-}
-
-int
-Performer_group::get_tempo () const
-{
- Context *c = context_->get_parent_context ();
- if (c)
- {
- Performer_group *pgp = dynamic_cast<Performer_group *> (c->implementation ());
- return pgp->get_tempo ();
- }
- return 60;
-}
-
--- /dev/null
+/*
+ performer-group-performer.cc -- implement Performer_group
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "performer-group-performer.hh"
+
+#include "context.hh"
+#include "audio-element.hh"
+#include "warn.hh"
+
+ADD_TRANSLATOR_GROUP (Performer_group,
+ /* doc */ "",
+ /* create */ "",
+ /* accept */ "",
+ /* read */ "",
+ /* write */ "");
+
+void
+Performer_group::announce_element (Audio_element_info info)
+{
+ announce_infos_.push (info);
+ Translator_group *t
+ = context ()->get_parent_context ()->implementation ();
+
+ if (Performer_group *eg = dynamic_cast<Performer_group *> (t))
+ eg->announce_element (info);
+}
+
+void
+Performer_group::acknowledge_audio_elements ()
+{
+ for (int j = 0; j < announce_infos_.size (); j++)
+ {
+ Audio_element_info info = announce_infos_[j];
+
+ for (SCM p = get_simple_trans_list (); scm_is_pair (p); p = scm_cdr (p))
+ {
+ Translator *t = unsmob_translator (scm_car (p));
+ Performer *eng = dynamic_cast<Performer *> (t);
+ if (eng && eng != info.origin_trans_)
+ eng->acknowledge_audio_element (info);
+ }
+ }
+}
+
+void
+performer_each (SCM list, Performer_method method)
+{
+ for (SCM p = list; scm_is_pair (p); p = scm_cdr (p))
+ {
+ Performer *e = dynamic_cast<Performer *> (unsmob_translator (scm_car (p)));
+ if (e)
+ (e->*method) ();
+ }
+}
+
+void
+Performer_group::do_announces ()
+{
+ while (1)
+ {
+ performer_each (get_simple_trans_list (),
+ &Performer::create_audio_elements);
+
+ if (!announce_infos_.size ())
+ break;
+
+ acknowledge_audio_elements ();
+ announce_infos_.clear ();
+ }
+}
+
+void
+Performer_group::play_element (Audio_element *e)
+{
+ Context *c = context_->get_parent_context ();
+ if (c)
+ {
+ Performer_group *pgp = dynamic_cast<Performer_group *> (c->implementation ());
+ pgp->play_element (e);
+ }
+}
+
+int
+Performer_group::get_tempo () const
+{
+ Context *c = context_->get_parent_context ();
+ if (c)
+ {
+ Performer_group *pgp = dynamic_cast<Performer_group *> (c->implementation ());
+ return pgp->get_tempo ();
+ }
+ return 60;
+}
+
#include "engraver-group-engraver.hh"
#include "performer-group-performer.hh"
#include "recording-group-engraver.hh"
+#include "warn.hh"
/*
Quick & dirty.
else if (sym == ly_symbol2scm ("Recording_group_engraver"))
return new Recording_group_engraver ();
+ programming_error ("Couldn't find type");
+ scm_flush (scm_current_error_port ());
+ scm_display (sym, scm_current_error_port ());
+ scm_flush (scm_current_error_port ());
+
assert (0);
return 0;
}