-1.3.65.mb1
-==========
+1.3.66.hwn1
+===========
+
+* Use callbacks for augmentation dot positioning.
-* Corrected text sizes in paper*.ly
+* Removed types Note_head and Rest
+
+* Cleanup of slur.cc: use common reference points in a sane manner.
+
+1.3.66
+======
+* Corrected text sizes in paper*.ly (Mats Bengtsson)
1.3.65.uu1
==========
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=66
+PATCH_LEVEL=67
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
{
end_beam ();
}
- else if (Rest* rest_l = dynamic_cast<Rest *> (info.elem_l_))
+ else if (to_boolean (info.elem_l_->get_elt_property ("rest-interface")))
{
end_beam ();
}
{
if (beam_p_)
{
- if (Rest* r = dynamic_cast<Rest* > (info.elem_l_))
+ if (to_boolean (info.elem_l_->get_elt_property("rest-interface")))
{
- r->add_offset_callback (Beam::rest_collision_callback, Y_AXIS);
+ info.elem_l_->add_offset_callback (Beam::rest_collision_callback, Y_AXIS);
}
- else if (Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_))
+ else if (to_boolean (info.elem_l_->get_elt_property ("stem-interface")))
{
+ Stem *stem_l = dynamic_cast<Stem*> (info.elem_l_);
if (stem_l->beam_l ())
return;
-
bool stem_grace = stem_l->get_elt_property ("grace") == SCM_BOOL_T;
SCM wg =get_property ("weAreGraceContext");
*/
#include "staff-symbol-referencer.hh"
-#include "breathing-sign-engraver.hh"
#include "breathing-sign.hh"
#include "musical-request.hh"
#include "command-request.hh"
#include "engraver-group-engraver.hh"
-#include "note-head.hh"
#include "local-key-item.hh"
+#include "engraver.hh"
+#include "command-request.hh"
+
+class Breathing_sign_engraver : public Engraver {
+public:
+ Breathing_sign_engraver();
+ VIRTUAL_COPY_CONS(Translator);
+
+protected:
+ virtual bool do_try_music (Music *req_l);
+ virtual void do_process_music();
+
+ virtual void do_pre_move_processing();
+ virtual void do_post_move_processing();
+private:
+ Breathing_sign_req * breathing_sign_req_l_;
+ Breathing_sign * breathing_sign_p_;
+};
Breathing_sign_engraver::Breathing_sign_engraver()
{
SCM
Breathing_sign::member_after_line_breaking ()
{
- Real space = staff_symbol_referencer (this).staff_space();
+ Real space = Staff_symbol_referencer_interface (this).staff_space();
Direction d = Directional_element_interface (this). get ();
if (!d)
{
#include "beam.hh"
#include "repeated-music.hh"
#include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "engraver-group-engraver.hh"
#include "musical-request.hh"
#include "warn.hh"
::warning (s);
}
}
- if (Note_head *nh = dynamic_cast<Note_head*> (info.elem_l_))
+ if (to_boolean (info.elem_l_->get_elt_property ("note-head-interface")))
{
- nh->set_elt_property ("duration-log", gh_int2scm (intlog2 (note_head_i_)));
+ info.elem_l_->set_elt_property ("duration-log", gh_int2scm (intlog2 (note_head_i_)));
}
}
}
#include "debug.hh"
#include "command-request.hh"
#include "timing-translator.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "key-item.hh"
#include "local-key-item.hh"
#include "array.hh"
Item * it_l =dynamic_cast <Item *> (info.elem_l_);
if (it_l)
{
- if (dynamic_cast<Note_head*>(it_l)
+ if (to_boolean (it_l->get_elt_property("note-head-interface"))
|| dynamic_cast<Local_key_item*> (it_l))
{
Staff_symbol_referencer_interface si (it_l);
#include "debug.hh"
#include "collision.hh"
#include "note-column.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "paper-def.hh"
#include "axis-group-interface.hh"
#include "item.hh"
/*
TODO.
*/
- Note_head * nu_l= cu_l->first_head();
- Note_head * nd_l = cd_l->first_head();
+ Rhythmic_head * nu_l= cu_l->first_head();
+ Rhythmic_head * nd_l = cd_l->first_head();
int downpos = Note_column::head_positions_interval (cd_l)[BIGGER];
int uppos = Note_column::head_positions_interval (cu_l)[SMALLER];
#include "axis-group-interface.hh"
-// todo: dots and elements duplicate each other.
-void
-Dot_column::add_dots (Item *d)
-{
- Pointer_group_interface gi (this, "dots");
- gi.add_element (d);
-
- add_dependency (d);
- Axis_group_interface (this).add_element (d);
-}
void
Dot_column::add_head (Rhythmic_head *r)
return ;
Side_position_interface (this).add_support (r);
- add_dots (r->dots_l ());
+ Item * d = r->dots_l ();
+ if (d)
+ {
+ Pointer_group_interface gi (this, "dots");
+ gi.add_element (d);
+
+ d->add_offset_callback (force_shift_callback , Y_AXIS);
+ Axis_group_interface (this).add_element (d);
+ }
}
int
-Dot_column::compare (Item * const &d1, Item * const &d2)
+Dot_column::compare (Score_element * const &d1, Score_element * const &d2)
{
Staff_symbol_referencer_interface s1(d1);
Staff_symbol_referencer_interface s2(d2);
Dot_column::Dot_column (SCM s)
: Item (s)
{
- Pointer_group_interface gi (this, "dots");
- gi.set_interface ();
+ this->set_elt_pointer ("dots", SCM_EOL);
Directional_element_interface (this).set (RIGHT);
Axis_group_interface (this).set_interface ();
Should be smarter.
*/
-GLUE_SCORE_ELEMENT(Dot_column,after_line_breaking);
+
+Real
+Dot_column::force_shift_callback (Score_element const * dot, Axis a)
+{
+ assert (a == Y_AXIS);
+ Score_element * me = dot->parent_l (X_AXIS);
+ SCM dots = me->get_elt_pointer ("dots");
+ do_shifts (dots);
+ return 0.0;
+}
+
SCM
-Dot_column::member_after_line_breaking ()
+Dot_column::do_shifts (SCM l)
{
- Link_array<Item> dots = Pointer_group_interface__extract_elements (this, (Item*)0 , "dots");
+ Link_array<Score_element> dots;
+ while (gh_pair_p (l))
+ {
+ dots.push (unsmob_element (gh_car (l)));
+ l = gh_cdr (l);
+ }
+
dots.sort (Dot_column::compare);
if (dots.size () < 2)
}
if (!conflicts)
- return SCM_UNDEFINED;
-
+ return SCM_UNDEFINED;
int middle = s.center ();
/*
for (int i=0; i < dots.size (); pos += 2, i++)
{
- staff_symbol_referencer (dots[i]).set_position(pos);
+ Score_element * d = dots[i];
+ Staff_symbol_referencer_interface (d).set_position(pos);
}
return SCM_UNDEFINED;
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,after_line_breaking);
-SCM
-Dots::after_line_breaking (SCM smob)
+Real
+Dots::quantised_position_callback (Score_element const* me, Axis a)
{
- Item * p = dynamic_cast<Item*> (unsmob_element (smob));
-
- SCM d= p->get_elt_property ("dot-count");
+ assert (a == Y_AXIS);
+
+ SCM d= me->get_elt_property ("dot-count");
if (gh_number_p (d) && gh_scm2int (d))
{
- if (!Directional_element_interface (p).get ())
- Directional_element_interface (p).set (UP);
+ if (!Directional_element_interface (me).get ())
+ Directional_element_interface (me).set (UP);
- Staff_symbol_referencer_interface si (p);
+ Staff_symbol_referencer_interface si (me);
int pos = int (si.position_f ());
if (!(pos % 2))
- si.set_position (pos + Directional_element_interface (p).get ());
+ return si.staff_space () / 2.0 * Directional_element_interface (me).get ();
}
- return SCM_UNDEFINED;
+ return 0.0;
}
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,brew_molecule);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,brew_molecule);
SCM
Dots::brew_molecule (SCM d)
{
#include "side-position-interface.hh"
#include "engraver.hh"
#include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "group-interface.hh"
#include "directional-element-interface.hh"
#include "staff-symbol-referencer.hh"
#include "engraver.hh"
#include "grace-align-item.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "local-key-item.hh"
#include "paper-column.hh"
#include "dimension-cache.hh"
{
align_l_ = g;
}
- else if (Note_head * n = dynamic_cast <Note_head*> (i.elem_l_))
+ else if (to_boolean (i.elem_l_->get_elt_property ("note-head-interface")))
{
- if (!to_boolean (n->get_elt_property ("grace")))
- support_.push (n);
+ if (!to_boolean (i.elem_l_->get_elt_property ("grace")))
+ support_.push (dynamic_cast<Item*> (i.elem_l_));
}
else if (Local_key_item*it = dynamic_cast<Local_key_item*>(i.elem_l_))
{
+++ /dev/null
-/*
- breathing-sign-engraver.hh -- declare Breathing_Sign_engraver
-
- Copyright (C) 1999 Michael Krause
-
- written for the GNU LilyPond music typesetter
-
-*/
-
-#ifndef BREATHING_SIGN_ENGRAVER_HH
-#define BREATHING_SIGN_ENGRAVER_HH
-
-#include "engraver.hh"
-#include "command-request.hh"
-#include "breathing-sign.hh"
-
-class Breathing_sign_engraver : public Engraver {
-public:
- Breathing_sign_engraver();
- VIRTUAL_COPY_CONS(Translator);
-
-protected:
- virtual bool do_try_music (Music *req_l);
- virtual void do_process_music();
-
- virtual void do_pre_move_processing();
- virtual void do_post_move_processing();
-
-private:
- Breathing_sign_req * breathing_sign_req_l_;
- Breathing_sign * breathing_sign_p_;
-};
-
-#endif // BREATHING_SIGN_ENGRAVER_HH
*/
class Dot_column : public Item
{
- static int compare (Item * const&,Item * const&);
- void add_dots (Item*);
+ static int compare (Score_element * const&,Score_element * const&);
public:
VIRTUAL_COPY_CONS (Score_element);
void add_head (Rhythmic_head*);
Dot_column (SCM);
-
-
- SCM member_after_line_breaking ();
- static SCM after_line_breaking (SCM);
+
+ static Real force_shift_callback (Score_element const* , Axis);
+ static SCM do_shifts (SCM dotlist);
};
#endif // DOT_COLUMN_HH
class Dots // interface
{
public:
- static SCM after_line_breaking (SCM);
+ static Real quantised_position_callback(Score_element const*, Axis);
static SCM brew_molecule (SCM);
};
SCM member_brew_molecule () const;
VIRTUAL_COPY_CONS (Score_element);
- virtual void do_add_processing ();
SCM member_after_line_breaking ();
static SCM after_line_breaking (SCM);
virtual Array<Rod> get_rods () const;
static Slice head_positions_interval(Score_element* me) ;
static Direction static_dir (Score_element*);
void translate_rests(int dy);
- Note_head * first_head ()const;
+ Rhythmic_head * first_head ()const;
Interval rest_dim ()const ;
Note_column (SCM);
void set_stem (Score_element*);
#ifndef NOTEHEAD_HH
#define NOTEHEAD_HH
-#include "rhythmic-head.hh"
+#include "lily-guile.hh"
+#include "molecule.hh"
/** ball at the end of the stem. Takes care of:
*/
-class Note_head : public Rhythmic_head
+class Note_head
{
public:
- static int compare (Note_head * const &a, Note_head *const &b) ;
- static SCM brew_molecule (SCM);
-
-
- Molecule ledger_line (Interval) const;
- Note_head (SCM);
-
- SCM member_before_line_breaking ();
- static SCM before_line_breaking (SCM);
- SCM member_brew_molecule() const;
+ static SCM brew_molecule (SCM);
+ static Molecule ledger_line (Interval, Score_element*) ;
};
#endif // NOTEHEAD_HH
+++ /dev/null
-/*
- head-engraver.hh -- part of GNU LilyPond
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef HEADSGRAV_HH
-#define HEADSGRAV_HH
-#include "engraver.hh"
-#include "pqueue.hh"
-
-/**
- make balls and rests
- */
-class Note_heads_engraver : public Engraver {
- Link_array<Note_head> note_p_arr_;
- Link_array<Item> dot_p_arr_;
- Link_array<Note_req> note_req_l_arr_;
- Moment note_end_mom_;
-public:
- VIRTUAL_COPY_CONS(Translator);
- Note_heads_engraver();
-
-protected:
- virtual bool do_try_music (Music *req_l) ;
- virtual void do_process_music();
- virtual void do_pre_move_processing();
-};
-
-
-#endif // HEADSGRAV_HH
+++ /dev/null
-/*
- rest-engraver.hh -- declare Engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef REST_GRAV_HH
-#define REST_GRAV_HH
-
-#include "engraver.hh"
-
-class Rest_engraver : public Engraver
-{
- Rest_req *rest_req_l_;
- Item * dot_p_;
- Rest * rest_p_;
-protected:
- virtual bool do_try_music (Music *);
- virtual void do_pre_move_processing ();
- virtual void do_post_move_processing ();
- virtual void do_process_music ();
-public:
-
- VIRTUAL_COPY_CONS(Translator);
- Rest_engraver ();
-};
-#endif // REST_GRAV_HH
#ifndef REST_HH
#define REST_HH
-#include "rhythmic-head.hh"
+#include "lily-guile.hh"
/**
A pause.
style -- string specifying glyph style
*/
-class Rest : public Rhythmic_head
+class Rest
{
public:
- SCM member_after_line_breaking ();
static SCM after_line_breaking (SCM);
- SCM member_brew_molecule () const;
-
- static SCM brew_molecule (SCM);
-
-Rest (SCM s);
+ static SCM brew_molecule (SCM);
};
#endif // REST_HH
VIRTUAL_COPY_CONS(Rhythmic_head);
int balltype_i () const;
- void add_dots (Item *);
+ void set_dots (Item *);
Stem * stem_l () const;
Item * dots_l () const;
int dot_count () const;
static SCM brew_molecule (SCM);
SCM member_brew_molecule () const;
- virtual Array<Offset> get_encompass_offset_arr () const;
+ Array<Offset> get_encompass_offset_arr () const;
Bezier get_curve () const;
- virtual Direction get_default_dir () const;
+ Direction get_default_dir () const;
SCM member_after_line_breaking ();
static SCM after_line_breaking (SCM);
- virtual void do_add_processing ();
Array<Rod> get_rods () const;
- Offset get_attachment (Direction dir) const;
+ Offset get_attachment (Direction dir, Score_element**common) const;
private:
void de_uglyfy (Slur_bezier_bow* bb, Real default_height);
void set_extremities ();
void set_control_points ();
- Offset encompass_offset (Note_column const* )const;
+ Offset encompass_offset (Score_element *col,Score_element**common)const;
};
#endif // SLUR_HH
};
int compare_position (Score_element *const&,Score_element *const&);
-
-
-Staff_symbol_referencer_interface staff_symbol_referencer (Score_element const*);
-
#endif /* STAFF_SYMBOL_REFERENCER_HH */
our beam, for aligning abbrev flags
*/
Beam* beam_l () const;
- Note_head * first_head () const;
- Drul_array<Note_head*> extremal_heads () const;
+ Rhythmic_head * first_head () const;
+ Drul_array<Rhythmic_head*> extremal_heads () const;
Score_element * support_head () const;
Stem (SCM);
void set_head (Direction, Item*head_l);
VIRTUAL_COPY_CONS(Score_element);
- Note_head* head (Direction) const;
+ Rhythmic_head* head (Direction) const;
Real position_f () const;
- static SCM brew_molecule (SCM);
-
-
- virtual Direction get_default_dir() const;
-
-
+ static SCM brew_molecule (SCM);
+ Direction get_default_dir() const;
SCM member_brew_molecule () const;
- virtual Array<Offset> get_encompass_offset_arr () const;
+ Array<Offset> get_encompass_offset_arr () const;
Bezier get_curve () const;
/*
SCM member_brew_molecule () const;
VIRTUAL_COPY_CONS(Score_element);
- virtual void do_add_processing ();
- virtual Direction get_default_dir () const;
+
+ Direction get_default_dir () const;
};
#endif // Tuplet_spanner_HH
SCM member_brew_molecule () const;
VIRTUAL_COPY_CONS (Score_element);
- virtual void do_add_processing ();
+
SCM member_after_line_breaking ();
static SCM after_line_breaking (SCM);
};
#include "engraver.hh"
#include "item.hh"
#include "side-position-interface.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "stem.hh"
/**
void
Line_number_engraver::acknowledge_element (Score_element_info inf)
{
- if (dynamic_cast<Note_head*> (inf.elem_l_))
+ if (to_boolean (inf.elem_l_->get_elt_property ("note-head-interface")))
{
interesting_.push (inf);
support_.push (inf.elem_l_);
}
- if (dynamic_cast<Stem*> (inf.elem_l_))
+ else if (to_boolean (inf.elem_l_->get_elt_property ("stem-interface")))
{
support_.push (inf.elem_l_);
}
#include "local-key-item.hh"
#include "key-item.hh"
#include "tie.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "timing-translator.hh"
#include "engraver-group-engraver.hh"
#include "grace-align-item.hh"
key_item_p_ = new Local_key_item (get_property ("basicLocalKeyProperties"));
Side_position_interface (key_item_p_).set_axis (X_AXIS);
Side_position_interface (key_item_p_).set_direction (LEFT);
- staff_symbol_referencer(key_item_p_).set_interface ();
+ Staff_symbol_referencer_interface (key_item_p_).set_interface ();
announce_element (Score_element_info (key_item_p_, 0));
}
grace_align_l_ = gai;
}
Note_req * note_l = dynamic_cast <Note_req *> (info.req_l_);
- Note_head * note_head = dynamic_cast<Note_head *> (info.elem_l_);
+ Rhythmic_head * note_head = dynamic_cast<Rhythmic_head *> (info.elem_l_);
if (he_gr != selfgr)
return;
#include "lookup.hh"
#include "paper-def.hh"
#include "musical-request.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "misc.hh"
void
Multi_measure_rest::member_brew_molecule () const
{
Real staff_space
- = staff_symbol_referencer (this).staff_space ();
+ = Staff_symbol_referencer_interface (this).staff_space ();
Interval sp_iv;
Direction d = LEFT;
UGH. JUNKME elt prop "columns" isn't really needed.
*/
-void
-Multi_measure_rest::do_add_processing ()
-{
-#if 0
- if (gh_pair_p (get_elt_pointer ("columns")))
- {
- Link_array<Item> column_arr (Pointer_group_interface__extract_elements (this, (Item*)0, "columns"));
-
- set_bound (LEFT, column_arr[0 >? column_arr.size () - 2]);
- set_bound (RIGHT, column_arr.top ());
- }
-#endif
- // set columns to SCM_EOL?
-}
-
-GLUE_SCORE_ELEMENT(Multi_measure_rest,after_line_breaking);
-SCM
-Multi_measure_rest::member_after_line_breaking ()
-{
- if (!gh_pair_p (get_elt_pointer ("columns")))
- {
- suicide ();
- }
-
- return SCM_UNDEFINED;
-}
return r->extent (Y_AXIS);
}
-Note_head*
+Rhythmic_head*
Note_column::first_head () const
{
Stem * st = stem_l ();
build a ledger line for small pieces.
*/
Molecule
-Note_head::ledger_line (Interval xwid) const
+Note_head::ledger_line (Interval xwid, Score_element *me)
{
Drul_array<Molecule> endings;
- endings[LEFT] = lookup_l()->afm_find ("noteheads-ledgerending");
+ endings[LEFT] = me->lookup_l()->afm_find ("noteheads-ledgerending");
Molecule *e = &endings[LEFT];
endings[RIGHT] = *e;
}
-GLUE_SCORE_ELEMENT(Note_head,before_line_breaking);
-SCM
-Note_head::member_before_line_breaking ()
-{
- // 8 ball looks the same as 4 ball:
-
- if (balltype_i () > 2)
- set_elt_property ("duration-log", gh_int2scm (2));
-
- if (Item *d = dots_l ())
- { // move into Rhythmic_head?
- Staff_symbol_referencer_interface si (d);
- Staff_symbol_referencer_interface me (this);
-
- si.set_position(int (me.position_f ()));
- }
-
- return SCM_UNDEFINED;
-}
-
-GLUE_SCORE_ELEMENT(Note_head,brew_molecule);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Note_head,brew_molecule);
SCM
-Note_head::member_brew_molecule () const
+Note_head::brew_molecule (SCM smob)
{
- Staff_symbol_referencer_interface si (this);
+ Score_element *me = unsmob_element (smob);
+ Staff_symbol_referencer_interface si (me);
Real inter_f = si.staff_space ()/2;
int sz = si.line_count ()-1;
? 0
: (abs((int)p) - sz) /2;
- SCM style = get_elt_property ("style");
+ SCM style = me->get_elt_property ("style");
if (style == SCM_UNDEFINED)
{
style = ly_symbol2scm("default");
}
- Molecule out = lookup_l()->afm_find (String ("noteheads-") +
+ Molecule out = me->lookup_l()->afm_find (String ("noteheads-") +
ly_scm2string (scm_eval (gh_list (ly_symbol2scm("find-notehead-symbol"),
- gh_int2scm(balltype_i ()),
+ me->get_elt_property ("duration-log"),
ly_quote_scm(style),
SCM_UNDEFINED))));
Interval hd = out.extent (X_AXIS);
Real hw = hd.length ()/4;
Molecule ledger (ledger_line (Interval (hd[LEFT] - hw,
- hd[RIGHT] + hw)));
+ hd[RIGHT] + hw), me));
ledger.set_empty (true);
}
return out.create_scheme();
}
-
-
-Note_head::Note_head (SCM s)
- : Rhythmic_head (s)
-{
-
-}
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "note-head.hh"
-#include "note-heads-engraver.hh"
+#include "rhythmic-head.hh"
+#include "engraver.hh"
#include "paper-def.hh"
#include "musical-request.hh"
#include "dots.hh"
#include "dot-column.hh"
#include "staff-symbol-referencer.hh"
+#include "engraver.hh"
+#include "pqueue.hh"
+
+/**
+ make balls and rests
+ */
+class Note_heads_engraver : public Engraver
+{
+ Link_array<Rhythmic_head> note_p_arr_;
+ Link_array<Item> dot_p_arr_;
+ Link_array<Note_req> note_req_l_arr_;
+ Moment note_end_mom_;
+public:
+ VIRTUAL_COPY_CONS(Translator);
+ Note_heads_engraver();
+
+protected:
+ virtual bool do_try_music (Music *req_l) ;
+ virtual void do_process_music();
+ virtual void do_pre_move_processing();
+};
+
+
+
+
Note_heads_engraver::Note_heads_engraver()
{
for (int i=0; i < note_req_l_arr_.size (); i++)
{
- Note_head *note_p = new Note_head (get_property ("basicNoteHeadProperties"));
+ Rhythmic_head *note_p = new Rhythmic_head (get_property ("basicNoteHeadProperties"));
Staff_symbol_referencer_interface si (note_p);
si.set_interface ();
if (note_req_l->duration_.dots_i_)
{
- Item * d = new Item (get_property ("basicDotsProperties"));
+ Item * d = new Item (get_property ("basicDotsProperties"));
Staff_symbol_referencer_interface sd (d);
sd.set_interface ();
- note_p->add_dots (d);
+ note_p->set_dots (d);
if (note_req_l->duration_.dots_i_
!= gh_scm2int (d->get_elt_property ("dot-count")))
d->set_elt_property ("dot-count", gh_int2scm (note_req_l->duration_.dots_i_));
-
+
+ d->set_parent (note_p, Y_AXIS);
+ d->add_offset_callback (Dots::quantised_position_callback, Y_AXIS);
announce_element (Score_element_info (d,0));
dot_p_arr_.push (d);
}
#include "item.hh"
#include "lookup.hh"
#include "lily-guile.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "stem.hh"
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
{
if (p->item_p_)
{
- if (Note_head* n = dynamic_cast<Note_head*> (info.elem_l_))
+ if (Rhythmic_head* n = dynamic_cast<Rhythmic_head*> (info.elem_l_))
{
Side_position_interface st (p->item_p_);
st.add_support (n);
#include "staff-symbol-referencer.hh"
#include "pitch-squash-engraver.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
void
Pitch_squash_engraver::acknowledge_element (Score_element_info i)
{
- if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
+ if (to_boolean (i.elem_l_->get_elt_property ("note-head-interface")))
{
- Staff_symbol_referencer_interface (nh).set_position(0);
+ Staff_symbol_referencer_interface (i.elem_l_).set_position(0);
}
}
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+
#include <math.h> // ceil.
#include "debug.hh"
#include "rest-collision.hh"
#include "note-column.hh"
#include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "paper-def.hh"
#include "rest.hh"
#include "group-interface.hh"
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "staff-symbol-referencer.hh"
-#include "rest-engraver.hh"
#include "musical-request.hh"
#include "dots.hh"
-#include "rest.hh"
+#include "rhythmic-head.hh"
+#include "engraver.hh"
+
+class Rest_engraver : public Engraver
+{
+ Rest_req *rest_req_l_;
+ Item * dot_p_;
+ Rhythmic_head * rest_p_;
+protected:
+ virtual bool do_try_music (Music *);
+ virtual void do_pre_move_processing ();
+ virtual void do_post_move_processing ();
+ virtual void do_process_music ();
+public:
+
+ VIRTUAL_COPY_CONS(Translator);
+ Rest_engraver ();
+};
+
/*
Should merge with Note_head_engraver
{
if (rest_req_l_ && !rest_p_)
{
- rest_p_ = new Rest (get_property ("basicRestProperties"));
+ rest_p_ = new Rhythmic_head (get_property ("basicRestProperties"));
Staff_symbol_referencer_interface si (rest_p_);
si.set_interface ();
Staff_symbol_referencer_interface si (dot_p_);
si.set_interface ();
- rest_p_->add_dots (dot_p_);
+ rest_p_->set_dots (dot_p_);
+ dot_p_->set_parent (rest_p_, Y_AXIS);
+ dot_p_->add_offset_callback (Dots::quantised_position_callback, Y_AXIS);
dot_p_->set_elt_property ("dot-count",
gh_int2scm (rest_req_l_->duration_.dots_i_));
announce_element (Score_element_info (dot_p_,0));
#include "staff-symbol-referencer.hh"
// -> offset callback
-GLUE_SCORE_ELEMENT(Rest,after_line_breaking);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Rest,after_line_breaking);
SCM
-Rest::member_after_line_breaking ()
+Rest::after_line_breaking (SCM smob)
{
- if (balltype_i () == 0)
+ Score_element *me = unsmob_element (smob);
+ int bt = gh_scm2int (me->get_elt_property ("duration-log"));
+ if (bt == 0)
{
- Staff_symbol_referencer_interface si (this);
- si.set_position (si.position_f () + 2);
+ Staff_symbol_referencer_interface si (me);
+ me->translate_axis (si.staff_space() , Y_AXIS);
}
- Item * d = dots_l ();
- if (d && balltype_i () > 4) // UGH.
+
+ Score_element * d = unsmob_element (me->get_elt_pointer ("dot"));
+ if (d && bt > 4) // UGH.
{
- /*
- UGH.
- */
- staff_symbol_referencer (d)
- .set_position ((balltype_i () == 7) ? 4 : 3);
+ d->set_elt_property ("staff-position",
+ gh_int2scm ((bt == 7) ? 4 : 3));
}
return SCM_UNDEFINED;
MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Rest,brew_molecule)
-
SCM
Rest::brew_molecule (SCM smob)
{
return sc-> lookup_l ()->afm_find (idx).create_scheme();
}
-
-
-Rest::Rest (SCM s)
- : Rhythmic_head (s)
-{
-}
-
#include "dimension-cache.hh"
#include "slur.hh"
#include "engraver.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "stem.hh"
#include "note-column.hh"
#include "dot-column.hh"
return dots_l ()
? gh_scm2int (dots_l ()->get_elt_property ("dot-count")) : 0;
}
-
-GLUE_SCORE_ELEMENT(Rhythmic_head,after_line_breaking);
-SCM
-Rhythmic_head::member_after_line_breaking ()
-{
- if (Item *d = dots_l ())
- {
- Staff_symbol_referencer_interface si (d);
- Staff_symbol_referencer_interface me (d);
- si.set_position(int (me.position_f ()));
- }
-
- return SCM_UNDEFINED;
-}
-
void
-Rhythmic_head::add_dots (Item *dot_l)
+Rhythmic_head::set_dots (Item *dot_l)
{
set_elt_pointer ("dot", dot_l->self_scm_);
- dot_l->add_dependency (this);
}
}
+void
+Score_element::discretionary_processing()
+{
+}
+
+
+SCM
+spanner_get_bound (SCM slur, SCM dir)
+{
+ return dynamic_cast<Spanner*> (unsmob_element (slur))->get_bound (to_dir (dir))->self_scm_;
+}
+
+SCM
+score_element_get_pointer (SCM se, SCM name)
+{
+ SCM s = scm_assq (name, unsmob_element (se)->pointer_alist_);
+ return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s);
+}
+
+SCM
+score_element_get_property (SCM se, SCM name)
+{
+ SCM s = scm_assq (name, unsmob_element (se)->property_alist_);
+ return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s);
+}
+
+
static void
init_functions ()
{
scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (SCM(*)(...))Score_element::ly_get_elt_property);
scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (SCM(*)(...))Score_element::ly_set_elt_property);
+ scm_make_gsubr ("ly-get-elt-pointer", 2 , 0, 0,
+ (SCM(*)(...)) score_element_get_pointer);
+ scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0,
+ (SCM(*)(...)) spanner_get_bound);
}
-
ADD_SCM_INIT_FUNC(scoreelt, init_functions);
-void
-Score_element::discretionary_processing()
-{
-}
return d;
}
-void
-Slur::do_add_processing ()
-{
-#if 0
- Link_array<Note_column> encompass_arr =
- Pointer_group_interface__extract_elements (this, (Note_column*)0, "note-columns");
- if (encompass_arr.size ())
- {
- set_bound (LEFT, encompass_arr[0]);
- if (encompass_arr.size () > 1)
- set_bound (RIGHT, encompass_arr.top ());
- }
-#endif
-}
Offset
-Slur::encompass_offset (Note_column const* col) const
+Slur::encompass_offset (Score_element* col,
+ Score_element **common) const
{
Offset o;
- Stem* stem_l = col->stem_l ();
+ Score_element* stem_l = unsmob_element (col->get_elt_pointer ("stem"));
+
Direction dir = Directional_element_interface (this).get ();
if (!stem_l)
{
warning (_ ("Slur over rest?"));
- o[X_AXIS] = col->relative_coordinate (0, X_AXIS);
- o[Y_AXIS] = col->relative_coordinate (0, Y_AXIS);
+ o[X_AXIS] = col->relative_coordinate (common[X_AXIS], X_AXIS);
+ o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);
return o;
}
Direction stem_dir = Directional_element_interface (stem_l).get ();
if ((stem_dir == dir)
&& !stem_l->extent (Y_AXIS).empty_b ())
{
- o[Y_AXIS] = stem_l->relative_coordinate (0, Y_AXIS);
+ o[Y_AXIS] = stem_l->relative_coordinate (common[Y_AXIS], Y_AXIS); // iuhg
}
else
{
- o[Y_AXIS] = col->relative_coordinate (0, Y_AXIS);
+ o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS); // ugh
}
/*
return SCM_UNDEFINED;
}
-SCM
-slur_get_bound (SCM slur, SCM dir)
-{
- return ((Slur*)unsmob_element (slur))->get_bound (to_dir (dir))->self_scm_;
-}
-
-SCM
-score_element_get_pointer (SCM se, SCM name)
-{
- SCM s = scm_assq (name, unsmob_element (se)->pointer_alist_);
- return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s);
-}
-
-SCM
-score_element_get_property (SCM se, SCM name)
-{
- SCM s = scm_assq (name, unsmob_element (se)->property_alist_);
- return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s);
-}
-
-void
-init_score_elts ()
-{
- scm_make_gsubr ("get-pointer", 2 , 0, 0,
- (SCM(*)(...)) score_element_get_pointer);
- scm_make_gsubr ("get-property", 2 , 0, 0,
- (SCM(*)(...)) score_element_get_property);
- scm_make_gsubr ("get-bound", 2 , 0, 0,
- (SCM(*)(...)) slur_get_bound);
-}
-
-ADD_SCM_INIT_FUNC (score_elt, init_score_elts);
-
void
Slur::set_extremities ()
{
}
Offset
-Slur::get_attachment (Direction dir) const
+Slur::get_attachment (Direction dir,
+ Score_element **common) const
{
SCM s = get_elt_property ("attachment");
SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
Real ss = Staff_symbol_referencer_interface (this).staff_space ();
Real hs = ss / 2.0;
Offset o;
+
+
if (Note_column* n = dynamic_cast<Note_column*> (get_bound (dir)))
{
if (Stem* st = dynamic_cast<Stem*> (n->stem_l ()))
SCM other_a = dir == LEFT ? gh_cdr (s) : gh_car (s);
if (ly_symbol2string (other_a) != "loose-end")
{
- o = Offset (0, get_attachment (-dir)[Y_AXIS]);
+ o = Offset (0, get_attachment (-dir, common)[Y_AXIS]);
}
}
}
}
- if (str != "loose-end")
- o += Offset (0, get_bound (dir)->relative_coordinate (0, Y_AXIS)
- - relative_coordinate (0, Y_AXIS));
-
+
+ /*
+ 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])
+ {
+ o[Y_AXIS] += get_bound (dir)->relative_coordinate (common[Y_AXIS], Y_AXIS)
+ - relative_coordinate (common[Y_AXIS], Y_AXIS);
+ }
return o;
}
Array<Offset>
Slur::get_encompass_offset_arr () const
{
- Link_array<Note_column> encompass_arr =
- Pointer_group_interface__extract_elements (this, (Note_column*)0, "note-columns");
+ SCM eltlist = get_elt_pointer ("note-columns");
+ Score_element *common[] = {common_refpoint (eltlist,X_AXIS),
+ 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);
+
+ Link_array<Score_element> encompass_arr;
+ while (gh_pair_p (eltlist))
+ {
+ encompass_arr.push (unsmob_element (gh_car (eltlist)));
+ eltlist =gh_cdr (eltlist);
+ }
+ encompass_arr.reverse ();
+
Array<Offset> offset_arr;
- Offset origin (relative_coordinate (0, X_AXIS),
- relative_coordinate (0, Y_AXIS));
+ Offset origin (relative_coordinate (common[X_AXIS], X_AXIS),
+ relative_coordinate (common[Y_AXIS], Y_AXIS));
int first = 1;
int last = encompass_arr.size () - 2;
- offset_arr.push (get_attachment (LEFT));
+ offset_arr.push (get_attachment (LEFT, common));
/*
left is broken edge
if (encompass_arr[0] != get_bound (LEFT))
{
first--;
- offset_arr[0][Y_AXIS] -= encompass_arr[0]->relative_coordinate (0, Y_AXIS)
- - relative_coordinate (0, Y_AXIS);
+
+ // ?
+ offset_arr[0][Y_AXIS] -=
+ encompass_arr[0]->relative_coordinate (common[Y_AXIS], Y_AXIS)
+ - relative_coordinate (common[Y_AXIS], Y_AXIS);
}
/*
for (int i = first; i <= last; i++)
{
- Offset o (encompass_offset (encompass_arr[i]));
+ Offset o (encompass_offset (encompass_arr[i], common));
offset_arr.push (o - origin);
}
- offset_arr.push (Offset (spanner_length (), 0) + get_attachment (RIGHT));
+ offset_arr.push (Offset (spanner_length (), 0) + get_attachment (RIGHT,common));
if (encompass_arr[0] != get_bound (LEFT))
{
- offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (0, Y_AXIS)
- - relative_coordinate (0, Y_AXIS);
+ offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS)
+ - relative_coordinate (common[Y_AXIS], Y_AXIS);
}
return offset_arr;
Real off =0.0;
if (gh_number_p (pos))
{
- Real space = staff_symbol_referencer (sc).staff_space ();
+ Real space = Staff_symbol_referencer_interface (sc).staff_space ();
off = gh_scm2double (pos) * space/2.0;
}
elt_l_->add_offset_callback (callback, Y_AXIS);
}
-Staff_symbol_referencer_interface
-staff_symbol_referencer (Score_element const*e)
-{
- return e; // gee, I'm so smart!
-}
int
compare_position (Score_element *const &a, Score_element * const &b)
*/
#include "staff-symbol-referencer.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "stem.hh"
#include "musical-request.hh"
#include "misc.hh"
#include "stem.hh"
#include "debug.hh"
#include "paper-def.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "lookup.hh"
#include "molecule.hh"
#include "paper-column.hh"
}
- Drul_array<Note_head*> e (extremal_heads ());
+ Drul_array<Rhythmic_head*> e (extremal_heads ());
- return Interval (staff_symbol_referencer (e[DOWN]).position_f (),
- staff_symbol_referencer( e[UP]).position_f ());
+ return Interval (Staff_symbol_referencer_interface (e[DOWN]).position_f (),
+ Staff_symbol_referencer_interface ( e[UP]).position_f ());
}
/*
The note head which forms one end of the stem.
*/
-Note_head*
+Rhythmic_head*
Stem::first_head () const
{
return extremal_heads ()[-get_direction ()];
/*
START is part where stem reaches `last' head.
*/
-Drul_array<Note_head*>
+Drul_array<Rhythmic_head*>
Stem::extremal_heads () const
{
const int inf = 1000000;
extpos[DOWN] = inf;
extpos[UP] = -inf;
- Drul_array<Note_head *> exthead;
+ Drul_array<Rhythmic_head *> exthead;
exthead[LEFT] = exthead[RIGHT] =0;
for (SCM s = get_elt_pointer ("heads"); gh_pair_p (s); s = gh_cdr (s))
{
- Note_head * n = dynamic_cast<Note_head*> (unsmob_element (gh_car (s)));
+ Rhythmic_head * n = dynamic_cast<Rhythmic_head*> (unsmob_element (gh_car (s)));
Staff_symbol_referencer_interface si (n);
int p = int(si.position_f ());
n->set_elt_pointer ("stem", this->self_scm_);
n->add_dependency (this);
- if (Note_head *nh = dynamic_cast<Note_head *> (n))
+ if (to_boolean (n->get_elt_property ("note-head-interface")))
{
- Pointer_group_interface gi (this);
- gi.name_ = "heads";
-
- gi.add_element (n);
+ Pointer_group_interface (this, "heads").add_element (n);
}
else
{
/*
UGH. Who determines balltype for stem?
*/
- Note_head * nh = dynamic_cast<Note_head*> (support_head ());
+ Rhythmic_head * nh = dynamic_cast<Rhythmic_head*> (support_head ());
return !(heads_i () && nh->balltype_i () >= 1);
}
Interval stem_y(y1,y2);
stem_y.unite (Interval (y2,y1));
- Real dy = staff_symbol_referencer (this).staff_space ()/2.0;
+ Real dy = Staff_symbol_referencer_interface (this).staff_space ()/2.0;
Real head_wid = 0;
if (support_head ())
head_wid = support_head ()->extent (X_AXIS).length ();
Stem *st = dynamic_cast<Stem*> ((Score_element*)se);
Real r=0;
- if (Note_head * f = st->first_head ())
+ if (Rhythmic_head * f = st->first_head ())
{
Interval head_wid(0, f->extent (X_AXIS).length ());
#include "side-position-interface.hh"
#include "item.hh"
#include "musical-request.hh"
-#include "note-head.hh"
+
#include "stem.hh"
#include "staff-symbol.hh"
Link_array<Text_script_req> reqs_;
Link_array<Item> texts_;
public:
-
VIRTUAL_COPY_CONS(Translator);
protected:
virtual bool do_try_music (Music* m);
void
-Text_engraver::acknowledge_element (Score_element_info i)
+Text_engraver::acknowledge_element (Score_element_info inf)
{
- if (Note_head *n = dynamic_cast<Note_head*> (i.elem_l_))
+ if (to_boolean (inf.elem_l_->get_elt_property ("note-head-interface")))
{
for (int i=0; i < texts_.size (); i++)
{
Side_position_interface st (texts_[i]);
- st.add_support (n);
+ st.add_support (inf.elem_l_);
if (st.get_axis( ) == X_AXIS
&& !texts_[i]->parent_l (Y_AXIS))
- texts_[i]->set_parent (n, Y_AXIS);
+ texts_[i]->set_parent (inf.elem_l_, Y_AXIS);
}
}
- if (Stem *n = dynamic_cast<Stem*> (i.elem_l_))
+ if (Stem *n = dynamic_cast<Stem*> (inf.elem_l_))
{
for (int i=0; i < texts_.size (); i++)
{
Molecule m;
m.set_empty (false);
mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (space)*
- staff_symbol_referencer (s).staff_space ());
+ Staff_symbol_referencer_interface (s).staff_space ());
}
return mol.create_scheme ();
}
#include "group-interface.hh"
#include "tie.hh"
#include "directional-element-interface.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
Tie_column::Tie_column (SCM s)
: Spanner (s)
#include "tie-engraver.hh"
#include "command-request.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "musical-request.hh"
#include "tie.hh"
#include "translator-group.hh"
struct CHead_melodic_tuple {
Melodic_req *req_l_ ;
- Note_head *head_l_;
+ Rhythmic_head *head_l_;
Moment end_;
CHead_melodic_tuple ();
- CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
+ CHead_melodic_tuple (Rhythmic_head*, Melodic_req*, Moment);
static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
};
void
Tie_engraver::acknowledge_element (Score_element_info i)
{
- if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
+ if (Rhythmic_head *nh = dynamic_cast<Rhythmic_head *> (i.elem_l_))
{
Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
if (!m)
end_ = 0;
}
-CHead_melodic_tuple::CHead_melodic_tuple (Note_head *h, Melodic_req*m, Moment mom)
+CHead_melodic_tuple::CHead_melodic_tuple (Rhythmic_head *h, Melodic_req*m, Moment mom)
{
head_l_ = h;
req_l_ = m;
#include "lookup.hh"
#include "paper-def.hh"
#include "tie.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
#include "bezier.hh"
#include "paper-column.hh"
#include "debug.hh"
}
-Note_head*
+Rhythmic_head*
Tie::head (Direction d) const
{
SCM c = get_elt_pointer ("heads");
c = index_cell (c, d);
- return dynamic_cast<Note_head*> (unsmob_element (c));
+ return dynamic_cast<Rhythmic_head*> (unsmob_element (c));
}
Real
Tie::position_f () const
{
return head (LEFT)
- ? staff_symbol_referencer (head (LEFT)).position_f ()
- : staff_symbol_referencer (head (RIGHT)).position_f () ;
+ ? Staff_symbol_referencer_interface (head (LEFT)).position_f ()
+ : Staff_symbol_referencer_interface (head (RIGHT)).position_f () ;
}
warning (_ ("lonely tie"));
Direction d = LEFT;
- Drul_array<Note_head *> new_head_drul;
+ Drul_array<Rhythmic_head *> new_head_drul;
new_head_drul[LEFT] = head(LEFT);
new_head_drul[RIGHT] = head(RIGHT);
do {
if (!Directional_element_interface (this).get ())
Directional_element_interface (this).set (get_default_dir ());
- Real staff_space = staff_symbol_referencer (this).staff_space ();
+ Real staff_space = Staff_symbol_referencer_interface (this).staff_space ();
Real half_space = staff_space / 2;
Real x_gap_f = paper_l ()->get_var ("tie_x_gap");
Real y_gap_f = paper_l ()->get_var ("tie_y_gap");
Direction d (Directional_element_interface (this).get ());
Bezier_bow b (get_encompass_offset_arr (), d);
- Real staff_space = staff_symbol_referencer (this).staff_space ();
+ Real staff_space = Staff_symbol_referencer_interface (this).staff_space ();
Real h_inf = paper_l ()->get_var ("tie_height_limit_factor") * staff_space;
Real r_0 = paper_l ()->get_var ("tie_ratio");
}
return mol.create_scheme();
}
-
-void
-Tuplet_spanner::do_add_processing ()
-{
-#if 0
- if (gh_pair_p (get_elt_pointer ("columns")))
- {
- Link_array<Note_column> column_arr=
- Pointer_group_interface__extract_elements (this, (Note_column*)0, "columns");
-
- set_bound (LEFT, column_arr[0]);
- set_bound (RIGHT, column_arr.top ());
- }
-#endif
-}
+
mol.translate_axis (left, X_AXIS);
return mol.create_scheme();
}
-
-void
-Volta_spanner::do_add_processing ()
-{
-#if 0
- Link_array<Bar> bar_arr
- = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars");
- if (bar_arr.size ())
- {
- set_bound (LEFT, bar_arr[0]);
- set_bound (RIGHT, bar_arr.top ());
- }
-#endif
-}
GLUE_SCORE_ELEMENT(Volta_spanner,after_line_breaking);
SCM
(molecule-callback . ,Crescendo::brew_molecule)
)
basicDotColumnProperties = #`(
- (after-line-breaking-callback . ,Dot_column::after_line_breaking)
+ (dot-column-interface . #t)
)
basicDotsProperties = #`(
(molecule-callback . ,Dots::brew_molecule)
- (after-line-breaking-callback . ,Dots::after_line_breaking)
(dot-count . 1)
(dots-interface . #t)
)
basicMultiMeasureRestProperties = #`(
(molecule-callback . ,Multi_measure_rest::brew_molecule)
(staff-position . 0)
- (after-line-breaking-callback . ,Multi_measure_rest::after_line_breaking)
+
)
basicNoteColumnProperties = #`(
(axes 0 1)
basicNoteHeadProperties = #`(
(note-head-interface . #t)
(molecule-callback . ,Note_head::brew_molecule)
- (before-line-breaking-callback . ,Note_head::before_line_breaking)
- (after-line-breaking-callback . ,Rhythmic_head::after_line_breaking)
)
basicNoteNameProperties = #`(
(molecule-callback . ,Text_item::brew_molecule)
basicRestProperties = #`(
(rest-interface . #t)
(molecule-callback . ,Rest::brew_molecule)
- (after-line-breaking-callback . ,Rhythmic_head::after_line_breaking)
(minimum-beam-collision-distance . 1.5)
)
basicStemProperties = #`(
(before-line-breaking-callback . ,Stem::before_line_breaking)
(molecule-callback . ,Stem::brew_molecule)
+ (stem-interface . #t)
)
staffSymbolBasicProperties = #`(
(molecule-callback . ,Staff_symbol::brew_molecule)
Begin3
Title: LilyPond
-Version: 1.3.66
-Entered-date: 29JUN00
+Version: 1.3.67
+Entered-date: 30JUN00
Description:
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.66.tar.gz
+ 1000k lilypond-1.3.67.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.66.tar.gz
+ 1000k lilypond-1.3.67.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.66
+Version: 1.3.67
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.66.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.67.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
(define (attached-to-stem slur dir)
- (let* ((note-columns (get-pointer slur 'note-columns))
+ (let* ((note-columns (ly-get-elt-pointer slur 'note-columns))
(col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
- (stem (get-pointer col 'stem)))
+ (stem (ly-get-elt-pointer col 'stem)))
(and
- (eq? col (get-bound slur dir))
+ (eq? col (ly-get-spanner-bound slur dir))
stem
- (get-pointer stem 'heads))))
+ (ly-get-elt-pointer stem 'heads))))
;; Slur-extremity-rules is a list of rules. Each rule is a pair
(define slur-extremity-rules
(list
- (cons (lambda (slur dir)
- ;; urg, code dup
- (let* ((note-columns (get-pointer slur 'note-columns))
- (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
- (stem (get-pointer col 'stem)))
- (and stem
- (not (= (get-property slur 'direction)
- (get-property stem 'direction)))))) 'head)
+ (cons (lambda (slur dir)
+ ;; urg, code dup
+ (let* ((note-columns (ly-get-elt-pointer slur 'note-columns))
+ (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
+ (stem (ly-get-elt-pointer col 'stem)))
+ (and stem
+ (not (= (ly-get-elt-property slur 'direction)
+ (ly-get-elt-property stem 'direction)))))) 'head)
- (cons (lambda (slur dir)
- ;; if attached-to-stem
- (and (attached-to-stem slur dir)
- ;; and got beam
- ;; urg, code dup
- (let* ((note-columns (get-pointer slur 'note-columns))
- (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
- (stem (get-pointer col 'stem)))
- (and stem
- (get-pointer stem 'beam)
- ;; and beam on same side as slur
- (let ((beaming (get-property stem 'beaming)))
- (if (pair? beaming)
- (<= 1
- (if (= dir -1) (car beaming) (cdr beaming)))
- #f))))))
- 'stem)
+ (cons (lambda (slur dir)
+ ;; if attached-to-stem
+ (and (attached-to-stem slur dir)
+ ;; and got beam
+ ;; urg, code dup
+ (let* ((note-columns (ly-get-elt-pointer slur 'note-columns))
+ (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
+ (stem (ly-get-elt-pointer col 'stem)))
+ (and stem
+ (ly-get-elt-pointer stem 'beam)
+ ;; and beam on same side as slur
+ (let ((beaming (ly-get-elt-property stem 'beaming)))
+ (if (pair? beaming)
+ (<= 1
+ (if (= dir -1) (car beaming) (cdr beaming)))
+ #f))))))
+ 'stem)
- (cons (lambda (slur dir) (not (attached-to-stem slur dir))) 'loose-end)
+ (cons (lambda (slur dir) (not (attached-to-stem slur dir))) 'loose-end)
- ;; default case, attach to head
- (cons (lambda (x y) #t) 'head)
- ))
+ ;; default case, attach to head
+ (cons (lambda (x y) #t) 'head)
+ ))
;; This list defines the offsets for each type of attachment.