import re
import time
+logfile = sys.stdout
+
def program_id ():
return name + ' version ' + version;
def gulp_file (f):
- sys.stderr.write ('[%s' % f)
+ logfile.write ('[%s' % f)
try:
i = open (f)
i.seek (0, 2)
n = i.tell ()
i.seek (0,0)
except:
- sys.stderr.write ('can\'t open file %s\n ' % f)
+ logfile.write ('can\'t open file %s\n ' % f)
return ''
s = i.read (n)
- sys.stderr.write (']')
+ logfile.write (']')
if len (s) <= 0:
- sys.stderr.write ('gulped empty file: %s\n'% f)
+ logfile.write ('gulped empty file: %s\n'% f)
return s
mf = files[0]
output_name = font_name + '.pfa'
-sys.stderr.write ('Font: %s\n'% font_name)
+logfile.write ('Font: %s\n'% font_name)
def header (f):
f.write ('%!PS-AdobeFont-3.0: ' + font_name + '\n')
suspect_re = re.compile ('closepath ((gsave )*fill( grestore stroke)*) 1 setgray newpath (.*?) closepath fill')
def characters (f):
- sys.stderr.write ('[')
+ logfile.write ('[')
files = []
import find # q
f.write ('end % of CharProcs\n')
f.write (encoding)
f.write ('\n')
- sys.stderr.write (']')
+ logfile.write (']')
ps_file = open (output_name, 'w')
header (ps_file)
characters (ps_file)
footer (ps_file)
-sys.stderr.write ('\n')
+logfile.write ('\n')
ps_file.close ()
-sys.stderr.write ('Wrote PostScript font: %s\n' % output_name)
+logfile.write ('Wrote PostScript font: %s\n' % output_name)
class Align_note_column_engraver: public Engraver
{
Item * align_item_p_;
- Note_column * now_column_l_;
+ Score_element * now_column_l_;
Score_element * accidental_l_;
virtual void process_acknowledged ();
void
Align_note_column_engraver::acknowledge_element (Score_element_info inf)
{
- if (Note_column * n = dynamic_cast<Note_column*> (inf.elem_l_))
+ if (Note_column::has_interface(inf.elem_l_))
{
- now_column_l_ =n;
+ now_column_l_ =inf.elem_l_;
}
else if (Local_key_item::has_interface (inf.elem_l_))
{
if (!has_interface (me))
{
me->set_interface (ly_symbol2scm ("axis-group-interface"));
- me->set_elt_property ("elements", SCM_EOL);
}
+ me->set_elt_property ("elements", SCM_EOL);
}
#include "score-engraver.hh"
#include "rest.hh"
#include "drul-array.hh"
+#include "item.hh"
+#include "spanner.hh"
class Beam_engraver : public Engraver
{
Drul_array<Span_req*> reqs_drul_;
- Beam *finished_beam_p_;
- Beam *beam_p_;
+ Spanner *finished_beam_p_;
+ Spanner *beam_p_;
Span_req * prev_start_req_;
Beaming_info_list * beam_info_p_;
}
prev_start_req_ = reqs_drul_[START];
- beam_p_ = new Beam (get_property ("basicBeamProperties"));
-
+ beam_p_ = new Spanner (get_property ("basicBeamProperties"));
+ Beam::set_interface (beam_p_);
+
SCM smp = get_property ("measurePosition");
Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
{
finished_beam_info_p_->beamify ();
- finished_beam_p_->set_beaming (finished_beam_info_p_);
+ Beam::set_beaming (finished_beam_p_, finished_beam_info_p_);
typeset_element (finished_beam_p_);
delete finished_beam_info_p_;
finished_beam_info_p_ =0;
Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_;
beam_info_p_->add_stem (stem_location,
(rhythmic_req->duration_.durlog_i_ - 2) >? 1);
- beam_p_->add_stem (stem_l);
+ Beam::add_stem (beam_p_, stem_l);
}
}
}
#include "warn.hh"
#include "misc.hh"
#include "note-head.hh"
+#include "spanner.hh"
+#include "item.hh"
/**
This acknowledges repeated music with "tremolo" style. It typesets
int note_head_i_;
- Beam * beam_p_;
- Beam * finished_beam_p_;
+ Spanner * beam_p_;
+ Spanner * finished_beam_p_;
protected:
virtual void do_removal_processing();
{
if (repeat_ && !beam_p_)
{
- beam_p_ = new Beam (get_property ("basicBeamProperties"));
+ beam_p_ = new Spanner (get_property ("basicBeamProperties"));
+ Beam::set_interface (beam_p_);
beam_p_->set_elt_property ("chord-tremolo", SCM_BOOL_T);
if (Rhythmic_req* r = dynamic_cast <Rhythmic_req *> (info.req_l_))
{
- beam_p_->add_stem (s);
+ Beam::add_stem (beam_p_, s);
Moment stem_location = now_mom () -
start_mom_ + beam_start_location_;
}
a collision object. */
class Collision_engraver : public Engraver {
Item * col_p_;
- Link_array<Note_column> note_column_l_arr_;
+ Link_array<Score_element> note_column_l_arr_;
protected:
virtual void acknowledge_element (Score_element_info);
void
Collision_engraver::acknowledge_element (Score_element_info i)
{
- if (Note_column * c = dynamic_cast<Note_column *> (i.elem_l_))
+ if (Note_column::has_interface (i.elem_l_))
{
/*should check Y axis? */
- if (c->rest_b () || c->parent_l(X_AXIS))
+ if (Note_column::rest_b (i.elem_l_) || i.elem_l_->parent_l(X_AXIS))
return ;
- note_column_l_arr_.push (c);
+ note_column_l_arr_.push (i.elem_l_);
}
}
#include "item.hh"
void
-Collision::add_column (Score_element*me,Note_column* ncol_l)
+Collision::add_column (Score_element*me,Score_element* ncol_l)
{
ncol_l->add_offset_callback (force_shift_callback, X_AXIS);
Axis_group_interface::add_element (me, ncol_l);
SCM
Collision::automatic_shift (Score_element *me)
{
- Drul_array<Link_array<Note_column> > clash_groups;
+ Drul_array<Link_array<Score_element> > clash_groups;
Drul_array<Array<int> > shifts;
SCM tups = SCM_EOL;
SCM car = gh_car (s);
Score_element * se = unsmob_element (car);
- if (Note_column * col = dynamic_cast<Note_column*> (se))
- clash_groups[col->dir ()].push (col);
+ if (Note_column::has_interface (se))
+ clash_groups[Note_column::dir (se)].push (se);
}
do
{
Array<int> & shift (shifts[d]);
- Link_array<Note_column> & clashes (clash_groups[d]);
+ Link_array<Score_element> & clashes (clash_groups[d]);
clashes.sort (Note_column::shift_compare);
all of them again. */
if (extents[UP].size () && extents[DOWN].size ())
{
- Note_column *cu_l =clash_groups[UP][0];
- Note_column *cd_l =clash_groups[DOWN][0];
+ Score_element *cu_l =clash_groups[UP][0];
+ Score_element *cd_l =clash_groups[DOWN][0];
/*
TODO.
*/
- Score_element * nu_l= cu_l->first_head();
- Score_element * nd_l = cd_l->first_head();
+ Score_element * nu_l= Note_column::first_head(cu_l);
+ Score_element * nd_l = Note_column::first_head(cd_l);
int downpos = Note_column::head_positions_interval (cd_l)[BIGGER];
int uppos = Note_column::head_positions_interval (cu_l)[SMALLER];
void
Dynamic_engraver::acknowledge_element (Score_element_info i)
{
- if (Note_column* n = dynamic_cast<Note_column*> (i.elem_l_))
+ if (Note_column::has_interface (i.elem_l_))
{
if (line_spanner_)
{
- Side_position::add_support (line_spanner_,n);
- add_bound_item (line_spanner_,n);
+ Side_position::add_support (line_spanner_,i.elem_l_);
+ add_bound_item (line_spanner_,dynamic_cast<Item*>(i.elem_l_));
}
}
}
#define BEAM_HH
#include "lily-proto.hh"
-#include "spanner.hh"
+#include "lily-guile.hh"
/** a beam connects multiple stems.
damping -- amount of beam slope damping. (int)
should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams
*/
-class Beam : public Spanner
+class Beam
{
public:
-
-
- int visible_stem_count () const;
- Item* first_visible_stem () const;
- Item* last_visible_stem () const;
+ static int visible_stem_count (Score_element*);
+ static Item* first_visible_stem (Score_element*);
+ static Item* last_visible_stem (Score_element*);
+ static bool has_interface (Score_element*);
+ static void set_interface (Score_element*);
static Real rest_collision_callback (Score_element *,Axis);
Beam (SCM);
- void add_stem (Score_element*);
- void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
- void set_beaming (Beaming_info_list *);
- void set_stemlens ();
- VIRTUAL_COPY_CONS(Score_element);
-
- int get_multiplicity () const;
-
+ static void add_stem (Score_element*,Score_element*);
+ static void set_grouping (Score_element*,Rhythmic_grouping def, Rhythmic_grouping current);
+ static void set_beaming (Score_element*,Beaming_info_list *);
+ static void set_stemlens (Score_element*);
+ static int get_multiplicity (Score_element*me);
static SCM brew_molecule (SCM);
static SCM before_line_breaking (SCM);
static SCM after_line_breaking (SCM);
+ static Molecule stem_beams (Score_element*,Item *here, Item *next, Item *prev);
- Molecule stem_beams (Item *here, Item *next, Item *prev) const;
private:
- Direction get_default_dir () const;
- void set_stem_directions ();
- void auto_knees ();
- bool auto_knee (String gap_str, bool interstaff_b);
- void set_stem_shorten ();
- void calc_default_position_and_height (Real* y, Real* dy) const;
- bool suspect_slope_b (Real y, Real dy) const;
- Real calc_slope_damping_f (Real dy) const;
- Real calc_stem_y_f (Item* s, Real y, Real dy) const;
- Real check_stem_length_f (Real y, Real dy) const;
- void set_stem_length (Real y, Real dy);
- Real quantise_dy_f (Real dy) const;
- Real quantise_y_f (Real y, Real dy, int quant_dir);
- int forced_stem_count () const;
+ static Direction get_default_dir (Score_element*);
+ static void set_stem_directions (Score_element*);
+ static void auto_knees (Score_element*);
+ static bool auto_knee (Score_element*,String gap_str, bool interstaff_b);
+ static void set_stem_shorten (Score_element*);
+ static void calc_default_position_and_height (Score_element*,Real* y, Real* dy);
+ static bool suspect_slope_b (Score_element*, Real y, Real dy);
+ static Real calc_slope_damping_f (Score_element*, Real dy);
+ static Real calc_stem_y_f (Score_element*, Item* s, Real y, Real dy);
+ static Real check_stem_length_f (Score_element*, Real y, Real dy);
+ static void set_stem_length (Score_element*, Real y, Real dy);
+ static Real quantise_dy_f (Score_element*, Real dy);
+ static Real quantise_y_f (Score_element*, Real y, Real dy, int quant_dir);
+ static int forced_stem_count (Score_element*);
};
#endif // BEAM_HH
static SCM forced_shift (Score_element*);
static Real force_shift_callback (Score_element *, Axis);
static void do_shifts (Score_element*);
- static void add_column (Score_element*me,Note_column*ncol_l);
+ static void add_column (Score_element*me,Score_element*ncol_l);
};
#endif // COLLISION_HH
#ifndef MULTI_MEASURE_REST_HH
#define MULTI_MEASURE_REST_HH
-#include "spanner.hh"
+#include "lily-proto.hh"
+#include "lily-guile.hh"
+#include "rod.hh"
-
-class Multi_measure_rest : public Spanner
+class Multi_measure_rest
{
public:
- Multi_measure_rest (SCM);
-
static void set_interface (Score_element*);
static bool has_interface (Score_element*);
static SCM brew_molecule (SCM);
static void add_column (Score_element*,Item*);
- VIRTUAL_COPY_CONS (Score_element);
- virtual Array<Rod> get_rods () const;
+ static SCM set_spacing_rods (SCM);
};
#endif /* MULTI_MEASURE_REST_HH */
UGR. Junkme. refpoint should be the notehead, dir should come from stem.
*/
-class Note_column : public Item
+class Note_column
{
public:
- static int shift_compare (Note_column *const &, Note_column*const&);
+ static int shift_compare (Score_element *const &, Score_element*const&);
/** The relative position of the "voice" containing this
chord. Normally this would be the same as the stem direction,
JUNKME.
*/
- Direction dir () const;
-
- static Slice head_positions_interval(Score_element* me) ;
+ static Direction dir (Score_element*me);
+ static Slice head_positions_interval(Score_element* me);
static Direction static_dir (Score_element*);
- void translate_rests(int dy);
- Score_element * first_head ()const;
- Interval rest_dim ()const ;
- Note_column (SCM);
- void set_stem (Score_element*);
- void set_dotcol (Score_element*);
- void add_head (Score_element*);
- bool rest_b () const;
-
+ static void translate_rests(Score_element*me,int dy);
+ static Score_element * first_head (Score_element*me);
+ static Interval rest_dim (Score_element*me);
+ static void set_stem (Score_element*me,Score_element*);
+ static void set_dotcol (Score_element*me,Score_element*);
+ static void add_head (Score_element*me,Score_element*);
+ static bool rest_b (Score_element*me);
static bool has_interface (Score_element*);
-
- Item *stem_l()const;
+ static void set_interface (Score_element*);
+ static Item *stem_l(Score_element*);
};
#endif // NOTE_COLUMN_HH
class Rest_collision // interface
{
public:
- static void add_column (Score_element*me,Note_column*);
+ static void add_column (Score_element*me,Score_element*);
static void set_interface (Score_element*me);
static bool has_interface (Score_element*);
static Real force_shift_callback (Score_element *, Axis);
#include "direction.hh"
#include "drul-array.hh"
-struct Column_rod
-{
- Paper_column *other_l_;
- Real distance_f_;
-
- Column_rod ();
-};
struct Rod
virtual void do_break_processing ();
virtual Score_element *find_broken_piece (Line_of_score*) const;
- /// generate rods & springs
- virtual void do_space_processing ();
virtual void discretionary_processing ();
virtual void do_derived_mark ();
#ifndef SCRIPT_HH
#define SCRIPT_HH
-#include "item.hh"
-#include "drul-array.hh"
+#include "lily-guile.hh"
+#include "lily-proto.hh"
/**
Articulation marks (and the like) that are attached to notes/stems.
Needs support from Staff_side for proper operation. Staff_side
handles the positioning.
*/
-class Script : public Item
+class Script
{
public:
- static Molecule get_molecule (Score_element*,Direction d);
- Script (SCM);
+ static Molecule get_molecule (Score_element*,Direction d);
+ static void set_interface (Score_element*);
+ static bool has_interface (Score_element*);
static SCM brew_molecule (SCM);
static SCM after_line_breaking (SCM);
};
#include "spanner.hh"
-class Separating_group_spanner : public Spanner
+class Separating_group_spanner
{
public:
static void add_spacing_unit (Score_element*me, Item*);
- Separating_group_spanner(SCM);
-protected:
- VIRTUAL_COPY_CONS(Score_element);
- virtual Array<Rod> get_rods () const;
+ static void set_interface (Score_element*);
+ static SCM set_spacing_rods (SCM);
};
#endif /* SEPARATING_GROUP_SPANNER_HH */
#ifndef SLUR_HH
#define SLUR_HH
-#include "spanner.hh"
+#include "lily-guile.hh"
+#include "lily-proto.hh"
#include "rod.hh"
-/**
- A #Bow# which tries to drape itself around the stems too.
- */
-class Slur : public Spanner
+class Slur
{
public:
- Slur (SCM);
- VIRTUAL_COPY_CONS(Score_element);
-
- void add_column (Note_column*);
- static SCM brew_molecule (SCM);
-
- Array<Offset> get_encompass_offset_arr () const;
- Bezier get_curve () const;
-
- Direction get_default_dir () const;
+ static void add_column (Score_element*me,Score_element*col);
+ static SCM brew_molecule (SCM);
+ static void set_interface (Score_element*);
+ static bool has_interface (Score_element*);
+ static Array<Offset> get_encompass_offset_arr (Score_element*me) ;
+ static Bezier get_curve (Score_element*me) ;
+ static Direction get_default_dir (Score_element*me) ;
static SCM after_line_breaking (SCM);
- Array<Rod> get_rods () const;
- Offset get_attachment (Direction dir, Score_element**common) const;
-
+ static SCM set_spacing_rods (SCM);
private:
- void de_uglyfy (Slur_bezier_bow* bb, Real default_height);
- void set_extremities ();
- void set_control_points ();
- Offset encompass_offset (Score_element *col,Score_element**common)const;
+ static Offset get_attachment (Score_element*me,Direction dir, Score_element**common) ;
+ static void de_uglyfy (Score_element*me,Slur_bezier_bow* bb, Real default_height);
+ static void set_extremities (Score_element*me);
+ static void set_control_points (Score_element*me);
+ static Offset encompass_offset (Score_element*me,Score_element *col,Score_element**common);
};
#endif // SLUR_HH
#ifndef STEM_HH
#define STEM_HH
-#include "item.hh"
-#include "array.hh"
-#include "moment.hh"
-#include "molecule.hh"
+#include "lily-proto.hh"
+#include "lily-guile.hh"
#include "stem-info.hh"
/**the rule attached to the ball.
/// how many abbrev beam don't reach stem?
int beam_gap_i_;
-
-
*/
-class Stem : public Item
+class Stem
{
public:
static SCM brew_molecule (SCM);
/// log of the duration. Eg. 4 -> 16th note -> 2 flags
static int flag_i (Score_element*) ;
-
static int beam_count (Score_element*,Direction) ;
static void set_beaming (Score_element*,int, Direction d);
/**
don't print flag when in beam.
our beam, for aligning abbrev flags
*/
- static Beam * beam_l (Score_element*);
+ static Score_element * beam_l (Score_element*);
static Score_element * first_head (Score_element*) ;
static Drul_array<Score_element*> extremal_heads (Score_element*);
-
static Score_element * support_head (Score_element*) ;
- Stem (SCM);
-
+
/// ensure that this Stem also encompasses the Notehead #n#
static void add_head (Score_element*me, Score_element*n);
-
static Stem_info calc_stem_info (Score_element *) ;
-
static Real chord_start_f (Score_element *) ;
static Direction get_direction (Score_element*) ;
static int type_i (Score_element *) ;
static Direction get_default_dir(Score_element *) ;
static int get_center_distance(Score_element *,Direction) ;
static int heads_i (Score_element *) ;
-
static bool invisible_b(Score_element *) ;
/// heads that the stem encompasses (positions)
static Interval head_positions(Score_element *) ;
-
-
static Real get_default_stem_end_position (Score_element*me) ;
static void position_noteheads(Score_element*);
static Real stem_end_position (Score_element*) ;
#ifndef SYSTEM_START_DELIMITER_HH
#define SYSTEM_START_DELIMITER_HH
-#include "spanner.hh"
+#include "lily-guile.hh"
+#include "lily-proto.hh"
/*
Braces/brackets across staffs.
*/
-class System_start_delimiter : public Spanner
+class System_start_delimiter
{
public:
- System_start_delimiter (SCM);
static SCM brew_molecule (SCM);
- VIRTUAL_COPY_CONS (Score_element);
-
+ static void set_interface (Score_element*me);
+ static bool has_interface (Score_element*);
static SCM after_line_breaking (SCM);
static void try_collapse (Score_element*);
-
- Molecule staff_bracket (Real) const;
- Molecule staff_brace (Real) const;
- Molecule simple_bar (Real) const;
+ static Molecule staff_bracket (Score_element*,Real) ;
+ static Molecule staff_brace (Score_element*,Real) ;
+ static Molecule simple_bar (Score_element*,Real) ;
};
#endif /* SYSTEM_START_DELIMITER_HH */
#ifndef TIE_COLUMN_HH
#define TIE_COLUMN_HH
-#include "spanner.hh"
+#include "lily-proto.hh"
+#include "lily-guile.hh"
-class Tie_column : public Spanner
+class Tie_column
{
public:
- Tie_column (SCM s);
- VIRTUAL_COPY_CONS (Score_element);
static void set_interface (Score_element*me);
static bool has_interface (Score_element*);
static void add_tie (Score_element*me,Tie*);
-
static SCM after_line_breaking (SCM);
static void set_directions (Score_element*me);
};
Bezier get_curve () const;
Drul_array<Real> dy_f_drul_;
Drul_array<Real> dx_f_drul_;
- virtual Array<Rod> get_rods () const;
+ static SCM set_spacing_rods (SCM);
Array<Offset> get_controls () const;
};
class Instrument_name_engraver : public Engraver
{
Item *text_;
- System_start_delimiter * delim_ ;
+ Spanner * delim_ ;
void create_text (SCM s);
public:
}
}
- if (dynamic_cast <System_start_delimiter*> (i.elem_l_)
+ if (System_start_delimiter::has_interface (i.elem_l_)
&& i.origin_trans_l_->daddy_trans_l_ == daddy_trans_l_)
{
- delim_ = dynamic_cast<System_start_delimiter*> (i.elem_l_);
+ delim_ = dynamic_cast<Spanner*> (i.elem_l_);
}
}
if (busy_span_req_l_ && !mmrest_p_)
{
- mmrest_p_ = new Multi_measure_rest (get_property ("basicMultiMeasureRestProperties"));
+ mmrest_p_ = new Spanner (get_property ("basicMultiMeasureRestProperties"));
+
Multi_measure_rest::set_interface (mmrest_p_);
Staff_symbol_referencer::set_interface (mmrest_p_);
#include "debug.hh"
#include "paper-def.hh"
#include "paper-column.hh" // urg
-#include "bar.hh"
#include "lookup.hh"
#include "rest.hh"
#include "molecule.hh"
#include "misc.hh"
#include "group-interface.hh"
-#include "stem.hh"
+#include "spanner.hh"
#include "staff-symbol-referencer.hh"
+
void
Multi_measure_rest::set_interface (Score_element*me)
{
me->set_elt_property ("columns", SCM_EOL);
}
-Multi_measure_rest::Multi_measure_rest (SCM s)
- : Spanner(s)
-{}
-
/*
[TODO] 17
* variable-sized multi-measure rest symbol: |====| ??
}
-Array<Rod>
-Multi_measure_rest::get_rods () const
+MAKE_SCHEME_CALLBACK (Multi_measure_rest, set_spacing_rods);
+
+SCM
+Multi_measure_rest::set_spacing_rods (SCM smob)
{
- Array<Rod> a;
+ Score_element*me = unsmob_element (smob);
- if (!(get_bound (LEFT) && get_bound (RIGHT)))
+ Spanner*sp = dynamic_cast<Spanner*> (me);
+ if (!(sp->get_bound (LEFT) && sp->get_bound (RIGHT)))
{
programming_error ("Multi_measure_rest::get_rods (): I am not spanned!");
- return a;
+ return SCM_UNDEFINED;
}
- Item * l = get_bound (LEFT)->column_l ();
- Item * r = get_bound (RIGHT)->column_l ();
+ Item * l = sp->get_bound (LEFT)->column_l ();
+ Item * r = sp->get_bound (RIGHT)->column_l ();
Item * lb = l->find_prebroken_piece (RIGHT);
Item * rb = r->find_prebroken_piece (LEFT);
should do something more advanced.
*/
rod.distance_f_ = l->extent (X_AXIS)[BIGGER] - r->extent (X_AXIS)[SMALLER]
- + paper_l ()->get_var ("multi_measure_rest_x_minimum");
+ + me->paper_l ()->get_var ("multi_measure_rest_x_minimum");
- a.push (rod);
+ rod.add_to_cols ();
}
-
- return a;
+ return SCM_UNDEFINED;
}
#include "note-head.hh"
bool
-Note_column::rest_b () const
+Note_column::rest_b (Score_element*me)
{
- return unsmob_element (get_elt_property ("rest"));
+ return unsmob_element (me->get_elt_property ("rest"));
}
int
-Note_column::shift_compare (Note_column *const &p1, Note_column*const&p2)
+Note_column::shift_compare (Score_element *const &p1, Score_element *const&p2)
{
SCM s1 = p1->get_elt_property ("horizontal-shift");
SCM s2 = p2->get_elt_property ("horizontal-shift");
return h1 - h2;
}
-Note_column::Note_column( SCM s)
- : Item (s)
+void
+Note_column::set_interface (Score_element* me)
{
- Score_element* me = this;
me->set_elt_property ("note-heads", SCM_EOL);
me->set_interface (ly_symbol2scm ("note-column-interface"));
}
Item *
-Note_column::stem_l () const
+Note_column::stem_l (Score_element*me)
{
- SCM s = get_elt_property ("stem");
+ SCM s = me->get_elt_property ("stem");
return dynamic_cast<Item*>(unsmob_element (s));
}
-
Slice
Note_column::head_positions_interval(Score_element *me)
}
Direction
-Note_column::static_dir (Score_element* me)
+Note_column::dir (Score_element* me)
{
Score_element *stem = unsmob_element (me->get_elt_property ("stem"));
if (stem && Stem::has_interface (stem))
}
-Direction
-Note_column::dir () const
-{
- return static_dir ((Score_element*) this);
-}
-
void
-Note_column::set_stem (Score_element * stem_l)
+Note_column::set_stem (Score_element*me,Score_element * stem_l)
{
- set_elt_property ("stem", stem_l->self_scm_);
-
- add_dependency (stem_l);
- Axis_group_interface::add_element (this, stem_l);
+ me->set_elt_property ("stem", stem_l->self_scm_);
+ me->add_dependency (stem_l);
+ Axis_group_interface::add_element (me, stem_l);
}
void
-Note_column::add_head (Score_element *h)
+Note_column::add_head (Score_element*me,Score_element *h)
{
if (Rest::has_interface (h))
{
- this->set_elt_property ("rest", h->self_scm_);
+ me->set_elt_property ("rest", h->self_scm_);
}
else if (Note_head::has_interface (h))
{
- Pointer_group_interface gi (this, "note-heads");
+ Pointer_group_interface gi (me, "note-heads");
gi.add_element (h);
}
- Axis_group_interface::add_element (this, h);
+ Axis_group_interface::add_element (me, h);
}
/**
translate the rest symbols vertically by amount DY_I.
*/
void
-Note_column::translate_rests (int dy_i)
+Note_column::translate_rests (Score_element*me,int dy_i)
{
- Score_element * r = unsmob_element (get_elt_property ("rest"));
+ Score_element * r = unsmob_element (me->get_elt_property ("rest"));
if (r)
{
r->translate_axis (dy_i * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
void
-Note_column::set_dotcol (Score_element *d)
+Note_column::set_dotcol (Score_element*me,Score_element *d)
{
- Axis_group_interface::add_element (this, d);
+ Axis_group_interface::add_element (me, d);
}
Interval
-Note_column::rest_dim () const
+Note_column::rest_dim (Score_element*me)
{
- Score_element * r = unsmob_element (get_elt_property ("rest"));
+ Score_element * r = unsmob_element (me->get_elt_property ("rest"));
return r->extent (Y_AXIS);
}
Score_element*
-Note_column::first_head () const
+Note_column::first_head (Score_element*me)
{
- Score_element * st = stem_l ();
+ Score_element * st = stem_l (me);
return st? Stem::first_head (st): 0;
}
{
Item* rest_collision_p_;
- Link_array<Note_column> note_column_l_arr_;
+ Link_array<Score_element> note_column_l_arr_;
protected:
virtual void acknowledge_element (Score_element_info);
virtual void process_acknowledged ();
void
Rest_collision_engraver::acknowledge_element (Score_element_info i)
{
- if (dynamic_cast<Note_column *> (i.elem_l_))
- note_column_l_arr_.push (dynamic_cast<Note_column *> (i.elem_l_));
+ if (Note_column::has_interface (i.elem_l_))
+ note_column_l_arr_.push (i.elem_l_);
}
void
}
void
-Rest_collision::add_column (Score_element*me,Note_column *p)
+Rest_collision::add_column (Score_element*me,Score_element *p)
{
me->add_dependency (p);
Pointer_group_interface gi (me);
/*
ugh. -> score elt type
*/
- Link_array<Note_column> rests;
- Link_array<Note_column> notes;
+ Link_array<Score_element> rests;
+ Link_array<Score_element> notes;
for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
{
Score_element * e = unsmob_element (gh_car (s));
if (e && unsmob_element (e->get_elt_property ("rest")))
- rests.push (dynamic_cast<Note_column*> (e));
+ rests.push (e);
else
- notes.push (dynamic_cast<Note_column*> (e));
+ notes.push (e);
}
int dy = display_count > 2 ? 6 : 4;
if (display_count > 1)
{
- rests[0]->translate_rests (dy);
- rests[1]->translate_rests (-dy);
+ Note_column::translate_rests (rests[0],dy);
+ Note_column::translate_rests (rests[1], -dy);
}
}
// meisjes met jongetjes
{
warning (_("too many notes for rest collision"));
}
- Note_column * rcol = rests[0];
+ Score_element * rcol = rests[0];
// try to be opposite of noteheads.
- Direction dir = - notes[0]->dir();
+ Direction dir = - Note_column::dir (notes[0]);
- Interval restdim = rcol->rest_dim ();
+ Interval restdim = Note_column::rest_dim (rcol);
if (restdim.empty_b ())
return SCM_UNDEFINED;
if (discrete_dist < stafflines+1)
discrete_dist = int (ceil (discrete_dist / 2.0)* 2.0);
- rcol->translate_rests (dir * discrete_dist);
+ Note_column::translate_rests (rcol,dir * discrete_dist);
}
return SCM_UNDEFINED;
}
class Rhythmic_column_engraver :public Engraver
{
Link_array<Score_element> rhead_l_arr_;
- Link_array<Slur> grace_slur_endings_;
+ Link_array<Score_element> grace_slur_endings_;
Score_element * stem_l_;
- Note_column *ncol_p_;
+ Score_element *ncol_p_;
Score_element *dotcol_l_;
protected:
{
if (!ncol_p_)
{
- ncol_p_ = new Note_column (get_property("basicNoteColumnProperties"));
+ ncol_p_ = new Item (get_property("basicNoteColumnProperties"));
+ Note_column::set_interface (ncol_p_);
announce_element (Score_element_info (ncol_p_, 0));
}
for (int i=0; i < rhead_l_arr_.size (); i++)
{
if (!rhead_l_arr_[i]->parent_l(X_AXIS))
- ncol_p_->add_head (rhead_l_arr_[i]);
+ Note_column::add_head (ncol_p_, rhead_l_arr_[i]);
}
rhead_l_arr_.set_size (0);
}
if (dotcol_l_
&& !dotcol_l_->parent_l (X_AXIS))
{
- ncol_p_->set_dotcol (dotcol_l_);
+ Note_column::set_dotcol (ncol_p_, dotcol_l_);
}
if (stem_l_
&& !stem_l_->parent_l(X_AXIS))
{
- ncol_p_->set_stem (stem_l_);
+ Note_column::set_stem (ncol_p_, stem_l_);
stem_l_ = 0;
}
if (!wegrace)
for (int i=0; i < grace_slur_endings_.size(); i++)
- grace_slur_endings_[i]->add_column (ncol_p_);
+ Slur::add_column (grace_slur_endings_[i], ncol_p_);
grace_slur_endings_.clear ();
}
}
SCM wg = get_property ("weAreGraceContext");
bool wegrace = to_boolean (wg);
if (wegrace != to_boolean (i.elem_l_->get_elt_property ("grace"))
- && !dynamic_cast<Slur*> (i.elem_l_))
+ && !Slur::has_interface (i.elem_l_))
return ;
Item * item = dynamic_cast <Item *> (i.elem_l_);
{
dotcol_l_ = item;
}
- else if (Slur *s = dynamic_cast<Slur*> (i.elem_l_))
+ else if (Slur::has_interface (i.elem_l_))
{
/*
end slurs starting on grace notes
*/
- if (to_boolean (s->get_elt_property ("grace")))
- grace_slur_endings_.push (s);
+ if (to_boolean (i.elem_l_->get_elt_property ("grace")))
+ grace_slur_endings_.push (i.elem_l_);
}
}
#include "paper-score.hh"
#include "stem.hh"
#include "staff-symbol-referencer.hh"
+#include "item.hh"
Item*
{
}
-void
-Score_element::do_space_processing ()
-{
-}
void
Score_element::do_add_processing()
#include "musical-request.hh"
#include "stem.hh"
#include "rhythmic-head.hh"
-
-
#include "engraver.hh"
class Script_engraver : public Engraver {
- Link_array<Script> script_p_arr_;
+ Link_array<Score_element> script_p_arr_;
Link_array<Articulation_req> script_req_l_arr_;
public:
continue;
}
// todo -> use result of articulation-to-scriptdef directly as basic prop list.
- Script *p =new Script (get_property ("basicScriptProperties"));
+ Score_element *p =new Item (get_property ("basicScriptProperties"));
+ Script::set_interface (p);
p->add_offset_callback (Side_position::centered_on_parent, X_AXIS);
{
for (int i=0; i < script_p_arr_.size(); i++)
{
- Script * sc = script_p_arr_[i];
- if (to_boolean (sc->remove_elt_property ("staff-support")))
+ Score_element * sc = script_p_arr_[i];
+ if (to_boolean (sc->get_elt_property ("staff-support")))
{
Side_position::add_staff_support (sc);
}
#include "lookup.hh"
#include "side-position-interface.hh"
#include "paper-def.hh"
-
-
-Script ::Script (SCM s)
- : Item (s)
-{
-}
+#include "item.hh"
Molecule
Script::get_molecule(Score_element * me, Direction d)
return Molecule ();
}
-
-
MAKE_SCHEME_CALLBACK(Script,after_line_breaking);
SCM
Script::after_line_breaking (SCM smob)
return SCM_UNDEFINED;
}
-
MAKE_SCHEME_CALLBACK(Script,brew_molecule);
SCM
return get_molecule (me, dir).create_scheme();
}
+bool
+Script::has_interface (Score_element*me)
+{
+ return me->has_interface ("script-interface");
+}
-
+void
+Script::set_interface (Score_element*me)
+{
+ return me->set_interface ("script-interface");
+}
#include "dimensions.hh"
#include "group-interface.hh"
-static Rod
-make_rod (Item *l, Item *r)
+static void
+do_rod (Item *l, Item *r)
{
Rod rod;
rod.distance_f_ = li[RIGHT] - ri[LEFT];
rod.columnize ();
- return rod;
+ rod.add_to_cols ();
}
-
-Array<Rod>
-Separating_group_spanner::get_rods () const
+MAKE_SCHEME_CALLBACK(Separating_group_spanner,set_spacing_rods);
+SCM
+Separating_group_spanner::set_spacing_rods (SCM smob)
{
- Array<Rod> a;
+ Score_element*me = unsmob_element (smob);
- for (SCM s = get_elt_property ("elements"); gh_pair_p (s) && gh_pair_p (gh_cdr (s)); s = gh_cdr (s))
+ for (SCM s = me->get_elt_property ("elements"); gh_pair_p (s) && gh_pair_p (gh_cdr (s)); s = gh_cdr (s))
{
/*
Order of elements is reversed!
Item *rb
= dynamic_cast<Item*>(r->find_prebroken_piece (LEFT));
- a.push (make_rod(l, r));
+ do_rod(l, r);
if (lb)
{
- Rod rod(make_rod (lb, r));
- a.push (rod);
+ do_rod (lb, r);
}
if (rb)
{
- a.push (make_rod (l, rb));
+ do_rod (l, rb);
}
if (lb && rb)
{
- Rod rod(make_rod (lb, rb));
- a.push (rod);
+ do_rod (lb, rb);
+
}
}
/*
We've done our job, so we get lost.
*/
- for (SCM s = get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = me->get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
{
Item * it =dynamic_cast<Item*>(unsmob_element (gh_car (s)));
if (it && it->broken_b ())
}
it->suicide ();
}
-
- ((Separating_group_spanner *)this)->suicide ();
-
- return a;
+ me->suicide ();
+ return SCM_UNDEFINED ;
}
void
}
-Separating_group_spanner::Separating_group_spanner (SCM s)
- : Spanner (s)
+void
+Separating_group_spanner::set_interface (Score_element*me)
{
- set_elt_property ("elements", SCM_EOL);
+ me->set_elt_property ("elements", SCM_EOL);
}
#include "note-column.hh"
#include "translator-group.hh"
#include "engraver.hh"
+#include "spanner.hh"
class Slur_engraver :public Engraver {
Link_array<Span_req> requests_arr_;
Link_array<Span_req> new_slur_req_l_arr_;
- Link_array<Slur> slur_l_stack_;
- Link_array<Slur> end_slur_l_arr_;
+ Link_array<Score_element> slur_l_stack_;
+ Link_array<Score_element> end_slur_l_arr_;
void set_melisma (bool);
protected:
void
Slur_engraver::acknowledge_element (Score_element_info info)
{
- if (dynamic_cast<Note_column *> (info.elem_l_))
+ if (Note_column::has_interface (info.elem_l_))
{
- Note_column *col_l =dynamic_cast<Note_column *> (info.elem_l_) ;// ugh
+ Score_element *e =info.elem_l_;
for (int i = 0; i < slur_l_stack_.size (); i++)
- slur_l_stack_[i]->add_column (col_l);
+ Slur::add_column (slur_l_stack_[i], e);
for (int i = 0; i < end_slur_l_arr_.size (); i++)
- end_slur_l_arr_[i]->add_column (col_l);
+ Slur::add_column (end_slur_l_arr_[i], e);
}
}
void
Slur_engraver::do_process_music ()
{
- Array<Slur*> start_slur_l_arr_;
+ Link_array<Score_element> start_slur_l_arr_;
for (int i=0; i< new_slur_req_l_arr_.size (); i++)
{
Span_req* slur_req_l = new_slur_req_l_arr_[i];
slur_req_l->warning (_f ("can't find both ends of %s", _ ("slur")));
else
{
- Slur* slur = slur_l_stack_.pop ();
+ Score_element* slur = slur_l_stack_.pop ();
SCM s = get_property ("slurEndAttachment");
if (gh_symbol_p (s))
{
{
// push a new slur onto stack.
// (use temp. array to wait for all slur STOPs)
- Slur* slur = new Slur (get_property ("basicSlurProperties"));
+ Score_element* slur = new Spanner (get_property ("basicSlurProperties"));
+ Slur::set_interface (slur);
SCM s = get_property ("slurBeginAttachment");
if (gh_symbol_p (s))
{
#include "main.hh"
#include "group-interface.hh"
#include "staff-symbol-referencer.hh"
+#include "spanner.hh"
-Slur::Slur (SCM s)
- : Spanner (s)
+
+void
+Slur::set_interface (Score_element*me)
{
- set_elt_property ("attachment", gh_cons (SCM_BOOL_F, SCM_BOOL_F));
- set_elt_property ("note-columns", SCM_EOL);
- set_elt_property ("control-points", SCM_EOL);
+ me-> set_elt_property ("attachment", gh_cons (SCM_BOOL_F, SCM_BOOL_F));
+ me->set_elt_property ("note-columns", SCM_EOL);
+ me->set_elt_property ("control-points", SCM_EOL);
+ me->set_interface (ly_symbol2scm ("slur-interface"));
}
void
-Slur::add_column (Note_column*n)
+Slur::add_column (Score_element*me, Score_element*n)
{
if (!gh_pair_p (n->get_elt_property ("note-heads")))
warning (_ ("Putting slur over rest. Ignoring."));
else
{
- Pointer_group_interface (this, "note-columns").add_element (n);
- add_dependency (n);
+ Pointer_group_interface (me, "note-columns").add_element (n);
+ me->add_dependency (n);
}
- add_bound_item (this, n);
+ add_bound_item (dynamic_cast<Spanner*> (me), dynamic_cast<Item*>(n));
}
void
-Slur::de_uglyfy (Slur_bezier_bow* bb, Real default_height)
+Slur::de_uglyfy (Score_element*me, Slur_bezier_bow* bb, Real default_height)
{
Real length = bb->curve_.control_[3][X_AXIS] ;
Real ff = bb->fit_factor ();
Real h = bb->curve_.control_[i][Y_AXIS] * ff / length;
Real f = default_height / length;
- Real c1 = paper_l ()->get_var ("bezier_control1");
- Real c2 = paper_l ()->get_var ("bezier_control2");
- Real c3 = paper_l ()->get_var ("bezier_control3");
+ Real c1 = me->paper_l ()->get_var ("bezier_control1");
+ Real c2 = me->paper_l ()->get_var ("bezier_control2");
+ Real c3 = me->paper_l ()->get_var ("bezier_control3");
if (h > c1 * f)
{
h = c1 * f;
}
Direction
-Slur::get_default_dir () const
+Slur::get_default_dir (Score_element*me)
{
- Link_array<Note_column> encompass_arr =
- Pointer_group_interface__extract_elements (this, (Note_column*)0, "note-columns");
+ Link_array<Score_element> encompass_arr =
+ Pointer_group_interface__extract_elements (me, (Score_element*)0, "note-columns");
Direction d = DOWN;
for (int i=0; i < encompass_arr.size (); i ++)
{
- if (encompass_arr[i]->dir () < 0)
+ if (Note_column::dir (encompass_arr[i]) < 0)
{
d = UP;
break;
Offset
-Slur::encompass_offset (Score_element* col,
- Score_element **common) const
+Slur::encompass_offset (Score_element*me,
+ Score_element* col,
+ Score_element **common)
{
Offset o;
Score_element* stem_l = unsmob_element (col->get_elt_property ("stem"));
- Direction dir = Directional_element_interface (this).get ();
+ Direction dir = Directional_element_interface (me).get ();
if (!stem_l)
{
/*
leave a gap: slur mustn't touch head/stem
*/
- o[Y_AXIS] += dir * paper_l ()->get_var ("slur_y_free");
+ o[Y_AXIS] += dir * me->paper_l ()->get_var ("slur_y_free");
return o;
}
Slur::after_line_breaking (SCM smob)
{
Score_element *me = unsmob_element (smob);
- Slur * sl = dynamic_cast<Slur*>(me);
- sl->set_extremities ();
- sl->set_control_points ();
+ set_extremities (me);
+ set_control_points (me);
return SCM_UNDEFINED;
}
void
-Slur::set_extremities ()
+Slur::set_extremities (Score_element*me)
{
- if (!Directional_element_interface (this).get ())
- Directional_element_interface (this).set (get_default_dir ());
+ if (!Directional_element_interface (me).get ())
+ Directional_element_interface (me).set (get_default_dir (me));
Direction dir = LEFT;
do
{
- if (!gh_symbol_p (index_cell (get_elt_property ("attachment"), dir)))
+ if (!gh_symbol_p (index_cell (me->get_elt_property ("attachment"), dir)))
{
// for (SCM s = get_elt_property ("slur-extremity-rules"); s != SCM_EOL; s = gh_cdr (s))
for (SCM s = scm_eval (ly_symbol2scm ("slur-extremity-rules"));
s != SCM_EOL; s = gh_cdr (s))
{
- SCM r = gh_call2 (gh_caar (s), this->self_scm_,
+ SCM r = gh_call2 (gh_caar (s), me->self_scm_,
gh_int2scm ((int)dir));
if (r != SCM_BOOL_F)
{
- index_set_cell (get_elt_property ("attachment"), dir,
+ index_set_cell (me->get_elt_property ("attachment"), dir,
gh_cdar (s));
break;
}
}
Offset
-Slur::get_attachment (Direction dir,
- Score_element **common) const
+Slur::get_attachment (Score_element*me,Direction dir,
+ Score_element **common)
{
- SCM s = get_elt_property ("attachment");
+ Spanner*sp = dynamic_cast<Spanner*>(me);
+ SCM s = me->get_elt_property ("attachment");
SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
String str = ly_symbol2string (a);
- Real ss = Staff_symbol_referencer::staff_space ((Score_element*)this);
+ Real ss = Staff_symbol_referencer::staff_space ((Score_element*)me);
Real hs = ss / 2.0;
Offset o;
-
- if (Note_column* n = dynamic_cast<Note_column*> (get_bound (dir)))
+
+ if (Note_column::has_interface (sp->get_bound (dir)))
{
- if (n->stem_l ())
+ Score_element * n =sp->get_bound (dir);
+ if (Score_element*st = Note_column::stem_l (n))
{
- Score_element*st = n->stem_l();
+
if (str == "head")
{
o = Offset (0, Stem::chord_start_f (st ));
Default position is centered in X, on outer side of head Y
*/
o += Offset (0.5 * n->extent (X_AXIS).length (),
- 0.5 * ss * Directional_element_interface (this).get ());
+ 0.5 * ss * Directional_element_interface (me).get ());
}
else if (str == "alongside-stem")
{
*/
o += Offset (n->extent (X_AXIS).length ()
* (1 + Stem::get_direction (st )),
- 0.5 * ss * Directional_element_interface (this).get ());
+ 0.5 * ss * Directional_element_interface (me).get ());
}
else if (str == "stem")
{
SCM other_a = dir == LEFT ? gh_cdr (s) : gh_car (s);
if (ly_symbol2string (other_a) != "loose-end")
{
- o = Offset (0, get_attachment (-dir, common)[Y_AXIS]);
+ o = Offset (0, get_attachment (me, -dir, common)[Y_AXIS]);
}
}
SCM l = scm_assoc
(scm_listify (a,
gh_int2scm (Stem::get_direction (st ) * dir),
- gh_int2scm (Directional_element_interface (this).get () * dir),
+ gh_int2scm (Directional_element_interface (me).get () * dir),
SCM_UNDEFINED),
scm_eval (ly_symbol2scm ("slur-extremity-offset-alist")));
What if get_bound () is not a note-column?
*/
if (str != "loose-end"
- && get_bound (dir)->common_refpoint (common[Y_AXIS], Y_AXIS) == common[Y_AXIS])
+ && sp->get_bound (dir)->common_refpoint (common[Y_AXIS], Y_AXIS) == common[Y_AXIS])
{
- o[Y_AXIS] += get_bound (dir)->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - relative_coordinate (common[Y_AXIS], Y_AXIS);
+ o[Y_AXIS] += sp->get_bound (dir)->relative_coordinate (common[Y_AXIS], Y_AXIS)
+ - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
}
return o;
}
Array<Offset>
-Slur::get_encompass_offset_arr () const
+Slur::get_encompass_offset_arr (Score_element*me)
{
- SCM eltlist = get_elt_property ("note-columns");
- Score_element *common[] = {common_refpoint (eltlist,X_AXIS),
- common_refpoint (eltlist,Y_AXIS)};
+ Spanner*sp = dynamic_cast<Spanner*>(me);
+ SCM eltlist = me->get_elt_property ("note-columns");
+ Score_element *common[] = {me->common_refpoint (eltlist,X_AXIS),
+ me->common_refpoint (eltlist,Y_AXIS)};
- common[X_AXIS] = common[X_AXIS]->common_refpoint (get_bound (RIGHT), X_AXIS);
- common[X_AXIS] = common[X_AXIS]->common_refpoint (get_bound (LEFT), X_AXIS);
+ common[X_AXIS] = common[X_AXIS]->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
+ common[X_AXIS] = common[X_AXIS]->common_refpoint (sp->get_bound (LEFT), X_AXIS);
Link_array<Score_element> encompass_arr;
while (gh_pair_p (eltlist))
Array<Offset> offset_arr;
- Offset origin (relative_coordinate (common[X_AXIS], X_AXIS),
- relative_coordinate (common[Y_AXIS], Y_AXIS));
+ Offset origin (me->relative_coordinate (common[X_AXIS], X_AXIS),
+ me->relative_coordinate (common[Y_AXIS], Y_AXIS));
int first = 1;
int last = encompass_arr.size () - 2;
- offset_arr.push (get_attachment (LEFT, common));
+ offset_arr.push (get_attachment (me, LEFT, common));
/*
left is broken edge
*/
- if (encompass_arr[0] != get_bound (LEFT))
+ if (encompass_arr[0] != sp->get_bound (LEFT))
{
first--;
// ?
offset_arr[0][Y_AXIS] -=
encompass_arr[0]->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - relative_coordinate (common[Y_AXIS], Y_AXIS);
+ - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
}
/*
right is broken edge
*/
- if (encompass_arr.top () != get_bound (RIGHT))
+ if (encompass_arr.top () != sp->get_bound (RIGHT))
{
last++;
}
for (int i = first; i <= last; i++)
{
- Offset o (encompass_offset (encompass_arr[i], common));
+ Offset o (encompass_offset (me, encompass_arr[i], common));
offset_arr.push (o - origin);
}
- offset_arr.push (Offset (spanner_length (), 0) + get_attachment (RIGHT,common));
+ offset_arr.push (Offset (sp->spanner_length (), 0) + get_attachment (me, RIGHT,common));
- if (encompass_arr[0] != get_bound (LEFT))
+ if (encompass_arr[0] != sp->get_bound (LEFT))
{
offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - relative_coordinate (common[Y_AXIS], Y_AXIS);
+ - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
}
return offset_arr;
}
-Array<Rod>
-Slur::get_rods () const
+MAKE_SCHEME_CALLBACK(Slur,set_spacing_rods);
+SCM
+Slur::set_spacing_rods (SCM smob)
{
- Array<Rod> a;
+ Score_element*me = unsmob_element (smob);
+
Rod r;
-
- r.item_l_drul_[LEFT] = get_bound (LEFT);
- r.item_l_drul_[RIGHT] = get_bound (RIGHT);
- r.distance_f_ = paper_l ()->get_var ("slur_x_minimum");
+ Spanner*sp = dynamic_cast<Spanner*>(me);
+ r.item_l_drul_[LEFT] = sp->get_bound (LEFT);
+ r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT);
+ r.distance_f_ = me->paper_l ()->get_var ("slur_x_minimum");
- a.push (r);
- return a;
+ r.add_to_cols ();
+ return SCM_UNDEFINED;
}
SCM
Slur::brew_molecule (SCM smob)
{
- Slur * me = dynamic_cast<Slur*> (unsmob_element (smob));
-
-
+ Score_element * me = unsmob_element (smob);
Real thick = me->paper_l ()->get_var ("slur_thickness");
- Bezier one = me->get_curve ();
+ Bezier one = get_curve (me);
Molecule a;
SCM d = me->get_elt_property ("dashed");
}
void
-Slur::set_control_points ()
+Slur::set_control_points (Score_element*me)
{
- Slur_bezier_bow bb (get_encompass_offset_arr (),
- Directional_element_interface (this).get ());
+ Slur_bezier_bow bb (get_encompass_offset_arr (me),
+ Directional_element_interface (me).get ());
- Real staff_space = Staff_symbol_referencer::staff_space (this);
- Real h_inf = paper_l ()->get_var ("slur_height_limit_factor") * staff_space;
- Real r_0 = paper_l ()->get_var ("slur_ratio");
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
+ Real h_inf = me->paper_l ()->get_var ("slur_height_limit_factor") * staff_space;
+ Real r_0 = me->paper_l ()->get_var ("slur_ratio");
bb.set_default_bezier (h_inf, r_0);
{
Real length = bb.curve_.control_[3][X_AXIS];
Real default_height = bb.get_default_height (h_inf, r_0, length);
- bb.minimise_enclosed_area (paper_l(), default_height);
+ bb.minimise_enclosed_area (me->paper_l(), default_height);
- Real bff = paper_l ()->get_var ("slur_force_blowfit");
+ Real bff = me->paper_l ()->get_var ("slur_force_blowfit");
bb.curve_.control_[1][Y_AXIS] *= bff;
bb.curve_.control_[2][Y_AXIS] *= bff;
bb.blow_fit ();
- Real sb = paper_l ()->get_var ("slur_beautiful");
+ Real sb = me->paper_l ()->get_var ("slur_beautiful");
Real beautiful = length * default_height * sb;
Real area = bb.enclosed_area_f ();
Slurs that fit beautifully are not ugly
*/
if (area > beautiful)
- de_uglyfy (&bb, default_height);
+ de_uglyfy (me, &bb, default_height);
}
Bezier b = bb.get_bezier ();
for (int i= 4; i--;)
controls = gh_cons ( ly_offset2scm (b.control_[i]), controls);
- set_elt_property ("control-points", controls);
+ me->set_elt_property ("control-points", controls);
}
Bezier
-Slur::get_curve () const
+Slur::get_curve (Score_element*me)
{
Bezier b;
int i = 0;
- if (!Directional_element_interface (this).get ()
- || ! gh_symbol_p (index_cell (get_elt_property ("attachment"), LEFT)))
- ((Slur*)this)->set_extremities ();
+ if (!Directional_element_interface (me).get ()
+ || ! gh_symbol_p (index_cell (me->get_elt_property ("attachment"), LEFT)))
+ set_extremities (me);
- if (!gh_pair_p (get_elt_property ("control-points")))
- ((Slur*)this)->set_control_points ();
+ if (!gh_pair_p (me->get_elt_property ("control-points")))
+ set_control_points (me);
- for (SCM s= get_elt_property ("control-points"); s != SCM_EOL; s = gh_cdr (s))
+ for (SCM s= me->get_elt_property ("control-points"); s != SCM_EOL; s = gh_cdr (s))
{
b.control_[i] = ly_scm2offset (gh_car (s));
i++;
}
- Array<Offset> enc (get_encompass_offset_arr ());
- Direction dir = Directional_element_interface (this).get ();
+ Array<Offset> enc (get_encompass_offset_arr (me));
+ Direction dir = Directional_element_interface (me).get ();
Real x1 = enc[0][X_AXIS];
Real x2 = enc.top ()[X_AXIS];
return b;
}
+
+bool
+Slur::has_interface (Score_element*me)
+{
+ return me->has_interface ("slur-interface");
+}
+
+
#include "paper-column.hh"
#include "spacing-engraver.hh"
#include "spacing-spanner.hh"
+#include "engraver.hh"
+#include "pqueue.hh"
+
+struct Rhythmic_tuple
+{
+ Score_element_info info_;
+ Moment end_;
+
+ Rhythmic_tuple ()
+ {
+ }
+ Rhythmic_tuple (Score_element_info i, Moment m )
+ {
+ info_ = i;
+ end_ = m;
+ }
+ static int time_compare (Rhythmic_tuple const &, Rhythmic_tuple const &);
+};
+
+/**
+ Acknowledge rhythmic elements, for initializing spacing fields in
+ the columns.
+
+ should be the last one of the toplevel context
+*/
+class Spacing_engraver : public Engraver
+{
+ PQueue<Rhythmic_tuple> playing_durations_;
+ Array<Rhythmic_tuple> now_durations_;
+ Array<Rhythmic_tuple> stopped_durations_;
+
+ Spanner * spacing_p_;
+protected:
+ VIRTUAL_COPY_CONS(Translator);
+ virtual void acknowledge_element (Score_element_info);
+ virtual void do_post_move_processing ();
+ virtual void do_pre_move_processing ();
+ virtual void do_creation_processing ();
+ virtual void do_removal_processing ();
+public:
+ Spacing_engraver ();
+};
inline int
compare (Rhythmic_tuple const &a, Rhythmic_tuple const &b)
void
Spacing_engraver::do_creation_processing ()
{
- spacing_p_ =new Spacing_spanner (SCM_EOL);
+ spacing_p_ =new Spanner (get_property ("basicSpacingSpannerProperties"));
+ Spacing_spanner::set_interface (spacing_p_);
spacing_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn")));
announce_element (Score_element_info (spacing_p_, 0));
}
return broken_into_l_arr_.size();
}
-Array<Rod>
-Spanner::get_rods () const
-{
- Array<Rod> r;
- return r;
-}
-
-Array<Spring>
-Spanner::get_springs () const
-{
- Array<Spring> s;
- return s;
-}
-
-void
-Spanner::do_space_processing ()
-{
- Array<Rod> rs (get_rods ());
- for (int i=0; i < rs.size (); i++)
- {
- rs[i].add_to_cols ();
- }
-
- Array<Spring> ss (get_springs ());
- for (int i=0; i < ss.size (); i++)
- {
- if (isinf (ss[i].distance_f_))
- programming_error ("weird spring");
- else
- ss[i].add_to_cols ();
- }
-}
/*
If this is a broken spanner, return the amount the left end is to be
#include "musical-request.hh"
#include "misc.hh"
#include "stem-tremolo.hh"
-
+#include "item.hh"
#include "translator-group.hh"
#include "engraver.hh"
private:
int default_tremolo_type_i_;
- Stem *stem_p_;
+ Score_element *stem_p_;
Score_element *tremolo_p_;
Rhythmic_req *rhythmic_req_l_;
Tremolo_req* tremolo_req_l_;
int duration_log = r->duration_.durlog_i_;
if (!stem_p_)
{
- stem_p_ = new Stem (get_property ("basicStemProperties"));
+ stem_p_ = new Item (get_property ("basicStemProperties"));
+ Stem::set_interface (stem_p_);
Staff_symbol_referencer::set_interface(stem_p_);
#include "paper-def.hh"
#include "lookup.hh"
#include "stem.hh"
-#include "offset.hh"
-
+#include "item.hh"
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
{
Score_element *me= unsmob_element (smob);
Score_element * stem = unsmob_element (me->get_elt_property ("stem"));
- Beam * beam = Stem::beam_l (stem);
+ Score_element * beam = Stem::beam_l (stem);
Real dydx;
if (beam)
SCM s = beam->get_elt_property ("height");
if (gh_number_p (s))
dy = gh_scm2double (s);
- Real dx = beam->last_visible_stem ()->relative_coordinate (0, X_AXIS)
- - beam->first_visible_stem ()->relative_coordinate (0, X_AXIS);
+ Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
+ - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
dydx = dx ? dy/dx : 0;
}
else
// huh?
tremolo_flags = 1;
- int mult = beam ? beam->get_multiplicity () : 0;
+ int mult = beam ? Beam::get_multiplicity (beam) : 0;
Real interbeam_f = me->paper_l ()->interbeam_f (mult);
Molecule mol;
for (int i = 0; i < tremolo_flags; i++)
#include "group-interface.hh"
#include "cross-staff.hh"
#include "staff-symbol-referencer.hh"
-
+#include "spanner.hh"
void
}
}
-Stem::Stem (SCM s)
- : Item (s)
-{
- Score_element * me = this;
-
- me->set_elt_property ("heads", SCM_EOL);
- Stem::set_interface (me);
- me->add_offset_callback ( &Stem::off_callback, X_AXIS);
-}
-
bool
Stem::invisible_b (Score_element*me)
{
-Beam*
+Score_element*
Stem::beam_l (Score_element*me)
{
SCM b= me->get_elt_property ("beam");
- return dynamic_cast<Beam*> (unsmob_element (b));
+ return unsmob_element (b);
}
Stem_info
Stem::calc_stem_info (Score_element*me)
{
- Beam * beam = beam_l (me);
+ Score_element * beam = beam_l (me);
Direction beam_dir = Directional_element_interface (beam).get ();
if (!beam_dir)
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real half_space = staff_space / 2;
- Real interbeam_f = me->paper_l ()->interbeam_f (beam->get_multiplicity ());
+ Real interbeam_f = me->paper_l ()->interbeam_f (Beam::get_multiplicity (beam));
Real thick = gh_scm2double (beam->get_elt_property ("beam-thickness"));
- int multiplicity = beam->get_multiplicity ();
+ int multiplicity = Beam::get_multiplicity (beam);
Stem_info info;
info.idealy_f_ = chord_start_f (me);
if (gh_number_p (s))
info.idealy_f_ -= gh_scm2double (s);
- Real interstaff_f = -beam_dir* calc_interstaff_dist (dynamic_cast<Item*> (me), beam);
+ Real interstaff_f = -beam_dir* calc_interstaff_dist (dynamic_cast<Item*> (me), dynamic_cast<Spanner*> (beam));
info.idealy_f_ += interstaff_f;
info.miny_f_ += interstaff_f;
}
void
-Stem::set_interface (Score_element*m)
-{
- return m->set_interface (ly_symbol2scm ("stem-interface"));
+Stem::set_interface (Score_element*me)
+{
+ me->set_elt_property ("heads", SCM_EOL);
+ me->add_offset_callback ( &Stem::off_callback, X_AXIS);
+ me->set_interface (ly_symbol2scm ("stem-interface"));
}
#include "group-interface.hh"
#include "paper-column.hh"
#include "paper-def.hh"
+#include "spanner.hh"
class System_start_delimiter_engraver : public Engraver
{
Pointer_group_interface (delim_).add_element (inf.elem_l_);
}
- else if (System_start_delimiter * b = dynamic_cast<System_start_delimiter *> (inf.elem_l_))
+ else if (System_start_delimiter::has_interface (inf.elem_l_))
{
- SCM gl = b->get_elt_property ("glyph");
+ SCM gl = inf.elem_l_->get_elt_property ("glyph");
SCM my_gl = delim_->get_elt_property ("glyph");
/*
*/
if (gh_symbol_p (gl) && gl == ly_symbol2scm ("brace")
&& gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket"))
- b->translate_axis ( -paper_l ()->get_var ("interline"), X_AXIS); // ugh
+ inf.elem_l_->translate_axis ( -paper_l ()->get_var ("interline"), X_AXIS); // ugh
}
}
void
System_start_delimiter_engraver::do_creation_processing()
{
- delim_ = new System_start_delimiter (get_property ("basicSystemStartDelimiterProperties"));
+ delim_ = new Spanner (get_property ("basicSystemStartDelimiterProperties"));
+ System_start_delimiter::set_interface (delim_);
delim_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn")));
/*
*/
#include <math.h>
+#include "axis-group-interface.hh"
#include "system-start-delimiter.hh"
#include "paper-def.hh"
#include "molecule.hh"
-#include "axis-group-interface.hh"
#include "lookup.hh"
#include "all-font-metrics.hh"
+#include "spanner.hh"
Molecule
-System_start_delimiter::staff_bracket (Real height) const
+System_start_delimiter::staff_bracket (Score_element*me,Real height)
{
- Paper_def* p= paper_l ();
+ Paper_def* p= me->paper_l ();
SCM scmss = p->get_scmvar ("staffspace");
Real ss = gh_scm2double (scmss);
- Real arc_height = gh_scm2double (get_elt_property("arch-height")) * ss ;
+ Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) * ss ;
SCM at = gh_list (ly_symbol2scm ("bracket"),
- scm_product (get_elt_property ("arch-angle"), scmss),
- scm_product (get_elt_property ("arch-width"), scmss),
+ scm_product (me->get_elt_property ("arch-angle"), scmss),
+ scm_product (me->get_elt_property ("arch-width"), scmss),
gh_double2scm (arc_height),
- scm_product (get_elt_property ("bracket-width"),scmss),
+ scm_product (me->get_elt_property ("bracket-width"),scmss),
gh_double2scm (height),
- scm_product (get_elt_property ("arch-thick"),scmss),
- scm_product (get_elt_property ("bracket-thick"),scmss),
+ scm_product (me->get_elt_property ("arch-thick"),scmss),
+ scm_product (me->get_elt_property ("bracket-thick"),scmss),
SCM_UNDEFINED);
Real h = height + 2 * arc_height;
return mol;
}
-System_start_delimiter::System_start_delimiter (SCM s)
- : Spanner (s)
+void
+System_start_delimiter::set_interface (Score_element*me)
+{
+ me->set_extent_callback (0, Y_AXIS);
+ Pointer_group_interface (me).set_interface();
+ me->set_interface (ly_symbol2scm ("system-start-delimiter-interface"));
+}
+
+bool
+System_start_delimiter::has_interface (Score_element*me)
{
- set_extent_callback (0, Y_AXIS);
- Pointer_group_interface (this).set_interface();
+ return me->has_interface (ly_symbol2scm ("system-start-delimiter-interface"));
}
Molecule
-System_start_delimiter::simple_bar (Real h) const
+System_start_delimiter::simple_bar (Score_element*me,Real h)
{
- Real w = paper_l ()->get_var ("stafflinethickness") *
- gh_scm2double (get_elt_property ("thickness"));
- return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
+ Real w = me->paper_l ()->get_var ("stafflinethickness") *
+ gh_scm2double (me->get_elt_property ("thickness"));
+ return me->lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
}
MAKE_SCHEME_CALLBACK(System_start_delimiter,after_line_breaking);
SCM
System_start_delimiter::brew_molecule (SCM smob)
{
- Score_element * sc = unsmob_element (smob);
-
- System_start_delimiter * ssd= dynamic_cast<System_start_delimiter*> (sc);
-
- Interval ext = Axis_group_interface::group_extent_callback (sc, Y_AXIS);
+ Score_element * me = unsmob_element (smob);
+ Interval ext = Axis_group_interface::group_extent_callback (me, Y_AXIS);
Real l = ext.length ();
Molecule m;
- SCM s = sc->get_elt_property ("collapse-height");
+ SCM s = me->get_elt_property ("collapse-height");
if (gh_number_p (s) && l < gh_scm2double (s))
{
- sc->suicide();
+ me->suicide();
return SCM_EOL;
}
- s = sc->get_elt_property ("glyph");
+ s = me->get_elt_property ("glyph");
if (!gh_symbol_p(s))
return SCM_EOL;
if (s == ly_symbol2scm ("bracket"))
- m = ssd->staff_bracket (l);
+ m = staff_bracket (me,l);
else if (s == ly_symbol2scm ("brace"))
- m = ssd-> staff_brace (l);
+ m = staff_brace (me,l);
else if (s == ly_symbol2scm ("bar-line"))
- m = ssd->simple_bar (l);
+ m = simple_bar (me,l);
m.translate_axis (ext.center (), Y_AXIS);
Ugh. Suck me plenty.
*/
Molecule
-System_start_delimiter::staff_brace (Real y) const
+System_start_delimiter::staff_brace (Score_element*me,Real y)
{
- Real staffht = paper_l ()->get_var ("staffheight");
+ Real staffht = me->paper_l ()->get_var ("staffheight");
int staff_size = int (rint (staffht ));
// URG
#include "directional-element-interface.hh"
#include "rhythmic-head.hh"
-Tie_column::Tie_column (SCM s)
- : Spanner (s)
-{
-}
+
void
Tie_column::set_interface (Score_element*me)
{
- me-> set_elt_property ("ties", SCM_EOL);
+ me-> set_elt_property ("ties", SCM_EOL);
+ me->set_interface (ly_symbol2scm ("tie-column"));
me->set_extent_callback (0, X_AXIS);
me->set_extent_callback (0, Y_AXIS);
}
+bool
+Tie_column::has_interface (Score_element*me)
+{
+ return me->has_interface (ly_symbol2scm ("tie-column"));
+}
+
void
Tie_column::add_tie (Score_element*me,Tie *s)
{
Array<CHead_melodic_tuple> stopped_heads_;
Link_array<Tie> tie_p_arr_;
- Tie_column * tie_column_p_;
+ Spanner * tie_column_p_;
void set_melisma (bool);
}
else if (tie_p_arr_.size () > 1 && !tie_column_p_)
{
- tie_column_p_ = new Tie_column (get_property ("basicTieColumnProperties"));
+ tie_column_p_ = new Spanner (get_property ("basicTieColumnProperties"));
Tie_column::set_interface (tie_column_p_);
for (int i = tie_p_arr_.size (); i--; )
Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]);
}
-
-Array<Rod>
-Tie::get_rods () const
+MAKE_SCHEME_CALLBACK(Tie,set_spacing_rods);
+SCM
+Tie::set_spacing_rods (SCM smob)
{
- Array<Rod> a;
+ Score_element*me = unsmob_element (smob);
+ Spanner*sp = dynamic_cast<Spanner*> (me);
Rod r;
- r.item_l_drul_ [LEFT]=get_bound (LEFT);
- r.item_l_drul_ [RIGHT]=get_bound (RIGHT);
+ r.item_l_drul_ [LEFT]=sp->get_bound (LEFT);
+ r.item_l_drul_ [RIGHT]=sp->get_bound (RIGHT);
- r.distance_f_ = paper_l ()->get_var ("tie_x_minimum");
- a.push (r);
- return a;
+ r.distance_f_ = me->paper_l ()->get_var ("tie_x_minimum");
+ r.add_to_cols ();
+ return SCM_UNDEFINED;
}
-MAKE_SCHEME_CALLBACK(Tie,brew_molecule);
+
+
+
+
+MAKE_SCHEME_CALLBACK(Tie,brew_molecule);
SCM
Tie::brew_molecule (SCM smob)
{
#include "beam.hh"
#include "music-list.hh"
#include "engraver.hh"
+#include "spanner.hh"
class Tuplet_engraver : public Engraver
{
if (grace != wgb)
return;
- if (Note_column *nc = dynamic_cast<Note_column *> (i.elem_l_))
+ if (Note_column::has_interface(i.elem_l_))
{
for (int j =0; j <started_span_p_arr_.size (); j++)
if (started_span_p_arr_[j])
- Tuplet_spanner::add_column (started_span_p_arr_[j],nc);
+ Tuplet_spanner::add_column (started_span_p_arr_[j], dynamic_cast<Item*>(i.elem_l_));
}
- else if (Beam *b = dynamic_cast<Beam *> (i.elem_l_))
+ else if (Beam::has_interface (i.elem_l_))
{
for (int j = 0; j < started_span_p_arr_.size (); j++)
if (started_span_p_arr_[j])
- Tuplet_spanner::add_beam (started_span_p_arr_[j],b);
+ Tuplet_spanner::add_beam (started_span_p_arr_[j],i.elem_l_);
}
}
#include "dimensions.hh"
#include "group-interface.hh"
#include "directional-element-interface.hh"
+#include "spanner.hh"
if (gh_pair_p (me->get_elt_property ("columns")))
{
- Link_array<Note_column> column_arr=
- Pointer_group_interface__extract_elements (me, (Note_column*)0, "columns");
+ Link_array<Score_element> column_arr=
+ Pointer_group_interface__extract_elements (me, (Score_element*)0, "columns");
Real ncw = column_arr.top ()->extent(X_AXIS).length ();
Real w = dynamic_cast<Spanner*>(me)->spanner_length () + ncw;
void
Tuplet_spanner::calc_position_and_height (Score_element*me,Real *offset, Real * dy)
{
- Link_array<Note_column> column_arr=
- Pointer_group_interface__extract_elements (me, (Note_column*)0, "columns");
+ Link_array<Score_element> column_arr=
+ Pointer_group_interface__extract_elements (me, (Score_element*)0, "columns");
Score_element * common = me->common_refpoint (me->get_elt_property ("columns"), Y_AXIS);
Use outer non-rest columns to determine slope
*/
int l = 0;
- while (l <column_arr.size() && column_arr[l]->rest_b())
+ while (l <column_arr.size() && Note_column::rest_b(column_arr[l]))
l ++;
int r = column_arr.size ()- 1;
- while (r >= l && column_arr[r]->rest_b())
+ while (r >= l && Note_column::rest_b(column_arr[r]))
r--;
if (l < r)
void
Tuplet_spanner::calc_dy (Score_element*me,Real * dy)
{
- Link_array<Note_column> column_arr=
- Pointer_group_interface__extract_elements (me, (Note_column*)0, "columns");
-
+ Link_array<Score_element> column_arr=
+ Pointer_group_interface__extract_elements (me, (Score_element*)0, "columns");
Direction d = Directional_element_interface (me).get ();
*dy = column_arr.top ()->extent (Y_AXIS) [d]
{
SCM bs = me->get_elt_property ("beams");
Score_element *b = unsmob_element (gh_car (bs));
- Beam * beam_l = dynamic_cast<Beam*> (b);
+ Spanner * beam_l = dynamic_cast<Spanner *> (b);
if (!sp->broken_b ()
&& sp->get_bound (LEFT)->column_l () == beam_l->get_bound (LEFT)->column_l ()
&& sp->get_bound (RIGHT)->column_l () == beam_l->get_bound (RIGHT)->column_l ())
d = UP ;
for (SCM s = me->get_elt_property ("columns"); gh_pair_p (s); s = gh_cdr (s))
{
- Score_element * sc = unsmob_element (gh_car (s));
- Note_column * nc = dynamic_cast<Note_column*> (sc);
- if (nc->dir () < 0)
+ Score_element * nc = unsmob_element (gh_car (s));
+ if (Note_column::dir (nc) < 0)
{
d = DOWN;
break;
void
Tuplet_spanner::add_beam (Score_element*me, Score_element *b)
{
-me->add_dependency (b);
+ me->add_dependency (b);
Pointer_group_interface gi (me, "beams");
gi.add_element (b);
}
(interfaces . (dot-interface))
)
basicDynamicLineSpannerProperties = #`(
- (interfaces (dynamic-interface))
+ (interfaces (dynamic-interface axis-group-interface))
(axes . ( 1))
)
basicDynamicTextProperties = # `(
)
basicGraceAlignItemProperties = #`(
(axes . (0))
+ (interfaces . (axis-group-interface align-interface))
(before-line-breaking-callback . ,Grace_align_item::before_line_breaking)
)
basicHaraKiriVerticalGroupspannerProperties = #`(
(right-padding . 0.4)
(interfaces . (accidentals-interface ))
)
- basicLineOfScoreProperties = #`( )
-%{; (axes . (0 1))
-; (interfaces . (axis-group))
- ; (rank . -1)
- ; )%}
+ basicLineOfScoreProperties = #`(
+ (axes . (0 1))
+ (interfaces . (axis-group-interface))
+ )
basicLyricExtenderProperties = #`(
(molecule-callback . ,Lyric_extender::brew_molecule)
)
(visibility-lambda . ,end-of-line-invisible)
)
basicMultiMeasureRestProperties = #`(
+ (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
(molecule-callback . ,Multi_measure_rest::brew_molecule)
(staff-position . 0)
)
basicNoteColumnProperties = #`(
(axes 0 1)
- (interfaces . (note-column-interface))
+ (interfaces . (axis-group-interface note-column-interface))
)
basicNoteHeadProperties = #`(
(interfaces . (note-head-interface rhythmic-head-interface))
(style . "italic")
)
basicPaperColumnProperties = #`(
- (interfaces . (paper-column-interface))
+ (interfaces . (paper-column-interface axis-group-interface))
(axes 0)
(rank . -1)
)
)
basicSlurProperties = #`(
(molecule-callback . ,Slur::brew_molecule)
+ (spacing-procedure . ,Slur::set_spacing_rods)
(after-line-breaking-callback . ,Slur::after_line_breaking)
)
+ basicSpacingSpannerProperties =#`(
+ (spacing-procedure . ,Spacing_spanner::set_springs)
+ )
basicSpanBarProperties = #`(
(break-align-symbol . Staff_bar)
(barsize-procedure . ,Span_bar::get_bar_size)
basicTieProperties = #`(
(molecule-callback . ,Tie::brew_molecule)
(after-line-breaking-callback . ,Tie::after_line_breaking)
+ (spacing-procedure . ,Tie::set_spacing_rods)
(interfaces . (tie-interface))
)
basicTieColumnProperties = #`(
(interfaces . (separation-item-interface))
)
basicSeparatingGroupSpannerProperties = #`(
- (interfaces . (separation-spanner-interface))
+ (interfaces . (separation-spanner-interface))
+ (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
)
basicInstrumentNameProperties = #`(
(breakable . #t)
)
basicVerticalAxisGroupProperties = #`(
(axes 1)
+ (interfaces . (axis-group-interface))
)
basicVoltaSpannerProperties = #`(
(molecule-callback . ,Volta_spanner::brew_molecule)