-1.3.55.jcn1
+1.3.55.hwn1
===========
-* Made bugfix for Stem_tremolo
+* Molecules are now generated via callbacks exclusively; most calls to
+set_elt_property ("transparent) have been replaced by suicide().
1.3.54.hwn2
===========
loose_column_distance = 2.5 * \interline;
linewidth = -1.0;
\translator {
- \type "Score_engraver";
- \name "Score";
- \consists "Rest_engraver";
- \consists "Stem_engraver";
- \consists "Rhythmic_column_engraver";
+ \StaffContext
+ \remove "Clef_engraver";
+ \remove "Staff_symbol_engraver";
+ \remove "Bar_engraver";
}
}
}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=55
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=56
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+\score {
+ \notes \relative c'' {
+ c4 <d4 \context Staff = "another" e4> f
+ }
+}
Spanner*
Axis_group_engraver::get_spanner_p () const
{
- return new Spanner (SCM_EOL);
+ return new Spanner (get_property ("basicVerticalAxisGroupProperties"));
}
void
if (!has_interface_b ())
{
elt_l_->set_elt_pointer ("elements", SCM_EOL);
- elt_l_->set_elt_property ("transparent", SCM_BOOL_T); // junk this?
+
Group_interface (elt_l_, "interfaces").add_thing (ly_symbol2scm ("Axis_group"));
}
return Molecule ();
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Bar);
Molecule
Bar::compound_barline (String str, Real h) const
if (!gh_string_p (g))
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
+ set_elt_property ("molecule-callback", SCM_BOOL_T);
+ set_extent_callback (0, X_AXIS);
+ // leave y_extent for spanbar?
}
else if (! gh_equal_p (g, orig))
set_elt_property ("glyph", g);
if (visible_stem_count () < 2)
{
warning (_ ("beam has less than two stems"));
- // set_elt_property ("transparent", SCM_BOOL_T);
+
}
if (!directional_element (this).get ())
return leftbeams;
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS (Beam);
Molecule
Beam::do_brew_molecule () const
return filter_solutions (sol);
}
+/**
+ Compute the bounding box dimensions in direction of A.
+ */
Interval
Bezier::extent (Axis a)const
{
return iv;
}
+/**
+ Flip around axis A
+ */
+
void
Bezier::flip (Axis a)
{
{
}
+
+
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Breathing_sign);
+
Molecule
Breathing_sign::do_brew_molecule () const
{
if (gh_boolean_p (chord_inversion))
find_inversion_b = gh_scm2bool (chord_inversion);
- chord_name_p_ = new Chord_name (SCM_EOL);
+ chord_name_p_ = new Chord_name (get_property ("basicChordNameProperties"));
Chord chord = to_chord (pitch_arr_, tonic_req_, inversion_req_, bass_req_,
find_inversion_b);
return mol;
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Chord_name);
+
Molecule
Chord_name::do_brew_molecule () const
{
{
if (repeat_ && !beam_p_)
{
- beam_p_ = new Beam (SCM_EOL);
+ beam_p_ = new Beam (get_property ("basicBeamProperties"));
beam_p_->set_elt_property ("chord-tremolo", SCM_BOOL_T);
#include "paper-def.hh"
#include "lookup.hh"
-
/*
construct from parser output
*/
c0_position_i_ -= (int) octave_dir_ * 7;
-
current_settings_ = gh_cons (gh_cons (ly_symbol2scm ("glyph"), clef_glyph_), basic_properties_);
current_settings_ =
gh_cons (gh_cons (ly_symbol2scm ("c0-position"),
clef_p_ = c;
}
Staff_symbol_referencer_interface si(clef_p_);
- clef_p_->set_elt_property ("glyph", clef_glyph_);
+
si.set_position (clef_position_i_);
if (octave_dir_)
{
: Item (s)
{}
+
+/*
+FIXME: should use symbol.
+
+FIXME: this should be schemified.
+*/
void
Clef_item::before_line_breaking ()
{
SCM glyph = get_elt_property ("glyph");
- /*
- FIXME: should use symbol.
- */
if (gh_string_p (glyph))
{
String s = ly_scm2string (glyph);
/*
FIXME: should use fontsize property to set clef changes.
*/
- if (break_status_dir() != RIGHT && style != "fullSizeChanges")
+ if (get_elt_property ("non-default") &&
+ break_status_dir() != RIGHT && style != "fullSizeChanges")
{
s += "_change";
+ set_elt_property ("glyph", ly_str02scm (s.ch_C()));
}
- s = "clefs-" + s;
- set_elt_property ("glyph", ly_str02scm (s.ch_C()));
}
else
{
- set_elt_property ("transparent", SCM_BOOL_T);
+ suicide ();
+ return;
}
-
+
+ // ugh.
if (style == "transparent") // UGH. JUNKME
{
- set_elt_property ("transparent", SCM_BOOL_T);
+ set_elt_property ("molecule-callback", SCM_BOOL_T);
set_extent_callback (0, X_AXIS);
}
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Crescendo)
Molecule
Crescendo::do_brew_molecule () const
{
if (!isdir_b (dir) || !gh_pair_p (dyns))
{
Crescendo * me = (Crescendo*)this;
- me->set_elt_property ("transparent", SCM_BOOL_T);
+ me->suicide ();
Molecule m;
return m;
Dots::after_line_breaking ()
{
SCM d= get_elt_property ("dot-count");
- if (!gh_number_p (d) || !gh_scm2int (d))
- {
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
- }
- else
+ if (gh_number_p (d) && gh_scm2int (d))
{
if (!directional_element (this).get ())
directional_element (this).set (UP);
}
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Dots);
Molecule
Dots::do_brew_molecule () const
{
Molecule mol (lookup_l ()->blank (Box (Interval (0,0),
Interval (0,0))));
- Molecule d = lookup_l ()->afm_find (String ("dots-dot"));
- Real dw = d.extent (X_AXIS).length ();
- d.translate_axis (-dw, X_AXIS);
+ SCM c = get_elt_property ("dot-count");
+ if (!gh_number_p (c))
+ {
+ Molecule d = lookup_l ()->afm_find (String ("dots-dot"));
+
+ Real dw = d.extent (X_AXIS).length ();
+ d.translate_axis (-dw, X_AXIS);
- for (int i = gh_scm2int (get_elt_property ("dot-count")); i--; )
- {
- d.translate_axis (2*dw,X_AXIS);
- mol.add_molecule (d);
+ for (int i = gh_scm2int (c); i--; )
+ {
+ d.translate_axis (2*dw,X_AXIS);
+ mol.add_molecule (d);
+ }
}
-
return mol;
}
Dynamic_line_spanner::Dynamic_line_spanner (SCM s)
: Spanner (s)
{
- set_elt_property ("transparent", SCM_BOOL_T);
Side_position_interface (this).set_axis (Y_AXIS);
Axis_group_interface (this).set_interface ();
Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
else
{
span_start_req_l_ = span_req_l_drul_[START];
- cresc_p_ = new Crescendo (SCM_EOL);
+ cresc_p_ = new Crescendo (get_property ("basicCrescendoProperties"));
cresc_p_->set_elt_property
("grow-direction",
gh_int2scm ((span_req_l_drul_[START]->span_type_str_ == "crescendo")
#include "proto.hh"
#include "musical-request.hh"
-#include "extender-engraver.hh"
#include "extender-spanner.hh"
#include "paper-column.hh"
#include "text-item.hh"
-#include "extender-engraver.hh"
+#include "engraver.hh"
+#include "drul-array.hh"
+#include "extender-spanner.hh"
+#include "pqueue.hh"
+
+
+/**
+ Generate an centred extender. Should make a Extender_spanner that
+ typesets a nice centred extender of varying length depending on the
+ gap between syllables.
+
+ We remember the last Text_item that come across. When we get a
+ request, we create the spanner, and attach the left point to the
+ last lyrics, and the right point to any lyrics we receive by
+ then. */
+class Extender_engraver : public Engraver
+{
+ Text_item * last_lyric_l_;
+ Text_item * current_lyric_l_;
+ Extender_req* req_l_;
+ Lyric_extender* extender_spanner_p_;
+public:
+ Extender_engraver ();
+ VIRTUAL_COPY_CONS (Translator);
+
+protected:
+ virtual void acknowledge_element (Score_element_info);
+ virtual void do_removal_processing();
+ virtual void do_process_music();
+ virtual bool do_try_music (Music*);
+ virtual void do_pre_move_processing();
+ virtual void do_post_move_processing ();
+private:
+
+};
+
ADD_THIS_TRANSLATOR (Extender_engraver);
return;
}
- extender_spanner_p_ = new Extender_spanner (SCM_EOL);
+ extender_spanner_p_ = new Lyric_extender (get_property ("basicLyricExtenderProperties"));
extender_spanner_p_->set_textitem (LEFT, last_lyric_l_);
announce_element (Score_element_info (extender_spanner_p_, req_l_));
}
if ( line_l () != s->line_l ())
programming_error ("Killing other children too");
- s->set_elt_property ("transparent", SCM_BOOL_T);
- s->set_extent_callback (0, X_AXIS);
- s->set_extent_callback (0, Y_AXIS);
-
+ s->suicide ();
}
set_extent_callback (0, X_AXIS);
set_extent_callback (0, Y_AXIS);
#include "hyphen-spanner.hh"
#include "paper-column.hh"
#include "text-item.hh"
-#include "extender-engraver.hh"
ADD_THIS_TRANSLATOR (Hyphen_engraver);
return;
}
- hyphen_spanner_p_ = new Hyphen_spanner (SCM_EOL);
+ hyphen_spanner_p_ = new Hyphen_spanner (get_property ("basicHyphenSpannerProperties"));
hyphen_spanner_p_->set_textitem (LEFT, last_lyric_l_);
announce_element (Score_element_info (hyphen_spanner_p_, req_l_));
}
set_extent_callback (Score_element::point_dimension_callback,Y_AXIS);
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Hyphen_spanner)
Molecule
Hyphen_spanner::do_brew_molecule () const
{
Molecule compound_barline (String, Real height) const;
Molecule simple_barline (Real wid, Real height) const;
+ static SCM scheme_molecule (SCM);
+
protected:
virtual void before_line_breaking ();
class Beam : public Spanner
{
public:
+ static SCM scheme_molecule (SCM);
+
int stem_count () const;
Stem* stem (int) const;
class Breathing_sign : public Item
{
public:
+ static SCM scheme_molecule (SCM);
+
VIRTUAL_COPY_CONS(Score_element);
Breathing_sign (SCM s);
protected:
virtual Molecule do_brew_molecule () const;
};
-
-
#endif // BREATHING_SIGN_HH
class Chord_name : public Item
{
public:
- VIRTUAL_COPY_CONS (Score_element);
+ static SCM scheme_molecule (SCM);
+
+VIRTUAL_COPY_CONS (Score_element);
Molecule ly_word2molecule (SCM scm) const;
Molecule ly_text2molecule (SCM scm) const;
Chord_name(SCM s);
*/
class Crescendo : public Spanner {
public:
- Crescendo(SCM);
+ static SCM scheme_molecule (SCM);
+
+Crescendo(SCM);
protected:
VIRTUAL_COPY_CONS(Score_element);
virtual Molecule do_brew_molecule() const;
virtual Molecule do_brew_molecule () const;
virtual void after_line_breaking ();
public:
+ static SCM scheme_molecule (SCM);
+
Dots (SCM);
};
+++ /dev/null
-/*
- extender-engraver.hh -- declare Extender_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Glen Prideaux <glenprideaux@iname.com>,
- Han-Wen Nienhuys, Jan Nieuwenhuizen.
-*/
-
-#ifndef EXTENDER_ENGRAVER_HH
-#define EXTENDER_ENGRAVER_HH
-
-#include "engraver.hh"
-#include "drul-array.hh"
-#include "extender-spanner.hh"
-#include "pqueue.hh"
-#include "extender-engraver.hh"
-
-
-/**
- Generate an centred extender. Should make a Extender_spanner that
- typesets a nice centred extender of varying length depending on the
- gap between syllables.
-
- We remember the last Text_item that come across. When we get a
- request, we create the spanner, and attach the left point to the
- last lyrics, and the right point to any lyrics we receive by
- then. */
-class Extender_engraver : public Engraver
-{
- Text_item * last_lyric_l_;
- Text_item * current_lyric_l_;
- Extender_req* req_l_;
- Extender_spanner* extender_spanner_p_;
-public:
- Extender_engraver ();
- VIRTUAL_COPY_CONS (Translator);
-
-protected:
- virtual void acknowledge_element (Score_element_info);
- virtual void do_removal_processing();
- virtual void do_process_music();
- virtual bool do_try_music (Music*);
- virtual void do_pre_move_processing();
- virtual void do_post_move_processing ();
-private:
-
-};
-
-#endif // EXTENDER_ENGRAVER_HH
extend beond, lasting the whole duration of the melissima
(as in MUP, urg).
*/
-class Extender_spanner : public Spanner
+class Lyric_extender : public Spanner
{
public:
- Extender_spanner (SCM);
+ Lyric_extender (SCM);
void set_textitem (Direction, Item*);
+ static SCM scheme_molecule (SCM);
+
protected:
virtual Molecule do_brew_molecule () const;
#include "drul-array.hh"
#include "hyphen-spanner.hh"
#include "pqueue.hh"
-#include "extender-engraver.hh"
/**
public:
Hyphen_spanner (SCM);
void set_textitem (Direction, Item*);
+ static SCM scheme_molecule (SCM);
+
protected:
virtual Molecule do_brew_molecule () const;
Key_item (SCM);
void add (int pitch, int acc);
void add_old (int pitch, int acc);
+ static SCM scheme_molecule (SCM);
+
protected:
virtual Molecule do_brew_molecule() const;
Molecule accidental (int,bool,bool) const;
public:
Local_key_item (SCM );
- void add_pitch (Musical_pitch, bool cautionary, bool natural);
+ static SCM scheme_molecule (SCM);
+
+void add_pitch (Musical_pitch, bool cautionary, bool natural);
protected:
virtual void before_line_breaking ();
virtual Molecule do_brew_molecule() const;
void translate_axis (Real,Axis);
Interval extent (Axis) const;
+ /**
+ codify THIS into a Scheme expression.
+ */
+ SCM create_scheme () const;
bool empty_b() const;
};
SCM fontify_atom (Font_metric*, SCM atom);
+Molecule create_molecule (SCM scheme_molecule);
{
public:
Multi_measure_rest (SCM);
+ static SCM scheme_molecule (SCM);
+
void add_column (Item*);
Molecule compound_rest (int)const;
{
public:
static int compare (Note_head * const &a, Note_head *const &b) ;
+ static SCM scheme_molecule (SCM);
+
Molecule ledger_line (Interval) const;
Note_head (SCM);
virtual void after_line_breaking ();
virtual Molecule do_brew_molecule () const;
public:
- Rest (SCM s);
+ static SCM scheme_molecule (SCM);
+
+Rest (SCM s);
};
#endif // REST_HH
/// generate rods & springs
virtual void do_space_processing ();
virtual void discretionary_processing ();
-
+ virtual void do_derived_mark ();
/// do calculations before determining horizontal spacing
virtual void before_line_breaking ();
/// do calculations after determining horizontal spacing
be handled by GUILE gc. */
virtual ~Score_element ();
- /// generate the molecule
- virtual Molecule do_brew_molecule () const;
///executed directly after the item is added to the Paper_score
virtual void do_add_processing ();
-
+ virtual Molecule do_brew_molecule ()const;
+
static Interval dim_cache_callback (Dimension_cache const*);
public:
static SCM ly_set_elt_property (SCM, SCM,SCM);
static SCM ly_get_elt_property (SCM, SCM);
-
+ static SCM scheme_molecule (SCM);
virtual void handle_broken_dependencies ();
virtual void handle_prebroken_dependencies ();
Score_element * unsmob_element (SCM);
+#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE) \
+SCM \
+TYPE::scheme_molecule (SCM smob) \
+{ \
+ TYPE * b = dynamic_cast<TYPE*> (unsmob_element (smob)); \
+ return b ? b->do_brew_molecule ().create_scheme () : SCM_EOL; \
+} \
+ \
+void \
+TYPE ## __init_functions () \
+{ \
+ scm_make_gsubr (#TYPE "::scheme_molecule", 1, 0, 0, \
+ (SCM(*)(...))TYPE::scheme_molecule); \
+} \
+ \
+ADD_SCM_INIT_FUNC(TYPE ## _molecule, TYPE ## __init_functions); \
+
#endif // STAFFELEM_HH
Molecule get_molecule (Direction d) const;
public:
Script (SCM);
+ static SCM scheme_molecule (SCM);
+
protected:
virtual void before_line_breaking ();
virtual void after_line_breaking ();
VIRTUAL_COPY_CONS(Score_element);
void add_column (Note_column*);
+ static SCM scheme_molecule (SCM);
+
protected:
virtual Array<Rod> get_rods () const;
virtual Array<Spring> get_springs () const;
virtual Score_element* find_broken_piece (Line_of_score*) const;
+ virtual void do_derived_mark ();
protected:
void set_my_columns ();
VIRTUAL_COPY_CONS(Score_element);
int steps_i() const;
int line_count () const;
Staff_symbol (SCM s);
+ static SCM scheme_molecule (SCM);
+
protected:
VIRTUAL_COPY_CONS(Score_element);
virtual Molecule do_brew_molecule() const;
static Interval dim_callback (Score_element*, Axis);
public:
- Stem_tremolo (SCM);
+ static SCM scheme_molecule (SCM);
+
+Stem_tremolo (SCM);
void set_stem (Stem *);
};
class Stem : public Item
{
public:
+ static SCM scheme_molecule (SCM);
+
+
+
/// log of the duration. Eg. 4 -> 16th note -> 2 flags
int flag_i () const;
Real get_default_stem_end_position () const;
void position_noteheads();
-
Real stem_end_position () const;
static Real off_callback (Score_element const*, Axis);
-protected:
Molecule flag () const;
virtual void before_line_breaking();
class Sustain_pedal : public Item
{
public:
- VIRTUAL_COPY_CONS (Score_element);
+ static SCM scheme_molecule (SCM);
+
+VIRTUAL_COPY_CONS (Score_element);
Sustain_pedal (SCM);
protected:
virtual Molecule do_brew_molecule () const;
{
public:
System_start_delimiter (SCM);
- VIRTUAL_COPY_CONS (Score_element);
+ static SCM scheme_molecule (SCM);
+
+VIRTUAL_COPY_CONS (Score_element);
protected:
virtual void after_line_breaking();
virtual Molecule do_brew_molecule () const;
{
public:
VIRTUAL_COPY_CONS (Score_element);
- Text_item (SCM s);
+ static SCM scheme_molecule (SCM);
+
+Text_item (SCM s);
protected:
virtual Molecule do_brew_molecule () const;
};
Note_head* head (Direction) const;
Real position_f () const;
+ static SCM scheme_molecule (SCM);
+
virtual Direction get_default_dir() const;
protected:
virtual Molecule do_brew_molecule() const;
public:
Time_signature (SCM);
+ static SCM scheme_molecule (SCM);
+
/*
TODO: make this SCM!
{
public:
Tuplet_spanner (SCM);
-
+ static SCM scheme_molecule (SCM);
+
+
void add_column (Note_column*);
void add_beam (Beam*);
protected:
{
public:
Volta_spanner (SCM);
-
+ static SCM scheme_molecule (SCM);
void add_column (Note_column*);
void add_bar (Bar*);
/*
+
interpretation-context-handle.cc -- implement Interpretation_context_handle
source file of the GNU LilyPond music typesetter
Item::Item (SCM s)
: Score_element (s)
-
{
broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
}
SCM result = gh_apply (vis, args);
bool trans = gh_scm2bool (gh_car (result));
bool empty = gh_scm2bool (gh_cdr (result));
-
- if (empty)
+
+ if (empty && trans)
+ suicide ();
+ else if (empty)
{
set_extent_callback (0, X_AXIS);
set_extent_callback (0, Y_AXIS);
}
- if (trans)
- set_elt_property ("transparent", SCM_BOOL_T);
+ else if (trans)
+ set_elt_property ("molecule-callback", SCM_BOOL_T);
}
}
+
*/
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Key_item)
Molecule
-Key_item::do_brew_molecule() const
+Key_item::do_brew_molecule () const
{
Molecule mol;
{
if (!text_item_p_ && interesting_.size ())
{
- text_item_p_ = new Text_item (SCM_EOL);
+ text_item_p_ = new Text_item (get_property ("basicTextProperties") );
Side_position_interface si (text_item_p_);
si.set_axis (Y_AXIS);
text_item_p_->set_parent (interesting_[0].elem_l_, Y_AXIS);
r = r->column_l ();
SCM s = get_elt_pointer ("columns");
- while (gh_car (s) != r->self_scm_)
+ while (gh_pair_p (s) && gh_car (s) != r->self_scm_)
s = gh_cdr (s);
-
- s = gh_cdr (s);
+ if (gh_pair_p (s))
+ s = gh_cdr (s);
- while (gh_car (s) != l->self_scm_)
+ while (gh_pair_p (s) && gh_car (s) != l->self_scm_)
{
Paper_column *c
= dynamic_cast<Paper_column*> (unsmob_element (gh_car (s)));
/*
UGH. clean me up
*/
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Local_key_item)
Molecule
-Local_key_item::do_brew_molecule() const
+Local_key_item::do_brew_molecule () const
{
Molecule mol;
Staff_symbol_referencer_interface si (this);
{
return expr_;
}
+
+Molecule
+create_molecule (SCM scm_mol)
+{
+ if (!gh_pair_p (scm_mol))
+ return Molecule ();
+
+ SCM exp = gh_car (scm_mol);
+ scm_mol = gh_cdr (scm_mol);
+ Box b ;
+ if (gh_pair_p (scm_mol))
+ {
+ Interval i1 = ly_scm2interval (gh_car (scm_mol));
+ Interval i2 = ly_scm2interval (gh_cdr (scm_mol));
+ b = Box (i1,i2);
+ }
+ return Molecule (b, exp);
+}
+
+SCM
+Molecule::create_scheme () const
+{
+ return gh_cons (expr_,
+ gh_cons (ly_interval2scm (dim_[X_AXIS]),
+ ly_interval2scm (dim_[Y_AXIS])));
+}
[TODO] 17
* variable-sized multi-measure rest symbol: |====| ??
*/
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Multi_measure_rest)
Molecule
Multi_measure_rest::do_brew_molecule () const
{
Multi_measure_rest::after_line_breaking ()
{
if (!gh_pair_p (get_elt_pointer ("columns")))
- set_elt_property ("transparent", SCM_BOOL_T);
+ {
+ suicide ();
+ }
+
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Note_head);
Molecule
Note_head::do_brew_molecule() const
for (int i=0; i < note_req_l_arr_.size (); i++)
{
- Note_head *note_p = new Note_head (SCM_EOL);
+ Note_head *note_p = new Note_head (get_property ("basicNoteHeadProperties"));
Staff_symbol_referencer_interface si (note_p);
si.set_interface ();
if (note_req_l->duration_.dots_i_)
{
- Dots * d = new Dots (SCM_EOL);
+ Dots * d = new Dots (get_property ("basicDotsProperties"));
Staff_symbol_referencer_interface sd (d);
sd.set_interface ();
else
{
assert (!volta_span_p_);
- volta_span_p_ = new Volta_spanner (SCM_EOL);
+ volta_span_p_ = new Volta_spanner (get_property ("basicVoltaSpannerProperties"));
announce_element (Score_element_info (volta_span_p_,0));
volta_span_p_->set_elt_property ("text",
ly_str02scm (t.ch_C()));
return to_duration (r->balltype_i (), r->dot_count ()).length_mom ();
}
+/*
+ ugh
+ */
static Rhythmic_head*
col2rhythmic_head (Note_column* c)
{
display_count = gh_scm2int (s);
for (; i > display_count; i--)
col2rhythmic_head (rest_l_arr[i-1])
- ->set_elt_property ("transparent", SCM_BOOL_T);
+ ->set_elt_property ("molecule-callback", SCM_BOOL_T);
}
else
display_count = rest_l_arr.size ();
#include "musical-request.hh"
#include "dots.hh"
#include "rest.hh"
+
/*
Should merge with Note_head_engraver
*/
{
if (rest_req_l_ && !rest_p_)
{
- rest_p_ = new Rest (SCM_EOL);
+ rest_p_ = new Rest (get_property ("basicRestProperties"));
Staff_symbol_referencer_interface si (rest_p_);
si.set_interface ();
if (rest_req_l_->duration_.dots_i_)
{
- dot_p_ = new Dots (SCM_EOL);
+ dot_p_ = new Dots (get_property ("basicDotsProperties"));
Staff_symbol_referencer_interface si (dot_p_);
si.set_interface ();
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Rest)
Molecule
Rest::do_brew_molecule () const
{
property_alist_ = gh_cons (gh_cons (sym, val), property_alist_);
}
-
void
Score_element::set_elt_pointer (const char* k, SCM v)
{
Interval
Score_element::molecule_extent (Score_element const *s, Axis a )
{
- Molecule m = s->do_brew_molecule();
+ Molecule m = s->get_molecule ();
return m.extent(a);
}
Molecule
Score_element::get_molecule () const
{
- if (to_boolean (get_elt_property ("transparent")))
- return Molecule ();
+ SCM proc = get_elt_property ("molecule-callback");
+ if (gh_procedure_p (proc))
+ return create_molecule (gh_apply (proc, gh_list (this->self_scm_, SCM_UNDEFINED)));
- return do_brew_molecule ();
+ return Molecule ();
}
}
-/*
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Score_element)
+
+ /*
ugh.
*/
+
Molecule
-Score_element::do_brew_molecule() const
+Score_element::do_brew_molecule () const
{
SCM glyph = get_elt_property ("glyph");
if (gh_string_p (glyph))
{
return lookup_l ()->afm_find (String (ly_scm2string (glyph)));
-
}
else
{
pointer_alist_ = SCM_EOL;
set_extent_callback (0, Y_AXIS);
set_extent_callback (0, X_AXIS);
-}
+ for (int a= X_AXIS; a <= Y_AXIS; a++)
+ {
+ dim_cache_[a].off_callbacks_.clear ();
+ }
+}
void
Score_element::handle_prebroken_dependencies()
{
}
-
Score_element*
Score_element::find_broken_piece (Line_of_score*) const
{
return SCM_EOL;
}
scm_gc_mark (s->pointer_alist_);
+
+ s->do_derived_mark ();
+ if (s->parent_l (Y_AXIS))
+ scm_gc_mark (s->parent_l (Y_AXIS)->self_scm_);
+ if (s->parent_l (X_AXIS))
+ scm_gc_mark (s->parent_l (X_AXIS)->self_scm_);
+
return s->property_alist_;
}
return 1;
}
+void
+Score_element::do_derived_mark ()
+{
+}
+
void
Score_element::do_smobify_self ()
{
continue;
}
// todo -> use result of articulation-to-scriptdef directly as basic prop list.
- Script *p =new Script (SCM_EOL);
+ Script *p =new Script (get_property ("basicScriptProperties"));
Side_position_interface stafy (p);
i.set_direction (d);
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Script)
Molecule
Script::do_brew_molecule () const
{
{
// push a new slur onto stack.
//(use temp. array to wait for all slur STOPs)
- Slur * s_p =new Slur (SCM_EOL);
+ Slur * s_p =new Slur (get_property ("basicSlurProperties"));
requests_arr_.push (slur_req_l);
start_slur_l_arr_.push (s_p);
#include "group-interface.hh"
#include "staff-symbol-referencer.hh"
-
-
class Slur_bezier_bow : public Bezier_bow
{
public:
if (!encompass_arr.size ())
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
+ suicide();
return;
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Slur);
+
/*
Ugh should have dash-length + dash-period
*/
{
set_extent_callback (0, X_AXIS);
set_extent_callback (0, Y_AXIS);
- set_elt_property ("transparent", SCM_BOOL_T);
}
/*
{
if (!gh_pair_p (get_elt_pointer ("elements")))
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
+ suicide ();
}
SCM gl = get_elt_property ("glyph");
if (!gh_string_p (gl))
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
+ suicide ();
+ return ;
}
else {
String type_str = ly_scm2string (gl);
{
iv[LEFT] = spanned_drul_[LEFT]->column_l ()->rank_i ();
}
- if ( spanned_drul_[RIGHT])
+ if (spanned_drul_[RIGHT])
{
iv[RIGHT] = spanned_drul_[RIGHT]->column_l ()->rank_i ();
}
return 0.0;
}
+
+void
+Spanner::do_derived_mark ()
+{
+ Direction d = LEFT;
+ do
+ if (spanned_drul_[d])
+ scm_gc_mark (spanned_drul_[d]->self_scm_);
+ while (flip (&d) != LEFT);
+}
+
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Staff_symbol)
Molecule
-Staff_symbol::do_brew_molecule() const
+Staff_symbol::do_brew_molecule () const
{
Score_element * common
= get_bound (LEFT)->common_refpoint (get_bound (RIGHT), X_AXIS);
int duration_log = r->duration_.durlog_i_;
if (!stem_p_)
{
- stem_p_ = new Stem (SCM_EOL);
+ stem_p_ = new Stem (get_property ("basicStemProperties"));
Staff_symbol_referencer_interface st(stem_p_);
st.set_interface ();
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Stem_tremolo)
Molecule
Stem_tremolo::do_brew_molecule () const
{
if (invisible_b ())
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, Y_AXIS);
- set_extent_callback (0, X_AXIS);
+ remove_elt_property ("molecule-callback");
+ // suicide();
}
-
+
set_spacing_hints ();
}
}
-const Real ANGLE = 20* (2.0*M_PI/360.0); // ugh!
+const Real ANGLE = 20* (2.0*M_PI/360.0); // ugh! Should be settable.
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Stem)
Molecule
Stem::do_brew_molecule () const
{
if (scm_ilength (get_elt_pointer ("elements")) <= 1 && gl == ly_symbol2scm ("bar-line"))
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
+ suicide ();
}
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(System_start_delimiter);
Molecule
System_start_delimiter::do_brew_molecule ()const
{
if (gh_number_p (s) && l < gh_scm2double (s))
{
System_start_delimiter * me = (System_start_delimiter*)this;
- me->set_elt_property ("transparent", SCM_BOOL_T);
- me->set_extent_callback (0, X_AXIS);
- me->set_extent_callback (0, Y_AXIS);
+ me->suicide ();
return m;
}
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Text_item)
+
Molecule
Text_item::do_brew_molecule () const
{
set_elt_pointer ("ties", SCM_EOL);
set_extent_callback (0, X_AXIS);
set_extent_callback (0, Y_AXIS);
- set_elt_property ("transparent", SCM_BOOL_T);
}
void
}
}
-
+ SCM basic = get_property ("basicTieProperties");
SCM sparse = get_property ("sparseTies");
if (to_boolean (sparse))
{
SCM pair = gh_list_ref (head_list, gh_int2scm (i/2));
- Tie * p = new Tie (SCM_EOL);
+ Tie * p = new Tie (basic);
p->set_head (LEFT, dynamic_cast<Item*> (unsmob_element (gh_car (pair))));
p->set_head (RIGHT, dynamic_cast<Item*> (unsmob_element (gh_cdr (pair))));
}
else for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s))
{
- Tie * p = new Tie (SCM_EOL);
+ Tie * p = new Tie (basic);
p->set_head (LEFT, dynamic_cast<Item*> (unsmob_element (gh_caar (s))));
p->set_head (RIGHT, dynamic_cast<Item*> (unsmob_element (gh_cdar (s))));
}
else if (tie_p_arr_.size () > 1 && !tie_column_p_)
{
- tie_column_p_ = new Tie_column (SCM_EOL);
+ tie_column_p_ = new Tie_column (get_property ("basicTieColumnProperties"));
for (int i = tie_p_arr_.size (); i--; )
tie_column_p_->add_tie (tie_p_arr_ [i]);
announce_element (Score_element_info (tie_column_p_, 0));
if (!head (LEFT) && !head (RIGHT))
{
programming_error ("Tie without heads.");
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
+ suicide ();
return;
}
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Tie)
Molecule
Tie::do_brew_molecule () const
{
}
// ugh.!
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Time_signature)
Molecule
Time_signature::do_brew_molecule () const
{
if (i < started_span_p_arr_.size () && started_span_p_arr_[i])
continue;
- Tuplet_spanner* glep = new Tuplet_spanner (SCM_EOL);
+ Tuplet_spanner* glep = new Tuplet_spanner (get_property ("basicTupletSpannerProperties"));
if (i >= started_span_p_arr_.size ())
started_span_p_arr_.push (glep);
else
/*
TODO.
*/
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Tuplet_spanner)
Molecule
Tuplet_spanner::do_brew_molecule () const
{
if (!column_arr.size ())
{
- set_elt_property ("transparent", SCM_BOOL_T);
- set_extent_callback (0, X_AXIS);
- set_extent_callback (0, Y_AXIS);
+ suicide ();
}
Direction d = directional_element (this).get ();
*/
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Volta_spanner)
Molecule
Volta_spanner::do_brew_molecule () const
{
% name, glyph id, c0 position
supportedClefTypes = #'(
- ("treble" . ("G" -2))
- ("violin" . ("G" -2))
- ("G" . ("G" -2))
- ("G2" . ("G" -2))
- ("french" . ("G" -4 ))
- ("soprano" . ("C" -4 ))
- ("mezzosoprano" . ("C" -2 ))
- ("alto" . ("C" 0 ))
- ("tenor" . ("C" 2 ))
- ("baritone" . ("C" 4 ))
- ("varbaritone" . ("F" 0))
- ("bass" . ("F" 2 ))
- ("F" . ( "F" 2))
- ("subbass" . ("F" 4))
- )
- clefPitches = #'(("G" . -4)
- ("C" . 0)
- ("F" . 4))
+ ("treble" . ("clefs-G" -2))
+ ("violin" . ("clefs-G" -2))
+ ("G" . ("clefs-G" -2))
+ ("G2" . ("clefs-G" -2))
+ ("french" . ("clefs-G" -4 ))
+ ("soprano" . ("clefs-C" -4 ))
+ ("mezzosoprano" . ("clefs-C" -2 ))
+ ("alto" . ("clefs-C" 0 ))
+ ("tenor" . ("clefs-C" 2 ))
+ ("baritone" . ("clefs-C" 4 ))
+ ("varbaritone" . ("clefs-F" 0))
+ ("bass" . ("clefs-F" 2 ))
+ ("F" . ( "clefs-F" 2))
+ ("subbass" . ("clefs-F" 4))
+ )
+ % where is c0 in this clef?
+ clefPitches = #'(("clefs-G" . -4)
+ ("clefs-C" . 0)
+ ("clefs-F" . 4))
\consists "Clef_engraver";
\consists "Key_engraver";
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% default settings, mainly for breakable items
+ % in alphabetical order
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ basicBarlineProperties = #`(
+ (break-align-symbol . Staff_bar)
+ (molecule-callback . ,Bar::scheme_molecule)
+ (visibility-lambda . ,begin-of-line-invisible)
+ (breakable . #t)
+ )
+
basicBarNumberProperties = #`(
- (breakable . #t)
- (visibility-lambda . ,begin-of-line-visible)
+ (molecule-callback . ,Text_item::scheme_molecule)
+ (breakable . #t)
+ (visibility-lambda . ,begin-of-line-visible)
)
- basicMarkProperties = #'(
- (breakable . #t)
- (visibility-lambda . end-of-line-invisible)
+
+ basicBeamProperties = #`(
+ (molecule-callback . ,Beam::scheme_molecule)
+ (beam-thickness . 0.42) ; interline!
)
- leftEdgeBasicProperties = #'(
- (break-align-symbol . Left_edge_item)
- (breakable . #t)
+
+ basicBreakAlignProperties = #`(
+ (breakable . #t)
)
- staffSymbolBasicProperties = #'(
- (staff-space . 1.0 )
- (line-count . 5 )
- )
- basicTimeSignatureProperties = #`(
- (break-align-symbol . Time_signature)
- (visibility-lambda . ,all-visible)
- (breakable . #t)
- )
- basicBarlineProperties = #`(
- (break-align-symbol . Staff_bar)
- (visibility-lambda . ,begin-of-line-invisible)
- (breakable . #t)
- )
- basicSystemStartDelimiterProperties = #'(
- (collapse-height . 1.0)
+
+ basicBreathingSignProperties = #`(
+ (break-align-symbol . Breathing_sign)
+ (breakable . #t )
+ (molecule-callback . ,Breathing_sign::scheme_molecule)
+ (visibility-lambda . ,begin-of-line-invisible)
)
- basicKeyProperties = #`(
- (break-align-symbol . Key_item)
- (visibility-lambda . ,begin-of-line-visible)
- (breakable . #t)
- )
basicClefItemProperties = #`(
+ (molecule-callback . ,Score_element::scheme_molecule)
(breakable . #t)
(break-align-symbol . Clef_item)
(visibility-lambda . ,begin-of-line-visible)
)
-
- basicBeamProperties = #`(
- (beam-thickness . 0.42) ; interline!
+ basicSlurProperties = #`(
+ (molecule-callback . ,Slur::scheme_molecule)
)
- basicStemTremoloProperties = #'(
- (beam-width . 4.0) ; interline!
- (beam-thickness . 0.42) ; interline!
+ basicChordNameProperties = #`(
+ (molecule-callback . ,Chord_name::scheme_molecule)
)
-
- basicBreathingSignProperties = #'(
- (break-align-symbol . Breathing_sign)
- (breakable . #t )
- (visibility-lambda . ,begin-of-line-invisible)
+ basicCollisionProperties = #`(
+ (axes 0 1)
)
- basicOctavateEightProperties = #'(
- (self-alignment-X . 0)
- (text . "8")
- (style . "italic")
+ basicCrescendoProperties = #`(
+ (molecule-callback . ,Crescendo::scheme_molecule)
+ )
+ basicDotsProperties = #`(
+ (molecule-callback . ,Dots::scheme_molecule)
)
basicDynamicLineSpannerProperties = #`(
- (transparent . #t)
+
)
basicDynamicTextProperties = # `(
(style . "dynamic")
+ (molecule-callback . ,Text_item::scheme_molecule)
(script-priority . 100)
(self-alignment-Y . 0)
)
+ leftEdgeBasicProperties = #`(
+ (break-align-symbol . Left_edge_item)
+ (breakable . #t)
+ )
+ basicHyphenSpannerProperties = #`(
+ (molecule-callback . ,Hyphen_spanner::scheme_molecule)
+ )
+ basicKeyProperties = #`(
+ (molecule-callback . ,Key_item::scheme_molecule)
+ (break-align-symbol . Key_item)
+ (visibility-lambda . ,begin-of-line-visible)
+ (breakable . #t)
+ )
+ basicLocalKeyProperties = #`(
+ (molecule-callback . ,Local_key_item::scheme_molecule)
+ (left-padding . 0.2)
+ (right-padding . 0.4)
+ )
+ basicLyricExtenderProperties = #`(
+ (molecule-callback . ,Lyric_extender::scheme_molecule)
+ )
basicLyricTextProperties = #`(
(non-rhythmic . #t)
)
- basicRestCollisionProperties = #`(
- (transparent . #t)
+ basicMarkProperties = #`(
+ (molecule-callback . ,Text_item::scheme_molecule)
+ (breakable . #t)
+ (visibility-lambda . ,end-of-line-invisible)
)
- basicCollisionProperties = #`(
- (transparent . #t)
+ basicNoteColumnProperties = #`(
(axes 0 1)
)
- basicSingleMaltGroupingItemProperties = #'(
- (transparent . #t)
+ basicNoteHeadProperties = #`(
+ (molecule-callback . ,Note_head::scheme_molecule)
+ )
+
+ basicOctavateEightProperties = #`(
+ (self-alignment-X . 0)
+ (text . "8")
+ (molecule-callback . ,Text_item::scheme_molecule)
+ (style . "italic")
+ )
+ basicTextProperties = #`( )
+ basicRestProperties = #`(
+ (molecule-callback . ,Rest::scheme_molecule)
+ )
+
+ basicRestCollisionProperties = #`(
+ )
+ basicScriptProperties = #`(
+ (molecule-callback . ,Script::scheme_molecule)
)
- basicBreakAlignProperties = #'(
+
+ basicSlurProperties = #`(
+ (molecule-callback . ,Slur::scheme_molecule)
+ )
+
+ basicSystemStartDelimiterProperties = #`(
+ (molecule-callback . ,System_start_delimiter::scheme_molecule)
+ (collapse-height . 1.0)
+ )
+ basicStemProperties = #`(
+ (molecule-callback . ,Stem::scheme_molecule)
+ )
+ staffSymbolBasicProperties = #`(
+ (molecule-callback . ,Staff_symbol::scheme_molecule)
+ (staff-space . 1.0 )
+ (line-count . 5 )
+ )
+ basicTimeSignatureProperties = #`(
+ (molecule-callback . ,Time_signature::scheme_molecule)
+ (break-align-symbol . Time_signature)
+ (visibility-lambda . ,all-visible)
(breakable . #t)
+ )
+ basicTieProperties = #`(
+ (molecule-callback . ,Tie::scheme_molecule)
+ )
+ basicTieColumnProperties = #`(
+
+ )
+ basicTupletSpannerProperties = #`(
+ (molecule-callback . ,Tuplet_spanner::scheme_molecule)
+ )
+ basicStemTremoloProperties = #`(
+ (molecule-callback . ,Stem_tremolo::scheme_molecule)
+ (beam-width . 4.0) ; interline!
+ (beam-thickness . 0.42) ; interline!
+ )
+
+ basicSingleMaltGroupingItemProperties = #`(
+
)
basicInstrumentNameProperties = #`(
(breakable . #t)
+ (molecule-callback . Text_item::scheme_molecule)
(break-align-symbol . Instrument_name)
(visibility-lambda . ,begin-of-line-visible)
)
- basicLocalKeyProperties = #`(
- (left-padding . 0.2)
- (right-padding . 0.4)
+ basicVerticalAxisGroupProperties = #`(
+ (axes 1)
)
-
+ basicVoltaSpannerProperties = #`(
+ (molecule-callback . ,Volta_spanner::scheme_molecule)
+ )
+
\accepts "Staff";
\accepts "StaffGroup";
\accepts "RhythmicStaff";
Begin3
Title: LilyPond
-Version: 1.3.55
-Entered-date: 26MAY00
+Version: 1.3.56
+Entered-date: 29MAY00
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.55.tar.gz
+ 1000k lilypond-1.3.56.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.55.tar.gz
+ 1000k lilypond-1.3.56.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.55
+Version: 1.3.56
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.55.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.56.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif