source file of the GNU LilyPond music typesetter
- (C) 2002 Juergen Reuter <reuter@ipd.uka.de>
+ (c) 2002--2004 Juergen Reuter <reuter@ipd.uka.de>
*/
#include "engraver.hh"
#include "item.hh"
#include "note-head.hh"
#include "staff-symbol-referencer.hh"
-#include "musical-request.hh"
+#include "event.hh"
#include "pitch.hh"
/*
*
* - If a piece consists of several loosely coupled sections, should
* there be multiple ambitus grobs allowed, one for each section?
- * Then there probably should be some "\ambitus" request added to
+ * Then there probably should be some "\ambitus" event added to
* mudela, stating where an ambitus grob should be placed. This
* ambitus grob should then represent the ambitus in the range of time
- * between this "\ambitus" request and the next one (or the end of the
- * piece, if there is no more such request). To be compliant with the
+ * between this "\ambitus" event and the next one (or the end of the
+ * piece, if there is no more such event). To be compliant with the
* current implementation, we might implicitly assume an "\ambitus"
- * request at the beginning of the piece, but then the question where
+ * event at the beginning of the piece, but then the question where
* to put this first ambitus grob (before/after the clef?) becomes
* even more urgent.
*
* (pitch_min > pitch_max) means that pitches are not yet
* initialized
*/
- pitch_min = Pitch (0, 0, +1);
- pitch_max = Pitch (0, 0, -1);
+ pitch_min = Pitch (0, 0, SHARP);
+ pitch_max = Pitch (0, 0, FLAT);
}
void
* assumed to be 0.
*/
SCM c0 = get_property ("centralCPosition");
- ambitus_->set_grob_property ("centralCPosition", c0);
+ ambitus_->set_grob_property ("c0-position", c0);
/*
* Similar for keySignature.
*/
SCM key_signature = get_property ("keySignature");
- ambitus_->set_grob_property ("keySignature", key_signature);
+ ambitus_->set_grob_property ("accidentals", key_signature);
typeset_grob (ambitus_);
is_typeset = 1;
{
if (Note_head::has_interface (info.grob_))
{
- Note_req *nr = dynamic_cast<Note_req*> (info.music_cause ());
- if (nr)
+ Music *nr = info.music_cause ();
+ if (nr && nr->is_mus_type ("note-event"))
{
Pitch pitch = *unsmob_pitch (nr->get_mus_property ("pitch"));
if (Pitch::compare (pitch_min, pitch_max) > 0) // already init'd?
void
Ambitus_engraver::create_ambitus ()
{
- SCM basicProperties = get_property ("Ambitus");
- ambitus_ = new Item (basicProperties); is_typeset = 0;
+ ambitus_ = make_item ("Ambitus");
+ is_typeset = 0; // UGH.
announce_grob (ambitus_, SCM_EOL);
}
* most probably arises from an empty voice, such as shared
* global timesig/clef definitions.
*/
-#if 0
- ambitus_->warning("empty ambitus range [ignored]");
-#endif
ambitus_->suicide();
}
}
ENTER_DESCRIPTION(Ambitus_engraver,
/* descr */ "",
/* creats*/ "Ambitus",
-/* acks */ "note-head-interface",
+/* accepts */ "",
+/* acks */ "note-head-interface",
/* reads */ "",
/* write */ "");