where_defined().
* lily/bezier.cc (get_other_coordinate): use curve_coordinate
(curve_coordinate): new function
* flower/include/parray.hh (binsearch): add lo,hi range to arguments.
* lily/simple-spacer.cc (add_columns): only add rods between
column i and begin/end if keep-inside-line is set (this repleces
allow-outside-line as default)
+2005-07-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/context.cc (where_defined): also assign value in
+ where_defined().
+
+ * lily/bezier.cc (get_other_coordinate): use curve_coordinate
+ (curve_coordinate): new function
+
+ * flower/include/parray.hh (binsearch): add lo,hi range to arguments.
+
+ * lily/simple-spacer.cc (add_columns): only add rods between
+ column i and begin/end if keep-inside-line is set (this repleces
+ allow-outside-line as default)
+
2005-07-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/tuplet-engraver.cc (start_translation_timestep): only read
int
binsearch (Array<T> const &arr, T t, int (*compare) (T const &, T const &))
{
- int lo;
- int hi;
int cmp;
int result;
- lo = 0;
- hi = Array<T>::maxkey;
+ int lo = 0;
+ int hi = arr.size ();
/* binary search */
do
template<class T>
int
binsearch_links (Link_array<T> const &arr, T *t,
- int (*compare) (T *const &, T *const &),
- int lo = 0, int hi = -1)
+ int (*compare) (T *const &, T *const &))
{
int cmp;
int result;
- if (hi < 0)
- hi = arr.size ();
+ int lo = 0;
+ int hi = arr.size ();
if (hi == 0)
return -1;
Context *trans = context ()->get_parent_context ();
/* Huh. Don't understand what this is good for. --hwn. */
- while (trans && trans->where_defined (ly_symbol2scm ("localKeySignature")))
+
+ SCM val;
+ while (trans && trans->where_defined (ly_symbol2scm ("localKeySignature"), &val))
{
trans->set_property ("localKeySignature", ly_deep_copy (last_keysig_));
trans = trans->get_parent_context ();
int a = pitch->get_alteration ();
SCM key = scm_cons (scm_int2num (o), scm_int2num (n));
+ SCM localsig = SCM_EOL;
while (origin
- && origin->where_defined (ly_symbol2scm ("localKeySignature")))
+ && origin->where_defined (ly_symbol2scm ("localKeySignature"), &localsig))
{
- /*
- huh? we set props all the way to the top?
- */
- SCM localsig = origin->get_property ("localKeySignature");
bool change = false;
if (accidentals_[i].tied_)
{
"Accidental AccidentalSuggestion",
"",
-
- /* acks */
- "",
"autoAccidentals "
"autoCautionaries "
/* descr */ "",
/* creats*/ "Ambitus AmbitusLine AmbitusNoteHead AmbitusAccidental",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Generate an Arpeggio symbol",
/* creats*/ "Arpeggio",
/* accepts */ "arpeggio-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
"@code{stemRightBeamCount}. ",
/* creats*/ "Beam",
/* accepts */ "beam-forbid-event",
- /* acks */ "",
/* reads */ "autoBeaming autoBeamSettings beatLength subdivideBeams",
/* write */ "");
/* descr */ "Group all objects created in this context in a VerticalAxisGroup spanner.",
/* creats*/ "VerticalAxisGroup",
/* accepts */ "",
- /* acks */ "",
/* reads */ "verticalExtent minimumVerticalExtent extraVerticalExtent",
/* write */ "");
}
Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), e);
- me->add_dependency (e);
}
bool
bool warn = true;
if (to_boolean (sync))
{
- tr = tr->where_defined (ly_symbol2scm ("measurePosition"));
+ SCM mp;
+ tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp);
Moment zero;
tr->set_property ("measurePosition", zero.smobbed_copy ());
}
"@code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point",
/* creats*/ "BarLine",
/* accepts */ "",
- /* acks */ "",
/* reads */ "whichBar",
/* write */ "");
/* creats*/ "BarNumber",
/* accepts */ "",
- /* acks */ "",
/* reads */ "currentBarNumber stavesFound barNumberVisibility",
/* write */ "");
"printed with flags instead of beams.",
/* creats*/ "Beam",
/* accepts */ "beam-event",
- /* acks */ "",
/* reads */ "beamMelismaBusy beatLength subdivideBeams",
/* write */ "");
" are at grace points in time. ",
/* creats*/ "Beam",
/* accepts */ "beam-event",
- /* acks */ "stem-interface rest-interface",
/* reads */ "beamMelismaBusy beatLength allowBeamBreak subdivideBeams",
/* write */ "");
}
ADD_TRANSLATOR (Beam_performer, "", "",
- "beam-event", "", "", "");
+ "beam-event", "", "");
return 0.0;
}
- Offset c = curve_point (ts[0]);
#ifdef PARANOID
+ Offset c = curve_point (ts[0]);
if (fabs (c[a] - x) > 1e-8)
programming_error ("bezier intersection not correct?");
#endif
-
- return c[other];
+
+ return curve_coordinate (ts[0], other);
+}
+
+Real
+Bezier::curve_coordinate (Real t, Axis a) const
+{
+ Real tj = 1;
+ Real one_min_tj[4];
+ one_min_tj[0] = 1;
+ for (int i = 1; i < 4; i++)
+ {
+ one_min_tj[i] = one_min_tj[i-1] * (1-t);
+ }
+
+ Real r = 0.0;
+ for (int j = 0; j < 4; j++)
+ {
+ r += control_[j][a] * binomial_coefficient_3[j]
+ * tj * one_min_tj[3-j];
+
+ tj *= t;
+ }
+
+ return r;
}
Offset
"The left edge of the alignment gets a separate group, with a symbol @code{left-edge}. ",
/* creats*/ "BreakAlignment BreakAlignGroup LeftEdge",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "BreathingSign",
/* accepts */ "breathing-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
"and generate the appropriate chordname.",
/* creats*/ "ChordName",
/* accepts */ "note-event",
- /* acks */ "",
/* reads */ "chordChanges chordNameExceptions chordNameFunction "
"chordNoteNamer chordRootNamer chordNameExceptions majorSevenSymbol",
/* write */ "");
/* descr */ "Generates beams for tremolo repeats.",
/* creats*/ "Beam",
/* accepts */ "repeated-music",
- /* acks */ "",
/* reads */ "",
/* write */ "");
if (to_boolean (force_clef))
{
- Context *w = context ()->where_defined (ly_symbol2scm ("forceClef"));
+ SCM prev;
+ Context *w = context ()->where_defined (ly_symbol2scm ("forceClef"), &prev);
w->set_property ("forceClef", SCM_EOL);
}
}
/* descr */ "Determine and set reference point for pitches",
/* creats*/ "Clef OctavateEight",
/* accepts */ "",
- /* acks */ "",
/* reads */ "clefPosition clefGlyph middleCPosition clefOctavation explicitClefVisibility forceClef",
/* write */ "");
/* descr */ "Engraves a cluster using Spanner notation ",
/* creats*/ "ClusterSpanner ClusterSpannerBeacon",
/* accepts */ "cluster-note-event busy-playing-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
#include "translator.icc"
+ADD_ACKNOWLEDGER(Coherent_ligature_engraver, note_head);
+ADD_ACKNOWLEDGER(Coherent_ligature_engraver, rest);
ADD_TRANSLATOR (Coherent_ligature_engraver,
/* descr */ "This is an abstract class. Subclasses such as Gregorian_ligature_engraver handle ligatures by glueing special ligature heads together.",
/* creats*/ "",
/* accepts */ "ligature-event",
- /* acks */ "note-head-interface rest-interface",
/* reads */ "",
/* write */ "");
/* descr */ "Collect NoteColumns, and as soon as there are two or more, put them in a NoteCollision object.",
/* creats*/ "NoteCollision",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
"break long notes and automatically tie them into the next measure.",
/* creats*/ "NoteHead Dots Tie",
/* accepts */ "busy-playing-event note-event",
- /* acks */ "",
/* reads */ "middleCPosition measurePosition measureLength",
/* write */ "");
execute_pushpop_property (Context *trg,
SCM prop, SCM eltprop, SCM val)
{
+ SCM prev = SCM_EOL;
if (scm_is_symbol (prop) && scm_is_symbol (eltprop))
{
if (val != SCM_UNDEFINED)
{
- SCM prev = SCM_EOL;
- Context *where = trg->where_defined (prop);
+ Context *where = trg->where_defined (prop, &prev);
/*
Don't mess with MIDI.
prev = scm_cons (base, base);
trg->internal_set_property (prop, prev);
}
- else
- prev = trg->internal_get_property (prop);
if (!scm_is_pair (prev))
{
// warning here.
}
}
- else if (trg->where_defined (prop) == trg)
+ else if (trg->where_defined (prop, &prev) == trg)
{
- SCM prev = trg->internal_get_property (prop);
SCM prev_alist = scm_car (prev);
SCM daddy = scm_cdr (prev);
{
assert (scm_is_symbol (sym));
- tg = tg->where_defined (sym);
+ SCM props;
+ tg = tg->where_defined (sym, &props);
if (!tg)
return SCM_EOL;
? updated_grob_properties (tg->get_parent_context (), sym)
: SCM_EOL;
- SCM props = tg->internal_get_property (sym);
-
if (!scm_is_pair (props))
{
programming_error ("grob props not a pair?");
SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
- tr = tr->where_defined (name);
+ SCM val;
+ tr = tr->where_defined (name, &val);
if (tr)
return tr->self_scm ();
PROPERTIES
*/
Context *
-Context::where_defined (SCM sym) const
+Context::where_defined (SCM sym, SCM *value) const
{
- if (properties_dict ()->contains (sym))
+ if (properties_dict ()->try_retrieve (sym, value))
{
return (Context *)this;
}
- return (daddy_context_) ? daddy_context_->where_defined (sym) : 0;
+ return (daddy_context_) ? daddy_context_->where_defined (sym, value) : 0;
}
-//#define PROFILE_PROPERTY_ACCESSES
-
SCM context_property_lookup_table;
LY_DEFINE(ly_context_property_lookup_stats, "ly:context-property-lookup-stats",
0,0,0, (),
SCM
Context::internal_get_property (SCM sym) const
{
-#ifdef PROFILE_PROPERTY_ACCESSES
- extern void note_property_access (SCM *table, SCM sym);
- note_property_access (&context_property_lookup_table, sym);
+#ifndef NDEBUG
+ if (profile_property_accesses)
+ {
+ extern void note_property_access (SCM *table, SCM sym);
+ note_property_access (&context_property_lookup_table, sym);
+ }
#endif
SCM val = SCM_EOL;
return daddy_context_;
}
-Translator_group *
-Context::implementation () const
-{
- return implementation_;
-}
-
void
Context::clear_key_disambiguations ()
{
void
Custos_engraver::acknowledge_bar (Grob_info info)
{
+ (void) info;
custos_permitted_ = true;
}
/* descr */ "",
/* creats*/ "Custos",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
"level as @ref{Timing_translator}. ",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */
"measurePosition automaticBars whichBar barAlways defaultBarType "
"measureLength",
"If omitted, then dots appear on top of the notes.",
/* creats*/ "DotColumn",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Generate noteheads.",
/* creats*/ "NoteHead Dots Script",
/* accepts */ "note-event busy-playing-event",
- /* acks */ "",
/* reads */ "drumStyleTable",
/* write */ "");
ADD_TRANSLATOR (Drum_note_performer,
"Play drum notes.", "",
- "note-event busy-playing-event", "", "", "");
+ "note-event busy-playing-event", "", "");
/* creats*/ "DynamicLineSpanner DynamicText Hairpin TextSpanner",
/* accepts */ "absolute-dynamic-event crescendo-event decrescendo-event",
- /* acks */ "note-column-interface script-interface",
/* reads */ "",
/* write */ "");
/*descr*/ "",
/* creats*/ "",
/* accepts */ "absolute-dynamic-event",
- /* acks */ "",
/*reads */"dynamicAbsoluteVolumeFunction midiMaximumVolume midiMinimumVolume midiInstrument instrumentEqualizer",
/*writes*/"");
/* descr */ "A group of engravers taken together",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Create lyric extenders",
/* creats*/ "LyricExtender",
/* accepts */ "extender-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Make figured bass numbers.",
/* creats*/ "BassFigure",
/* accepts */ "rest-event bass-figure-event",
- /* acks */ "",
/* reads */ "bassFigureFormatFunction",
/* write */ "");
/* descr */ "Create fingering-scripts",
/* creats*/ "Fingering",
/* accepts */ "fingering-event",
- /* acks */ "rhythmic-head-interface stem-interface",
/* reads */ "",
/* write */ "");
/*
We only want to process a grob once.
*/
+ if (!size)
+ return ;
+
if (gi.context () != context ())
- return;
-
- if (size)
- {
- Real font_size = size
- + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
- gi.grob ()->set_property ("font-size", scm_make_real (font_size));
- }
+ return ;
+
+ Real font_size = size
+ + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
+ gi.grob ()->set_property ("font-size", scm_make_real (font_size));
}
#include "translator.icc"
/* descr */ "Puts fontSize into font-relative-size grob property.",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "fontSize",
/* write */ "");
/* descr */ "Forbid line breaks when note heads are still playing at some point.",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "busyGrobs",
/* write */ "");
/* descr */ "Engrave a glissandi",
/* creats*/ "Glissando",
/* accepts */ "glissando-event",
- /* acks */ "",
/* reads */ "followVoice",
/* write */ "");
/* descr */ "Set font size and other properties for grace notes.",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "graceSettings",
/* write */ "");
#include "translator.icc"
+ADD_ACKNOWLEDGER(Gregorian_ligature_engraver, rest);
+ADD_ACKNOWLEDGER(Gregorian_ligature_engraver, note_head);
ADD_TRANSLATOR (Gregorian_ligature_engraver,
/* descr */ "This is an abstract class. Subclasses such as Vaticana_ligature_engraver handle ligatures by glueing special ligature heads together.",
/* creats*/ "",
/* accepts */ "ligature-event",
- /* acks */ "note-head-interface rest-interface",
/* reads */ "",
/* write */ "");
Grid_line_interface::add_grid_point (Grob *me, Grob *b)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), b);
- me->add_dependency (b);
}
ADD_INTERFACE (Grid_line_interface, "grid-line-interface",
"line lines, and draws a single span-line across them.",
/* creats*/ "GridLine",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
#include "item.hh"
#include "moment.hh"
+#include "translator.icc"
+
class Grid_point_engraver : public Engraver
{
public:
{
}
-#include "translator.icc"
ADD_TRANSLATOR (Grid_point_engraver,
/* descr */ "generate grid points.",
/* creats*/ "GridPoint",
/* accepts */ "",
- /* acks */ "",
/* reads */ "gridInterval",
/* write */ "");
/* descr */ "Administrate when certain grobs (eg. note heads) stop playing",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "busyGrobs",
/* write */ "busyGrobs");
#include "item.hh"
#include "misc.hh"
#include "item.hh"
+#include "program-option.hh"
+
SCM
Grob::get_property_alist_chain (SCM def) const
SCM
Grob::internal_get_property (SCM sym) const
{
-#ifdef PROFILE_PROPERTY_ACCESSES
- note_property_access (&grob_property_lookup_table, sym);
+#ifndef NDEBUG
+ if (profile_property_accesses)
+ {
+ note_property_access (&grob_property_lookup_table, sym);
+ }
#endif
SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
if (s->original_)
scm_gc_mark (s->original_->self_scm ());
- if (s->pscore_)
- scm_gc_mark (s->pscore_->self_scm ());
-
s->derived_mark ();
scm_gc_mark (s->object_alist_);
scm_gc_mark (s->interfaces_);
#include "rhythmic-head.hh"
#include "spanner.hh"
+#include "translator.icc"
+
class Hara_kiri_engraver : public Axis_group_engraver
{
protected:
interesting_ = SCM_EOL;
}
-#include "translator.icc"
+
ADD_ACKNOWLEDGER(Hara_kiri_engraver, grob);
ADD_TRANSLATOR (Hara_kiri_engraver,
/* descr */ "Like Axis_group_engraver, but make a hara-kiri spanner, and add "
"interesting items (ie. note heads, lyric syllables and normal rests) ",
/* creats*/ "RemoveEmptyVerticalGroup",
/* accepts */ "",
- /* acks */ "grob-interface",
/* reads */ "keepAliveInterfaces",
/* write */ "");
#include "note-column.hh"
#include "pointer-group-interface.hh"
+#include "translator.icc"
+
class Horizontal_bracket_engraver : public Engraver
{
public:
DECLARE_ACKNOWLEDGER(note_column);
};
-#include "translator.icc"
+
ADD_ACKNOWLEDGER(Horizontal_bracket_engraver,note_column);
ADD_TRANSLATOR (Horizontal_bracket_engraver,
"Create horizontal brackets over notes for musical analysis purposes.",
"HorizontalBracket",
"note-grouping-event",
"",
- "",
"");
Horizontal_bracket_engraver::Horizontal_bracket_engraver ()
/* descr */ "Create lyric hyphens",
/* creats*/ "LyricHyphen",
/* accepts */ "hyphen-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
Interval extent (Axis)const;
Polynomial polynomial (Axis)const;
Offset curve_point (Real t) const;
+ Real curve_coordinate (Real t, Axis) const;
static const int CONTROL_COUNT = 4;
SCM children_contexts () const { return context_list_; }
SCM default_child_context_name () const;
- Translator_group *implementation () const;
+ Translator_group *implementation () const { return implementation_; }
Context *get_parent_context () const;
Context (Object_key const *);
SCM internal_get_property (SCM name_sym) const;
SCM properties_as_alist () const;
void internal_set_property (SCM var_sym, SCM value);
- Context *where_defined (SCM name_sym) const;
+ Context *where_defined (SCM name_sym, SCM *value) const;
void unset_property (SCM var_sym);
Context *remove_context (Context *trans);
extern int testing_level_global;
extern bool lily_1_8_relative;
extern bool lily_1_8_compatibility_used;
+extern bool profile_property_accesses;
SCM ly_get_option (SCM);
SCM ly_set_option (SCM, SCM);
void precomputed_recurse_over_translators (Context *c, Translator_precompute_index idx, Direction dir);
Translator_group *get_translator_group (SCM sym);
-#define ADD_TRANSLATOR_GROUP(classname, desc, grobs, accepted, acked, read, write) \
+#define ADD_TRANSLATOR_GROUP(classname, desc, grobs, accepted, read, write) \
DECLARE_UNSMOB (Translator_group, translator_group);
TRANSLATOR_DECLARATIONS (Translator);
DECLARE_SMOBS (Translator, dummy);
+
protected: // should be private.
Context *daddy_context_;
virtual void derived_mark () const;
} \
ADD_GLOBAL_CTOR (_ ## T ## _adder);
-#define ADD_TRANSLATOR(classname, desc, grobs, accepted, acked, read, write) \
+#define ADD_TRANSLATOR(classname, desc, grobs, accepted, read, write) \
Array<Acknowledge_information> classname::acknowledge_static_array_;\
IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(classname); \
ADD_THIS_TRANSLATOR (classname); \
static_properties = scm_acons (ly_symbol2scm ("description"), \
scm_makfrom0str (desc), static_properties); \
\
- static_properties = scm_acons (ly_symbol2scm ("interfaces-acked"), \
- parse_symbol_list (acked), static_properties); \
static_properties = scm_acons (ly_symbol2scm ("events-accepted"), \
parse_symbol_list (accepted), static_properties); \
\
"at the left of the staff. ",
/* creats*/ "InstrumentName",
/* accepts */ "",
- /* acks */ "bar-line-interface axis-group-interface",
/* reads */ "instrument instr",
/* write */ "");
"at the left of the staff. ",
/* creats*/ "VocalName",
/* accepts */ "",
- /* acks */ "",
/* reads */ "vocNam vocalName",
/* write */ "");
/* descr */ "",
/* creats*/ "KeySignature",
/* accepts */ "key-change-event",
- /* acks */ "",
/* reads */ "keySignature printKeyCancellation lastKeySignature explicitKeySignatureVisibility createKeyOnClefChange keyAccidentalOrder keySignature",
/* write */ "lastKeySignature tonic keySignature");
ADD_TRANSLATOR (Key_performer,
"", "",
"key-change-event",
- "", "", "");
+ "", "");
"Creates the spanner to draw ledger lines, and notices objects that need ledger lines",
/* creats*/ "LedgerLineSpanner",
/* accepts */ "",
- /* acks */ "", // ledgered-interface?
/* reads */ "",
/* write */ "")
/* descr */ "Handles Ligature_events by engraving Ligature brackets.",
/* creats*/ "TupletBracket",
/* accepts */ "ligature-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Abstract class; a concrete subclass handles Ligature_events by engraving Ligatures in a concrete style.",
/* creats */ "",
/* accepts */ "ligature-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "LyricText",
/* accepts */ "lyric-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
#include "translator.icc"
-ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event", "", "", "");
+ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event",
+ "", "");
"end up on the same Y-location",
/* creats*/ "RehearsalMark",
/* accepts */ "mark-event",
- /* acks */ "",
/* reads */ "rehearsalMark markFormatter stavesFound",
/* write */ "");
/* descr */ "Creates MeasureGrouping to indicate beat subdivision.",
/* creats*/ "MeasureGrouping",
/* accepts */ "",
- /* acks */ "",
/* reads */ "beatGrouping beatLength measurePosition currentMusicalColumn",
/* write */ "");
/* descr */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ",
/* creats*/ "",
/* accepts */ "melisma-playing-event melisma-span-event",
- /* acks */ "",
/* reads */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",
/* write */ "");
#include "translator.icc"
+ADD_ACKNOWLEDGER(Mensural_ligature_engraver, rest);
+ADD_ACKNOWLEDGER(Mensural_ligature_engraver, note_head);
ADD_TRANSLATOR (Mensural_ligature_engraver,
/* descr */ "Handles Mensural_ligature_events by glueing special ligature heads together.",
/* creats*/ "MensuralLigature",
/* accepts */ "ligature-event",
- /* acks */ "note-head-interface rest-interface",
/* reads */ "",
/* write */ "");
"which is maintained by @code{@ref{Staff_collecting_engraver}}. ",
/* creats*/ "MetronomeMark",
/* accepts */ "metronome-change-event",
- /* acks */ "",
/* reads */ "stavesFound metronomeMarkFormatter",
/* write */ "");
"should use a whole rest or a breve rest to represent 1 measure ",
/* creats*/ "MultiMeasureRest MultiMeasureRestNumber MultiMeasureRestText",
/* accepts */ "multi-measure-rest-event multi-measure-text-event",
- /* acks */ "",
/* reads */ "currentBarNumber restNumberThreshold breakableSeparationItem currentCommandColumn measurePosition measureLength",
/* write */ "");
{
Music *mus = (Music *) SCM_CELL_WORD_1 (m);
scm_gc_mark (mus->immutable_property_alist_);
- scm_gc_mark (mus->mutable_property_alist_);
- return SCM_EOL;
+ return mus->mutable_property_alist_;
}
Moment
"also takes care of articulations and harmonic note heads",
/* creats*/ "Fingering",
/* accepts */ "",
- /* acks */ "rhythmic-head-interface stem-interface",
/* reads */ "fingeringOrientations",
/* write */ "");
" followVoice is set, staff switches also generate a line.",
/* creats*/ "Glissando VoiceFollower",
/* accepts */ "glissando-event",
- /* acks */ "",
/* reads */ "followVoice",
/* write */ "");
/* descr */ "Generate noteheads.",
/* creats*/ "NoteHead Dots",
/* accepts */ "note-event busy-playing-event",
- /* acks */ "",
/* reads */ "middleCPosition",
/* write */ "");
/* descr */ "",
/* creats*/ "NoteName",
/* accepts */ "note-event",
- /* acks */ "",
/* reads */ "printOctaveNames",
/* write */ "");
#include "translator.icc"
ADD_TRANSLATOR (Note_performer, "", "",
- "note-event busy-playing-event", "", "", "");
+ "note-event busy-playing-event",
+ "", "");
Note_performer::Note_performer ()
{
/* descr */ "Create a text spanner when the ottavation property changes..",
/* creats*/ "OttavaBracket",
/* accepts */ "",
- /* acks */ "",
/* reads */ "ottavation",
/* write */ "");
" to any Graphic objects that satisfies the predicate.",
/* creats*/ "",
/* accepts */ "layout-instruction",
-/* acks */ "",
/* reads */ "",
/* write */ "");
"that there are no beams or notes that prevent a breakpoint.) ",
/* creats*/ "PaperColumn NonMusicalPaperColumn",
/* accepts */ "break-event",
- /* acks */ "",
/* reads */ "",
/* write */ "currentCommandColumn currentMusicalColumn");
"Print markings a2, Solo, Solo II, and unisono ",
/* creats*/ "CombineTextScript",
/* accepts */ "part-combine-event",
- /* acks */ "",
/* reads */ "printPartCombineTexts soloText soloIIText "
"aDueText",
/* write */ "");
/* descr */ "Make whole bar and double bar repeats.",
/* creats*/ "PercentRepeat DoublePercentRepeat",
/* accepts */ "repeated-music",
- /* acks */ "",
/* reads */ "measureLength currentCommandColumn",
/* write */ "");
/* descr */ "",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Print phrasing slurs. Similar to @ref{Slur_engraver}",
/* creats*/ "PhrasingSlur",
/* accepts */ "phrasing-slur-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Engrave piano pedal symbols and brackets.",
/* creats*/ "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
/* accepts */ "pedal-event",
- /* acks */ "",
/* reads */ "currentCommandColumn "
"pedalSostenutoStrings pedalSustainStrings "
"pedalUnaCordaStrings pedalSostenutoStyle "
ADD_TRANSLATOR (Piano_pedal_performer, "", "",
"pedal-event",
- "", "", "");
+ "", "");
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "squashedPosition",
/* write */ "");
/* descr */ "Print the bracketed notehead after a notehead with trill.",
/* creats*/ "TrillPitchHead TrillPitchAccidental TrillPitchGroup",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
*/
bool lily_1_8_relative = false;
bool lily_1_8_compatibility_used = false;
-
+bool profile_property_accesses = false;
/*
crash if internally the wrong type is used for a grob property.
*/
void internal_set_option (SCM var, SCM val)
{
scm_hashq_set_x (option_hash_, var, val);
-
- if (var == ly_symbol2scm ("midi-debug"))
+
+ if (0)
+ ;
+ else if (var == ly_symbol2scm ("profile-property-accesses"))
+ {
+ profile_property_accesses = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("midi-debug"))
{
do_midi_debugging_global = to_boolean (val);
val = scm_from_bool (to_boolean (val));
"in @code{recordEventSequence} when finished.",
"",
"",
- "",
"recordEventSequence",
"");
void
Repeat_acknowledge_engraver::start_translation_timestep ()
{
- Context *tr = context ()->where_defined (ly_symbol2scm ("repeatCommands"));
+ SCM rc;
+ Context *tr = context ()->where_defined (ly_symbol2scm ("repeatCommands"), &rc);
if (!tr)
tr = context ();
"repeatCommands ainto an appropriate setting for whichBar.",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "repeatCommands whichBar",
/* write */ "");
/* descr */ "Handles collisions of rests.",
/* creats*/ "RestCollision",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "Rest Dots",
/* accepts */ "rest-event",
- /* acks */ "",
/* reads */ "middleCPosition",
/* write */ "");
/* descr */ "Generates NoteColumn, an objects that groups stems, noteheads and rests.",
/* creats*/ "NoteColumn NoteSpacing",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
"that there are no beams or notes that prevent a breakpoint.) ",
/* creats*/ "System PaperColumn NonMusicalPaperColumn",
/* accepts */ "break-event",
- /* acks */ "note-spacing-interface staff-spacing-interface axis-group-interface",
/* reads */ "currentMusicalColumn currentCommandColumn verticallySpacedContexts",
/* write */ "");
/* descr */ "",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "ScriptColumn",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Handles note scripted articulations.",
/* creats*/ "Script",
/* accepts */ "script-event articulation-event",
- /* acks */ "",
/* reads */ "scriptDefinitions",
/* write */ "");
/* descr */ "Generates objects for computing spacing parameters.",
/* creats*/ "SeparationItem SeparatingGroupSpanner StaffSpacing",
/* accepts */ "",
- /* acks */ "",
/* reads */ "createSpacing",
/* write */ "breakableSeparationItem");
{
assert (i);
Pointer_group_interface::add_grob (s, ly_symbol2scm ("elements"), i);
- s->add_dependency (i);
}
void
scm_is_pair (s); s = scm_cdr (s))
{
Grob *other = unsmob_grob (scm_caar (s));
- int oi = binsearch_links (cols, other, &compare_paper_column_rank);
- if (oi >= 0
- && cols[oi] == other)
+ int j = binsearch_links (cols, other, &compare_paper_column_rank);
+ if (j >= 0 && cols[j] == other)
{
- spacer_->add_rod (i, oi, scm_to_double (scm_cdar (s)));
+ spacer_->add_rod (i, j, scm_to_double (scm_cdar (s)));
}
}
if (i
- && !to_boolean (cols[i]->get_property ("allow-outside-line")))
+ && to_boolean (cols[i]->get_property ("keep-inside-line")))
{
Interval e = cols[i]->extent (cols[i], X_AXIS);
if (!e.is_empty ())
/* descr */ "Make beat repeats.",
/* creats*/ "RepeatSlash",
/* accepts */ "repeated-music",
- /* acks */ "",
/* reads */ "measureLength",
/* write */ "");
/* descr */ "Build slurs grobs from slur events",
/* creats*/ "Slur",
/* accepts */ "slur-event",
- /* acks */ "",
/* reads */ "slurMelismaBusy doubleSlurs",
/* write */ "");
#include "translator.icc"
-ADD_TRANSLATOR (Slur_performer, "", "",
- "slur-event", "", "", "");
+ADD_TRANSLATOR (Slur_performer,
+ "", "",
+ "slur-event",
+ "", "");
#include "spring.hh"
#include "pointer-group-interface.hh"
#include "grob.hh"
+#include "paper-column.hh"
SCM
Spaceable_grob::get_minimum_distances (Grob *me)
}
}
+ if (Paper_column::get_rank (p) < Paper_column::get_rank (me))
+ {
+ programming_error ("Adding reverse rod");
+ }
+
mins = scm_cons (scm_cons (p->self_scm (), newdist), mins);
me->set_object ("minimum-distances", mins);
}
ADD_INTERFACE (Spaceable_grob, "spaceable-grob-interface",
"A layout object that takes part in the spacing problem. ",
"measure-length spacing-wishes penalty minimum-distances ideal-distances "
- "allow-outside-line left-neighbors right-neighbors");
+ "keep-inside-line left-neighbors right-neighbors");
/* descr */ "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes ",
/* creats*/ "SpacingSpanner",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "Arpeggio",
/* accepts */ "",
- /* acks */ "",
/* reads */ "connectArpeggios",
/* write */ "");
"bar lines, and draws a single span-bar across them.",
/* creats*/ "SpanBar",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
ADD_TRANSLATOR (Span_dynamic_performer,
"", "",
"crescendo-event decrescendo-event",
- "", "", "");
+ "", "");
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "stavesFound",
/* write */ "stavesFound");
ADD_TRANSLATOR (Staff_performer, "", "",
"",
- "", "", "");
+ "", "");
Staff_performer::Staff_performer ()
{
"staff lines.",
/* creats*/ "StaffSymbol",
/* accepts */ "staff-span-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "StanzaNumber",
/* accepts */ "",
- /* acks */ "",
/* reads */ "stanza",
/* write */ "");
"the beam engraver for overriding beaming.",
/* creats*/ "Stem StemTremolo",
/* accepts */ "tremolo-event",
- /* acks */ "",
/* reads */ "tremoloFlags stemLeftBeamCount stemRightBeamCount",
/* write */ "");
/* creats*/ "",
/* accepts */ "string-number-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
"this is to prevent spurious \"event junked\" warnings.",
/* creats*/ "",
/* accepts */ "general-music",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "",
/* accepts */ "general-music",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Creates a system start delimiter (ie. SystemStart@{Bar, Brace, Bracket@} spanner",
/* creats*/ "SystemStartBar SystemStartBrace SystemStartBracket",
/* accepts */ "",
- /* acks */ "",
/* reads */ "systemStartDelimiter",
/* write */ "");
ptr ++;
}
}
+
+ if (pscore_)
+ scm_gc_mark (pscore_->self_scm ());
+
Spanner::derived_mark ();
}
/* descr */ "Generate one or more tablature noteheads from Music of type NoteEvent.",
/* creats*/ "TabNoteHead Dots",
/* accepts */ "note-event string-number-event busy-playing-event",
- /* acks */ "",
/* reads */ "middleCPosition stringTunings minimumFret tablatureFormat highStringOne stringOneTopmost",
/* write */ "");
"staff lines.",
/* creats*/ "StaffSymbol",
/* accepts */ "staff-span-event",
- /* acks */ "",
/* reads */ "stringTunings",
/* write */ "");
ADD_TRANSLATOR (Tempo_performer, "", "",
"metronome-change-event",
- "", "", "");
+ "", "");
/* descr */ "Create text-scripts",
/* creats*/ "TextScript",
/* accepts */ "text-script-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Create text spanner from a Music.",
/* creats*/ "TextSpanner",
/* accepts */ "text-span-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Generate ties between noteheads of equal pitch.",
/* creats*/ "Tie TieColumn",
/* accepts */ "tie-event",
- /* acks */ "",
/* reads */ "tieMelismaBusy",
/* write */ "");
/* descr */ "Generate ties between noteheads of equal pitch.",
/* creats*/ "",
/* accepts */ "tie-event",
- /* acks */ "",
/* reads */ "tieMelismaBusy",
/* write */ "");
/* descr */ "Create a TimeSignature whenever @code{timeSignatureFraction} changes",
/* creats*/ "TimeSignature",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
#include "translator.icc"
-ADD_TRANSLATOR (Time_signature_performer, "", "", "", "", "", "");
+ADD_TRANSLATOR (Time_signature_performer, "", "", "", "", "");
,
- "", "", "", "", "");
+ "", "", "", "");
/* descr */ "Create trill spanner from a Music.",
/* creats*/ "TrillSpanner",
/* accepts */ "trill-span-event",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "Catch Time_scaled_music and generate appropriate bracket ",
/* creats*/ "TupletBracket",
/* accepts */ "time-scaled-music",
- /* acks */ "",
/* reads */ "tupletNumberFormatFunction tupletSpannerDuration",
/* write */ "");
"",
"skip-event",
"",
- "",
"");
Rest_swallow_translator::Rest_swallow_translator (){}
"",
"rest-event",
"",
- "",
-
"");
class Note_swallow_translator : public Translator
"",
"note-event",
"",
- "",
+
"");
#endif
}
+ADD_ACKNOWLEDGER(Vaticana_ligature_engraver, rest);
+ADD_ACKNOWLEDGER(Vaticana_ligature_engraver, note_head);
ADD_TRANSLATOR (Vaticana_ligature_engraver,
/* descr */ "Handles ligatures by glueing special ligature heads together.",
/* creats*/ "VaticanaLigature",
/* accepts */ "ligature-event",
- /* acks */ "note-head-interface rest-interface",
/* reads */ "",
/* write */ "");
"them vertically.",
/* creats*/ "VerticalAlignment",
/* accepts */ "",
- /* acks */ "",
/* reads */ "",
/* write */ "");
/* descr */ "",
/* creats*/ "",
/* accepts */ "",
- /* acks */ "",
/* reads */ "verticallySpacedContexts",
/* write */ "verticallySpacedContexts");
/* descr */ "Make volta brackets.",
/* creats*/ "VoltaBracket",
/* accepts */ "",
- /* acks */ "",
/* reads */ "repeatCommands voltaSpannerDuration stavesFound",
/* write */ "");
Volta_repeat_iterator::add_repeat_command (SCM what)
{
SCM reps = ly_symbol2scm ("repeatCommands");
- SCM current_reps = get_outlet ()->internal_get_property (reps);
+ SCM current_reps = SCM_EOL;
+ Context *where = get_outlet ()->where_defined (reps, ¤t_reps);
- Context *where = get_outlet ()->where_defined (reps);
if (where
&& current_reps == SCM_EOL || scm_is_pair (current_reps))
{
(inspect-quants ,number-pair? "If debugging is set,
set beam quant to this position, and print the respective scores.")
- (allow-outside-line ,boolean? "If set, allow this column to
+ (keep-inside-line ,boolean? "If set, this column cannot have
things sticking into the margin.")
(kern ,ly:dimension? "Amount of extra white space to add. For
bar line, this is the amount of space after a thick line.")
(parse-protect #t "continue when finding errors in inline
scheme are caught in the parser. If off, halt
on errors, and print a stack trace.")
+ (profile-property-accesses #f "keep statistics of get_property() calls.")
(old-relative #f
"relative for simultaneous music works
similar to chord syntax")