for interpolating loose column position.
* lily/text-spanner.cc (brew_molecule): default to no vertical
lines.
* lily/ottava-bracket.cc (brew_molecule): vertical line doesn't
take space.
virtual Spanner* get_spanner () const;
virtual void add_element (Grob*) ;
public:
-TRANSLATOR_DECLARATIONS(Axis_group_engraver );
+ TRANSLATOR_DECLARATIONS(Axis_group_engraver);
};
-
-
Axis_group_engraver::Axis_group_engraver ()
{
staffline_ = 0;
Grob *par = elts_[i]->get_parent (Y_AXIS);
if (!par || !Axis_group_interface::has_interface (par))
- if (elts_[i]->empty_b (Y_AXIS))
+ if (elts_[i]->is_empty (Y_AXIS))
{
/*
We have to do _something_, otherwise staff objects will
{
public:
TRANSLATOR_DECLARATIONS( Custos_engraver);
+ virtual void start_translation_timestep ();
virtual void acknowledge_grob (Grob_info);
virtual void process_acknowledged_grobs ();
virtual void stop_translation_timestep ();
void
Custos_engraver::stop_translation_timestep ()
{
+ /*
+ delay typeset until we're at the next moment, so we can silence custodes at the end of the piece.
+ */
for (int i = custodes_.size (); i--;)
{
typeset_grob (custodes_[i]);
}
-
- /*
- delay clear until we're at the next moment, so we can silence
- custodes at the end of the piece.
- */
pitches_.clear ();
+
custos_permitted = false;
}
+void
+Custos_engraver::start_translation_timestep ()
+{
+ custodes_.clear ();
+}
+
void
Custos_engraver::acknowledge_grob (Grob_info info)
for (int i = custodes_.size (); i--;)
{
custodes_[i]->suicide ();
+ typeset_grob (custodes_[i]);
}
custodes_.clear ();
}
}
bool
-Grob::empty_b (Axis a)const
+Grob::is_empty (Axis a)const
{
return ! (gh_pair_p (dim_cache_[a].dimension_) ||
gh_procedure_p (dim_cache_[a].dimension_));
void init ();
public:
- bool empty_b (Axis a) const;
+ bool is_empty (Axis a) const;
Interval extent (Grob * refpoint, Axis) const;
public:
TRANSLATOR_DECLARATIONS(Metronome_mark_engraver);
protected:
- Item* text_;
- Grob * bar_line_;
+ Item *text_;
+ Grob *bar_line_;
protected:
virtual void stop_translation_timestep ();
virtual void acknowledge_grob (Grob_info);
void create_items (Music*);
- virtual bool try_music (Music *req);
+ virtual bool try_music (Music *ev);
virtual void process_music ();
private:
- Music * mark_req_;
+ Music *mark_ev_;
};
Metronome_mark_engraver::Metronome_mark_engraver ()
{
text_ =0;
- mark_req_ = 0;
+ mark_ev_ = 0;
}
void
typeset_grob (text_);
text_ =0;
}
- mark_req_ = 0;
+ mark_ev_ = 0;
}
bool
Metronome_mark_engraver::try_music (Music* r)
{
- mark_req_ = r;
+ mark_ev_ = r;
return true;
}
void
Metronome_mark_engraver::process_music ()
{
- if (mark_req_)
+ if (mark_ev_)
{
- create_items (mark_req_);
+ create_items (mark_ev_);
SCM proc = get_property ("metronomeMarkFormatter");
- SCM result= scm_call_2 (proc, mark_req_->self_scm (),
+ SCM result= scm_call_2 (proc, mark_ev_->self_scm (),
daddy_trans_->self_scm());
text_->set_grob_property ("text", result);
scm_puts ("#<Mom ", port);
String str = r->to_string ();
scm_puts ((char *)str.to_str0 (), port);
- scm_puts (" >", port);
+ scm_puts (">", port);
return 1;
}
/*
TODO: add optional factor argument.
- */
+*/
LY_DEFINE (make_moment,"ly:make-moment", 2,0,0, (SCM n, SCM d),
"create the rational number with main timing @var{n}/@var{d}. \n"
-"\n"
-"\n"
-"Moment is a point in musical time. It is consists of a pair of\n"
-"rationals (@var{m},@var{g}), where @var{m} is the timing for the main\n"
-"notes, and @var{g} the timing for grace notes. In absence of grace\n"
-"notes, @var{g} is zero.\n"
-)
+ "\n"
+ "\n"
+ "Moment is a point in musical time. It is consists of a pair of\n"
+ "rationals (@var{m},@var{g}), where @var{m} is the timing for the main\n"
+ "notes, and @var{g} the timing for grace notes. In absence of grace\n"
+ "notes, @var{g} is zero.\n"
+ )
{
SCM_ASSERT_TYPE(SCM_INUMP (n), n, SCM_ARG1, __FUNCTION__, "integer");
SCM_ASSERT_TYPE(SCM_INUMP (d), d, SCM_ARG2, __FUNCTION__, "integer");
LY_DEFINE (add_moment,"ly:add-moment", 2,0,0, (SCM a, SCM b),
"Add two moments."
-)
+ )
{
Moment * ma = unsmob_moment (a);
Moment * mb = unsmob_moment (b);
LY_DEFINE (mul_moment,"ly:mul-moment", 2,0,0, (SCM a, SCM b),
"Multiply two moments."
-)
+ )
{
Moment * ma = unsmob_moment (a);
Moment * mb = unsmob_moment (b);
LY_DEFINE (div_moment,"ly:div-moment", 2,0,0, (SCM a, SCM b),
"Divide two moments."
-)
+ )
{
Moment * ma = unsmob_moment (a);
Moment * mb = unsmob_moment (b);
/*
only take the main part of SRC for multiplication.
- */
+*/
void
Moment::operator *= (Moment const &src)
{
/*
only take the main part of SRC for multiplication.
- */
+*/
void
Moment::operator /= (Moment const &src)
{
/*
- part-combine-music-iterator.cc -- implement New_pc_iterator
+ new-part-combine-music-iterator.cc -- implement New_pc_iterator
source file of the GNU LilyPond music typesetter
- (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 2004 Han-Wen Nienhuys
*/
#include "part-combine-music-iterator.hh"
+/*
+ ottava-bracket.cc -- implement Ottava_bracket
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ */
+
#include "molecule.hh"
#include "text-item.hh"
#include "text-spanner.hh"
Drul_array<Real> shorten = robust_scm2interval (me->get_grob_property ("shorten-pair"),
Interval (0,0));
+
+
+ /*
+ TODO: we should check if there are ledgers, and modify length of
+ the spanner to that.
+ */
do
{
Item *b = me->get_bound (d);
edge_height,
0.0,
flare, shorten);
+
+ /*
+ The vertical lines should not take space, for the following scenario:
+
+ 8 -----+
+ o |
+ |
+ |
+
+ */
+ b = Molecule (Box (b.extent (X_AXIS),
+ Interval (0.1,0.1)),
+ b.get_expr ());
b.translate_axis (bracket_span_points[LEFT], X_AXIS);
text.translate_axis (span_points[LEFT], X_AXIS);
source file of the GNU LilyPond music typesetter
(c) 2000--2003 Han-Wen Nienhuys
- Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "protected-scm.hh"
source file of the GNU LilyPond music typesetter
(c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "engraver.hh"
Span_arpeggio_engraver::process_acknowledged_grobs ()
{
/*
- connectArpeggios is slightly brusque; we should really read a elt
+ connectArpeggios is slightly brusque; we should really read a grob
property of the caught non-span arpeggios. That way, we can have
both non-connected and connected arps in one pianostaff.
-
*/
if (!span_arpeggio_ && arpeggios_.size () > 1
if (col->system_)
continue;
-
Item * left = 0;
Item * right = 0;
if (!left && l)
{
left = l->get_column ();
+ if (!left->get_system ())
+ left = left->find_prebroken_piece (RIGHT);
}
divide_over ++;
-
loose = right = r->get_column ();
}
while (1);
+
+ if (!right->get_system ())
+ right = right->find_prebroken_piece (LEFT);
/*
We divide the remaining space of the column over the left and
Grob * common = right->common_refpoint (left, X_AXIS);
Real rx = right->extent(common, X_AXIS)[LEFT];
- Real lx = left->extent(common, X_AXIS)[RIGHT];
+ Real lx = left->extent(common, X_AXIS)[RIGHT];
Real total_dx = rx - lx;
Interval cval =col->extent (col, X_AXIS);
dx *= 0.5;
col->system_ = which;
+ col->translate_axis (- col->relative_coordinate (common, X_AXIS), X_AXIS);
col->translate_axis (lx + dx - cval[LEFT], X_AXIS);
}
}
}
Drul_array<Real> edge_height = robust_scm2interval (me->get_grob_property ("edge-height"),
- Interval (1.0, 1.0));
+ Interval (0.0, 0.0));
Drul_array<Molecule> edge_line;
{
Direction d = LEFT;
/*
- plet-spanner.cc -- implement Tuplet_bracket
+ tuplet-bracket.cc -- implement Tuplet_bracket
source file of the GNU LilyPond music typesetter
(c) 1997--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+ Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
/*