+2003-09-18 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/melisma-engraver.cc (try_music): use melismaBusyProperties.
+
+ * scm/define-translator-properties.scm (melismaBusyProperties):
+ add melismaBusyProperties property.
+
2003-09-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* input/test/ambitus-mixed.ly (texidoc): new file.
};
-/*
- HUH ?
-
- how's this supposed to work?
- */
bool
Melisma_engraver::try_music (Music *m)
{
- SCM plain (get_property ("melismaBusy"));
- SCM slur (get_property ("slurMelismaBusy"));
- SCM tie (get_property ("tieMelismaBusy"));
- SCM beam (get_property ("beamMelismaBusy"));
-
- if ((to_boolean (plain))
- || (to_boolean (slur))
- || (to_boolean (tie))
- || (to_boolean (beam)))
- {
-
- daddy_trans_->set_property ("melismaEngraverBusy",SCM_BOOL_T);
- return true;
- }
- else
- {
- daddy_trans_->set_property ("melismaEngraverBusy",SCM_BOOL_F);
- return false;
- }
+ SCM melisma_properties = get_property ("melismaBusyProperties");
+ bool busy = false;
+
+ for (; gh_pair_p (melisma_properties);
+ melisma_properties = gh_cdr (melisma_properties))
+ busy = busy || to_boolean (get_property (gh_car (melisma_properties)));
+
+ /*
+ for the phrasing engraver we also need this.
+ */
+ daddy_trans_->set_property ("melismaEngraverBusy",gh_bool2scm (busy));
+ return busy;
}
Melisma_engraver::Melisma_engraver()
/* creats*/ "",
/* accepts */ "melisma-playing-event",
/* acks */ "",
-/* reads */ "melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy",
+/* reads */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",
/* write */ "melismaEngraverBusy");
changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
systemStartDelimiter =#'SystemStartBar
-
+ melismaBusyProperties = #'(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy)
+
clefGlyph = #"clefs-G"
clefPosition = #-2
centralCPosition = #-6
(translator-property-description 'melismaBusy boolean? "Signifies
whether a melisma is active. This can be used to signal melismas on
top of those automatically detected. ")
+(translator-property-description 'melismaBusyProperties list?
+ "List of properties (symbols) to
+determine whether a melisma is playing.")
(translator-property-description 'melismaEngraverBusy boolean? "See melismaBusy. This is set automatically.")
(translator-property-description 'metronomeMarkFormatter procedure?
"How to produce a metronome markup.