/* read */
"keySignature "
"middleCClefPosition "
- "middleCOffset ",
+ "middleCOffset ",
/* write */
""
else if (str == "'")
m = tick_bar_line (me, extent.at (UP), rounded);
else if (str == "kievan")
- m.add_stencil (Font_interface::get_default_font (me)->find_by_name("scripts.barline.kievan"));
+ m.add_stencil (Font_interface::get_default_font (me)->find_by_name ("scripts.barline.kievan"));
return m;
}
}
Beam_rhythmic_element::Beam_rhythmic_element (Moment m, int i, bool inv,
- Rational factor, bool tuplet_start)
+ Rational factor, bool tuplet_start)
{
start_moment_ = m;
rhythmic_importance_ = 0;
*tuplet_start_moment = Moment (-1, 1);
}
-
/*
Get the group start position, the next group starting position, and the
next beat starting position, given start_moment, base_moment,
// We use 1/8 as the base moment for the tuplet because it's
// the largest beamed value. If the tuplet is shorter, it's
// OK, the code still works
- int test_count = ( Moment (Rational (1, 8) / factor ) / base_moment).num ();
+ int test_count = ( Moment (Rational (1, 8) / factor) / base_moment).num ();
if (test_count > group_count) group_count = test_count;
}
*group_pos = *next_group_pos;
// the fraction of the tuplet, instead of the fraction of
// a beat.
Moment ratio = (tuplet_number == 1)
- ? dt / options.base_moment_
- : tuplet_dt / Moment (1, 8) / tuplet_moment;
+ ? dt / options.base_moment_
+ : tuplet_dt / Moment (1, 8) / tuplet_moment;
if (infos_[i].rhythmic_importance_ >= 0)
infos_[i].rhythmic_importance_ = (int) ratio.den ();
0);
return infos_.at (i).start_moment_
- + infos_.at(i).factor_ * dur.get_length ();
+ + infos_.at (i).factor_ * dur.get_length ();
}
bool
|| ly_symbol2scm ("push") == tag
|| ly_symbol2scm ("assign") == tag
|| ly_symbol2scm ("unset") == tag
- || ly_symbol2scm ("apply") == tag)
+ || ly_symbol2scm ("apply") == tag)
property_ops_ = scm_cons (mod, property_ops_);
else if (ly_symbol2scm ("alias") == tag)
context_aliases_ = scm_cons (sym, context_aliases_);
l1 = scm_cons (arg, l1);
else if (ly_symbol2scm ("remove") == tag
&& (scm_is_pair (arg)
- || ly_is_procedure (arg)
- || get_translator (arg)))
+ || ly_is_procedure (arg)
+ || get_translator (arg)))
l1 = scm_delete_x (arg, l1);
}
}
LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup",
- 2, 1, 0, (SCM def, SCM sym, SCM val),
+ 2, 1, 0, (SCM def, SCM sym, SCM val),
"Return the value of @var{sym} in output definition @var{def}"
" (e.g., @code{\\paper}). If no value is found, return"
" @var{val} or @code{'()} if @var{val} is undefined.")
}
LY_DEFINE (ly_context_def_modify, "ly:context-def-modify",
- 2, 0, 0, (SCM def, SCM mod),
- "Return the result of applying the context-mod @var{mod} to"
- " the context definition @var{def}. Does not change @var{def}.")
+ 2, 0, 0, (SCM def, SCM mod),
+ "Return the result of applying the context-mod @var{mod} to"
+ " the context definition @var{def}. Does not change @var{def}.")
{
LY_ASSERT_SMOB (Context_def, def, 1);
LY_ASSERT_SMOB (Context_mod, mod, 2);
SCM type = scm_car (entry);
entry = scm_cdr (entry);
if (!scm_is_pair (entry))
- continue;
+ continue;
SCM context_prop = scm_car (entry);
- if (scm_is_pair (context_prop)) {
- if (tg->is_alias (scm_car (context_prop)))
- context_prop = scm_cdr (context_prop);
- else
- continue;
- }
+ if (scm_is_pair (context_prop))
+ {
+ if (tg->is_alias (scm_car (context_prop)))
+ context_prop = scm_cdr (context_prop);
+ else
+ continue;
+ }
if (type == ly_symbol2scm ("push"))
{
else if (type == ly_symbol2scm ("assign"))
tg->set_property (context_prop, scm_cadr (entry));
else if (type == ly_symbol2scm ("apply"))
- scm_apply_1 (context_prop, tg->self_scm (), scm_cdr (entry));
+ scm_apply_1 (context_prop, tg->self_scm (), scm_cdr (entry));
}
}
return unsmob_context_def (definition_)->path_to_acceptable_context (name,
get_output_def (),
- scm_reverse_x (accepts, SCM_EOL));
+ scm_reverse_x (accepts, SCM_EOL));
}
Dispatcher *me = (Dispatcher *) SCM_CELL_WORD_1 (s);
scm_puts ("#<Dispatcher ", p);
scm_write (scm_call_1 (ly_lily_module_constant ("hash-table->alist"),
- me->listeners_), p);
+ me->listeners_), p);
scm_puts (">", p);
return 1;
}
class Interval_minefield
{
-public :
+public:
Interval_minefield (Interval, Real);
void add_forbidden_interval (Interval forbidden);
Interval feasible_placements ();
void solve ();
-private :
+private:
vector<Interval> forbidden_intervals_;
Interval feasible_placements_;
Real bulk_;
};
-#endif // INTERVAL_MINEFIELD_HH
\ No newline at end of file
+#endif // INTERVAL_MINEFIELD_HH
int scan_scm_id (SCM);
int identifier_type (SCM);
char escaped_char (char) const;
- const char * YYText_utf8 ();
+ const char *YYText_utf8 ();
Lily_parser *parser_;
Keyword_table *keytable_;
void listen (SCM ev) const;
bool operator == (Listener const &other) const
- { return type_ == other.type_
- && (*type_->equal_callback)((void *) target_, (void *) other.target_ );
+ {
+ return type_ == other.type_
+ && (*type_->equal_callback) ((void *) target_, (void *) other.target_);
}
DECLARE_SIMPLE_SMOBS (Listener);
inline void name (SCM); \
static void name ## _callback (void *self, SCM ev); \
static void name ## _mark (void *self); \
- static bool name ## _is_equal (void *a, void *b); \
+ static bool name ## _is_equal (void *a, void *b); \
Listener name ## _listener () const
#endif /* LISTENER_HH */
Paper_score *paper_score () const;
Grob *get_vertical_alignment ();
Grob *get_extremal_staff (Direction dir, Interval const &);
- Grob * get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds);
+ Grob *get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds);
Grob *get_pure_bound (Direction dir, int start, int end);
Grob *get_maybe_pure_bound (Direction dir, bool pure, int start, int end);
int get_rank () const;
return feasible_placements_;
}
- /*
- forbidden_intervals_ contains a vector of intervals in which
- the beam cannot start. it iterates through these intervals,
- pushing feasible_placements_ epsilon over or epsilon under a
- collision. when this type of change happens, the loop is marked
- as "dirty" and re-iterated.
+/*
+ forbidden_intervals_ contains a vector of intervals in which
+ the beam cannot start. it iterates through these intervals,
+ pushing feasible_placements_ epsilon over or epsilon under a
+ collision. when this type of change happens, the loop is marked
+ as "dirty" and re-iterated.
- TODO: figure out a faster ways that this loop can happen via
- a better search algorithm.
- */
+ TODO: figure out a faster ways that this loop can happen via
+ a better search algorithm.
+*/
void
-Interval_minefield::solve()
+Interval_minefield::solve ()
{
Real epsilon = 1.0e-10;
bool dirty = false;
|| feasible_widened.contains (forbidden_intervals_[i][d])
|| feasible_widened.contains (forbidden_intervals_[i][-d]))
{
- feasible_placements_[d] = forbidden_intervals_[i][d] + d * (epsilon + (bulk_ / 2));
+ feasible_placements_[d] = forbidden_intervals_[i][d] + d * (epsilon + (bulk_ / 2));
dirty = true;
}
}
Stencil
Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve, Real thickness)
{
- SCM commands = scm_list_n (ly_symbol2scm ("moveto"),
- scm_from_double (top_curve.control_[0][X_AXIS]),
- scm_from_double (top_curve.control_[0][Y_AXIS]),
- ly_symbol2scm ("curveto"),
- scm_from_double (top_curve.control_[1][X_AXIS]),
- scm_from_double (top_curve.control_[1][Y_AXIS]),
- scm_from_double (top_curve.control_[2][X_AXIS]),
- scm_from_double (top_curve.control_[2][Y_AXIS]),
- scm_from_double (top_curve.control_[3][X_AXIS]),
- scm_from_double (top_curve.control_[3][Y_AXIS]),
- ly_symbol2scm ("curveto"),
- scm_from_double (bottom_curve.control_[2][X_AXIS]),
- scm_from_double (bottom_curve.control_[2][Y_AXIS]),
- scm_from_double (bottom_curve.control_[1][X_AXIS]),
- scm_from_double (bottom_curve.control_[1][Y_AXIS]),
- scm_from_double (bottom_curve.control_[0][X_AXIS]),
- scm_from_double (bottom_curve.control_[0][Y_AXIS]),
- ly_symbol2scm ("closepath"),
- SCM_UNDEFINED);
+ SCM commands = scm_list_n (ly_symbol2scm ("moveto"),
+ scm_from_double (top_curve.control_[0][X_AXIS]),
+ scm_from_double (top_curve.control_[0][Y_AXIS]),
+ ly_symbol2scm ("curveto"),
+ scm_from_double (top_curve.control_[1][X_AXIS]),
+ scm_from_double (top_curve.control_[1][Y_AXIS]),
+ scm_from_double (top_curve.control_[2][X_AXIS]),
+ scm_from_double (top_curve.control_[2][Y_AXIS]),
+ scm_from_double (top_curve.control_[3][X_AXIS]),
+ scm_from_double (top_curve.control_[3][Y_AXIS]),
+ ly_symbol2scm ("curveto"),
+ scm_from_double (bottom_curve.control_[2][X_AXIS]),
+ scm_from_double (bottom_curve.control_[2][Y_AXIS]),
+ scm_from_double (bottom_curve.control_[1][X_AXIS]),
+ scm_from_double (bottom_curve.control_[1][Y_AXIS]),
+ scm_from_double (bottom_curve.control_[0][X_AXIS]),
+ scm_from_double (bottom_curve.control_[0][Y_AXIS]),
+ ly_symbol2scm ("closepath"),
+ SCM_UNDEFINED);
SCM horizontal_bend = scm_list_n (ly_symbol2scm ("path"),
scm_from_double (thickness),
if (measure_count == 1)
{
if (mdl == 0 && me->get_property ("staff-position") == SCM_EOL)
- {
- if (Staff_symbol_referencer::on_staff_line (me, 2))
- me->set_property ("staff-position", scm_from_int (2));
- else if (Staff_symbol_referencer::on_staff_line (me, 3))
- me->set_property ("staff-position", scm_from_int (3));
- }
+ {
+ if (Staff_symbol_referencer::on_staff_line (me, 2))
+ me->set_property ("staff-position", scm_from_int (2));
+ else if (Staff_symbol_referencer::on_staff_line (me, 3))
+ me->set_property ("staff-position", scm_from_int (3));
+ }
Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true));
Music *me = unsmob_music (m);
Duration *d = unsmob_duration (me->get_property ("duration"));
// Preset duration is used in chord repetitions.
- if (d) {
- Moment mom = d->get_length ();
- return mom.smobbed_copy ();
- }
+ if (d)
+ {
+ Moment mom = d->get_length ();
+ return mom.smobbed_copy ();
+ }
return maximum_length (me->get_property ("elements")).smobbed_copy ();
}
void
New_fingering_engraver::acknowledge_inline_accidental (Grob_info inf)
{
- accidentals_.push_back(inf.grob ());
+ accidentals_.push_back (inf.grob ());
}
void
else if (ev->in_event_class ("script-event"))
add_script (inf.grob (), ev, note_ev);
else if (ev->in_event_class ("string-number-event"))
- {
+ {
// String numbers are used in calculating harmonics even
// when we don't want them displayed. So don't make space
// for them if 'stencil is #f
Grob *g = make_item ("StringNumber", ev->self_scm ());
if (g->get_property ("stencil") != SCM_BOOL_F)
add_fingering (inf.grob (),
- ly_symbol2scm ("StringNumber"), &string_numbers_,
- ev, note_ev);
+ ly_symbol2scm ("StringNumber"), &string_numbers_,
+ ev, note_ev);
g->suicide (); // Kill grob created to check stencil
}
else if (ev->in_event_class ("stroke-finger-event"))
extract_grob_set (stem, "note-heads", heads);
for (vsize i = 0; i < heads.size (); i++)
unsmob_grob (heads[i]->get_object ("dot"))
- ->set_property ("direction", scm_from_int (dir));
+ ->set_property ("direction", scm_from_int (dir));
}
}
if (!s)
{
programming_error ("Your numbering function needs to return a stencil.");
- footnote_number_markups.push_back (SCM_EOL);
+ footnote_number_markups.push_back (SCM_EOL);
footnote_number_stencils.push_back (Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL));
}
else
- {
- footnote_number_markups.push_back (markup);
- footnote_number_stencils.push_back (*s);
- }
+ {
+ footnote_number_markups.push_back (markup);
+ footnote_number_stencils.push_back (*s);
+ }
counter++;
}
{
in_text_numbers = scm_cons (footnote_number_markups[i], in_text_numbers);
footnote_number_stencils[i].translate_axis ((max_length
- - footnote_number_stencils[i].extent (X_AXIS).length ()),
- X_AXIS);
+ - footnote_number_stencils[i].extent (X_AXIS).length ()),
+ X_AXIS);
numbers = scm_cons (footnote_number_stencils[i].smobbed_copy (), numbers);
}
Stencil annotation = *unsmob_stencil (scm_car (numbers));
annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
- + number_raise
- - annotation.extent (Y_AXIS)[UP]),
- Y_AXIS);
+ + number_raise
+ - annotation.extent (Y_AXIS)[UP]),
+ Y_AXIS);
footnote_stencil.add_at_edge (X_AXIS, LEFT, annotation, 0.0);
numbers = scm_cdr (numbers);
in_text_numbers = scm_cdr (in_text_numbers);
if (!unsmob_stencil (in_text_stencil))
in_text_stencil = SCM_EOL;
annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
- + number_raise
- - annotation.extent (Y_AXIS)[UP]),
- Y_AXIS);
+ + number_raise
+ - annotation.extent (Y_AXIS)[UP]),
+ Y_AXIS);
footnote_stencil.add_at_edge (X_AXIS, LEFT, annotation, 0.0);
numbers = scm_cdr (numbers);
in_text_numbers = scm_cdr (in_text_numbers);
SCM system_list = SCM_EOL;
for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
- system_list = scm_cons (pbookpart->systems (), system_list);
+ system_list = scm_cons (pbookpart->systems (), system_list);
systems_ = scm_append (scm_reverse_x (system_list, SCM_EOL));
}
else
LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 1, 0, (SCM port),
"Print @code{ly:set-option} usage. Optional @var{port} argument"
- "for the destination defaults to current output port.")
+ "for the destination defaults to current output port.")
{
SCM str = scm_from_locale_string (get_help_string ().c_str ());
scm_write_line (str, port);
Pitch diff = pitch_interval (qp, mp);
ev = ev->clone ();
- ev->make_transposable ();
+ ev->make_transposable ();
transpose_mutable (ev->get_property_alist (true), diff);
transposed_musics_ = scm_cons (ev->unprotect (), transposed_musics_);
if (position_override)
{
- amount =
- robust_scm2double (me->get_property ("staff-position"), 0) * 0.5 * ss;
+ amount
+ = robust_scm2double (me->get_property ("staff-position"), 0) * 0.5 * ss;
/*
semibreve rests are positioned one staff line off
/*
make sure rest is aligned to a staff line
*/
- if (Grob *staff = Staff_symbol_referencer::get_staff_symbol(me))
+ if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (me))
{
std::vector<Real> linepos = Staff_symbol::line_positions (staff);
- std::sort(linepos.begin(), linepos.end());
+ std::sort (linepos.begin (), linepos.end ());
std::vector<Real>::const_iterator it
- = std::lower_bound(linepos.begin(), linepos.end(), pos);
- if (it != linepos.end())
+ = std::lower_bound (linepos.begin (), linepos.end (), pos);
+ if (it != linepos.end ())
{
- pos = (int)ceil(*it);
+ pos = (int)ceil (*it);
}
}
*/
if (-1 <= durlog && durlog <= 1)
is_ledgered = !Staff_symbol_referencer::on_staff_line (me, pos)
- && !(durlog == -1
- && Staff_symbol_referencer::on_staff_line (me, pos + 2));
+ && !(durlog == -1
+ && Staff_symbol_referencer::on_staff_line (me, pos + 2));
}
string actual_style (style.c_str ());
Context *c = get_outlet ();
Stream_event *ev = get_music ()->to_event ();
SCM arts = ev->get_property ("articulations");
-
+
if (scm_is_pair (arts))
- {
- // There is no point in broadcasting articulations like
- // harmonic events that nobody listens to. Those work
- // exclusively as articulations.
- SCM listened = SCM_EOL;
- SCM unlistened = SCM_EOL;
- for (; scm_is_pair (arts); arts = scm_cdr (arts))
- {
- if (scm_is_true
- (scm_call_2
- (ly_lily_module_constant ("any"),
- ly_lily_module_constant ("ly:is-listened-event-class"),
- scm_call_1
- (ly_lily_module_constant ("ly:make-event-class"),
- unsmob_stream_event (scm_car (arts))
- ->get_property ("class")))))
- listened = scm_cons (scm_car (arts), listened);
- else
- unlistened = scm_cons (scm_car (arts), unlistened);
- }
- ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL));
- c->event_source ()->broadcast (ev);
- arts = scm_reverse_x (listened, SCM_EOL);
- for (; scm_is_pair (arts); arts = scm_cdr (arts))
- c->event_source ()->broadcast (unsmob_stream_event (scm_car (arts)));
- }
+ {
+ // There is no point in broadcasting articulations like
+ // harmonic events that nobody listens to. Those work
+ // exclusively as articulations.
+ SCM listened = SCM_EOL;
+ SCM unlistened = SCM_EOL;
+ for (; scm_is_pair (arts); arts = scm_cdr (arts))
+ {
+ if (scm_is_true
+ (scm_call_2
+ (ly_lily_module_constant ("any"),
+ ly_lily_module_constant ("ly:is-listened-event-class"),
+ scm_call_1
+ (ly_lily_module_constant ("ly:make-event-class"),
+ unsmob_stream_event (scm_car (arts))
+ ->get_property ("class")))))
+ listened = scm_cons (scm_car (arts), listened);
+ else
+ unlistened = scm_cons (scm_car (arts), unlistened);
+ }
+ ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL));
+ c->event_source ()->broadcast (ev);
+ arts = scm_reverse_x (listened, SCM_EOL);
+ for (; scm_is_pair (arts); arts = scm_cdr (arts))
+ c->event_source ()->broadcast (unsmob_stream_event (scm_car (arts)));
+ }
else
- c->event_source ()->broadcast (ev);
+ c->event_source ()->broadcast (ev);
ev->unprotect ();
}
: LEFT;
return scm_from_double ((pos[col_dir] - (iv.length () / 2)
- + col_dir
- * robust_scm2double (me->get_property ("collision-padding"), 0.0)));
+ + col_dir
+ * robust_scm2double (me->get_property ("collision-padding"), 0.0)));
}
void
return ret;
}
-
#include "ly-smobs.icc"
IMPLEMENT_SIMPLE_SMOBS (Simple_spacer);
{
if (id == robust_scm2string (slurs_[j]->get_property ("spanner-id"), ""))
{
- // We end only one slur unless several ones have been
- // caused by the same event, like with double slurs.
+ // We end only one slur unless several ones have been
+ // caused by the same event, like with double slurs.
if (!ended || scm_is_eq (starter,
- slurs_[j]->get_property ("cause")))
- {
- ended = true;
- starter = slurs_[j]->get_property ("cause");
- end_slurs_.push_back (slurs_[j]);
- slurs_.erase (slurs_.begin () + j);
- }
+ slurs_[j]->get_property ("cause")))
+ {
+ ended = true;
+ starter = slurs_[j]->get_property ("cause");
+ end_slurs_.push_back (slurs_[j]);
+ slurs_.erase (slurs_.begin () + j);
+ }
}
}
if (!ended)
Stream_event *ev = start_events_[i];
string id = robust_scm2string (ev->get_property ("spanner-id"), "");
- Grob *slur = make_spanner ("Slur", ev->self_scm ());
- Direction updown = to_dir (ev->get_property ("direction"));
+ Grob *slur = make_spanner ("Slur", ev->self_scm ());
+ Direction updown = to_dir (ev->get_property ("direction"));
+ slur->set_property ("spanner-id", ly_string2scm (id));
+ if (updown)
+ set_grob_direction (slur, updown);
+ slurs_.push_back (slur);
+
+ if (to_boolean (get_property ("doubleSlurs")))
+ {
+ set_grob_direction (slur, DOWN);
+ slur = make_spanner ("Slur", ev->self_scm ());
slur->set_property ("spanner-id", ly_string2scm (id));
- if (updown)
- set_grob_direction (slur, updown);
+ set_grob_direction (slur, UP);
slurs_.push_back (slur);
-
- if (to_boolean (get_property ("doubleSlurs")))
- {
- set_grob_direction (slur, DOWN);
- slur = make_spanner ("Slur", ev->self_scm ());
- slur->set_property ("spanner-id", ly_string2scm (id));
- set_grob_direction (slur, UP);
- slurs_.push_back (slur);
- }
+ }
}
set_melisma (slurs_.size ());
}
// called in mid-character, the results are somewhat arbitrary,
// but there is no really sane definition anyway.
if ((*line_chars & 0xc0) == 0x80)
- continue;
+ continue;
if (*line_chars == '\t')
(*column) = (*column / 8 + 1) * 8;
Real space = staff_space (me);
for (vector<Real>::const_iterator i = line_positions.begin (),
- e = line_positions.end ();
+ e = line_positions.end ();
i != e;
++i)
{
Real nearest_line = line_positions[0];
Real line_dist = abs (line_positions[0] - pos);
for (vector<Real>::const_iterator i = line_positions.begin (),
- e = line_positions.end ();
+ e = line_positions.end ();
i != e;
++i)
{
return;
if (!stem_)
- make_stem (gi, tuplet_start_);
-
+ make_stem (gi, tuplet_start_);
int ds = Stem::duration_log (stem_);
int dc = d->duration_log ();
stem_->set_object ("flag", flag->self_scm ());
maybe_flags_.push_back (flag);
}
- if (tuplet_start_)
+ if (tuplet_start_)
stem_->set_property ("tuplet-start", SCM_BOOL_T);
}
// set stem property if stem already exists
if (stem_)
stem_->set_property ("tuplet-start", SCM_BOOL_T);
- tuplet_start_ = true; // stash the value for use in later creation
+ tuplet_start_ = true; // stash the value for use in later creation
}
}
Stem::is_normal_stem (Grob *me)
{
if (!head_count (me))
- return false;
+ return false;
extract_grob_set (me, "note-heads", heads);
SCM style = heads[0]->get_property ("style");
SCM val = scm_cdr (entry);
if ((unsmob_pitch (val)
- || (prop == ly_symbol2scm ("element") && unsmob_music (val))
- || (prop == ly_symbol2scm ("elements") && scm_is_pair (val))
- || (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)))
- && scm_is_false (scm_assq (prop, mutable_property_alist_)))
- mutable_property_alist_ =
- scm_acons (prop, ly_music_deep_copy (val), mutable_property_alist_);
+ || (prop == ly_symbol2scm ("element") && unsmob_music (val))
+ || (prop == ly_symbol2scm ("elements") && scm_is_pair (val))
+ || (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)))
+ && scm_is_false (scm_assq (prop, mutable_property_alist_)))
+ mutable_property_alist_
+ = scm_acons (prop, ly_music_deep_copy (val), mutable_property_alist_);
}
}
-
SCM
Stream_event::dump (SCM self)
{
{
/* Don't match in mid-UTF-8 */
if ((str[i] & 0xc0) == 0x80)
- continue;
+ continue;
for (vsize j = max_length + 1; j--;)
{
- if (j > str.size () - i)
- continue;
+ if (j > str.size () - i)
+ continue;
string dummy = str.substr (i, j);
SCM ligature = ly_assoc_get (ly_string2scm (dummy),
- replacement_alist, SCM_BOOL_F);
- if (scm_is_true (ligature))
+ replacement_alist, SCM_BOOL_F);
+ if (scm_is_true (ligature))
str.replace (i, j, robust_scm2string (ligature, ""));
}
}
Timing_translator::initialize ()
{
Context *timing = unsmob_context (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
- context ()->self_scm (),
- ly_symbol2scm ("Timing")));
+ context ()->self_scm (),
+ ly_symbol2scm ("Timing")));
if (timing != context ())
{
context ()->add_alias (ly_symbol2scm ("Timing"));
- if (!timing) {
- programming_error ("Can't find Timing context template");
- timing = context ();
- }
- }
+ if (!timing)
+ {
+ programming_error ("Can't find Timing context template");
+ timing = context ();
+ }
+ }
SCM barnumber = timing->get_property ("currentBarNumber");
if (!scm_is_integer (barnumber))
context ()->set_property ("internalBarNumber", barnumber);
context ()->set_property ("timeSignatureFraction",
- timing->get_property ("timeSignatureFraction"));
+ timing->get_property ("timeSignatureFraction"));
/*
Do not init measurePosition; this should be done from global
context.
"",
/* read */
- "baseMoment "
+ "baseMoment "
"currentBarNumber "
"internalBarNumber "
"measureLength "
"measurePosition "
- "timeSignatureFraction ",
+ "timeSignatureFraction ",
/* write */
"baseMoment "
x_span[d] += d * overshoot[d];
else
x_span[d] = (bounds[d]->break_status_dir ()
- ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[-d]
- : robust_relative_extent (bounds[d], commonx, X_AXIS)[-d])
+ ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[-d]
+ : robust_relative_extent (bounds[d], commonx, X_AXIS)[-d])
- overshoot[LEFT];
}