note smaller, align to bottom.
* scm/define-grobs.scm (all-grob-descriptions): noone
* lily/metronome-engraver.cc (stop_translation_timestep): attach
metronome to musical column. Don't ack time sigs or bar lines.
+2004-07-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/translation-functions.scm (format-metronome-markup): make
+ note smaller, align to bottom.
+
+ * scm/define-grobs.scm (all-grob-descriptions): noone
+
+ * lily/metronome-engraver.cc (stop_translation_timestep): attach
+ metronome to musical column. Don't ack time sigs or bar lines.
+
2004-07-10 Heikki Junes <hjunes@cc.hut.fi>
* THANKS: sort, add David. Kristof contributed code, he is a
#include <ctype.h>
+#include "note-column.hh"
#include "bar-line.hh"
#include "time-signature.hh"
#include "engraver.hh"
protected:
Item *text_;
Grob *bar_line_;
+ Music *mark_ev_;
+ void create_items (Music*);
protected:
virtual void stop_translation_timestep ();
- virtual void acknowledge_grob (Grob_info);
- void create_items (Music*);
virtual bool try_music (Music *ev);
virtual void process_music ();
-
-private:
- Music *mark_ev_;
};
Metronome_mark_engraver::Metronome_mark_engraver ()
mark_ev_ = 0;
}
-void
-Metronome_mark_engraver::acknowledge_grob (Grob_info inf)
-{
- if (Bar_line::has_interface (inf.grob_))
- {
- bar_line_ = inf.grob_;
- }
- else if (text_ && Time_signature::has_interface (inf.grob_))
- {
- text_->set_parent (inf.grob_, X_AXIS);
- }
-}
-
void
Metronome_mark_engraver::stop_translation_timestep ()
{
if (text_)
{
- if (bar_line_ && !text_->get_parent (X_AXIS))
- text_->set_parent (bar_line_, X_AXIS);
-
+ Grob*mc = unsmob_grob (get_property( "currentMusicalColumn"));
+ text_->set_parent (mc, X_AXIS);
text_->set_property ("side-support-elements" , get_property ("stavesFound"));
text_ =0;
,
/* creats*/ "MetronomeMark",
/* accepts */ "metronome-change-event",
-/* acks */ "time-signature-interface bar-line-interface",
+ /* acks */ "",
/* reads */ "stavesFound metronomeMarkFormatter",
/* write */ "");
(print-function . ,Text_item::print)
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(direction . 1)
- (breakable . #t)
- (break-visibility . ,end-of-line-invisible)
(padding . 0.8)
(meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
))
(ly:stencil-align-to! m X LEFT)
m))
+(def-markup-command (general-align paper props axis dir arg) (integer? number? markup?)
+ "Align @var{arg} in @var{axis} direction to the @var{dir} side."
+ (let* ((m (interpret-markup paper props arg)))
+
+ (ly:stencil-align-to! m axis dir)
+ m
+ ))
+
(def-markup-command (halign paper props dir arg) (number? markup?)
"Set horizontal alignment. If @var{dir} is -1, then it is
left-aligned, while+1 is right. Values in between interpolate alignment
(let*
((dur (ly:music-property event 'tempo-unit))
(count (ly:music-property event 'metronome-count))
- (note-mark (make-note-by-number-markup (ly:duration-log dur)
- (ly:duration-dot-count dur)
- 1) ) )
+ (note-mark (make-smaller-markup
+ (make-note-by-number-markup (ly:duration-log dur)
+ (ly:duration-dot-count dur)
+ 1))))
(make-line-markup
(list
- note-mark
+ (make-general-align-markup Y DOWN note-mark)
(make-simple-markup "=")
(make-simple-markup (number->string count))