From b1323f33e9aa4b9eea05eefb8755c907d4d762d4 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 22 Feb 2004 21:24:08 +0000 Subject: [PATCH] (LY_DEFINE): use Scheme style naming for music/context/grob property functions. Internally, use get_property() and set_property() for both. --- ChangeLog | 6 + lily/accidental-engraver.cc | 18 +- lily/accidental-placement.cc | 26 +-- lily/accidental.cc | 18 +- lily/align-interface.cc | 22 +-- lily/ambitus-engraver.cc | 10 +- lily/ambitus.cc | 14 +- lily/apply-context-iterator.cc | 2 +- lily/arpeggio-engraver.cc | 2 +- lily/arpeggio.cc | 10 +- lily/auto-beam-engraver.cc | 4 +- lily/auto-change-iterator.cc | 2 +- lily/axis-group-engraver.cc | 4 +- lily/axis-group-interface.cc | 10 +- lily/balloon.cc | 10 +- lily/bar-engraver.cc | 4 +- lily/bar-line.cc | 22 +-- lily/bar-number-engraver.cc | 6 +- lily/beam-engraver.cc | 6 +- lily/beam-performer.cc | 2 +- lily/beam-quanting.cc | 12 +- lily/beam.cc | 116 ++++++------- lily/break-align-engraver.cc | 8 +- lily/break-align-interface.cc | 20 +-- lily/breathing-sign.cc | 8 +- lily/change-iterator.cc | 8 +- lily/chord-name-engraver.cc | 14 +- lily/chord-name.cc | 2 +- lily/chord-tremolo-engraver.cc | 8 +- lily/clef-engraver.cc | 12 +- lily/clef.cc | 10 +- lily/cluster-engraver.cc | 4 +- lily/cluster.cc | 12 +- lily/coherent-ligature-engraver.cc | 12 +- lily/completion-note-heads-engraver.cc | 18 +- lily/context-scheme.cc | 4 +- lily/context-specced-music-iterator.cc | 6 +- lily/custos-engraver.cc | 4 +- lily/custos.cc | 8 +- lily/directional-element-interface.cc | 4 +- lily/dot-column-engraver.cc | 4 +- lily/dot-column.cc | 12 +- lily/dots.cc | 2 +- lily/drum-note-engraver.cc | 22 +-- lily/drum-note-performer.cc | 2 +- lily/dynamic-engraver.cc | 24 +-- lily/dynamic-performer.cc | 2 +- lily/engraver-group-engraver.cc | 2 +- lily/engraver.cc | 2 +- lily/event.cc | 30 ++-- lily/extender-engraver.cc | 2 +- lily/figured-bass-engraver.cc | 4 +- lily/fingering-engraver.cc | 20 +-- lily/font-interface.cc | 4 +- lily/font-size-engraver.cc | 4 +- lily/gourlay-breaking.cc | 2 +- lily/grace-music.cc | 2 +- lily/gregorian-ligature-engraver.cc | 34 ++-- lily/gregorian-ligature.cc | 2 +- lily/grob-info.cc | 2 +- lily/grob-interface.cc | 2 +- lily/grob-pitch-tuple.cc | 2 +- lily/grob-property.cc | 4 +- lily/grob-scheme.cc | 10 +- lily/grob.cc | 38 ++-- lily/group-interface.cc | 2 +- lily/hairpin.cc | 6 +- lily/hara-kiri-group-spanner.cc | 4 +- lily/horizontal-bracket-engraver.cc | 2 +- lily/horizontal-bracket.cc | 2 +- lily/hyphen-engraver.cc | 2 +- lily/include/context.hh | 6 - lily/include/grob.hh | 11 +- lily/include/group-interface.hh | 2 +- lily/include/lily-guile.hh | 4 + lily/include/music.hh | 6 +- lily/instrument-name-engraver.cc | 10 +- lily/item.cc | 6 +- lily/key-engraver.cc | 12 +- lily/key-performer.cc | 2 +- lily/key-signature-interface.cc | 8 +- lily/ligature-engraver.cc | 6 +- lily/line-interface.cc | 8 +- lily/line-spanner.cc | 12 +- lily/lyric-combine-music.cc | 4 +- lily/lyric-engraver.cc | 2 +- lily/lyric-extender.cc | 6 +- lily/lyric-hyphen.cc | 10 +- lily/lyric-performer.cc | 6 +- lily/lyric-phrasing-engraver.cc | 2 +- lily/mark-engraver.cc | 6 +- lily/measure-grouping-engraver.cc | 4 +- lily/measure-grouping-spanner.cc | 6 +- lily/melisma-translator.cc | 2 +- lily/mensural-ligature-engraver.cc | 38 ++-- lily/mensural-ligature.cc | 10 +- lily/metronome-engraver.cc | 4 +- lily/multi-measure-rest-engraver.cc | 18 +- lily/multi-measure-rest.cc | 16 +- lily/music-iterator.cc | 2 +- lily/music-sequence.cc | 4 +- lily/music-wrapper.cc | 2 +- lily/music.cc | 42 ++--- lily/new-fingering-engraver.cc | 32 ++-- lily/new-lyric-combine-music-iterator.cc | 4 +- lily/note-collision.cc | 24 +-- lily/note-column.cc | 32 ++-- lily/note-head.cc | 22 +-- lily/note-heads-engraver.cc | 12 +- lily/note-name-engraver.cc | 4 +- lily/note-performer.cc | 2 +- lily/note-spacing.cc | 20 +-- lily/ottava-bracket.cc | 14 +- lily/ottava-engraver.cc | 4 +- lily/output-property-engraver.cc | 10 +- lily/paper-column.cc | 12 +- lily/paper-score.cc | 4 +- lily/parser.yy | 212 +++++++++++------------ lily/part-combine-engraver.cc | 4 +- lily/part-combine-iterator.cc | 6 +- lily/percent-repeat-engraver.cc | 2 +- lily/percent-repeat-item.cc | 4 +- lily/phrasing-slur-engraver.cc | 8 +- lily/piano-pedal-bracket.cc | 10 +- lily/piano-pedal-engraver.cc | 16 +- lily/piano-pedal-performer.cc | 4 +- lily/pitch-squash-engraver.cc | 2 +- lily/property-iterator.cc | 30 ++-- lily/quote-iterator.cc | 4 +- lily/relative-octave-check.cc | 2 +- lily/relative-octave-music.cc | 2 +- lily/repeated-music.cc | 14 +- lily/rest-collision.cc | 22 +-- lily/rest-engraver.cc | 12 +- lily/rest.cc | 12 +- lily/rhythmic-column-engraver.cc | 2 +- lily/rhythmic-head.cc | 10 +- lily/score-engraver.cc | 20 +-- lily/script-column.cc | 10 +- lily/script-engraver.cc | 22 +-- lily/script.cc | 2 +- lily/self-aligment-interface.cc | 4 +- lily/separating-group-spanner.cc | 4 +- lily/separating-line-group-engraver.cc | 8 +- lily/separation-item.cc | 20 +-- lily/sequential-music.cc | 4 +- lily/side-position-interface.cc | 18 +- lily/simple-spacer.cc | 6 +- lily/simultaneous-music-iterator.cc | 2 +- lily/simultaneous-music.cc | 4 +- lily/slash-repeat-engraver.cc | 2 +- lily/slur-engraver.cc | 10 +- lily/slur-performer.cc | 2 +- lily/slur.cc | 74 ++++---- lily/spaceable-grob.cc | 12 +- lily/spacing-engraver.cc | 4 +- lily/spacing-spanner.cc | 66 +++---- lily/span-arpeggio-engraver.cc | 6 +- lily/span-bar-engraver.cc | 6 +- lily/span-bar.cc | 20 +-- lily/span-dynamic-performer.cc | 2 +- lily/spanner.cc | 2 +- lily/staff-spacing.cc | 14 +- lily/staff-symbol-engraver.cc | 4 +- lily/staff-symbol-referencer.cc | 12 +- lily/staff-symbol.cc | 12 +- lily/stanza-number-engraver.cc | 2 +- lily/stem-engraver.cc | 10 +- lily/stem-tremolo.cc | 16 +- lily/stem.cc | 72 ++++---- lily/sustain-pedal.cc | 2 +- lily/system-start-delimiter-engraver.cc | 8 +- lily/system-start-delimiter.cc | 20 +-- lily/system.cc | 50 +++--- lily/tab-note-heads-engraver.cc | 18 +- lily/tempo-performer.cc | 4 +- lily/text-engraver.cc | 10 +- lily/text-item.cc | 2 +- lily/text-spanner-engraver.cc | 2 +- lily/text-spanner.cc | 12 +- lily/tie-engraver.cc | 12 +- lily/tie-performer.cc | 8 +- lily/tie.cc | 20 +-- lily/time-signature-engraver.cc | 2 +- lily/time-signature.cc | 8 +- lily/timing-engraver.cc | 2 +- lily/translator-group.cc | 2 +- lily/tuplet-bracket.cc | 40 ++--- lily/tuplet-engraver.cc | 4 +- lily/unfolded-repeat-iterator.cc | 14 +- lily/vaticana-ligature-engraver.cc | 48 ++--- lily/vaticana-ligature.cc | 20 +-- lily/volta-bracket.cc | 8 +- lily/volta-engraver.cc | 2 +- scripts/convert-ly.py | 11 ++ 195 files changed, 1201 insertions(+), 1191 deletions(-) diff --git a/ChangeLog b/ChangeLog index b02d685deb..bcb273808c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-22 Han-Wen Nienhuys + + * lily/context-scheme.cc (LY_DEFINE): use Scheme style naming for + music/context/grob property functions. Internally, use + get_property() and set_property() for both. + 2004-02-22 Heikki Junes * elisp/lilypond-mode.el (get-buffer-size): define new function, diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index 2b44ea3f51..b0410cb75a 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -248,7 +248,7 @@ Accidental_engraver::process_acknowledged_grobs () Music * note = accidentals_[i].melodic_; Context * origin = accidentals_[i].origin_; - Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch")); + Pitch * pitch = unsmob_pitch (note->get_property ("pitch")); if (!pitch) continue; @@ -262,7 +262,7 @@ Accidental_engraver::process_acknowledged_grobs () pitch, origin, cautionaries, barnum); - bool cautionary = to_boolean (note->get_mus_property ("cautionary")); + bool cautionary = to_boolean (note->get_property ("cautionary")); if (num_caut > num) { @@ -271,7 +271,7 @@ Accidental_engraver::process_acknowledged_grobs () cautionary = true; } - if (num == 0 && to_boolean (note->get_mus_property ("force-accidental"))) + if (num == 0 && to_boolean (note->get_property ("force-accidental"))) num = 1; @@ -312,13 +312,13 @@ Accidental_engraver::process_acknowledged_grobs () if (cautionary) { - a->set_grob_property ("cautionary", SCM_BOOL_T); + a->set_property ("cautionary", SCM_BOOL_T); } - support->set_grob_property ("accidental-grob", a->self_scm ()); + support->set_property ("accidental-grob", a->self_scm ()); - a->set_grob_property ("accidentals", accs); + a->set_property ("accidentals", accs); accidentals_[i].accidental_ = a; /* @@ -354,7 +354,7 @@ Accidental_engraver::stop_translation_timestep () { if (Grob * g = accidentals_[i].accidental_) { - g->set_grob_property ("tie", ties_[j]->self_scm ()); + g->set_property ("tie", ties_[j]->self_scm ()); accidentals_[i].tied_ = true; } @@ -370,7 +370,7 @@ Accidental_engraver::stop_translation_timestep () Music * note = accidentals_[i].melodic_; Context * origin = accidentals_[i].origin_; - Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch")); + Pitch * pitch = unsmob_pitch (note->get_property ("pitch")); if (!pitch) continue; @@ -439,7 +439,7 @@ Accidental_engraver::acknowledge_grob (Grob_info info) if (note && note->is_mus_type ("note-event") && Rhythmic_head::has_interface (info.grob_) - && !gh_equal_p (info.grob_->get_grob_property ("style"), ly_symbol2scm ("harmonic")) + && !gh_equal_p (info.grob_->get_property ("style"), ly_symbol2scm ("harmonic")) ) { Accidental_entry entry ; diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index c0f3b6ae67..6e9213421a 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -28,9 +28,9 @@ Accidental_placement::alignment_callback(SCM s, SCM ) Grob * me =unsmob_grob (s); Grob * par = me->get_parent (X_AXIS); - if (!to_boolean (par->get_grob_property ("positioning-done"))) + if (!to_boolean (par->get_property ("positioning-done"))) { - par->set_grob_property ("positioning-done", SCM_BOOL_T); + par->set_property ("positioning-done", SCM_BOOL_T); position_accidentals (par); } @@ -43,7 +43,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a) { a->set_parent (me, X_AXIS); a->add_offset_callback (alignment_callback_proc, X_AXIS); - SCM cause = a->get_parent (Y_AXIS)->get_grob_property("cause"); + SCM cause = a->get_parent (Y_AXIS)->get_property("cause"); Music *mcause =unsmob_music (cause); if (!mcause) @@ -52,11 +52,11 @@ Accidental_placement::add_accidental (Grob* me, Grob* a) return; } - Pitch *p= unsmob_pitch (mcause->get_mus_property ("pitch")); + Pitch *p= unsmob_pitch (mcause->get_property ("pitch")); int n = p->get_notename (); - SCM accs = me->get_grob_property ("accidental-grobs"); + SCM accs = me->get_property ("accidental-grobs"); SCM key = scm_int2num (n); SCM entry = scm_assq (key, accs); if (entry == SCM_BOOL_F) @@ -70,7 +70,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a) accs = scm_assq_set_x (accs, key, entry); - me->set_grob_property ("accidental-grobs", accs); + me->set_property ("accidental-grobs", accs); } /* @@ -81,13 +81,13 @@ Accidental_placement::split_accidentals (Grob * accs, Link_array *break_reminder, Link_array *real_acc) { - for (SCM acs =accs->get_grob_property ("accidental-grobs"); gh_pair_p (acs); + for (SCM acs =accs->get_property ("accidental-grobs"); gh_pair_p (acs); acs =gh_cdr (acs)) for (SCM s = gh_cdar (acs); gh_pair_p (s); s = gh_cdr (s)) { Grob *a = unsmob_grob (gh_car (s)); - if (unsmob_grob (a->get_grob_property ("tie"))) + if (unsmob_grob (a->get_property ("tie"))) break_reminder->push (a); else real_acc->push (a); @@ -122,7 +122,7 @@ Accidental_placement::get_relevant_accidental_extent (Grob *me, if (!extent.is_empty ()) { - Real p = robust_scm2double (me->get_grob_property ("left-padding"), 0.2); + Real p = robust_scm2double (me->get_property ("left-padding"), 0.2); extent[LEFT] -= p; } @@ -253,7 +253,7 @@ Accidental_placement::position_accidentals (Grob * me) if (!me->live ()) return SCM_UNSPECIFIED; - SCM accs = me->get_grob_property ("accidental-grobs"); + SCM accs = me->get_property ("accidental-grobs"); /* TODO: there is a bug in this code. If two accs are on the same @@ -381,10 +381,10 @@ Accidental_placement::position_accidentals (Grob * me) head_ape-> left_skyline_ = head_skyline; head_ape->offset_ = 0.0; - head_ape->offset_ -= robust_scm2double ( me->get_grob_property ("right-padding"), 0); + head_ape->offset_ -= robust_scm2double ( me->get_property ("right-padding"), 0); - Real padding = robust_scm2double (me->get_grob_property ("padding"),0.2); + Real padding = robust_scm2double (me->get_property ("padding"),0.2); Array left_skyline = head_ape->left_skyline_; /* @@ -428,7 +428,7 @@ Accidental_placement::position_accidentals (Grob * me) right_extent.unite (ape->offset_ + ape->extents_[i][X_AXIS]); - left_extent[LEFT] -= robust_scm2double (me->get_grob_property ("left-padding"), 0); + left_extent[LEFT] -= robust_scm2double (me->get_property ("left-padding"), 0); Interval width(left_extent[LEFT], right_extent[RIGHT]); diff --git a/lily/accidental.cc b/lily/accidental.cc index 427200dd9f..b8274edf71 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -38,7 +38,7 @@ SCM Accidental_interface::after_line_breaking (SCM smob) { Grob *me = unsmob_grob (smob); - Grob *tie = unsmob_grob (me->get_grob_property ("tie")); + Grob *tie = unsmob_grob (me->get_property ("tie")); if (tie && !tie->original_) { @@ -57,15 +57,15 @@ Accidental_interface::accurate_boxes (Grob *a,Grob**common) Array boxes; bool parens = false; - if (to_boolean (a->get_grob_property ("cautionary"))) + if (to_boolean (a->get_property ("cautionary"))) { - SCM cstyle = a->get_grob_property ("cautionary-style"); + SCM cstyle = a->get_property ("cautionary-style"); parens = gh_equal_p (cstyle, ly_symbol2scm ("parentheses")); } - SCM accs = a->get_grob_property ("accidentals"); - SCM scm_style = a->get_grob_property ("style"); + SCM accs = a->get_property ("accidentals"); + SCM scm_style = a->get_property ("style"); if (!gh_symbol_p (scm_style) && !parens && scm_ilength (accs) == 1) @@ -166,15 +166,15 @@ Accidental_interface::print (SCM smob) bool smaller = false; bool parens = false; - bool caut = to_boolean (me->get_grob_property ("cautionary")); + bool caut = to_boolean (me->get_property ("cautionary")); if (caut) { - SCM cstyle = me->get_grob_property ("cautionary-style"); + SCM cstyle = me->get_property ("cautionary-style"); parens = gh_equal_p (cstyle, ly_symbol2scm ("parentheses")); smaller = gh_equal_p (cstyle, ly_symbol2scm ("smaller")); } - SCM scm_style = me->get_grob_property ("style"); + SCM scm_style = me->get_property ("style"); String style; if (gh_symbol_p (scm_style)) { @@ -202,7 +202,7 @@ Accidental_interface::print (SCM smob) fm = Font_interface::get_default_font (me); Stencil mol; - for (SCM s = me->get_grob_property ("accidentals"); + for (SCM s = me->get_property ("accidentals"); gh_pair_p (s); s = gh_cdr (s)) { int alteration = gh_scm2int (gh_car (s)); diff --git a/lily/align-interface.cc b/lily/align-interface.cc index b745978191..53e5a1cfa8 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -21,7 +21,7 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis) Grob * me = unsmob_grob (element_smob); Axis ax = (Axis)gh_scm2int (axis); Grob * par = me->get_parent (ax); - if (par && !to_boolean (par->get_grob_property ("positioning-done"))) + if (par && !to_boolean (par->get_property ("positioning-done"))) { Align_interface::align_elements_to_extents (par, ax); } @@ -35,7 +35,7 @@ Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis) Grob * me = unsmob_grob (element_smob); Axis ax = (Axis)gh_scm2int (axis); Grob * par = me->get_parent (ax); - if (par && !to_boolean (par->get_grob_property ("positioning-done"))) + if (par && !to_boolean (par->get_property ("positioning-done"))) { Align_interface::align_to_fixed_distance (par, ax); } @@ -48,15 +48,15 @@ Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis) void Align_interface::align_to_fixed_distance (Grob *me , Axis a) { - me->set_grob_property ("positioning-done", SCM_BOOL_T); + me->set_property ("positioning-done", SCM_BOOL_T); - SCM d = me->get_grob_property ("stacking-dir"); + SCM d = me->get_property ("stacking-dir"); Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER; if (!stacking_dir) stacking_dir = DOWN; - Real dy = robust_scm2double (me->get_grob_property ("forced-distance"),0.0); + Real dy = robust_scm2double (me->get_property ("forced-distance"),0.0); Link_array elems = Pointer_group_interface__extract_grobs (me, (Grob*) 0, "elements"); @@ -120,15 +120,15 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a) void Align_interface::align_elements_to_extents (Grob * me, Axis a) { - me->set_grob_property ("positioning-done", SCM_BOOL_T); + me->set_property ("positioning-done", SCM_BOOL_T); - SCM d = me->get_grob_property ("stacking-dir"); + SCM d = me->get_property ("stacking-dir"); Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER; if (!stacking_dir) stacking_dir = DOWN; - Interval threshold = robust_scm2interval ( me->get_grob_property ("threshold"), Interval (0, Interval::infinity ())); + Interval threshold = robust_scm2interval ( me->get_property ("threshold"), Interval (0, Interval::infinity ())); Array dims; @@ -162,7 +162,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a) prop_syms[Y_AXIS] = ly_symbol2scm ("self-alignment-Y"); } - SCM align (me->internal_get_grob_property (prop_syms[a])); + SCM align (me->internal_get_property (prop_syms[a])); Array translates ; Interval total; @@ -226,7 +226,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a) Axis Align_interface::axis (Grob*me) { - return Axis (gh_scm2int (ly_car (me->get_grob_property ("axes")))); + return Axis (gh_scm2int (ly_car (me->get_property ("axes")))); } void @@ -253,7 +253,7 @@ find_fixed_alignment_parent (Grob *g) { while (g) { - if (gh_number_p (g->get_grob_property ("forced-distance"))) + if (gh_number_p (g->get_property ("forced-distance"))) return g; g = g->get_parent (Y_AXIS); diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index e5f952e9a6..4abc7fab14 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -115,13 +115,13 @@ Ambitus_engraver::stop_translation_timestep () * assumed to be 0. */ SCM c0 = get_property ("centralCPosition"); - ambitus_->set_grob_property ("c0-position", c0); + ambitus_->set_property ("c0-position", c0); /* * Similar for keySignature. */ SCM key_signature = get_property ("keySignature"); - ambitus_->set_grob_property ("accidentals", key_signature); + ambitus_->set_property ("accidentals", key_signature); typeset_grob (ambitus_); is_typeset = 1; @@ -139,7 +139,7 @@ Ambitus_engraver::acknowledge_grob (Grob_info info) Music *nr = info.music_cause (); if (nr && nr->is_mus_type ("note-event")) { - Pitch pitch = *unsmob_pitch (nr->get_mus_property ("pitch")); + Pitch pitch = *unsmob_pitch (nr->get_property ("pitch")); if (Pitch::compare (pitch_min, pitch_max) > 0) // already init'd? { // not yet init'd; use current pitch to init min/max @@ -174,9 +174,9 @@ Ambitus_engraver::finalize () { if (Pitch::compare (pitch_min, pitch_max) <= 0) { - ambitus_->set_grob_property ("pitch-min", + ambitus_->set_property ("pitch-min", pitch_min.smobbed_copy ()); - ambitus_->set_grob_property ("pitch-max", + ambitus_->set_property ("pitch-max", pitch_max.smobbed_copy ()); } else // have not seen any pitch, so forget about the ambitus diff --git a/lily/ambitus.cc b/lily/ambitus.cc index eaf006feb0..f34c83ec5b 100644 --- a/lily/ambitus.cc +++ b/lily/ambitus.cc @@ -132,7 +132,7 @@ Ambitus::print (SCM smob) Item *me = (Item *)unsmob_grob (smob); Stencil stencil = Stencil (); - SCM scm_note_head_style = me->get_grob_property ("note-head-style"); + SCM scm_note_head_style = me->get_property ("note-head-style"); String note_head_style; if (gh_symbol_p (scm_note_head_style)) { @@ -154,7 +154,7 @@ Ambitus::print (SCM smob) FIXME: Use positions. */ int p_min, p_max; - Pitch *pitch_min = unsmob_pitch (me->get_grob_property ("pitch-min")); + Pitch *pitch_min = unsmob_pitch (me->get_property ("pitch-min")); if (!pitch_min) { me->programming_error("Ambitus: pitch_min undefined; assuming 0"); @@ -164,7 +164,7 @@ Ambitus::print (SCM smob) { p_min = pitch_min->steps (); } - Pitch *pitch_max = unsmob_pitch (me->get_grob_property ("pitch-max")); + Pitch *pitch_max = unsmob_pitch (me->get_property ("pitch-max")); if (!pitch_max) { me->programming_error("Ambitus: pitch_max undefined; assuming 0"); @@ -179,7 +179,7 @@ Ambitus::print (SCM smob) me->programming_error ("Ambitus: reverse range"); } - SCM c0 = me->get_grob_property ("c0-position"); + SCM c0 = me->get_property ("c0-position"); if (gh_number_p (c0)) { p_min += gh_scm2int (c0); @@ -195,7 +195,7 @@ Ambitus::print (SCM smob) head_max.translate_axis (0.5*p_max, Y_AXIS); // join heads - if (to_boolean (me->get_grob_property ("join-heads")) && + if (to_boolean (me->get_property ("join-heads")) && ((p_max - p_min) >= 3)) { Real linethickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); @@ -226,8 +226,8 @@ Ambitus::print (SCM smob) stencil.add_stencil (ledger_lines); // add accidentals - SCM key_signature = me->get_grob_property ("key-signature"); - SCM scm_accidentals_style = me->get_grob_property ("accidentals-style"); + SCM key_signature = me->get_property ("key-signature"); + SCM scm_accidentals_style = me->get_property ("accidentals-style"); String accidentals_style; if (gh_symbol_p (scm_accidentals_style)) { diff --git a/lily/apply-context-iterator.cc b/lily/apply-context-iterator.cc index d8541f98c0..ea01600f60 100644 --- a/lily/apply-context-iterator.cc +++ b/lily/apply-context-iterator.cc @@ -17,7 +17,7 @@ protected: void Apply_context_iterator::process (Moment m) { - SCM proc = get_music ()->get_mus_property ("procedure"); + SCM proc = get_music ()->get_property ("procedure"); scm_call_1 (proc, get_outlet ()->self_scm()); diff --git a/lily/arpeggio-engraver.cc b/lily/arpeggio-engraver.cc index cc61fb3b0f..6d3c7e2cb9 100644 --- a/lily/arpeggio-engraver.cc +++ b/lily/arpeggio-engraver.cc @@ -71,7 +71,7 @@ Arpeggio_engraver::acknowledge_grob (Grob_info info) } else if (Note_column::has_interface (info.grob_ )) { - info.grob_->set_grob_property ("arpeggio", arpeggio_->self_scm ()); + info.grob_->set_property ("arpeggio", arpeggio_->self_scm ()); } } } diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index d2bc00f67b..49e03b48db 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -25,7 +25,7 @@ Arpeggio::print (SCM smob) Grob *me = unsmob_grob (smob); Grob * common = me; - for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem), @@ -43,7 +43,7 @@ Arpeggio::print (SCM smob) Interval heads; Real my_y = me->relative_coordinate (common, Y_AXIS); - for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem); @@ -65,7 +65,7 @@ Arpeggio::print (SCM smob) return SCM_EOL; } - SCM ad = me->get_grob_property ("arpeggio-direction"); + SCM ad = me->get_property ("arpeggio-direction"); Direction dir = CENTER; if (is_direction (ad)) { @@ -104,7 +104,7 @@ Arpeggio::brew_chord_bracket (SCM smob) Grob *me = unsmob_grob (smob); Grob * common = me; - for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem), @@ -114,7 +114,7 @@ Arpeggio::brew_chord_bracket (SCM smob) Interval heads; Real my_y = me->relative_coordinate (common, Y_AXIS); - for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem); diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 4156afeffa..df4fb7495b 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -440,7 +440,7 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) return ; } - int durlog = unsmob_duration (m->get_mus_property ("duration"))->duration_log (); + int durlog = unsmob_duration (m->get_property ("duration"))->duration_log (); if (durlog <= 2) { @@ -457,7 +457,7 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) return ; - Moment dur = unsmob_duration (m->get_mus_property ("duration"))->get_length (); + Moment dur = unsmob_duration (m->get_property ("duration"))->get_length (); /* FIXME: This comment has been here since long: diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index 81dcdaa1c4..83c2f45faf 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -120,7 +120,7 @@ void Auto_change_iterator::construct_children () { Music_wrapper_iterator::construct_children (); - split_list_ = get_music ()->get_mus_property ("split-list"); + split_list_ = get_music ()->get_property ("split-list"); } IMPLEMENT_CTOR_CALLBACK (Auto_change_iterator); diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 65d2aac84c..ee07b86f45 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -77,11 +77,11 @@ Axis_group_engraver::finalize () dims = get_property ("minimumVerticalExtent"); if (is_number_pair (dims) ) - staffline_->set_grob_property ("minimum-Y-extent", dims); + staffline_->set_property ("minimum-Y-extent", dims); dims = get_property ("extraVerticalExtent"); if (is_number_pair (dims)) - staffline_->set_grob_property ("extra-Y-extent", dims); + staffline_->set_property ("extra-Y-extent", dims); Grob * it = unsmob_grob (get_property ("currentCommandColumn")); diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 65c05ad1f9..1362c1275e 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -13,7 +13,7 @@ void Axis_group_interface::add_element (Grob*me,Grob *e) { - for (SCM ax = me->get_grob_property ("axes"); ax != SCM_EOL ; ax = ly_cdr (ax)) + for (SCM ax = me->get_property ("axes"); ax != SCM_EOL ; ax = ly_cdr (ax)) { Axis a = (Axis) gh_scm2int (ly_car (ax)); @@ -58,7 +58,7 @@ Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis) Grob *me = unsmob_grob (element_smob); Axis a = (Axis) gh_scm2int (scm_axis); - SCM elts = me->get_grob_property ("elements"); + SCM elts = me->get_property ("elements"); Grob * common = common_refpoint_of_list (elts, me, a); Real my_coord = me->relative_coordinate (common, a); @@ -73,7 +73,7 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2) SCM sa1= scm_int2num (a1); SCM sa2 = scm_int2num (a2); - SCM axes = me->get_grob_property ("axes"); + SCM axes = me->get_property ("axes"); if (!gh_pair_p (axes) || scm_memq (sa1, axes) == SCM_BOOL_F @@ -82,7 +82,7 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2) SCM ax = gh_cons (sa1, SCM_EOL); if (a1 != a2) ax= gh_cons (sa2, ax); - me->set_grob_property ("axes", ax); + me->set_property ("axes", ax); } if (a1 != X_AXIS && a2 != X_AXIS) @@ -108,7 +108,7 @@ Axis_group_interface::get_children (Grob*me) if (!has_interface (me)) return childs; - for (SCM ep = me->get_grob_property ("elements"); gh_pair_p (ep); ep = ly_cdr (ep)) + for (SCM ep = me->get_property ("elements"); gh_pair_p (ep); ep = ly_cdr (ep)) { Grob* e = unsmob_grob (ly_car (ep)); if (e) diff --git a/lily/balloon.cc b/lily/balloon.cc index 000640754d..d00fc3d6a5 100644 --- a/lily/balloon.cc +++ b/lily/balloon.cc @@ -26,7 +26,7 @@ Balloon_interface::print (SCM smob) { Grob *me= unsmob_grob (smob); - SCM cb = me->get_grob_property ("balloon-original-callback"); + SCM cb = me->get_property ("balloon-original-callback"); SCM scm_mol = SCM_EOL; if (gh_procedure_p (cb)) @@ -37,7 +37,7 @@ Balloon_interface::print (SCM smob) if (!unsmob_stencil (scm_mol)) return scm_mol; - SCM scm_off = me->get_grob_property ("balloon-text-offset"); + SCM scm_off = me->get_property ("balloon-text-offset"); if (!is_number_pair (scm_off)) return scm_mol; @@ -47,7 +47,7 @@ Balloon_interface::print (SCM smob) Box orig_extent = m->extent_box (); Box box_extent = orig_extent; - Real w = robust_scm2double (me->get_grob_property ("balloon-padding"), .1); + Real w = robust_scm2double (me->get_property ("balloon-padding"), .1); box_extent.widen (w, w); @@ -58,9 +58,9 @@ Balloon_interface::print (SCM smob) - SCM bt = me->get_grob_property ("balloon-text"); + SCM bt = me->get_property ("balloon-text"); SCM chain = Font_interface::font_alist_chain (me); - chain = gh_cons (me->get_grob_property ("balloon-text-props"), chain); + chain = gh_cons (me->get_property ("balloon-text-props"), chain); SCM text = Text_item::interpret_markup (me->get_paper ()->self_scm (), chain, bt); diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 2d519a7f65..b49572d6bd 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -49,8 +49,8 @@ Bar_engraver::create_bar () { bar_ = make_item ("BarLine"); SCM gl = get_property ("whichBar"); - if (scm_equal_p (gl, bar_->get_grob_property ("glyph")) != SCM_BOOL_T) - bar_->set_grob_property ("glyph", gl); + if (scm_equal_p (gl, bar_->get_property ("glyph")) != SCM_BOOL_T) + bar_->set_property ("glyph", gl); announce_grob(bar_, SCM_EOL); } diff --git a/lily/bar-line.cc b/lily/bar-line.cc index 39934f72f2..aa454acac2 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -28,8 +28,8 @@ Bar_line::print (SCM smob) { Grob * me = unsmob_grob (smob); - SCM s = me->get_grob_property ("glyph"); - SCM barsiz_proc = me->get_grob_property ("bar-size-procedure"); + SCM s = me->get_property ("glyph"); + SCM barsiz_proc = me->get_property ("bar-size-procedure"); if (gh_string_p (s) && gh_procedure_p (barsiz_proc)) { String str =ly_scm2string (s); @@ -47,10 +47,10 @@ Bar_line::print (SCM smob) Stencil Bar_line::compound_barline (Grob*me, String str, Real h) { - Real kern = robust_scm2double (me->get_grob_property ("kern"), 1); - Real thinkern = robust_scm2double (me->get_grob_property ("thin-kern"), 1); - Real hair = robust_scm2double (me->get_grob_property ("hair-thickness"), 1); - Real fatline = robust_scm2double (me->get_grob_property ("thick-thickness"), 1); + Real kern = robust_scm2double (me->get_property ("kern"), 1); + Real thinkern = robust_scm2double (me->get_property ("thin-kern"), 1); + Real hair = robust_scm2double (me->get_property ("hair-thickness"), 1); + Real fatline = robust_scm2double (me->get_property ("thick-thickness"), 1); Real staffline = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); Real staff_space = Staff_symbol_referencer::staff_space (me); @@ -154,24 +154,24 @@ Bar_line::before_line_breaking (SCM smob) Grob*me=unsmob_grob (smob); Item * item = dynamic_cast (me); - SCM g = me->get_grob_property ("glyph"); + SCM g = me->get_property ("glyph"); SCM orig = g; Direction bsd = item->break_status_dir (); if (gh_string_p (g) && bsd) { - SCM proc = me->get_grob_property ("break-glyph-function"); + SCM proc = me->get_property ("break-glyph-function"); g = gh_call2 (proc, g, scm_int2num (bsd)); } if (!gh_string_p (g)) { - me->set_grob_property ("print-function", SCM_EOL); + me->set_property ("print-function", SCM_EOL); me->set_extent (SCM_EOL, X_AXIS); // leave y_extent for spanbar? } if (! gh_equal_p (g, orig)) - me->set_grob_property ("glyph", g); + me->set_property ("glyph", g); return SCM_UNSPECIFIED; } @@ -185,7 +185,7 @@ Bar_line::get_staff_bar_size (SCM smob) { Grob*me = unsmob_grob (smob); Real ss = Staff_symbol_referencer::staff_space (me); - SCM size = me->get_grob_property ("bar-size"); + SCM size = me->get_property ("bar-size"); if (gh_number_p (size)) return gh_double2scm (gh_scm2double (size)*ss); else if (Staff_symbol_referencer::get_staff_symbol (me)) diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 67c7fc909d..7223ebbf6a 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -59,7 +59,7 @@ Bar_number_engraver::process_music () { create_items (); // guh. - text_->set_grob_property + text_->set_property ("text", scm_makfrom0str (to_string (gh_scm2int (bn)).to_str0 ())); } } @@ -81,7 +81,7 @@ Bar_number_engraver::acknowledge_grob (Grob_info inf) Grob * s = inf.grob_; if (text_ && dynamic_cast (s) - && s->get_grob_property ("break-align-symbol") == ly_symbol2scm ("left-edge")) + && s->get_property ("break-align-symbol") == ly_symbol2scm ("left-edge")) { /* By default this would land on the Paper_column -- so why @@ -95,7 +95,7 @@ Bar_number_engraver::stop_translation_timestep () { if (text_) { - text_->set_grob_property ("side-support-elements", get_property ("stavesFound")); + text_->set_property ("side-support-elements", get_property ("stavesFound")); typeset_grob (text_); text_ =0; } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index bd25a47df4..55d65a5772 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -97,7 +97,7 @@ Beam_engraver::try_music (Music *m) { if (m->is_mus_type ("beam-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); if (d == START && !valid_start_point ()) return false; if (d == STOP && !valid_end_point ()) @@ -253,7 +253,7 @@ Beam_engraver::acknowledge_grob (Grob_info info) last_stem_added_at_ = now; - int durlog = unsmob_duration (m->get_mus_property ("duration"))-> duration_log (); + int durlog = unsmob_duration (m->get_property ("duration"))-> duration_log (); if (durlog <= 2) { m->origin ()->warning (_ ("stem doesn't fit in beam")); @@ -265,7 +265,7 @@ Beam_engraver::acknowledge_grob (Grob_info info) */ } - stem->set_grob_property ("duration-log", + stem->set_property ("duration-log", scm_int2num (durlog)); Moment stem_location = now - beam_start_mom_ + beam_start_location_; beam_info_->add_stem (stem_location, diff --git a/lily/beam-performer.cc b/lily/beam-performer.cc index 427946738d..3deaa507ba 100644 --- a/lily/beam-performer.cc +++ b/lily/beam-performer.cc @@ -69,7 +69,7 @@ Beam_performer::try_music (Music *m) { if (m->is_mus_type ("beam-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); if (d == START) { diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index b78e435a49..2a828e0ee5 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -97,7 +97,7 @@ Beam::quanting (SCM smob) { Grob *me = unsmob_grob (smob); - SCM s = me->get_grob_property ("positions"); + SCM s = me->get_property ("positions"); Real yl = gh_scm2double (gh_car (s)); Real yr = gh_scm2double (gh_cdr (s)); @@ -111,7 +111,7 @@ Beam::quanting (SCM smob) Real thickness = Beam::get_thickness (me) / ss ; Real slt = Staff_symbol_referencer::line_thickness (me) / ss; - SCM sdy = me->get_grob_property ("least-squares-dy"); + SCM sdy = me->get_property ("least-squares-dy"); Real dy_mus = gh_number_p (sdy) ? gh_scm2double (sdy) : 0.0; Real straddle = 0.0; @@ -172,7 +172,7 @@ Beam::quanting (SCM smob) stem_infos.push (si); dirs_found[stem_infos.top ().dir_] = true; - bool f = to_boolean (s->get_grob_property ("french-beaming")) + bool f = to_boolean (s->get_property ("french-beaming")) && s != lvs && s != fvs; base_lengths.push (calc_stem_y (me, s, common, xl, xr, @@ -276,7 +276,7 @@ Beam::quanting (SCM smob) #if DEBUG_QUANTING - SCM inspect_quants = me->get_grob_property ("inspect-quants"); + SCM inspect_quants = me->get_property ("inspect-quants"); if (debug_beam_quanting_flag && gh_pair_p (inspect_quants)) { @@ -299,7 +299,7 @@ Beam::quanting (SCM smob) } #endif - me->set_grob_property ("positions", + me->set_property ("positions", ly_interval2scm (Drul_array (qscores[best_idx].yl, qscores[best_idx].yr))); #if DEBUG_QUANTING @@ -308,7 +308,7 @@ Beam::quanting (SCM smob) qscores[best_idx].score_card_ += to_string ("i%d", best_idx); // debug quanting - me->set_grob_property ("quant-score", + me->set_property ("quant-score", scm_makfrom0str (qscores[best_idx].score_card_.to_str0 ())); } #endif diff --git a/lily/beam.cc b/lily/beam.cc index 6d53a6c547..ef2a269e98 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -60,7 +60,7 @@ Beam::add_stem (Grob *me, Grob *s) s->add_dependency (me); assert (!Stem::get_beam (s)); - s->set_grob_property ("beam", me->self_scm ()); + s->set_property ("beam", me->self_scm ()); add_bound_item (dynamic_cast (me), dynamic_cast (s)); } @@ -69,7 +69,7 @@ Beam::add_stem (Grob *me, Grob *s) Real Beam::get_thickness (Grob * me) { - return robust_scm2double (me->get_grob_property ("thickness"), 0) + return robust_scm2double (me->get_property ("thickness"), 0) * Staff_symbol_referencer::staff_space (me); } @@ -77,7 +77,7 @@ Beam::get_thickness (Grob * me) Real Beam::get_beam_translation (Grob *me) { - SCM func = me->get_grob_property ("space-function"); + SCM func = me->get_property ("space-function"); if (gh_procedure_p (func)) { @@ -95,7 +95,7 @@ int Beam::get_beam_count (Grob *me) { int m = 0; - for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob *stem = unsmob_grob (ly_car (s)); m = m >? (Stem::beam_multiplicity (stem).length () + 1); @@ -150,12 +150,12 @@ Beam::before_line_breaking (SCM smob) { me->warning (_ ("beam has less than two visible stems")); - SCM stems = me->get_grob_property ("stems"); + SCM stems = me->get_property ("stems"); if (scm_ilength (stems) == 1) { me->warning (_ ("Beam has less than two stems. Removing beam.")); - unsmob_grob (gh_car (stems))->set_grob_property ("beam", SCM_EOL); + unsmob_grob (gh_car (stems))->set_property ("beam", SCM_EOL); me->suicide (); return SCM_UNSPECIFIED; @@ -239,7 +239,7 @@ Beam::connect_beams (Grob *me) for (int i = 0; i< stems.size(); i++) { Grob *this_stem = stems[i]; - SCM this_beaming = this_stem->get_grob_property ("beaming"); + SCM this_beaming = this_stem->get_property ("beaming"); Direction this_dir = get_grob_direction (this_stem); if (gh_pair_p (last_beaming) && gh_pair_p (this_beaming)) @@ -329,7 +329,7 @@ Beam::print (SCM grob) dx = stems.top ()->relative_coordinate (xcommon, X_AXIS) - x0; } - SCM posns = me->get_grob_property ("positions"); + SCM posns = me->get_property ("positions"); Drul_array pos; if (!is_number_pair (posns)) { @@ -351,7 +351,7 @@ Beam::print (SCM grob) Real last_xposn = -1; Real last_stem_width = -1 ; - Real gap_length =robust_scm2double ( me->get_grob_property ("gap"), 0.0); + Real gap_length =robust_scm2double ( me->get_property ("gap"), 0.0); Stencil the_beam; Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); @@ -360,10 +360,10 @@ Beam::print (SCM grob) { Grob * st = (i < stems.size()) ? stems[i] : 0; - SCM this_beaming = st ? st->get_grob_property ("beaming") : SCM_EOL; + SCM this_beaming = st ? st->get_property ("beaming") : SCM_EOL; Real xposn = st ? st->relative_coordinate (xcommon, X_AXIS) : 0.0; - Real stem_width = st ? robust_scm2double (st->get_grob_property ("thickness"), 1.0) *lt : 0 ; - Direction stem_dir = st ? to_dir (st->get_grob_property ("direction")) : CENTER; + Real stem_width = st ? robust_scm2double (st->get_property ("thickness"), 1.0) *lt : 0 ; + Direction stem_dir = st ? to_dir (st->get_property ("direction")) : CENTER; /* We do the space left of ST, with lfliebertjes pointing to the right from the left stem, and rfliebertjes pointing left from @@ -421,9 +421,9 @@ Beam::print (SCM grob) Stencil gapped; int gap_count = 0; - if (gh_number_p (me->get_grob_property ("gap-count"))) + if (gh_number_p (me->get_property ("gap-count"))) { - gap_count = gh_scm2int (me->get_grob_property ("gap-count")); + gap_count = gh_scm2int (me->get_property ("gap-count")); gapped = Lookup::beam (dydx, w - 2 * gap_length, thick, blot); full_beams.sort (default_compare); @@ -455,7 +455,7 @@ Beam::print (SCM grob) { int t = Stem::duration_log (st); - SCM proc = me->get_grob_property ("flag-width-function"); + SCM proc = me->get_property ("flag-width-function"); SCM result = gh_call1 (proc, scm_int2num (t)); nw_f = gh_scm2double (result); } @@ -509,7 +509,7 @@ Beam::print (SCM grob) the_beam.translate_axis (pos[LEFT], Y_AXIS); #if (DEBUG_QUANTING) - SCM quant_score = me->get_grob_property ("quant-score"); + SCM quant_score = me->get_property ("quant-score"); if (debug_beam_quanting_flag && gh_string_p (quant_score)) { @@ -563,7 +563,7 @@ Beam::get_default_dir (Grob *me) } } while (flip (&d) != DOWN); - SCM func = me->get_grob_property ("dir-function"); + SCM func = me->get_property ("dir-function"); SCM s = gh_call2 (func, gh_cons (scm_int2num (count[UP]), scm_int2num (count[DOWN])), @@ -574,7 +574,7 @@ Beam::get_default_dir (Grob *me) return to_dir (s); /* If dir is not determined: get default */ - return to_dir (me->get_grob_property ("neutral-direction")); + return to_dir (me->get_property ("neutral-direction")); } @@ -591,7 +591,7 @@ Beam::set_stem_directions (Grob *me, Direction d) { Grob *s = stems[i]; - SCM forcedir = s->get_grob_property ("direction"); + SCM forcedir = s->get_property ("direction"); if (!to_dir (forcedir)) set_grob_direction (s, d); } @@ -665,7 +665,7 @@ struct Int_set void Beam::consider_auto_knees (Grob* me) { - SCM scm = me->get_grob_property ("auto-knee-gap"); + SCM scm = me->get_property ("auto-knee-gap"); if (!gh_number_p (scm)) return ; @@ -703,9 +703,9 @@ Beam::consider_auto_knees (Grob* me) */ hps += stem->relative_coordinate (common, Y_AXIS); - if (to_dir (stem->get_grob_property ("direction"))) + if (to_dir (stem->get_property ("direction"))) { - Direction stemdir = to_dir (stem->get_grob_property ("direction")); + Direction stemdir = to_dir (stem->get_property ("direction")); hps[-stemdir] = - stemdir * infinity_f; } } @@ -749,7 +749,7 @@ Beam::consider_auto_knees (Grob* me) Direction d = (hps.center () < max_gap.center()) ? UP : DOWN ; - stem->set_grob_property ("direction", scm_int2num (d)); + stem->set_property ("direction", scm_int2num (d)); hps.intersect (max_gap); assert (hps.is_empty () || hps.length () < 1e-6 ); @@ -783,7 +783,7 @@ Beam::set_stem_shorten (Grob *me) int beam_count = get_beam_count (me); - SCM shorten_list = me->get_grob_property ("beamed-stem-shorten"); + SCM shorten_list = me->get_property ("beamed-stem-shorten"); if (shorten_list == SCM_EOL) return; @@ -797,7 +797,7 @@ Beam::set_stem_shorten (Grob *me) shorten_f *= forced_fraction; if (shorten_f) - me->set_grob_property ("shorten", gh_double2scm (shorten_f)); + me->set_property ("shorten", gh_double2scm (shorten_f)); } /* Call list of y-dy-callbacks, that handle setting of @@ -817,19 +817,19 @@ Beam::after_line_breaking (SCM smob) void Beam::position_beam (Grob *me) { - if (to_boolean (me->get_grob_property ("positioning-done"))) + if (to_boolean (me->get_property ("positioning-done"))) return ; - me->set_grob_property ("positioning-done", SCM_BOOL_T); + me->set_property ("positioning-done", SCM_BOOL_T); /* Copy to mutable list. */ - SCM s = ly_deep_copy (me->get_grob_property ("positions")); - me->set_grob_property ("positions", s); + SCM s = ly_deep_copy (me->get_property ("positions")); + me->set_property ("positions", s); if (ly_car (s) == SCM_BOOL_F) { // one wonders if such genericity is necessary --hwn. - SCM callbacks = me->get_grob_property ("position-callbacks"); + SCM callbacks = me->get_property ("position-callbacks"); for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i)) gh_call1 (ly_car (i), me->self_scm ()); } @@ -852,7 +852,7 @@ Beam::least_squares (SCM smob) if (count < 1) { - me->set_grob_property ("positions", ly_interval2scm (pos)); + me->set_property ("positions", ly_interval2scm (pos)); return SCM_UNSPECIFIED; } @@ -917,7 +917,7 @@ Beam::least_squares (SCM smob) slope esp. of the first part of a broken beam should predict where the second part goes. */ - me->set_grob_property ("least-squares-dy", + me->set_property ("least-squares-dy", gh_double2scm (pos[RIGHT] - pos[LEFT])); } else @@ -937,7 +937,7 @@ Beam::least_squares (SCM smob) minimise_least_squares (&dydx, &y, ideals); dy = dydx * dx; - me->set_grob_property ("least-squares-dy", gh_double2scm (dy)); + me->set_property ("least-squares-dy", gh_double2scm (dy)); pos = Interval (y, (y+dy)); } @@ -946,7 +946,7 @@ Beam::least_squares (SCM smob) */ scale_drul (&pos, 1/ Staff_symbol_referencer::staff_space (me)); - me->set_grob_property ("positions", ly_interval2scm (pos)); + me->set_property ("positions", ly_interval2scm (pos)); return SCM_UNSPECIFIED; } @@ -994,7 +994,7 @@ Beam::shift_region_to_valid (SCM grob) Real dx = lvs->relative_coordinate (commonx, X_AXIS) - x0; - Drul_array pos = ly_scm2interval ( me->get_grob_property ("positions")); + Drul_array pos = ly_scm2interval ( me->get_property ("positions")); scale_drul (&pos, Staff_symbol_referencer::staff_space (me)); @@ -1053,7 +1053,7 @@ Beam::shift_region_to_valid (SCM grob) pos = Drul_array (y, (y+dy)); scale_drul (&pos, 1/ Staff_symbol_referencer::staff_space (me)); - me->set_grob_property ("positions", ly_interval2scm (pos)); + me->set_property ("positions", ly_interval2scm (pos)); return SCM_UNSPECIFIED; } @@ -1090,7 +1090,7 @@ Beam::check_concave (SCM smob) */ bool concaveness1 = false; - SCM gap = me->get_grob_property ("concaveness-gap"); + SCM gap = me->get_property ("concaveness-gap"); if (gh_number_p (gap) && Stem::get_direction(stems.top ()) == Stem::get_direction(stems[0])) @@ -1127,7 +1127,7 @@ Beam::check_concave (SCM smob) */ Real concaveness2 = 0; - SCM thresh = me->get_grob_property ("concaveness-threshold"); + SCM thresh = me->get_property ("concaveness-threshold"); Real r2 = infinity_f; if (!concaveness1 && gh_number_p (thresh) && Stem::get_direction(stems.top ()) @@ -1174,12 +1174,12 @@ Beam::check_concave (SCM smob) /* TODO: some sort of damping iso -> plain horizontal */ if (concaveness1 || concaveness2 > r2) { - Drul_array pos = ly_scm2interval (me->get_grob_property ("positions")); + Drul_array pos = ly_scm2interval (me->get_property ("positions")); Real r = linear_combination (pos, 0); r /= Staff_symbol_referencer::staff_space (me); - me->set_grob_property ("positions", ly_interval2scm (Drul_array (r, r))); - me->set_grob_property ("least-squares-dy", gh_double2scm (0)); + me->set_property ("positions", ly_interval2scm (Drul_array (r, r))); + me->set_property ("least-squares-dy", gh_double2scm (0)); } return SCM_UNSPECIFIED; @@ -1197,12 +1197,12 @@ Beam::slope_damping (SCM smob) if (visible_stem_count (me) <= 1) return SCM_UNSPECIFIED; - SCM s = me->get_grob_property ("damping"); + SCM s = me->get_property ("damping"); int damping = gh_scm2int (s); if (damping) { - Drul_array pos = ly_scm2interval (me->get_grob_property ("positions")); + Drul_array pos = ly_scm2interval (me->get_property ("positions")); scale_drul (&pos, Staff_symbol_referencer::staff_space (me)); Real dy = pos[RIGHT] - pos[LEFT]; @@ -1224,7 +1224,7 @@ Beam::slope_damping (SCM smob) scale_drul (&pos, 1/Staff_symbol_referencer::staff_space (me)); - me->set_grob_property ("positions", ly_interval2scm (pos)); + me->set_property ("positions", ly_interval2scm (pos)); } return SCM_UNSPECIFIED; } @@ -1267,7 +1267,7 @@ Beam::calc_stem_y (Grob *me, Grob* s, Grob ** common, : 0) + pos[LEFT]; Direction my_dir = get_grob_direction (s); - SCM beaming = s->get_grob_property ("beaming"); + SCM beaming = s->get_property ("beaming"); Real stem_y = stem_y_beam0; if (french) @@ -1306,14 +1306,14 @@ Beam::set_stem_lengths (Grob *me) for (int a = 2; a--;) common[a] = common_refpoint_of_array (stems, me, Axis(a)); - Drul_array pos = ly_scm2realdrul (me->get_grob_property ("positions")); + Drul_array pos = ly_scm2realdrul (me->get_property ("positions")); Real staff_space = Staff_symbol_referencer::staff_space (me); scale_drul (&pos, staff_space); bool gap = false; Real thick =0.0; - if (gh_number_p (me->get_grob_property ("gap-count")) - &&gh_scm2int (me->get_grob_property ("gap-count"))) + if (gh_number_p (me->get_property ("gap-count")) + &&gh_scm2int (me->get_property ("gap-count"))) { gap = true; thick = get_thickness(me); @@ -1332,7 +1332,7 @@ Beam::set_stem_lengths (Grob *me) if (Stem::is_invisible (s)) continue; - bool french = to_boolean (s->get_grob_property ("french-beaming")); + bool french = to_boolean (s->get_property ("french-beaming")); Real stem_y = calc_stem_y (me, s, common, xl, xr, pos, french && s != lvs && s!= fvs); @@ -1369,7 +1369,7 @@ Beam::set_beaming (Grob *me, Beaming_info_list *beaming) continue; Grob *st = stems[i]; - SCM beaming_prop = st->get_grob_property ("beaming"); + SCM beaming_prop = st->get_property ("beaming"); if (beaming_prop == SCM_EOL || index_get_cell (beaming_prop, d) == SCM_EOL) { @@ -1470,23 +1470,23 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis) Grob *rest = unsmob_grob (element_smob); Axis a = (Axis) gh_scm2int (axis); - if (gh_number_p (rest->get_grob_property ("staff-position"))) + if (gh_number_p (rest->get_property ("staff-position"))) return gh_int2scm (0); assert (a == Y_AXIS); - Grob *st = unsmob_grob (rest->get_grob_property ("stem")); + Grob *st = unsmob_grob (rest->get_property ("stem")); Grob *stem = st; if (!stem) return gh_double2scm (0.0); - Grob *beam = unsmob_grob (stem->get_grob_property ("beam")); + Grob *beam = unsmob_grob (stem->get_property ("beam")); if (!beam || !Beam::has_interface (beam) || !Beam::visible_stem_count (beam)) return gh_double2scm (0.0); Drul_array pos (0, 0); - SCM s = beam->get_grob_property ("positions"); + SCM s = beam->get_property ("positions"); if (gh_pair_p (s) && gh_number_p (ly_car (s))) pos = ly_scm2interval (s); Real staff_space = Staff_symbol_referencer::staff_space (rest); @@ -1516,7 +1516,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis) Real rest_dim = rest->extent (common_y, Y_AXIS)[d]; Real minimum_distance = - staff_space * robust_scm2double (rest->get_grob_property ("minimum-distance"), 0.0); + staff_space * robust_scm2double (rest->get_property ("minimum-distance"), 0.0); Real shift = d * (((beam_y - d * minimum_distance) - rest_dim) * d get_grob_property ("knee"); + SCM k = me->get_property ("knee"); if (gh_boolean_p (k)) return gh_scm2bool (k); bool knee = false; int d = 0; - for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Direction dir = get_grob_direction (unsmob_grob (ly_car (s))); if (d && d != dir) @@ -1556,7 +1556,7 @@ Beam::is_knee (Grob* me) d = dir; } - me->set_grob_property ("knee", gh_bool2scm (knee)); + me->set_property ("knee", gh_bool2scm (knee)); return knee; } diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 91db57ae33..77cfa0f9b4 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -99,12 +99,12 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) if (item->get_parent (X_AXIS)) return; - SCM bp=item->get_grob_property ("breakable"); + SCM bp=item->get_property ("breakable"); bool breakable = (to_boolean (bp)); if (!breakable) return ; - SCM align_name = item->get_grob_property ("break-align-symbol"); + SCM align_name = item->get_property ("break-align-symbol"); if (!gh_symbol_p (align_name)) return ; @@ -115,7 +115,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) announce_grob (align_, SCM_EOL); left_edge_ = make_item ("LeftEdge"); - add_to_group (left_edge_->get_grob_property ("break-align-symbol"), left_edge_); + add_to_group (left_edge_->get_property ("break-align-symbol"), left_edge_); announce_grob(left_edge_, SCM_EOL); } @@ -138,7 +138,7 @@ Break_align_engraver::add_to_group(SCM align_name, Item*item) { group = make_item ("BreakAlignGroup"); - group->set_grob_property ("break-align-symbol", align_name); + group->set_property ("break-align-symbol", align_name); group->set_parent (align_, Y_AXIS); announce_grob(group, item->self_scm()); diff --git a/lily/break-align-interface.cc b/lily/break-align-interface.cc index 91cf8a8745..6fcbfa5968 100644 --- a/lily/break-align-interface.cc +++ b/lily/break-align-interface.cc @@ -32,9 +32,9 @@ Break_align_interface::alignment_callback (SCM element_smob, SCM axis) assert (a == X_AXIS); Grob *par = me->get_parent (a); - if (par && !to_boolean (par->get_grob_property ("positioning-done"))) + if (par && !to_boolean (par->get_property ("positioning-done"))) { - par->set_grob_property ("positioning-done", SCM_BOOL_T); + par->set_property ("positioning-done", SCM_BOOL_T); Break_align_interface::do_alignment (par); } @@ -53,7 +53,7 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis) Direction bsd = item->break_status_dir (); if (bsd == LEFT) { - me->set_grob_property ("self-alignment-X", scm_int2num (RIGHT)); + me->set_property ("self-alignment-X", scm_int2num (RIGHT)); } /* @@ -117,17 +117,17 @@ Break_align_interface::do_alignment (Grob *me) /* Find the first grob with a space-alist entry. */ - for (SCM s= l->get_grob_property ("elements"); + for (SCM s= l->get_property ("elements"); gh_pair_p (s) ; s = gh_cdr (s)) { Grob *elt = unsmob_grob (gh_car (s)); if (edge_idx < 0 - && elt->get_grob_property ("break-align-symbol") + && elt->get_property ("break-align-symbol") == ly_symbol2scm( "left-edge")) edge_idx = idx; - SCM l =elt->get_grob_property ("space-alist"); + SCM l =elt->get_property ("space-alist"); if (gh_pair_p(l)) { alist= l; @@ -142,12 +142,12 @@ Break_align_interface::do_alignment (Grob *me) table, but that gets icky when that grob is suicided for some reason. */ - for (SCM s = r ? r->get_grob_property ("elements") : SCM_EOL; + for (SCM s = r ? r->get_property ("elements") : SCM_EOL; !gh_symbol_p (rsym) && gh_pair_p (s); s = gh_cdr (s)) { Grob * elt =unsmob_grob(gh_car (s)); - rsym = elt->get_grob_property ("break-align-symbol"); + rsym = elt->get_property ("break-align-symbol"); } if (rsym == ly_symbol2scm("left-edge")) @@ -165,8 +165,8 @@ Break_align_interface::do_alignment (Grob *me) sym_string = ly_symbol2string (rsym); String orig_string ; - if (unsmob_grob (l->get_grob_property ("cause"))) - orig_string = unsmob_grob (l->get_grob_property ("cause"))->name (); + if (unsmob_grob (l->get_property ("cause"))) + orig_string = unsmob_grob (l->get_property ("cause"))->name (); programming_error (_f("No spacing entry from %s to `%s'", orig_string.to_str0 (), diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index a4180549ff..262316178b 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -47,7 +47,7 @@ Breathing_sign::divisio_minima (SCM smob) Real staff_size; Real thickness = Staff_symbol_referencer::line_thickness (me); - thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); + thickness *= robust_scm2double (me->get_property ("thickness"), 1.0); if (Staff_symbol_referencer::get_staff_symbol (me)) { staff_size = (Staff_symbol_referencer::line_count (me) - 1) * staff_space; @@ -79,7 +79,7 @@ Breathing_sign::divisio_maior (SCM smob) Real staff_space = Staff_symbol_referencer::staff_space (me); Real staff_size; Real thickness = Staff_symbol_referencer::line_thickness (me); - thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); + thickness *= robust_scm2double (me->get_property ("thickness"), 1.0); if (Staff_symbol_referencer::get_staff_symbol (me)) { @@ -119,7 +119,7 @@ Breathing_sign::divisio_maxima (SCM smob) Real staff_space = Staff_symbol_referencer::staff_space (me); Real staff_size; Real thickness = Staff_symbol_referencer::line_thickness (me); - thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); + thickness *= robust_scm2double (me->get_property ("thickness"), 1.0); if (Staff_symbol_referencer::get_staff_symbol (me)) { @@ -149,7 +149,7 @@ Breathing_sign::finalis (SCM smob) Real staff_space = Staff_symbol_referencer::staff_space (me); Real staff_size; Real thickness = Staff_symbol_referencer::line_thickness (me); - thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); + thickness *= robust_scm2double (me->get_property ("thickness"), 1.0); if (Staff_symbol_referencer::get_staff_symbol (me)) { diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 0060d4a0ad..804e3ff6e3 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -16,8 +16,8 @@ void Change_iterator::error (String reason) { - String to_type = ly_symbol2string (get_music ()->get_mus_property ("change-to-type")); - String to_id = ly_scm2string (get_music ()->get_mus_property ("change-to-id")); + String to_type = ly_symbol2string (get_music ()->get_property ("change-to-type")); + String to_id = ly_scm2string (get_music ()->get_property ("change-to-id")); String warn1 = _f ("can't change `%s' to `%s'", to_type, to_id) + ": " + reason; @@ -41,8 +41,8 @@ Change_iterator::process (Moment m) Context * current = get_outlet (); Context * last = 0; - SCM to_type = get_music ()->get_mus_property ("change-to-type"); - String to_id = ly_scm2string (get_music ()->get_mus_property ("change-to-id")); + SCM to_type = get_music ()->get_property ("change-to-type"); + String to_id = ly_scm2string (get_music ()->get_property ("change-to-id")); /* find the type of translator that we're changing. diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 9d88608406..0cfac615fa 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -68,16 +68,16 @@ Chord_name_engraver::process_music () for (int i =0 ; i < notes_.size (); i++) { Music *n = notes_[i]; - SCM p = n->get_mus_property ("pitch"); + SCM p = n->get_property ("pitch"); if (!unsmob_pitch (p)) continue; - if (n->get_mus_property ("inversion") == SCM_BOOL_T) + if (n->get_property ("inversion") == SCM_BOOL_T) { inversion_event = n; inversion = p; } - else if (n->get_mus_property ("bass") == SCM_BOOL_T) + else if (n->get_property ("bass") == SCM_BOOL_T) bass = p; else pitches = gh_cons (p, pitches); @@ -85,10 +85,10 @@ Chord_name_engraver::process_music () if (inversion_event) { - SCM oct = inversion_event->get_mus_property ("octavation"); + SCM oct = inversion_event->get_property ("octavation"); if (gh_number_p (oct)) { - Pitch *p = unsmob_pitch (inversion_event->get_mus_property ("pitch")); + Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch")); int octavation = gh_scm2int (oct); Pitch orig = p->transposed (Pitch (-octavation, 0,0)); @@ -110,12 +110,12 @@ Chord_name_engraver::process_music () SCM chord_as_scm = gh_cons (pitches, gh_cons (bass, inversion)); chord_name_ = make_item ("ChordName"); - chord_name_->set_grob_property("text", markup); + chord_name_->set_property("text", markup); announce_grob(chord_name_, notes_[0]->self_scm ()); SCM s = get_property ("chordChanges"); if (to_boolean (s) && gh_pair_p (last_chord_) && gh_equal_p (chord_as_scm, last_chord_)) - chord_name_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T); + chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T); last_chord_ = chord_as_scm; } diff --git a/lily/chord-name.cc b/lily/chord-name.cc index 84909fadf4..92f8c2418b 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -23,7 +23,7 @@ Chord_name::after_line_breaking (SCM smob) Item* me = unsmob_item (smob); assert (me); - SCM s = me->get_grob_property ("begin-of-line-visible"); + SCM s = me->get_property ("begin-of-line-visible"); if (to_boolean (s)) { if (Paper_column::get_rank (me->get_column ()) - diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 49d62e12de..8c16d48041 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -82,7 +82,7 @@ Chord_tremolo_engraver::try_music (Music * m) { Repeated_music * rp = dynamic_cast (m); if (rp - && rp->get_mus_property ("iterator-ctor") == Chord_tremolo_iterator::constructor_proc + && rp->get_property ("iterator-ctor") == Chord_tremolo_iterator::constructor_proc && !repeat_) { Moment l = rp->get_length (); @@ -124,7 +124,7 @@ Chord_tremolo_engraver::process_music () if (sequential_body_b_ && !beam_) { beam_ = make_spanner ("Beam"); - beam_->set_grob_property ("chord-tremolo", SCM_BOOL_T); + beam_->set_property ("chord-tremolo", SCM_BOOL_T); SCM smp = get_property ("measurePosition"); Moment mp @@ -138,7 +138,7 @@ Chord_tremolo_engraver::process_music () { stem_tremolo_ = make_item ("StemTremolo"); announce_grob(stem_tremolo_, repeat_->self_scm()); - stem_tremolo_->set_grob_property ("flag-count", + stem_tremolo_->set_property ("flag-count", scm_int2num (flags_)); } } @@ -179,7 +179,7 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info) if (Stem::duration_log (s) != 1) { - beam_->set_grob_property ("gap-count", gh_int2scm (flags_ - total_duration_flags_)); + beam_->set_property ("gap-count", gh_int2scm (flags_ - total_duration_flags_)); } if (info.music_cause ()->is_mus_type ("rhythmic-event")) diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index a9c93ba42c..7e2590907b 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -104,14 +104,14 @@ Clef_engraver::create_clef () int dir = sign (abs_oct); abs_oct = abs (abs_oct) + 1; - g->set_grob_property ("text", + g->set_property ("text", scm_number_to_string (gh_int2scm (abs_oct), SCM_MAKINUM (10))); Side_position_interface::add_support (g,clef_); g->set_parent (clef_, Y_AXIS); g->set_parent (clef_, X_AXIS); - g->set_grob_property ("direction", scm_int2num (dir)); + g->set_property ("direction", scm_int2num (dir)); octavate_ = g; announce_grob(octavate_, SCM_EOL); } @@ -140,7 +140,7 @@ Clef_engraver::inspect_clef_properties () set_glyph (); create_clef (); - clef_->set_grob_property ("non-default", SCM_BOOL_T); + clef_->set_property ("non-default", SCM_BOOL_T); prev_cpos_ = clefpos; prev_glyph_ = glyph; @@ -161,17 +161,17 @@ Clef_engraver::stop_translation_timestep () if (clef_) { SCM vis = 0; - if (to_boolean (clef_->get_grob_property ("non-default"))) + if (to_boolean (clef_->get_property ("non-default"))) { vis = get_property ("explicitClefVisibility"); } if (vis) { - clef_->set_grob_property ("break-visibility", vis); + clef_->set_property ("break-visibility", vis); if (octavate_) { - octavate_->set_grob_property ("break-visibility", vis); + octavate_->set_property ("break-visibility", vis); } } diff --git a/lily/clef.cc b/lily/clef.cc index d385520114..73216528f0 100644 --- a/lily/clef.cc +++ b/lily/clef.cc @@ -21,18 +21,18 @@ Clef::before_line_breaking (SCM smob) { Item *s = unsmob_item (smob); - SCM glyph = s->get_grob_property ("glyph-name"); + SCM glyph = s->get_property ("glyph-name"); if (gh_string_p (glyph)) { String str = ly_scm2string (glyph); - if (to_boolean (s->get_grob_property ("non-default")) + if (to_boolean (s->get_property ("non-default")) && s->break_status_dir () != RIGHT - && !to_boolean (s->get_grob_property ("full-size-change"))) + && !to_boolean (s->get_property ("full-size-change"))) { str += "_change"; - s->set_grob_property ("glyph-name", scm_makfrom0str (str.to_str0 ())); + s->set_property ("glyph-name", scm_makfrom0str (str.to_str0 ())); } } else @@ -52,7 +52,7 @@ SCM Clef::print (SCM smob) { Grob *me = unsmob_grob (smob); - SCM glyph_scm = me->get_grob_property ("glyph-name"); + SCM glyph_scm = me->get_property ("glyph-name"); if (!gh_string_p (glyph_scm)) return SCM_EOL; diff --git a/lily/cluster-engraver.cc b/lily/cluster-engraver.cc index 494d3d147b..0988829f26 100644 --- a/lily/cluster-engraver.cc +++ b/lily/cluster-engraver.cc @@ -88,7 +88,7 @@ Cluster_spanner_engraver::process_music () for (int i = 0; i get_mus_property ("pitch")); + Pitch *pit =unsmob_pitch (cluster_notes_[i]->get_property ("pitch")); int p =( pit ? pit->steps () : 0) + c0; @@ -97,7 +97,7 @@ Cluster_spanner_engraver::process_music () } beacon_ = make_item ("ClusterSpannerBeacon"); - beacon_->set_grob_property ("positions", + beacon_->set_property ("positions", scm_cons (gh_int2scm (pmin), gh_int2scm (pmax))); announce_grob (beacon_, cluster_notes_[0]->self_scm ()); diff --git a/lily/cluster.cc b/lily/cluster.cc index d1794a908a..6c11ff1aa6 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -32,13 +32,13 @@ brew_cluster_piece (Grob *me, Array bottom_points, Array top_poi { Real blotdiameter = Staff_symbol_referencer::staff_space (me)/2; - Real padding =robust_scm2double ( me->get_grob_property ("padding"), 0.0); + Real padding =robust_scm2double ( me->get_property ("padding"), 0.0); Offset vpadding = Offset (0, padding); Offset hpadding = Offset (0.5 * blotdiameter, 0); Offset hvpadding = 0.5 * hpadding + vpadding; - SCM shape_scm = me->get_grob_property ("style"); + SCM shape_scm = me->get_property ("style"); String shape; if (gh_symbol_p (shape_scm)) @@ -142,7 +142,7 @@ Cluster::print (SCM smob) Item *right_bound = spanner->get_bound (RIGHT); Grob *common = left_bound->common_refpoint (right_bound, X_AXIS); - SCM cols =me->get_grob_property ("columns"); + SCM cols =me->get_property ("columns"); if (!gh_pair_p (cols)) { @@ -169,7 +169,7 @@ Cluster::print (SCM smob) { Grob * col = unsmob_grob (ly_car (s)); - SCM posns = col->get_grob_property ("positions"); + SCM posns = col->get_property ("positions"); Slice s (0,0); if (is_number_pair (posns)) @@ -191,11 +191,11 @@ Cluster::print (SCM smob) if (spanner->get_break_index () < orig->broken_intos_.size()-1) { Spanner * next = orig->broken_intos_[spanner->get_break_index () + 1]; - SCM cols = next->get_grob_property ("columns"); + SCM cols = next->get_property ("columns"); if (gh_pair_p (cols)) { Grob * col = unsmob_grob (ly_car (scm_last_pair (cols))); - SCM posns = col->get_grob_property ("positions"); + SCM posns = col->get_property ("positions"); Slice s (0,0); if (is_number_pair (posns)) diff --git a/lily/coherent-ligature-engraver.cc b/lily/coherent-ligature-engraver.cc index df911f947e..956df39cbe 100644 --- a/lily/coherent-ligature-engraver.cc +++ b/lily/coherent-ligature-engraver.cc @@ -78,7 +78,7 @@ * add it to the spacing spanner code. */ #if 0 // experimental code to collapse spacing after ligature - SCM incr_scm = lc->get_grob_property ("forced-spacing"); + SCM incr_scm = lc->get_property ("forced-spacing"); if (incr_scm != SCM_EOL) /* (Paper_column::is_musical (l)) */ { me->warning (_f ("gotcha: ptr=%ul", lc));//debug @@ -126,7 +126,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column) // Change column not only for targeted item (NoteColumn), but // also for all associated grobs (NoteSpacing, SeparationItem). Grob *sl = Staff_symbol_referencer::get_staff_symbol (item); - for (SCM tail = parent->get_grob_property ("elements"); + for (SCM tail = parent->get_property ("elements"); gh_pair_p (tail); tail = ly_cdr (tail)) { @@ -139,7 +139,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column) sibling_parent->warning (_f ("Coherent_ligature_engraver: " "setting `spacing-increment = " "0.01': ptr=%ul", parent)); - sibling_parent->set_grob_property("forced-spacing", + sibling_parent->set_property("forced-spacing", gh_double2scm (0.01)); #endif sibling->set_parent (column, X_AXIS); @@ -179,17 +179,17 @@ compute_delta_pitches (Array primitives) primitive = dynamic_cast (primitives[i].grob_); Music *music_cause = primitives[i].music_cause (); int pitch = - unsmob_pitch (music_cause->get_mus_property ("pitch"))->steps (); + unsmob_pitch (music_cause->get_property ("pitch"))->steps (); if (prev_primitive) { delta_pitch = pitch - prev_pitch; - prev_primitive->set_grob_property ("delta-pitch", + prev_primitive->set_property ("delta-pitch", gh_int2scm (delta_pitch)); } prev_pitch = pitch; prev_primitive = primitive; } - primitive->set_grob_property ("delta-pitch", gh_int2scm (0)); + primitive->set_property ("delta-pitch", gh_int2scm (0)); } void diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index 33908639a9..f87cf8119f 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -172,7 +172,7 @@ Completion_heads_engraver::process_music () } else { - orig = unsmob_duration (note_reqs_[0]->get_mus_property ("duration")); + orig = unsmob_duration (note_reqs_[0]->get_property ("duration")); note_dur = *orig; } Moment nb = next_barline_moment (); @@ -212,12 +212,12 @@ Completion_heads_engraver::process_music () if (scratch_note_reqs_.size()) { req = scratch_note_reqs_[i]; - SCM pits = note_reqs_[i]->get_mus_property ("pitch"); - req->set_mus_property ("pitch",pits); + SCM pits = note_reqs_[i]->get_property ("pitch"); + req->set_property ("pitch",pits); } - req->set_mus_property ("duration", note_dur.smobbed_copy ()); - note->set_grob_property ("duration-log", + req->set_property ("duration", note_dur.smobbed_copy ()); + note->set_property ("duration-log", gh_int2scm (note_dur.duration_log ())); int dots= note_dur.dot_count (); @@ -229,22 +229,22 @@ Completion_heads_engraver::process_music () /* measly attempt to save an eeny-weenie bit of memory. */ - if (dots != gh_scm2int (d->get_grob_property ("dot-count"))) - d->set_grob_property ("dot-count", gh_int2scm (dots)); + if (dots != gh_scm2int (d->get_property ("dot-count"))) + d->set_property ("dot-count", gh_int2scm (dots)); d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); dots_.push (d); } - Pitch *pit =unsmob_pitch (req->get_mus_property ("pitch")); + Pitch *pit =unsmob_pitch (req->get_property ("pitch")); int pos = pit->steps (); SCM c0 = get_property ("centralCPosition"); if (gh_number_p (c0)) pos += gh_scm2int (c0); - note->set_grob_property ("staff-position", gh_int2scm (pos)); + note->set_property ("staff-position", gh_int2scm (pos)); announce_grob (note,req->self_scm ()); notes_.push (note); } diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc index a9f28b7fac..3c93893302 100644 --- a/lily/context-scheme.cc +++ b/lily/context-scheme.cc @@ -47,7 +47,7 @@ LY_DEFINE(ly_context_pushpop_property, LY_DEFINE(ly_get_context_property, - "ly:get-context-property", 2, 0, 0, + "ly:context-property", 2, 0, 0, (SCM context, SCM name), "retrieve the value of @var{name} from context @var{context}") { @@ -61,7 +61,7 @@ LY_DEFINE(ly_get_context_property, } LY_DEFINE(ly_set_context_property, - "ly:set-context-property!", 3, 0, 0, + "ly:context-set-property!", 3, 0, 0, (SCM context, SCM name, SCM val), "set value of property @var{name} in context @var{context} to @var{val}.") { diff --git a/lily/context-specced-music-iterator.cc b/lily/context-specced-music-iterator.cc index 050d704abf..de231fe5c3 100644 --- a/lily/context-specced-music-iterator.cc +++ b/lily/context-specced-music-iterator.cc @@ -21,13 +21,13 @@ public: void Context_specced_music_iterator::construct_children () { - SCM ct = get_music ()->get_mus_property ("context-type"); + SCM ct = get_music ()->get_property ("context-type"); String c_id; - SCM ci = get_music ()->get_mus_property ("context-id"); + SCM ci = get_music ()->get_property ("context-id"); if (gh_string_p (ci)) c_id = ly_scm2string (ci); - SCM ops = get_music ()->get_mus_property ("property-operations"); + SCM ops = get_music ()->get_property ("property-operations"); Context * a = get_outlet ()->find_create_context (ct, c_id, ops); diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index 173fb6720c..08e34c082e 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -89,7 +89,7 @@ Custos_engraver::acknowledge_grob (Grob_info info) don't look at the staff-position, since we can't be sure whether Clef_engraver already applied a vertical shift. */ - pitches_.push (*unsmob_pitch (m->get_mus_property ("pitch"))); + pitches_.push (*unsmob_pitch (m->get_property ("pitch"))); } } } @@ -112,7 +112,7 @@ Custos_engraver::process_acknowledged_grobs () p += gh_scm2int (c0); - c->set_grob_property ("staff-position", + c->set_property ("staff-position", gh_int2scm (p)); } diff --git a/lily/custos.cc b/lily/custos.cc index 80071f70b4..414d8904cd 100644 --- a/lily/custos.cc +++ b/lily/custos.cc @@ -32,7 +32,7 @@ Custos::print (SCM smob) { Item *me = (Item *)unsmob_grob (smob); - SCM scm_style = me->get_grob_property ("style"); + SCM scm_style = me->get_property ("style"); String style; if (gh_symbol_p (scm_style)) { @@ -49,17 +49,17 @@ Custos::print (SCM smob) * for both cases? */ bool adjust - = to_boolean (me->get_grob_property ("adjust-if-on-staffline")); + = to_boolean (me->get_property ("adjust-if-on-staffline")); int neutral_pos; - SCM ntr_pos = me->get_grob_property ("neutral-position"); + SCM ntr_pos = me->get_property ("neutral-position"); if (gh_number_p (ntr_pos)) neutral_pos = gh_scm2int (ntr_pos); else neutral_pos = 0; Direction neutral_direction = - to_dir (me->get_grob_property ("neutral-direction")); + to_dir (me->get_property ("neutral-direction")); int pos = (int)rint (Staff_symbol_referencer::get_position (me)); int sz = Staff_symbol_referencer::line_count (me)-1; diff --git a/lily/directional-element-interface.cc b/lily/directional-element-interface.cc index e4481d6bcb..19fb77b0f6 100644 --- a/lily/directional-element-interface.cc +++ b/lily/directional-element-interface.cc @@ -13,7 +13,7 @@ Direction get_grob_direction (Grob*me) { - SCM d= me->get_grob_property ("direction"); + SCM d= me->get_property ("direction"); if (!is_direction (d)) return CENTER; @@ -24,5 +24,5 @@ void set_grob_direction (Grob*me, Direction d) { SCM sd = gh_int2scm (d); - me->set_grob_property ("direction", sd); + me->set_property ("direction", sd); } diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 77b167301c..ae36be53b6 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -47,7 +47,7 @@ Dot_column_engraver::stop_translation_timestep () See [Ross, p 171] */ if (stem_) - dotcol_->set_grob_property ("stem", stem_->self_scm ()); + dotcol_->set_property ("stem", stem_->self_scm ()); typeset_grob (dotcol_); dotcol_ =0; @@ -59,7 +59,7 @@ Dot_column_engraver::stop_translation_timestep () void Dot_column_engraver::acknowledge_grob (Grob_info info) { - Grob *d = unsmob_grob (info.grob_->get_grob_property ("dot")); + Grob *d = unsmob_grob (info.grob_->get_property ("dot")); if (d) { if (!dotcol_) diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 7c691c5ca7..1295dc3cb5 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -32,9 +32,9 @@ Dot_column::force_shift_callback (SCM element_smob, SCM axis) assert (a == Y_AXIS); me = me->get_parent (X_AXIS); - if (!to_boolean (me->get_grob_property ("positioning-done"))) + if (!to_boolean (me->get_property ("positioning-done"))) { - me->set_grob_property ("positioning-done", SCM_BOOL_T); + me->set_property ("positioning-done", SCM_BOOL_T); do_shifts (me); } @@ -49,7 +49,7 @@ Dot_column::side_position (SCM element_smob, SCM axis) Axis a = (Axis) gh_scm2int (axis); assert (a == X_AXIS); - Grob * stem = unsmob_grob (me->get_grob_property ("stem")); + Grob * stem = unsmob_grob (me->get_property ("stem")); if (stem && !Stem::get_beam (stem) && Stem::duration_log (stem) > 2 @@ -266,7 +266,7 @@ Dot_column::do_shifts (Grob*me) Grob * note = dots[i]->get_parent (Y_AXIS); if (note) { - Grob *stem = unsmob_grob (note->get_grob_property ("stem")); + Grob *stem = unsmob_grob (note->get_property ("stem")); if (stem) dp.extremal_head_ = Stem::first_head (stem) == note; } @@ -275,7 +275,7 @@ Dot_column::do_shifts (Grob*me) dp.pos_= p; if (dp.extremal_head_) - dp.dir_ = to_dir (dp.dot_->get_grob_property ("direction")); + dp.dir_ = to_dir (dp.dot_->get_property ("direction")); remove_collision (cfg, p); cfg[p] = dp; @@ -295,7 +295,7 @@ Dot_column::do_shifts (Grob*me) void Dot_column::add_head (Grob * me, Grob *rh) { - Grob * d = unsmob_grob (rh->get_grob_property ("dot")); + Grob * d = unsmob_grob (rh->get_property ("dot")); if (d) { Side_position_interface::add_support (me,rh); diff --git a/lily/dots.cc b/lily/dots.cc index 049ec03026..8fcd15e8ed 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -22,7 +22,7 @@ Dots::print (SCM d) Grob *sc = unsmob_grob (d); Stencil mol; - SCM c = sc->get_grob_property ("dot-count"); + SCM c = sc->get_property ("dot-count"); if (gh_number_p (c)) { diff --git a/lily/drum-note-engraver.cc b/lily/drum-note-engraver.cc index 834b7fd74a..ac6d359874 100644 --- a/lily/drum-note-engraver.cc +++ b/lily/drum-note-engraver.cc @@ -65,9 +65,9 @@ Drum_notes_engraver::process_music () Item *note = make_item ("NoteHead"); Music * ev = events_[i]; - Duration dur = *unsmob_duration (ev->get_mus_property ("duration")); + Duration dur = *unsmob_duration (ev->get_property ("duration")); - note->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ())); + note->set_property ("duration-log", gh_int2scm (dur.duration_log ())); if (dur.dot_count ()) { @@ -75,15 +75,15 @@ Drum_notes_engraver::process_music () Rhythmic_head::set_dots (note, d); if (dur.dot_count () - != robust_scm2int (d->get_grob_property ("dot-count"), 0)) - d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ())); + != robust_scm2int (d->get_property ("dot-count"), 0)) + d->set_property ("dot-count", gh_int2scm (dur.dot_count ())); d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); dots_.push (d); } - SCM drum_type = ev->get_mus_property ("drum-type"); + SCM drum_type = ev->get_property ("drum-type"); SCM defn = SCM_EOL; @@ -97,9 +97,9 @@ Drum_notes_engraver::process_music () SCM script = gh_cadr (defn); if (scm_integer_p (pos) == SCM_BOOL_T) - note->set_grob_property ("staff-position", pos); + note->set_property ("staff-position", pos); if (gh_symbol_p (style)) - note->set_grob_property ("style", style); + note->set_property ("style", style); if (gh_string_p (script)) { @@ -109,8 +109,8 @@ Drum_notes_engraver::process_music () daddy_context_, script, 0); - if (p->get_grob_property ("follow-into-staff")) - p->set_grob_property ("staff-padding", SCM_EOL); + if (p->get_property ("follow-into-staff")) + p->set_property ("staff-padding", SCM_EOL); announce_grob (p, ev->self_scm ()); @@ -136,8 +136,8 @@ Drum_notes_engraver::acknowledge_grob (Grob_info inf) { Grob*e = scripts_[i]; - if (to_dir (e->get_grob_property ("side-relative-direction"))) - e->set_grob_property ("direction-source", inf.grob_->self_scm ()); + if (to_dir (e->get_property ("side-relative-direction"))) + e->set_property ("direction-source", inf.grob_->self_scm ()); /* add dep ? diff --git a/lily/drum-note-performer.cc b/lily/drum-note-performer.cc index dcbc4f3320..b2fc142b4a 100644 --- a/lily/drum-note-performer.cc +++ b/lily/drum-note-performer.cc @@ -36,7 +36,7 @@ Drum_note_performer::create_audio_elements () while (note_evs_.size ()) { Music* n = note_evs_.pop (); - SCM sym = n->get_mus_property ("drum-type"); + SCM sym = n->get_property ("drum-type"); SCM defn = SCM_EOL; if (gh_symbol_p (sym) diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index e2b73d2890..68f8b56f14 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -97,7 +97,7 @@ Dynamic_engraver::try_music (Music * m) else if (m->is_mus_type ("decrescendo-event") || m->is_mus_type ("crescendo-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); accepted_spanreqs_drul_[d] = m; if (current_cresc_ev_ && d == START) @@ -141,11 +141,11 @@ Dynamic_engraver::process_music () if (script_ev_) { script_ = make_item ("DynamicText"); - script_->set_grob_property ("text", - script_ev_->get_mus_property ("text")); + script_->set_property ("text", + script_ev_->get_property ("text")); - if (Direction d = to_dir (script_ev_->get_mus_property ("direction"))) + if (Direction d = to_dir (script_ev_->get_property ("direction"))) set_grob_direction (line_spanner_, d); Axis_group_interface::add_element (line_spanner_, script_); @@ -201,7 +201,7 @@ Dynamic_engraver::process_music () { current_cresc_ev_ = accepted_spanreqs_drul_[START]; - if (Direction d = to_dir (current_cresc_ev_->get_mus_property ("direction"))) + if (Direction d = to_dir (current_cresc_ev_->get_property ("direction"))) set_grob_direction (line_spanner_, d); /* @@ -209,7 +209,7 @@ Dynamic_engraver::process_music () */ String start_type = - ly_symbol2string (current_cresc_ev_->get_mus_property ("name")); + ly_symbol2string (current_cresc_ev_->get_property ("name")); /* ugh. Use push/pop? @@ -223,7 +223,7 @@ Dynamic_engraver::process_music () if (!gh_symbol_p (s) || s == ly_symbol2scm ("hairpin")) { cresc_ = make_spanner ("Hairpin"); - cresc_->set_grob_property ("grow-direction", + cresc_->set_property ("grow-direction", gh_int2scm ((start_type == "crescendo") ? BIGGER : SMALLER)); @@ -238,7 +238,7 @@ Dynamic_engraver::process_music () else { cresc_ = make_spanner ("TextSpanner"); - cresc_->set_grob_property ("style", s); + cresc_->set_property ("style", s); daddy_context_->set_property ((start_type + "Spanner").to_str0 (), SCM_EOL); s = get_property ((start_type + "Text").to_str0 ()); @@ -247,7 +247,7 @@ Dynamic_engraver::process_music () */ if (gh_string_p (s) || gh_pair_p (s)) { - cresc_->set_grob_property ("edge-text", + cresc_->set_property ("edge-text", gh_cons (s, scm_makfrom0str (""))); daddy_context_->set_property ((start_type + "Text").to_str0 (), SCM_EOL); @@ -399,7 +399,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) if (script_ && !script_->get_parent (X_AXIS)) { - SCM head = scm_last_pair (i.grob_->get_grob_property ("heads")); + SCM head = scm_last_pair (i.grob_->get_property ("heads")); if (gh_pair_p (head)) script_->set_parent (unsmob_grob (head), X_AXIS); } @@ -407,7 +407,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) } else if (Script_interface::has_interface (i.grob_) && script_) { - SCM p = i.grob_->get_grob_property ("script-priority"); + SCM p = i.grob_->get_property ("script-priority"); /* UGH. @@ -415,7 +415,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) DynamicText doesn't really have a script-priority field. */ if (gh_number_p (p) - && gh_scm2int (p) < gh_scm2int (script_->get_grob_property ("script-priority"))) + && gh_scm2int (p) < gh_scm2int (script_->get_property ("script-priority"))) { Side_position_interface::add_support (line_spanner_, i.grob_); diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index a00139574c..ba604af615 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -49,7 +49,7 @@ Dynamic_performer::create_audio_elements () if (gh_procedure_p (proc)) { // urg - svolume = gh_call1 (proc, script_req_->get_mus_property ("text")); + svolume = gh_call1 (proc, script_req_->get_property ("text")); } Real volume = robust_scm2double (svolume, 0.5); diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index 26201fb3be..e82967ce34 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -42,7 +42,7 @@ Engraver_group_engraver::acknowledge_grobs () { Grob_info info = announce_infos_[j]; - SCM meta = info.grob_->internal_get_grob_property (meta_sym); + SCM meta = info.grob_->internal_get_property (meta_sym); SCM nm = scm_assoc (name_sym, meta); if (gh_pair_p (nm)) nm = ly_cdr (nm); diff --git a/lily/engraver.cc b/lily/engraver.cc index 87cb246d6f..40d637ec04 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -42,7 +42,7 @@ Engraver::announce_grob (Grob* e, SCM cause) `causes' generically. */ if (unsmob_music (cause) || unsmob_grob (cause)) - e->set_grob_property ("cause", cause); + e->set_property ("cause", cause); Grob_info i; i.grob_ = e; diff --git a/lily/event.cc b/lily/event.cc index dc2ca4b328..d7ca5581ea 100644 --- a/lily/event.cc +++ b/lily/event.cc @@ -13,7 +13,7 @@ Moment Event::get_length () const { - Duration *d = unsmob_duration (get_mus_property ("duration")); + Duration *d = unsmob_duration (get_property ("duration")); if (!d) { Moment m ; @@ -25,9 +25,9 @@ Event::get_length () const void Event::compress (Moment m) { - Duration *d = unsmob_duration (get_mus_property ("duration")); + Duration *d = unsmob_duration (get_property ("duration")); if (d) - set_mus_property ("duration", d ->compressed (m.main_part_).smobbed_copy ()); + set_property ("duration", d ->compressed (m.main_part_).smobbed_copy ()); } void @@ -38,7 +38,7 @@ Event::transpose (Pitch delta) _all_ pitch values are transposed automatically. */ - Pitch *p = unsmob_pitch (get_mus_property ("pitch")); + Pitch *p = unsmob_pitch (get_property ("pitch")); if (!p) return ; @@ -50,19 +50,19 @@ Event::transpose (Pitch delta) delta.to_string ())); } - set_mus_property ("pitch", np.smobbed_copy ()); + set_property ("pitch", np.smobbed_copy ()); } Pitch Event::to_relative_octave (Pitch last) { - Pitch *old_pit = unsmob_pitch (get_mus_property ("pitch")); + Pitch *old_pit = unsmob_pitch (get_property ("pitch")); if (old_pit) { Pitch new_pit = *old_pit; new_pit = new_pit.to_relative_octave (last); - SCM check = get_mus_property ("absolute-octave"); + SCM check = get_property ("absolute-octave"); if (gh_number_p (check) && new_pit.get_octave () != gh_scm2int (check)) { @@ -77,7 +77,7 @@ Event::to_relative_octave (Pitch last) origin ()->warning (s); } - set_mus_property ("pitch", new_pit.smobbed_copy ()); + set_property ("pitch", new_pit.smobbed_copy ()); return new_pit; } @@ -97,7 +97,7 @@ LY_DEFINE(ly_music_duration_length, "ly:music-duration-length", 1, 0,0, Music* m = unsmob_music(mus); SCM_ASSERT_TYPE(m, mus, SCM_ARG1, __FUNCTION__, "Music"); - Duration *d = unsmob_duration (m->get_mus_property ("duration")); + Duration *d = unsmob_duration (m->get_property ("duration")); Moment l ; @@ -121,9 +121,9 @@ LY_DEFINE(ly_music_duration_compress, "ly:music-duration-compress", 2, 0,0, SCM_ASSERT_TYPE(m, mus, SCM_ARG1, __FUNCTION__, "Music"); SCM_ASSERT_TYPE(f, factor, SCM_ARG2, __FUNCTION__, "Moment"); - Duration *d = unsmob_duration (m->get_mus_property ("duration")); + Duration *d = unsmob_duration (m->get_property ("duration")); if (d) - m->set_mus_property ("duration", d->compressed (f->main_part_).smobbed_copy()); + m->set_property ("duration", d->compressed (f->main_part_).smobbed_copy()); return SCM_UNSPECIFIED; } @@ -177,11 +177,11 @@ LY_DEFINE(ly_transpose_key_alist, "ly:transpose-key-alist", void Key_change_ev::transpose (Pitch p) { - SCM pa = get_mus_property ("pitch-alist"); + SCM pa = get_property ("pitch-alist"); - set_mus_property ("pitch-alist", ly_transpose_key_alist (pa, p.smobbed_copy())); - Pitch tonic = *unsmob_pitch (get_mus_property ("tonic")); - set_mus_property ("tonic", + set_property ("pitch-alist", ly_transpose_key_alist (pa, p.smobbed_copy())); + Pitch tonic = *unsmob_pitch (get_property ("tonic")); + set_property ("tonic", tonic.smobbed_copy ()); } diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 323edb8ea6..2bf4c70870 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -72,7 +72,7 @@ completize_extender (Spanner* sp) { if (!sp->get_bound (RIGHT)) { - SCM heads = sp->get_grob_property ("heads"); + SCM heads = sp->get_property ("heads"); if (gh_pair_p (heads)) { Item* it = dynamic_cast (unsmob_grob (gh_car (heads))); diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc index 91023c09a6..aeb5c1e1fe 100644 --- a/lily/figured-bass-engraver.cc +++ b/lily/figured-bass-engraver.cc @@ -70,7 +70,7 @@ Figured_bass_engraver::process_music () { figure_ = make_item ("BassFigure"); announce_grob(figure_, rest_req_->self_scm()); // todo - figure_->set_grob_property ("text" , scm_makfrom0str ("-")); + figure_->set_property ("text" , scm_makfrom0str ("-")); } else if (figures_.size ()) { @@ -85,7 +85,7 @@ Figured_bass_engraver::process_music () SCM markup = scm_call_2 (proc, l, daddy_context_->self_scm ()); figure_ = make_item ("BassFigure"); - figure_->set_grob_property ("text", markup); + figure_->set_property ("text", markup); announce_grob(figure_, figures_[0]->self_scm()); // todo } } diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index 19f3eec6c7..867e93d382 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -71,7 +71,7 @@ Fingering_engraver::process_music () { for (int i= reqs_.size(); i--;) { - SCM dir = reqs_[i]->get_mus_property ("direction"); + SCM dir = reqs_[i]->get_property ("direction"); make_script (to_dir (dir), reqs_[i], Y_AXIS, i); } } @@ -83,9 +83,9 @@ Fingering_engraver::make_script (Direction d, Music *r,Axis a, int i) Axis other = other_axis (a); - SCM pitch = r->get_mus_property ("pitch"); + SCM pitch = r->get_property ("pitch"); if (unsmob_pitch (pitch)) - fingering->set_grob_property ("pitch", pitch); + fingering->set_property ("pitch", pitch); Side_position_interface::set_axis (fingering, a); @@ -94,26 +94,26 @@ Fingering_engraver::make_script (Direction d, Music *r,Axis a, int i) // Hmm int priority = 200; - SCM s = fingering->get_grob_property ("script-priority"); + SCM s = fingering->get_property ("script-priority"); if (gh_number_p (s)) priority = gh_scm2int (s); /* See script-engraver.cc */ priority += i; - fingering->set_grob_property ("script-priority", gh_int2scm (priority)); + fingering->set_property ("script-priority", gh_int2scm (priority)); - if (!is_direction (fingering->get_grob_property ("direction"))) + if (!is_direction (fingering->get_property ("direction"))) { if (d) - fingering->set_grob_property ("direction", gh_int2scm (d)); + fingering->set_property ("direction", gh_int2scm (d)); else - fingering->set_grob_property ("direction", gh_int2scm (RIGHT)); + fingering->set_property ("direction", gh_int2scm (RIGHT)); } - SCM dig = r->get_mus_property ("digit"); - fingering->set_grob_property ("text", scm_number_to_string (dig, gh_int2scm (10))); + SCM dig = r->get_property ("digit"); + fingering->set_property ("text", scm_number_to_string (dig, gh_int2scm (10))); announce_grob (fingering, r->self_scm()); fingerings_.push (fingering); diff --git a/lily/font-interface.cc b/lily/font-interface.cc index 4c3bf6524b..fc6ce65726 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -21,12 +21,12 @@ Font_metric * Font_interface::get_default_font (Grob*me) { - Font_metric * fm = unsmob_metrics (me->get_grob_property ("font")); + Font_metric * fm = unsmob_metrics (me->get_property ("font")); if (fm) return fm; fm = select_font (me->get_paper (), font_alist_chain (me)); - me->set_grob_property ("font", fm->self_scm ()); + me->set_property ("font", fm->self_scm ()); return fm; } diff --git a/lily/font-size-engraver.cc b/lily/font-size-engraver.cc index dfc08b45c4..30e4fe86de 100644 --- a/lily/font-size-engraver.cc +++ b/lily/font-size-engraver.cc @@ -40,8 +40,8 @@ Font_size_engraver::acknowledge_grob (Grob_info gi) { Real font_size = gh_scm2double (sz); - font_size += robust_scm2double (gi.grob_->get_grob_property ("font-size"), 0); - gi.grob_->set_grob_property ("font-size", gh_double2scm (font_size)); + font_size += robust_scm2double (gi.grob_->get_property ("font-size"), 0); + gi.grob_->set_property ("font-size", gh_double2scm (font_size)); } } diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 2a4f0f14ac..4b412a62a7 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -225,7 +225,7 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev, Grob * pc = this_one.cols_.top (); if (pc->original_) { - SCM pen = pc->get_grob_property ("penalty"); + SCM pen = pc->get_property ("penalty"); if (gh_number_p (pen) && fabs (gh_scm2double (pen)) < 10000) { break_penalties += gh_scm2double (pen); diff --git a/lily/grace-music.cc b/lily/grace-music.cc index a25e867879..39e396a2da 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -31,7 +31,7 @@ Grace_music::start_mom () const Grace_music::Grace_music () { - set_mus_property ("iterator-ctor", + set_property ("iterator-ctor", Grace_iterator::constructor_proc); } diff --git a/lily/gregorian-ligature-engraver.cc b/lily/gregorian-ligature-engraver.cc index f1d58d7c09..a11878c248 100644 --- a/lily/gregorian-ligature-engraver.cc +++ b/lily/gregorian-ligature-engraver.cc @@ -91,18 +91,18 @@ void check_and_fix_all_prefixes (Array primitives) /* compute head prefix set by inspecting primitive grob properties */ int prefix_set = - (VIRGA * to_boolean (primitive->get_grob_property ("virga"))) | - (STROPHA * to_boolean (primitive->get_grob_property ("stropha"))) | - (INCLINATUM * to_boolean (primitive->get_grob_property ("inclinatum"))) | - (AUCTUM * to_boolean (primitive->get_grob_property ("auctum"))) | - (DESCENDENS * to_boolean (primitive->get_grob_property ("descendens"))) | - (ASCENDENS * to_boolean (primitive->get_grob_property ("ascendens"))) | - (ORISCUS * to_boolean (primitive->get_grob_property ("oriscus"))) | - (QUILISMA * to_boolean (primitive->get_grob_property ("quilisma"))) | - (DEMINUTUM * to_boolean (primitive->get_grob_property ("deminutum"))) | - (CAVUM * to_boolean (primitive->get_grob_property ("cavum"))) | - (LINEA * to_boolean (primitive->get_grob_property ("linea"))) | - (PES_OR_FLEXA * to_boolean (primitive->get_grob_property ("pes-or-flexa"))); + (VIRGA * to_boolean (primitive->get_property ("virga"))) | + (STROPHA * to_boolean (primitive->get_property ("stropha"))) | + (INCLINATUM * to_boolean (primitive->get_property ("inclinatum"))) | + (AUCTUM * to_boolean (primitive->get_property ("auctum"))) | + (DESCENDENS * to_boolean (primitive->get_property ("descendens"))) | + (ASCENDENS * to_boolean (primitive->get_property ("ascendens"))) | + (ORISCUS * to_boolean (primitive->get_property ("oriscus"))) | + (QUILISMA * to_boolean (primitive->get_property ("quilisma"))) | + (DEMINUTUM * to_boolean (primitive->get_property ("deminutum"))) | + (CAVUM * to_boolean (primitive->get_property ("cavum"))) | + (LINEA * to_boolean (primitive->get_property ("linea"))) | + (PES_OR_FLEXA * to_boolean (primitive->get_property ("pes-or-flexa"))); /* check: ascendens and descendens exclude each other; same with auctum and deminutum */ @@ -186,7 +186,7 @@ void check_and_fix_all_prefixes (Array primitives) /* all other combinations should be valid (unless I made a mistake) */ - primitive->set_grob_property ("prefix-set", gh_int2scm (prefix_set)); + primitive->set_property ("prefix-set", gh_int2scm (prefix_set)); } } @@ -204,8 +204,8 @@ provide_context_info (Array primitives) Grob *primitive = primitives[i].grob_; Music *music_cause = primitives[i].music_cause (); int context_info = 0; - int pitch = unsmob_pitch (music_cause->get_mus_property ("pitch"))->steps (); - int prefix_set = gh_scm2int (primitive->get_grob_property ("prefix-set")); + int pitch = unsmob_pitch (music_cause->get_property ("pitch"))->steps (); + int prefix_set = gh_scm2int (primitive->get_property ("prefix-set")); if (prefix_set & PES_OR_FLEXA) if (!i) // ligature may not start with 2nd head of pes or flexa @@ -234,7 +234,7 @@ provide_context_info (Array primitives) } if (prev_primitive) - prev_primitive->set_grob_property ("context-info", + prev_primitive->set_property ("context-info", gh_int2scm (prev_context_info)); prev_primitive = primitive; prev_prefix_set = prefix_set; @@ -242,7 +242,7 @@ provide_context_info (Array primitives) prev_pitch = pitch; } if (prev_primitive) - prev_primitive->set_grob_property ("context-info", + prev_primitive->set_property ("context-info", gh_int2scm (prev_context_info)); } diff --git a/lily/gregorian-ligature.cc b/lily/gregorian-ligature.cc index 042457ea34..26e7bfbb92 100644 --- a/lily/gregorian-ligature.cc +++ b/lily/gregorian-ligature.cc @@ -24,7 +24,7 @@ Gregorian_ligature::prefixes_to_str (Grob *primitive) { String str; int prefix_set = - gh_scm2int (primitive->get_grob_property ("prefix-set")); + gh_scm2int (primitive->get_property ("prefix-set")); check_prefix ("virga", VIRGA, prefix_set, &str); check_prefix ("stropha", STROPHA, prefix_set, &str); check_prefix ("inclinatum", INCLINATUM, prefix_set, &str); diff --git a/lily/grob-info.cc b/lily/grob-info.cc index f4042ec296..809fdd54a4 100644 --- a/lily/grob-info.cc +++ b/lily/grob-info.cc @@ -21,7 +21,7 @@ Grob_info::Grob_info () Music* Grob_info::music_cause () { - SCM cause = grob_->get_grob_property ("cause"); + SCM cause = grob_->get_property ("cause"); return unsmob_music (cause); } diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc index 18f699c4a4..922bd0f23e 100644 --- a/lily/grob-interface.cc +++ b/lily/grob-interface.cc @@ -57,7 +57,7 @@ check_interfaces_for_property (Grob const *me, SCM sym) return ; } - SCM ifs = me->get_grob_property ("interfaces"); + SCM ifs = me->get_property ("interfaces"); bool found = false; for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs)) diff --git a/lily/grob-pitch-tuple.cc b/lily/grob-pitch-tuple.cc index b1ea68ca4f..e6b4f9cd73 100644 --- a/lily/grob-pitch-tuple.cc +++ b/lily/grob-pitch-tuple.cc @@ -28,7 +28,7 @@ Grob_pitch_tuple::Grob_pitch_tuple () Grob_pitch_tuple::Grob_pitch_tuple (Grob *h, Music *m, Moment mom) { head_ = h; - pitch_ = *unsmob_pitch (m->get_mus_property ("pitch")); + pitch_ = *unsmob_pitch (m->get_property ("pitch")); end_ = mom; } diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 8c0350e83a..ec83ef75b5 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -66,7 +66,7 @@ Grob::add_to_list_property (SCM sym, SCM thing) extern void check_interfaces_for_property (Grob const *me, SCM sym); void -Grob::internal_set_grob_property (SCM s, SCM v) +Grob::internal_set_property (SCM s, SCM v) { /* Perhaps we simply do the assq_set, but what the heck. */ if (!live ()) @@ -84,7 +84,7 @@ Grob::internal_set_grob_property (SCM s, SCM v) SCM -Grob::internal_get_grob_property (SCM sym) const +Grob::internal_get_property (SCM sym) const { SCM s = scm_sloppy_assq (sym, mutable_property_alist_); if (s != SCM_BOOL_F) diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 2906d08dd5..f825996bc4 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -6,7 +6,7 @@ #include "system.hh" -LY_DEFINE (ly_set_grob_property,"ly:set-grob-property!", 3, 0, 0, +LY_DEFINE (ly_grob_set_property,"ly:grob-set-property!", 3, 0, 0, (SCM grob, SCM sym, SCM val), "Set @var{sym} in grob @var{grob} to value @var{val}") { @@ -17,12 +17,12 @@ LY_DEFINE (ly_set_grob_property,"ly:set-grob-property!", 3, 0, 0, if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) error ("typecheck failed"); - sc->internal_set_grob_property (sym, val); + sc->internal_set_property (sym, val); return SCM_UNSPECIFIED; } -LY_DEFINE (ly_get_grob_property, - "ly:get-grob-property", 2, 0, 0, (SCM grob, SCM sym), +LY_DEFINE (ly_get_property, + "ly:grob-property", 2, 0, 0, (SCM grob, SCM sym), "Get the value of a value in grob @var{g} of property @var{sym}. It\n" "will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.\n" "\n" @@ -35,7 +35,7 @@ LY_DEFINE (ly_get_grob_property, SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob"); SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); - return sc->internal_get_grob_property (sym); + return sc->internal_get_property (sym); } LY_DEFINE (spanner_get_bound, "ly:spanner-get-bound", 2 , 0, 0, diff --git a/lily/grob.cc b/lily/grob.cc index 60acbdb54f..255438c1a7 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -64,7 +64,7 @@ Grob::Grob (SCM basicprops) mutable_property_alist_ = scm_c_make_hash_table (HASH_SIZE); #endif - SCM meta = get_grob_property ("meta"); + SCM meta = get_property ("meta"); if (gh_pair_p (meta)) { SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta); @@ -74,7 +74,7 @@ Grob::Grob (SCM basicprops) */ bool itc = internal_type_checking_global_b; internal_type_checking_global_b = false; - internal_set_grob_property (ly_symbol2scm ("interfaces"), gh_cdr(ifs)); + internal_set_property (ly_symbol2scm ("interfaces"), gh_cdr(ifs)); internal_type_checking_global_b = itc; } @@ -91,7 +91,7 @@ Grob::Grob (SCM basicprops) for (int a = X_AXIS; a <= Y_AXIS; a++) { - SCM l = get_grob_property (onames[a]); + SCM l = get_property (onames[a]); if (scm_ilength (l) >=0) { @@ -103,8 +103,8 @@ Grob::Grob (SCM basicprops) programming_error ("[XY]-offset-callbacks must be a list"); } - SCM cb = get_grob_property (enames[a]); - SCM xt = get_grob_property (xnames[a]); + SCM cb = get_property (enames[a]); + SCM xt = get_property (xnames[a]); /* Should change default to empty? @@ -113,7 +113,7 @@ Grob::Grob (SCM basicprops) cb = xt; else if (cb != SCM_BOOL_F && !gh_procedure_p (cb) && !gh_pair_p (cb) - && gh_procedure_p (get_grob_property ("print-function"))) + && gh_procedure_p (get_property ("print-function"))) cb = stencil_extent_proc; dim_cache_[a].dimension_ = cb; @@ -186,7 +186,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) status_= busy; - for (SCM d = get_grob_property ("dependencies"); gh_pair_p (d); + for (SCM d = get_property ("dependencies"); gh_pair_p (d); d = ly_cdr (d)) { unsmob_grob (ly_car (d)) @@ -194,7 +194,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) } - SCM proc = internal_get_grob_property (funcname); + SCM proc = internal_get_property (funcname); if (gh_procedure_p (proc)) gh_call1 (proc, this->self_scm ()); @@ -209,7 +209,7 @@ Grob::get_stencil () const return 0; } - SCM mol = get_grob_property ("stencil"); + SCM mol = get_property ("stencil"); if (unsmob_stencil (mol)) return unsmob_stencil (mol); @@ -218,7 +218,7 @@ Grob::get_stencil () const if (live ()) { Grob *me = (Grob*)this; - me->set_grob_property ("stencil", mol); + me->set_property ("stencil", mol); } return unsmob_stencil (mol); @@ -227,7 +227,7 @@ Grob::get_stencil () const SCM Grob::get_uncached_stencil ()const { - SCM proc = get_grob_property ("print-function"); + SCM proc = get_property ("print-function"); SCM mol = SCM_EOL; if (gh_procedure_p (proc)) @@ -241,10 +241,10 @@ Grob::get_uncached_stencil ()const if (store_locations_global_b) { - SCM cause = get_grob_property ("cause"); + SCM cause = get_property ("cause"); if (Music*m = unsmob_music (cause)) { - SCM music_origin = m->get_mus_property ("origin"); + SCM music_origin = m->get_property ("origin"); if (unsmob_input (music_origin)) origin = music_origin; } @@ -262,7 +262,7 @@ Grob::get_uncached_stencil ()const /* transparent retains dimensions of element. */ - if (m && to_boolean (get_grob_property ("transparent"))) + if (m && to_boolean (get_property ("transparent"))) mol = Stencil (m->extent_box (), SCM_EOL).smobbed_copy (); return mol; @@ -504,7 +504,7 @@ Grob::extent (Grob * refp, Axis a) const ext = ly_scm2interval (d->dimension_); - SCM extra = get_grob_property (a == X_AXIS + SCM extra = get_property (a == X_AXIS ? "extra-X-extent" : "extra-Y-extent"); @@ -517,7 +517,7 @@ Grob::extent (Grob * refp, Axis a) const ext[SMALLER] += gh_scm2double (ly_car (extra)); } - extra = get_grob_property (a == X_AXIS + extra = get_property (a == X_AXIS ? "minimum-X-extent" : "minimum-Y-extent"); if (gh_pair_p (extra)) @@ -590,7 +590,7 @@ common_refpoint_of_array (Link_array const &arr, Grob *common, Axis a) String Grob::name () const { - SCM meta = get_grob_property ("meta"); + SCM meta = get_property ("meta"); SCM nm = scm_assoc (ly_symbol2scm ("name"), meta); nm = (gh_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL; return gh_symbol_p (nm) ? ly_symbol2string (nm) : classname (this); @@ -674,7 +674,7 @@ Grob::warning (String s)const SCM cause = self_scm(); while (Grob * g = unsmob_grob (cause)) { - cause = g->get_grob_property ("cause"); + cause = g->get_property ("cause"); } if (Music *m = unsmob_music (cause)) @@ -761,7 +761,7 @@ Grob::discretionary_processing () bool Grob::internal_has_interface (SCM k) { - SCM ifs = get_grob_property ("interfaces"); + SCM ifs = get_property ("interfaces"); return scm_memq (k, ifs) != SCM_BOOL_F; } diff --git a/lily/group-interface.cc b/lily/group-interface.cc index a62dde9a9c..ff1a4a30b6 100644 --- a/lily/group-interface.cc +++ b/lily/group-interface.cc @@ -25,7 +25,7 @@ Group_interface::add_thing (Grob*me, String name, SCM thing) int Group_interface::count (Grob *me, String name) { - return scm_ilength (me->get_grob_property (name.to_str0 ())); + return scm_ilength (me->get_property (name.to_str0 ())); } diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 42bd74e54e..f00cc045d1 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -26,7 +26,7 @@ Hairpin::print (SCM smob) Grob *me= unsmob_grob (smob); Spanner *spanner = dynamic_cast (me); - SCM s = me->get_grob_property ("grow-direction"); + SCM s = me->get_property ("grow-direction"); if (!is_direction (s)) { me->suicide (); @@ -41,7 +41,7 @@ Hairpin::print (SCM smob) /* Ugh. property name is not general. */ - Real padding = gh_scm2double (me->get_grob_property ("if-text-padding")); + Real padding = gh_scm2double (me->get_property ("if-text-padding")); Drul_array broken; Drul_array bounds ; @@ -101,7 +101,7 @@ Hairpin::print (SCM smob) } bool continued = broken[Direction (-grow_dir)]; - Real height = robust_scm2double (me->get_grob_property ("height"), 0.2) * + Real height = robust_scm2double (me->get_property ("height"), 0.2) * Staff_symbol_referencer::staff_space (me); Real starth, endh; diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc index eacd67fd7a..dabcf7c7e1 100644 --- a/lily/hara-kiri-group-spanner.cc +++ b/lily/hara-kiri-group-spanner.cc @@ -31,11 +31,11 @@ void Hara_kiri_group_spanner::consider_suicide (Grob*me) { Spanner*sp = dynamic_cast (me); - SCM worth = me->get_grob_property ("items-worth-living"); + SCM worth = me->get_property ("items-worth-living"); if (gh_pair_p (worth)) return ; - if (!to_boolean (me->get_grob_property ("remove-first")) + if (!to_boolean (me->get_property ("remove-first")) && broken_spanner_index (sp) == 0) { return ; diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index b4621cb61f..60a3669d7f 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lily/horizontal-bracket-engraver.cc @@ -48,7 +48,7 @@ Horizontal_bracket_engraver::try_music (Music *m) { if (m->is_mus_type ("note-grouping-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); if (d == STOP) { diff --git a/lily/horizontal-bracket.cc b/lily/horizontal-bracket.cc index 8d74224bfa..0164092e81 100644 --- a/lily/horizontal-bracket.cc +++ b/lily/horizontal-bracket.cc @@ -54,7 +54,7 @@ Horizontal_bracket::print (SCM smob) Direction d = get_grob_direction (me); Real thickness = Staff_symbol_referencer::line_thickness (me); - thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); + thickness *= robust_scm2double (me->get_property ("thickness"), 1.0); Stencil b = Lookup::bracket (X_AXIS, ext, thickness, - d* 1.0, thickness/2); diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 15f472cadc..dbf70c7414 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -72,7 +72,7 @@ completize_hyphen (Spanner* sp) { if (!sp->get_bound (RIGHT)) { - SCM heads = sp->get_grob_property ("heads"); + SCM heads = sp->get_property ("heads"); if (gh_pair_p (heads)) { Item* it = dynamic_cast (unsmob_grob (gh_car (heads))); diff --git a/lily/include/context.hh b/lily/include/context.hh index 09015d26ec..aadc76bc67 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -79,12 +79,6 @@ Context * find_context_below (Context * where, Context * unsmob_context (SCM); -#define set_property(x,y) internal_set_property(ly_symbol2scm(x),y) - -/* - C&P! - */ -#define get_property(x) internal_get_property(ly_symbol2scm(x)) DECLARE_UNSMOB(Context,context); #endif /* CONTEXT_HH */ diff --git a/lily/include/grob.hh b/lily/include/grob.hh index f01bf92bdf..ce4c00264a 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -32,9 +32,6 @@ enum Grob_status { typedef void (Grob::*Grob_method_pointer) (void); -#define get_grob_property(x) internal_get_grob_property(ly_symbol2scm(x)) -#define set_grob_property(x,y) internal_set_grob_property(ly_symbol2scm(x),y) - /* Basic output object. */ @@ -72,8 +69,8 @@ public: /* properties */ - SCM internal_get_grob_property (SCM) const; - void internal_set_grob_property (SCM, SCM val); + SCM internal_get_property (SCM) const; + void internal_set_property (SCM, SCM val); void add_to_list_property (SCM, SCM); void warning (String)const; void programming_error (String)const; @@ -118,8 +115,8 @@ public: DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis)); - static SCM ly_set_grob_property (SCM, SCM,SCM); - static SCM ly_get_grob_property (SCM, SCM); + static SCM ly_grob_set_property (SCM, SCM,SCM); + static SCM ly_grob_property (SCM, SCM); bool internal_has_interface (SCM intf); static bool has_interface (Grob*me); diff --git a/lily/include/group-interface.hh b/lily/include/group-interface.hh index 4d4a8c7938..55519b0123 100644 --- a/lily/include/group-interface.hh +++ b/lily/include/group-interface.hh @@ -42,7 +42,7 @@ Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name) { Link_array arr; - for (SCM s = elt->get_grob_property (name); gh_pair_p (s); s = gh_cdr (s)) + for (SCM s = elt->get_property (name); gh_pair_p (s); s = gh_cdr (s)) { SCM e = gh_car (s); arr.push (dynamic_cast (unsmob_grob (e))); diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 443713b6b6..768bb6735e 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -312,4 +312,8 @@ SCM FNAME ARGLIST ; \ LY_DEFINE_WITHOUT_DECL(CLASS ## FNAME, CLASS::FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) +#define get_property(x) internal_get_property(ly_symbol2scm(x)) +#define set_property(x,y) internal_set_property(ly_symbol2scm (x), y) + + #endif /* LILY_GUILE_HH */ diff --git a/lily/include/music.hh b/lily/include/music.hh index 95a9777f3b..a7e3e804eb 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -19,8 +19,6 @@ #include "music-constructor.hh" -#define get_mus_property(x) internal_get_mus_property(ly_symbol2scm(x)) -#define set_mus_property(x,y) internal_set_mus_property(ly_symbol2scm (x), y) #define is_mus_type(x) internal_is_music_type(ly_symbol2scm (x)) /** Music is anything that has duration and supports both time compression and @@ -41,8 +39,8 @@ public: Input *origin () const; void set_spot (Input); - SCM internal_get_mus_property (SCM) const; - void internal_set_mus_property (SCM , SCM val); + SCM internal_get_property (SCM) const; + void internal_set_property (SCM , SCM val); SCM get_property_alist (bool mut) const; bool internal_is_music_type (SCM) const; diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index bbecea499a..642983f72b 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -50,7 +50,7 @@ Instrument_name_engraver::stop_translation_timestep () { if (text_) { - text_->set_grob_property ("side-support-elements", + text_->set_property ("side-support-elements", get_property ("instrumentSupport")); typeset_grob (text_); text_ = 0; @@ -77,8 +77,8 @@ Instrument_name_engraver::create_text () text_ = make_item ("InstrumentName"); - if (text_->get_grob_property ("text") != txt) - text_->set_grob_property ("text", txt); + if (text_->get_property ("text") != txt) + text_->set_property ("text", txt); announce_grob (text_, SCM_EOL); } @@ -171,8 +171,8 @@ Vocal_name_engraver::create_text () text_ = make_item ("VocalName"); - if (text_->get_grob_property ("text") != txt) - text_->set_grob_property ("text", txt); + if (text_->get_property ("text") != txt) + text_->set_property ("text", txt); announce_grob (text_, SCM_EOL); } diff --git a/lily/item.cc b/lily/item.cc index 189d1a4da2..2077c17b45 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -42,7 +42,7 @@ Item::is_breakable (Grob*me) me->programming_error ("only items can be breakable."); Item * i =dynamic_cast (me->get_parent (X_AXIS)); - return (i) ? Item::is_breakable (i) : to_boolean (me->get_grob_property ("breakable")); + return (i) ? Item::is_breakable (i) : to_boolean (me->get_property ("breakable")); } Paper_column * @@ -152,7 +152,7 @@ Item::handle_prebroken_dependencies () give the item to break-visibility itself, so the function can do more complicated things. */ - SCM vis = get_grob_property ("break-visibility"); + SCM vis = get_property ("break-visibility"); if (gh_procedure_p (vis)) { SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED); @@ -168,7 +168,7 @@ Item::handle_prebroken_dependencies () set_extent (SCM_EOL, Y_AXIS); } else if (trans) - set_grob_property ("print-function", SCM_EOL); + set_property ("print-function", SCM_EOL); } } diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 41aeaffbdb..b8426de44b 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -66,12 +66,12 @@ Key_engraver::create_key (bool def) { item_ = make_item ("KeySignature"); - item_->set_grob_property ("c0-position", + item_->set_property ("c0-position", get_property ("centralCPosition")); // todo: put this in basic props. - item_->set_grob_property ("old-accidentals", get_property ("lastKeySignature")); - item_->set_grob_property ("new-accidentals", get_property ("keySignature")); + item_->set_property ("old-accidentals", get_property ("lastKeySignature")); + item_->set_property ("new-accidentals", get_property ("keySignature")); announce_grob(item_, key_ev_ ? key_ev_->self_scm() : SCM_EOL); } @@ -80,7 +80,7 @@ Key_engraver::create_key (bool def) { SCM vis = get_property ("explicitKeySignatureVisibility"); if (gh_procedure_p (vis)) - item_->set_grob_property ("break-visibility",vis); + item_->set_property ("break-visibility",vis); } } @@ -148,7 +148,7 @@ Key_engraver::stop_translation_timestep () void Key_engraver::read_ev (Key_change_ev const * r) { - SCM p = r->get_mus_property ("pitch-alist"); + SCM p = r->get_property ("pitch-alist"); if (!gh_pair_p (p)) return; @@ -170,7 +170,7 @@ Key_engraver::read_ev (Key_change_ev const * r) daddy_context_->set_property ("keySignature", accs); daddy_context_->set_property ("tonic" , - r->get_mus_property ("tonic")); + r->get_property ("tonic")); } diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 246cad751c..dbdfb4d835 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -44,7 +44,7 @@ Key_performer::create_audio_elements () { if (key_req_) { - SCM pitchlist = key_req_->get_mus_property ("pitch-alist"); + SCM pitchlist = key_req_->get_property ("pitch-alist"); SCM proc = scm_primitive_eval (ly_symbol2scm ("accidentals-in-key")); SCM acc = gh_call1 (proc, pitchlist); diff --git a/lily/key-signature-interface.cc b/lily/key-signature-interface.cc index eb936456ff..7ccd2179ed 100644 --- a/lily/key-signature-interface.cc +++ b/lily/key-signature-interface.cc @@ -102,7 +102,7 @@ Key_signature_interface::print (SCM smob) Real inter = Staff_symbol_referencer::staff_space (me)/2.0; - SCM scm_style = me->get_grob_property ("style"); + SCM scm_style = me->get_property ("style"); String style; if (gh_symbol_p (scm_style)) { @@ -113,10 +113,10 @@ Key_signature_interface::print (SCM smob) style = ""; } - SCM newas = me->get_grob_property ("new-accidentals"); + SCM newas = me->get_property ("new-accidentals"); Stencil mol; - SCM c0s = me->get_grob_property ("c0-position"); + SCM c0s = me->get_property ("c0-position"); int c0p = 0; if (gh_number_p (c0s)) c0p = gh_scm2int (c0s); @@ -150,7 +150,7 @@ Key_signature_interface::print (SCM smob) Item *it = dynamic_cast (me) ; if (it->break_status_dir () != RIGHT) { - SCM old = me->get_grob_property ("old-accidentals"); + SCM old = me->get_property ("old-accidentals"); /* Add half a space between cancellation and key sig. diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index 8501e4c5d6..5e2f63ff0a 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -80,7 +80,7 @@ Ligature_engraver::try_music (Music *m) { if (m->is_mus_type ("ligature-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); reqs_drul_[d] = m; return true; } @@ -188,7 +188,7 @@ Ligature_engraver::process_music () prev_start_req_ = reqs_drul_[START]; ligature_ = create_ligature_spanner (); brew_ligature_primitive_proc = - ligature_->get_grob_property ("ligature-primitive-callback"); + ligature_->get_property ("ligature-primitive-callback"); if (brew_ligature_primitive_proc == SCM_EOL) { warning ("Ligature_engraver: ligature-primitive-callback undefined"); @@ -271,7 +271,7 @@ Ligature_engraver::acknowledge_grob (Grob_info info) if (Note_head::has_interface (info.grob_)) { primitives_.push (info); - info.grob_->set_grob_property ("print-function", + info.grob_->set_property ("print-function", brew_ligature_primitive_proc); } if (Rest::has_interface (info.grob_)) diff --git a/lily/line-interface.cc b/lily/line-interface.cc index cc8c17b851..e53e40e22d 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -68,11 +68,11 @@ Stencil Line_interface::line (Grob *me, Offset from, Offset to) { Real thick = Staff_symbol_referencer::line_thickness (me) - * robust_scm2double (me->get_grob_property ("thickness"),1); + * robust_scm2double (me->get_property ("thickness"),1); - SCM type = me->get_grob_property ("style"); + SCM type = me->get_property ("style"); - SCM dash_fraction = me->get_grob_property ("dash-fraction"); + SCM dash_fraction = me->get_property ("dash-fraction"); if (gh_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line")) { @@ -83,7 +83,7 @@ Line_interface::line (Grob *me, Offset from, Offset to) fraction = (fraction >? 0) get_grob_property ("dash-period"), 1.0); + * robust_scm2double (me->get_property ("dash-period"), 1.0); if (period < 0) return Stencil (); diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index 2207d85a44..b9bea18d6f 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -31,12 +31,12 @@ zigzag_stencil (Grob *me, Real dy = dz[Y_AXIS]; Real thick = Staff_symbol_referencer::line_thickness (me); - thick *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); // todo: staff sym referencer? + thick *= robust_scm2double (me->get_property ("thickness"), 1.0); // todo: staff sym referencer? Real staff_space = Staff_symbol_referencer::staff_space (me); - double w = robust_scm2double (me->get_grob_property ("zigzag-width"), 1)*staff_space; - double l = robust_scm2double ( me->get_grob_property ("zigzag-length"), 1)* w; + double w = robust_scm2double (me->get_property ("zigzag-width"), 1)*staff_space; + double l = robust_scm2double ( me->get_property ("zigzag-length"), 1)* w; double h = l>w/2 ? sqrt(l*l-w*w/4) : 0; SCM list = scm_list_n (ly_symbol2scm ("zigzag-line"), @@ -84,7 +84,7 @@ Line_spanner::after_line_breaking (SCM g) /* Can't do suicide, since this mucks up finding the trend. */ - me->set_grob_property ("print-function", SCM_EOL); + me->set_property ("print-function", SCM_EOL); } return SCM_EOL; @@ -97,7 +97,7 @@ Line_spanner::line_stencil (Grob *me, Offset to) { Offset dz = to -from ; - SCM type = me->get_grob_property ("style"); + SCM type = me->get_property ("style"); if (gh_symbol_p (type) && (type == ly_symbol2scm ("line") || type == ly_symbol2scm ("dashed-line") @@ -182,7 +182,7 @@ Line_spanner::print (SCM smob) me->get_bound (RIGHT)); - Real gap = robust_scm2double (me->get_grob_property ("gap"), 0.0); + Real gap = robust_scm2double (me->get_property ("gap"), 0.0); Offset ofxy (gap, 0); /*offset from start point to start of line*/ Offset dxy ; diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index 9b779e5dc4..916510732b 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -24,7 +24,7 @@ Lyric_combine_music::get_length () const Music* Lyric_combine_music::get_music () const { - SCM l = get_mus_property ("elements"); + SCM l = get_property ("elements"); if (!gh_pair_p (l)) return 0; return unsmob_music (gh_car (l)); @@ -34,7 +34,7 @@ Lyric_combine_music::get_music () const Music* Lyric_combine_music::get_lyrics () const { - SCM l = get_mus_property ("elements"); + SCM l = get_property ("elements"); if (!gh_pair_p (l)) return 0; l = gh_cdr (l); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 23b98b095a..6c7c2697dc 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -61,7 +61,7 @@ Lyric_engraver::process_music () { text_= make_item ("LyricText"); - text_->set_grob_property ("text", req_->get_mus_property ("text")); + text_->set_property ("text", req_->get_property ("text")); announce_grob (text_, req_->self_scm()); } } diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 05e90ba421..a367065814 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -23,7 +23,7 @@ Lyric_extender::is_visible (Grob *gr) { Spanner*me = dynamic_cast (gr); - SCM heads = me->get_grob_property ("heads"); + SCM heads = me->get_property ("heads"); int l = scm_ilength (heads); if (l == 0) return false; @@ -65,7 +65,7 @@ Lyric_extender::print (SCM smob) note head, but haven't found a pattern in it yet. --hwn 1/1/04 */ - SCM minlen = me->get_grob_property ("minimum-length"); + SCM minlen = me->get_property ("minimum-length"); Real right_point = left_point + (robust_scm2double (minlen,0)); @@ -78,7 +78,7 @@ Lyric_extender::print (SCM smob) if (heads.size ()) right_point = right_point >? heads.top ()->extent (common, X_AXIS)[RIGHT]; - Real h = sl * robust_scm2double (me->get_grob_property ("thickness"), 0); + Real h = sl * robust_scm2double (me->get_property ("thickness"), 0); Real pad = 2* h; if (r->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) diff --git a/lily/lyric-hyphen.cc b/lily/lyric-hyphen.cc index 5973bab2c4..93f20bca4c 100644 --- a/lily/lyric-hyphen.cc +++ b/lily/lyric-hyphen.cc @@ -45,13 +45,13 @@ Hyphen_spanner::print (SCM smob) while (flip (&d) != LEFT); Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); - Real th = robust_scm2double (me->get_grob_property ("thickness"), 1) * lt ; - Real h = robust_scm2double (me->get_grob_property ("height"), 0.5); + Real th = robust_scm2double (me->get_property ("thickness"), 1) * lt ; + Real h = robust_scm2double (me->get_property ("height"), 0.5); // interval? - Real dp = robust_scm2double (me->get_grob_property ("dash-period"), 1.0); - Real dl = robust_scm2double (me->get_grob_property ("length"), .5 ); + Real dp = robust_scm2double (me->get_property ("dash-period"), 1.0); + Real dl = robust_scm2double (me->get_property ("length"), .5 ); if (dp < dl) dp = 1.5 * dl; @@ -98,7 +98,7 @@ Hyphen_spanner::set_spacing_rods (SCM smob) Rod r; Spanner*sp = dynamic_cast (me); r.distance_ = - robust_scm2double (me->get_grob_property ("minimum-length"), 0); + robust_scm2double (me->get_property ("minimum-length"), 0); Direction d=LEFT; do diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index c0279b7cf9..ae6e778ab2 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -40,11 +40,11 @@ Lyric_performer::create_audio_elements () { // FIXME: won't work with fancy lyrics if (lreqs_.size () - && gh_string_p (lreqs_[0]->get_mus_property ("text")) - && ly_scm2string (lreqs_[0]->get_mus_property ("text")).length ()) + && gh_string_p (lreqs_[0]->get_property ("text")) + && ly_scm2string (lreqs_[0]->get_property ("text")).length ()) { audio_ = new Audio_text (Audio_text::LYRIC, - ly_scm2string (lreqs_[0]->get_mus_property ("text"))); + ly_scm2string (lreqs_[0]->get_property ("text"))); Audio_element_info info (audio_, lreqs_[0]); announce_element (info); } diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index 5c087ff18d..fb94dded75 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -227,7 +227,7 @@ Lyric_phrasing_engraver::process_acknowledged_grobs () { l->set_parent (h, X_AXIS); if (alignment) - l->set_grob_property ("self-alignment-X", gh_int2scm (alignment)); + l->set_property ("self-alignment-X", gh_int2scm (alignment)); } } diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 5016287dec..0400f74509 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -68,7 +68,7 @@ Mark_engraver::stop_translation_timestep () { if (text_) { - text_->set_grob_property ("side-support-elements" , get_property ("stavesFound")); + text_->set_property ("side-support-elements" , get_property ("stavesFound")); typeset_grob (text_); text_ =0; } @@ -114,7 +114,7 @@ Mark_engraver::process_music () */ - SCM m = mark_ev_->get_mus_property ("label"); + SCM m = mark_ev_->get_property ("label"); SCM proc = get_property ("markFormatter"); if (!Text_item::markup_p (m) && gh_procedure_p (proc)) @@ -138,7 +138,7 @@ Mark_engraver::process_music () } if (Text_item::markup_p (m)) - text_->set_grob_property ("text", m); + text_->set_property ("text", m); else warning ("Mark label should be markup object."); } diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index df169a9474..d4fdd3cace 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -96,9 +96,9 @@ Measure_grouping_engraver::process_music () get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_)); if (grouplen == 3) - grouping_->set_grob_property ("style", ly_symbol2scm ("triangle")); + grouping_->set_property ("style", ly_symbol2scm ("triangle")); else - grouping_->set_grob_property ("style", ly_symbol2scm ("bracket")); + grouping_->set_property ("style", ly_symbol2scm ("bracket")); break ; } diff --git a/lily/measure-grouping-spanner.cc b/lily/measure-grouping-spanner.cc index d6b4b6f6ce..20c8cd3494 100644 --- a/lily/measure-grouping-spanner.cc +++ b/lily/measure-grouping-spanner.cc @@ -23,10 +23,10 @@ Measure_grouping::print (SCM grob) /* TODO: robustify. */ - SCM which = me->get_grob_property ("style"); - Real height = robust_scm2double (me->get_grob_property ("height"), 1); + SCM which = me->get_property ("style"); + Real height = robust_scm2double (me->get_property ("height"), 1); - Real t = Staff_symbol_referencer::line_thickness (me) * robust_scm2double (me->get_grob_property ("thickness"), 1); + Real t = Staff_symbol_referencer::line_thickness (me) * robust_scm2double (me->get_property ("thickness"), 1); Grob *common = me->get_bound(LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS); diff --git a/lily/melisma-translator.cc b/lily/melisma-translator.cc index f8090b134f..ce14a2909e 100644 --- a/lily/melisma-translator.cc +++ b/lily/melisma-translator.cc @@ -52,7 +52,7 @@ Melisma_translator::process_music () { if (event_) { - SCM sd = event_->get_mus_property ("span-direction"); + SCM sd = event_->get_property ("span-direction"); Direction d = to_dir (sd); if (d == START) daddy_context_->set_property ("melismaBusy", SCM_BOOL_T); diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index 629c299aa1..299d764447 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -211,7 +211,7 @@ Mensural_ligature_engraver::apply_transition (Array primitives, programming_error ("last_primitive undefined"); break; } - last_primitive->set_grob_property ("primitive", gh_int2scm (output)); + last_primitive->set_property ("primitive", gh_int2scm (output)); break; case MLP_BB: case MLP_LB: @@ -226,8 +226,8 @@ Mensural_ligature_engraver::apply_transition (Array primitives, programming_error ("primitive undefined"); break; } - last_primitive->set_grob_property ("primitive", gh_int2scm (output)); - primitive->set_grob_property ("primitive", gh_int2scm (MLP_NONE)); + last_primitive->set_property ("primitive", gh_int2scm (output)); + primitive->set_property ("primitive", gh_int2scm (MLP_NONE)); break; case MLP_SS: // delayed primitive with two note heads @@ -241,8 +241,8 @@ Mensural_ligature_engraver::apply_transition (Array primitives, programming_error ("last_primitive undefined"); break; } - last_last_primitive->set_grob_property ("primitive", gh_int2scm (output)); - last_primitive->set_grob_property ("primitive", gh_int2scm (MLP_NONE)); + last_last_primitive->set_property ("primitive", gh_int2scm (output)); + last_primitive->set_property ("primitive", gh_int2scm (MLP_NONE)); break; default: programming_error (_f ("unexpected case fall-through")); @@ -284,7 +284,7 @@ Mensural_ligature_engraver::transform_heads (Array primitives) } else { - pitch = *unsmob_pitch (nr->get_mus_property ("pitch")); + pitch = *unsmob_pitch (nr->get_property ("pitch")); have_pitch = 1; } @@ -343,13 +343,13 @@ void Mensural_ligature_engraver::propagate_properties (Spanner *ligature, Array primitives) { - Real thickness = robust_scm2double (ligature->get_grob_property ("thickness"), 1.4); + Real thickness = robust_scm2double (ligature->get_property ("thickness"), 1.4); thickness *= ligature->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); Real head_width = Font_interface::get_default_font (ligature)-> find_by_name ("noteheads--1mensural").extent (X_AXIS).length (); - Real flexa_width = robust_scm2double (ligature->get_grob_property ("flexa-width"), 2); + Real flexa_width = robust_scm2double (ligature->get_property ("flexa-width"), 2); flexa_width *= Staff_symbol_referencer::staff_space (ligature); Real half_flexa_width = 0.5 * (flexa_width + thickness); @@ -357,26 +357,26 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature, for (int i = 0; i < primitives.size (); i++) { Item *primitive = dynamic_cast (primitives[i].grob_); - int output = gh_scm2int (primitive->get_grob_property ("primitive")); - primitive->set_grob_property ("thickness", + int output = gh_scm2int (primitive->get_property ("primitive")); + primitive->set_property ("thickness", gh_double2scm (thickness)); switch (output) { case MLP_NONE: - primitive->set_grob_property ("head-width", + primitive->set_property ("head-width", gh_double2scm (half_flexa_width)); break; case MLP_sc: case MLP_ss: case MLP_cs: - primitive->set_grob_property ("head-width", + primitive->set_property ("head-width", gh_double2scm (head_width)); break; case MLP_BB: case MLP_LB: case MLP_SS: - primitive->set_grob_property ("head-width", + primitive->set_property ("head-width", gh_double2scm (half_flexa_width)); - primitive->set_grob_property ("flexa-width", + primitive->set_property ("flexa-width", gh_double2scm (flexa_width)); break; default: @@ -407,8 +407,8 @@ Mensural_ligature_engraver::fold_up_primitives (Array primitives) } distance += - gh_scm2double (current->get_grob_property ("head-width")) - - gh_scm2double (current->get_grob_property ("thickness")); + gh_scm2double (current->get_property ("head-width")) - + gh_scm2double (current->get_property ("thickness")); } } @@ -419,15 +419,15 @@ Mensural_ligature_engraver::join_primitives (Array primitives) for (int i = 0; i < primitives.size (); i++) { Grob_info info = primitives[i]; - Pitch pitch = *unsmob_pitch (info.music_cause ()->get_mus_property ("pitch")); + Pitch pitch = *unsmob_pitch (info.music_cause ()->get_property ("pitch")); if (i > 0) { Item *primitive = dynamic_cast (info.grob_); - int output = gh_scm2int (primitive->get_grob_property ("primitive")); + int output = gh_scm2int (primitive->get_property ("primitive")); if (output & MLP_ANY) { int delta_pitch = (pitch.steps () - last_pitch.steps ()); - primitive->set_grob_property ("join-left-amount", + primitive->set_property ("join-left-amount", gh_int2scm (delta_pitch)); } } diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index 0866707bd1..c696661d8a 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -127,7 +127,7 @@ add_ledger_lines (Grob *me, Stencil *out, int pos, Real offs, Stencil internal_brew_primitive (Grob *me, bool ledger_take_space) { - SCM primitive_scm = me->get_grob_property ("primitive"); + SCM primitive_scm = me->get_property ("primitive"); if (primitive_scm == SCM_EOL) { programming_error ("Mensural_ligature:" @@ -143,15 +143,15 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) Real staff_space = Staff_symbol_referencer::staff_space (me); if (primitive & MLP_ANY) { - thickness = robust_scm2double ( me->get_grob_property ("thickness"), .14); + thickness = robust_scm2double ( me->get_property ("thickness"), .14); } if (primitive & MLP_FLEXA) { - delta_pitch = robust_scm2int (me->get_grob_property ("delta-pitch"), + delta_pitch = robust_scm2int (me->get_property ("delta-pitch"), 0); - flexa_width = robust_scm2double (me->get_grob_property ("flexa-width"), 2.0 * staff_space); + flexa_width = robust_scm2double (me->get_property ("flexa-width"), 2.0 * staff_space); } switch (primitive) @@ -185,7 +185,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) return Stencil (); } - SCM join_left_scm = me->get_grob_property ("join-left-amount"); + SCM join_left_scm = me->get_property ("join-left-amount"); if (join_left_scm != SCM_EOL) { int join_left = gh_scm2int (join_left_scm); diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index b892ed32c7..bf5e4b1414 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -65,7 +65,7 @@ Metronome_mark_engraver::stop_translation_timestep () if (bar_line_ && !text_->get_parent (X_AXIS)) text_->set_parent (bar_line_, X_AXIS); - text_->set_grob_property ("side-support-elements" , get_property ("stavesFound")); + text_->set_property ("side-support-elements" , get_property ("stavesFound")); typeset_grob (text_); text_ =0; } @@ -103,7 +103,7 @@ Metronome_mark_engraver::process_music () SCM result= scm_call_2 (proc, mark_ev_->self_scm (), daddy_context_->self_scm()); - text_->set_grob_property ("text", result); + text_->set_property ("text", result); } } diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 3884fbe4b2..04e348d23b 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -90,11 +90,11 @@ Multi_measure_rest_engraver::process_music () = make_spanner ("MultiMeasureRestText"); Music* e = text_events_[i]; - SCM t = e->get_mus_property ("text"); - SCM dir = e->get_mus_property ("direction"); - sp->set_grob_property ("text",t); + SCM t = e->get_property ("text"); + SCM dir = e->get_property ("direction"); + sp->set_property ("text",t); if (is_direction (dir)) - sp->set_grob_property ("direction",dir); + sp->set_property ("direction",dir); numbers_.push (sp); announce_grob (sp, e->self_scm()); @@ -108,7 +108,7 @@ Multi_measure_rest_engraver::process_music () Grob *last =0; for (int i=0; i get_grob_property ("direction")) + if (gh_int2scm (d) == numbers_[i]->get_property ("direction")) { if (last) Side_position_interface::add_support (numbers_[i], last); @@ -236,20 +236,20 @@ Multi_measure_rest_engraver::start_translation_timestep () We can't plug a markup directly into the grob, since the measure-count determines the formatting of the mmrest. */ - last_rest_->set_grob_property ("measure-count", gh_int2scm (num)); + last_rest_->set_property ("measure-count", gh_int2scm (num)); SCM sml = get_property ("measureLength"); Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1); if (ml >= Rational (2)) { - last_rest_->set_grob_property ("use-breve-rest", SCM_BOOL_T); + last_rest_->set_property ("use-breve-rest", SCM_BOOL_T); } mmrest_ = 0; numbers_.clear (); Grob * last = last_numbers_.size() ? last_numbers_[0] : 0; - if (last && last->get_grob_property ("text") == SCM_EOL) + if (last && last->get_property ("text") == SCM_EOL) { SCM thres = get_property ("restNumberThreshold"); int t = 1; @@ -262,7 +262,7 @@ Multi_measure_rest_engraver::start_translation_timestep () { SCM text = scm_number_to_string (gh_int2scm (num), SCM_MAKINUM (10)); - last->set_grob_property ("text", text); + last->set_property ("text", text); } } } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index ad45fbc197..7fd6e765ce 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -101,7 +101,7 @@ Multi_measure_rest::print (SCM smob) mol.add_stencil (symbol_stencil (me, space)); int measures = 0; - SCM m (me->get_grob_property ("measure-count")); + SCM m (me->get_property ("measure-count")); if (gh_number_p (m)) { measures = gh_scm2int (m); @@ -117,7 +117,7 @@ Stencil Multi_measure_rest::symbol_stencil (Grob *me, Real space) { int measures = 0; - SCM m (me->get_grob_property ("measure-count")); + SCM m (me->get_property ("measure-count")); if (gh_number_p (m)) { measures = gh_scm2int (m); @@ -126,7 +126,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space) return Stencil(); - SCM limit = me->get_grob_property ("expand-limit"); + SCM limit = me->get_property ("expand-limit"); if (measures > gh_scm2int (limit)) { Real padding = 0.15; @@ -141,7 +141,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space) Font_metric *musfont = select_font (me->get_paper (), alist_chain); - SCM sml = me->get_grob_property ("use-breve-rest"); + SCM sml = me->get_property ("use-breve-rest"); if (measures == 1) { if (sml == SCM_BOOL_T) @@ -180,8 +180,8 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space) Stencil Multi_measure_rest::big_rest (Grob *me, Real width) { - Real thick_thick =robust_scm2double (me->get_grob_property ("thick-thickness"), 1.0); - Real hair_thick = robust_scm2double (me->get_grob_property ("hair-thickness"), .1); + Real thick_thick =robust_scm2double (me->get_property ("thick-thickness"), 1.0); + Real hair_thick = robust_scm2double (me->get_property ("hair-thickness"), .1); Real ss = Staff_symbol_referencer::staff_space (me); @@ -219,7 +219,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures, int count = 0; Real symbols_width = 0.0; - SCM sml = me->get_grob_property ("use-breve-rest"); + SCM sml = me->get_property ("use-breve-rest"); while (l) { @@ -337,7 +337,7 @@ Multi_measure_rest::set_spacing_rods (SCM smob) rod.distance_ = l->extent (l, X_AXIS)[BIGGER] - r->extent (r, X_AXIS)[SMALLER] + sym_width + 2.0; // 2.0 = magic! - Real minlen = robust_scm2double (me->get_grob_property ("minimum-length"), 0.0); + Real minlen = robust_scm2double (me->get_property ("minimum-length"), 0.0); rod.distance_ = max(rod.distance_, minlen); rod.add_to_cols (); diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 972859178f..438a02bad3 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -76,7 +76,7 @@ Music_iterator::get_static_get_iterator (Music *m) { Music_iterator * p =0; - SCM ctor = m->get_mus_property ("iterator-ctor") ; + SCM ctor = m->get_property ("iterator-ctor") ; SCM iter = SCM_EOL; if (gh_procedure_p (ctor)) { diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 3848a3708b..ad7333c104 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -14,7 +14,7 @@ SCM Music_sequence::music_list ()const { - return get_mus_property ("elements"); + return get_property ("elements"); } /* @@ -23,7 +23,7 @@ Music_sequence::music_list ()const void Music_sequence::append_music (Music *m) { - set_mus_property ("elements", + set_property ("elements", gh_append2 (music_list (), gh_cons (m->self_scm (), SCM_EOL))); scm_gc_unprotect_object (m->self_scm ()); } diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 8118cc23ae..b13d7fac60 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -27,7 +27,7 @@ Music_wrapper::get_length () const Music* Music_wrapper::element () const { - return unsmob_music (get_mus_property ("element")); + return unsmob_music (get_property ("element")); } diff --git a/lily/music.cc b/lily/music.cc index 9514210f33..e719e028f3 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -20,7 +20,7 @@ SCM ly_deep_mus_copy (SCM); bool Music::internal_is_music_type (SCM k)const { - SCM ifs = get_mus_property ("types"); + SCM ifs = get_property ("types"); return scm_memq (k, ifs) != SCM_BOOL_F; } @@ -28,7 +28,7 @@ Music::internal_is_music_type (SCM k)const String Music::name () const { - SCM nm = get_mus_property ("name"); + SCM nm = get_property ("name"); if (gh_symbol_p (nm)) { return ly_symbol2string (nm); @@ -83,7 +83,7 @@ Music::mark_smob (SCM m) Moment Music::get_length () const { - SCM l = get_mus_property ("length"); + SCM l = get_property ("length"); if (unsmob_moment (l)) return *unsmob_moment (l); else if (gh_procedure_p (l)) @@ -98,7 +98,7 @@ Music::get_length () const Moment Music::start_mom () const { - SCM l = get_mus_property ("start-moment-function"); + SCM l = get_property ("start-moment-function"); if (gh_procedure_p (l)) { SCM res = gh_call1 (l, self_scm ()); @@ -130,7 +130,7 @@ Music::print_smob (SCM s, SCM p, scm_print_state*) scm_puts ("#get_mus_property ("name"); + SCM nm = m->get_property ("name"); if (gh_symbol_p (nm) || gh_string_p (nm)) { scm_display (nm, p); @@ -153,12 +153,12 @@ Music::print_smob (SCM s, SCM p, scm_print_state*) Pitch Music::to_relative_octave (Pitch p) { - SCM elt = get_mus_property ("element"); + SCM elt = get_property ("element"); if (Music* m = unsmob_music (elt)) p = m->to_relative_octave (p); - p = music_list_to_relative (get_mus_property ("elements"), + p = music_list_to_relative (get_property ("elements"), p, false); return p; } @@ -166,24 +166,24 @@ Music::to_relative_octave (Pitch p) void Music::compress (Moment factor) { - SCM elt = get_mus_property ("element"); + SCM elt = get_property ("element"); if (Music* m = unsmob_music (elt)) m->compress (factor); - compress_music_list (get_mus_property ("elements"), factor); + compress_music_list (get_property ("elements"), factor); } void Music::transpose (Pitch delta) { - SCM elt = get_mus_property ("element"); + SCM elt = get_property ("element"); if (Music* m = unsmob_music (elt)) m->transpose (delta); - transpose_music_list (get_mus_property ("elements"), delta); + transpose_music_list (get_property ("elements"), delta); } @@ -195,7 +195,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Music); /****************************/ SCM -Music::internal_get_mus_property (SCM sym) const +Music::internal_get_property (SCM sym) const { SCM s = scm_sloppy_assq (sym, mutable_property_alist_); if (s != SCM_BOOL_F) @@ -206,7 +206,7 @@ Music::internal_get_mus_property (SCM sym) const } void -Music::internal_set_mus_property (SCM s, SCM v) +Music::internal_set_property (SCM s, SCM v) { if (internal_type_checking_global_b) if (!type_check_assignment (s, v, ly_symbol2scm ("music-type?"))) @@ -220,13 +220,13 @@ Music::internal_set_mus_property (SCM s, SCM v) void Music::set_spot (Input ip) { - set_mus_property ("origin", make_input (ip)); + set_property ("origin", make_input (ip)); } Input* Music::origin () const { - Input *ip = unsmob_input (get_mus_property ("origin")); + Input *ip = unsmob_input (get_property ("origin")); return ip ? ip : & dummy_input_global; } @@ -245,8 +245,8 @@ LY_DEFINE(ly_music_length, return sc->get_length().smobbed_copy(); } -LY_DEFINE(ly_get_mus_property, - "ly:get-mus-property", 2, 0, 0, (SCM mus, SCM sym), +LY_DEFINE(ly_get_property, + "ly:music-property", 2, 0, 0, (SCM mus, SCM sym), "Get the property @var{sym} of music expression @var{mus}.\n" "If @var{sym} is undefined, return @code{'()}.\n" ) { @@ -254,11 +254,11 @@ LY_DEFINE(ly_get_mus_property, SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "music"); SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); - return sc->internal_get_mus_property (sym); + return sc->internal_get_property (sym); } -LY_DEFINE(ly_set_mus_property, - "ly:set-mus-property!", 3, 0, 0, +LY_DEFINE(ly_set_property, + "ly:music-set-property!", 3, 0, 0, (SCM mus, SCM sym, SCM val), "Set property @var{sym} in music expression @var{mus} to @var{val}.") { @@ -269,7 +269,7 @@ LY_DEFINE(ly_set_mus_property, bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?")); if (ok) { - sc->internal_set_mus_property (sym, val); + sc->internal_set_property (sym, val); } return SCM_UNSPECIFIED; diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 9af231f9e9..e23fd23db3 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -65,7 +65,7 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf) { Music * note_ev =inf.music_cause (); - SCM arts = note_ev->get_mus_property ("articulations"); + SCM arts = note_ev->get_property ("articulations"); for (SCM s = arts; gh_pair_p (s); s = gh_cdr (s)) { @@ -89,8 +89,8 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf) } else if (m->is_mus_type ("harmonic-event")) { - inf.grob_->set_grob_property ("style", ly_symbol2scm ("harmonic")); - Grob * d = unsmob_grob (inf.grob_->get_grob_property ("dot")); + inf.grob_->set_property ("style", ly_symbol2scm ("harmonic")); + Grob * d = unsmob_grob (inf.grob_->get_property ("dot")); if (d) d->suicide (); } @@ -113,7 +113,7 @@ New_fingering_engraver::add_script (Grob * head, Grob * g= make_item ("Script"); make_script_from_event (g, &ft.description_, daddy_context_, - event->get_mus_property ("articulation-type"), 0); + event->get_property ("articulation-type"), 0); if (g) { ft.script_ =g ; @@ -138,7 +138,7 @@ New_fingering_engraver::add_fingering (Grob * head, Side_position_interface::add_support (ft.script_, head); - int d = gh_scm2int (event->get_mus_property ("digit")); + int d = gh_scm2int (event->get_property ("digit")); /* TODO: @@ -155,7 +155,7 @@ New_fingering_engraver::add_fingering (Grob * head, event->origin()->warning (_("music for the martians.")); } SCM sstr = scm_number_to_string (gh_int2scm (d), gh_int2scm (10)) ; - ft.script_->set_grob_property ("text", sstr); + ft.script_->set_property ("text", sstr); ft.finger_event_ = event; ft.note_event_ = hevent; @@ -179,7 +179,7 @@ New_fingering_engraver::position_scripts () */ for (int i = 0; i < fingerings_.size(); i++) { - fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_grob_property( "staff-position")); + fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_property( "staff-position")); } for (int i = fingerings_.size(); i--;) @@ -189,7 +189,7 @@ New_fingering_engraver::position_scripts () Array up, down, horiz; for (int i = fingerings_.size(); i--;) { - SCM d = fingerings_[i].finger_event_->get_mus_property ("direction"); + SCM d = fingerings_[i].finger_event_->get_property ("direction"); if (to_dir (d)) { ((to_dir (d) == UP) ? up : down ).push (fingerings_[i]); @@ -247,7 +247,7 @@ New_fingering_engraver::position_scripts () f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, Y_AXIS); f->add_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS); - f->set_grob_property ("direction", gh_int2scm (hordir)); + f->set_property ("direction", gh_int2scm (hordir)); typeset_grob (f); } @@ -257,13 +257,13 @@ New_fingering_engraver::position_scripts () Finger_tuple ft = up[i]; Grob* f = ft.script_; f->set_parent (ft.head_, X_AXIS); - f->set_grob_property ("script-priority", + f->set_property ("script-priority", gh_int2scm (finger_prio + i)); f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS); f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS); f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS); - f->set_grob_property ("direction", gh_int2scm (UP)); + f->set_property ("direction", gh_int2scm (UP)); typeset_grob (f); } @@ -273,13 +273,13 @@ New_fingering_engraver::position_scripts () Finger_tuple ft = down[i]; Grob* f = ft.script_; f->set_parent (ft.head_, X_AXIS); - f->set_grob_property ("script-priority", + f->set_property ("script-priority", gh_int2scm (finger_prio + down.size() - i)); f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS); f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS); f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS); - f->set_grob_property ("direction", gh_int2scm (DOWN)); + f->set_property ("direction", gh_int2scm (DOWN)); typeset_grob (f); } } @@ -300,14 +300,14 @@ New_fingering_engraver::stop_translation_timestep () for (int j = heads_.size() ; j--;) Side_position_interface::add_support (sc, heads_[j]); - if (stem_ && to_dir (sc->get_grob_property ("side-relative-direction"))) - sc->set_grob_property ("direction-source", stem_->self_scm ()); + if (stem_ && to_dir (sc->get_property ("side-relative-direction"))) + sc->set_property ("direction-source", stem_->self_scm ()); SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), articulations_[i].description_); if (gh_pair_p (follow) && to_boolean (gh_cdr (follow))) { sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS); - sc->set_grob_property ("staff-padding" , SCM_EOL); + sc->set_property ("staff-padding" , SCM_EOL); } typeset_grob (sc); } diff --git a/lily/new-lyric-combine-music-iterator.cc b/lily/new-lyric-combine-music-iterator.cc index 0278c0eaf2..fef21dde29 100644 --- a/lily/new-lyric-combine-music-iterator.cc +++ b/lily/new-lyric-combine-music-iterator.cc @@ -137,7 +137,7 @@ New_lyric_combine_music_iterator::derived_substitute (Context *f, Context *t) void New_lyric_combine_music_iterator::construct_children () { - Music *m = unsmob_music (get_music ()->get_mus_property ("element")); + Music *m = unsmob_music (get_music ()->get_property ("element")); lyric_iter_ = unsmob_iterator (get_iterator (m)); find_voice (); @@ -158,7 +158,7 @@ New_lyric_combine_music_iterator::find_voice () { if (!music_context_) { - SCM voice_name = get_music ()->get_mus_property ("associated-context"); + SCM voice_name = get_music ()->get_property ("associated-context"); if (gh_string_p (voice_name)) { diff --git a/lily/note-collision.cc b/lily/note-collision.cc index db71ddf296..82e3dc091c 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -29,9 +29,9 @@ Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis) me = me->get_parent (a); - if (! to_boolean (me->get_grob_property ("positioning-done"))) + if (! to_boolean (me->get_property ("positioning-done"))) { - me->set_grob_property ("positioning-done", SCM_BOOL_T); + me->set_property ("positioning-done", SCM_BOOL_T); do_shifts (me); } @@ -78,14 +78,14 @@ check_meshing_chords (Grob *me, if (merge_possible && Rhythmic_head::dot_count (nu) != Rhythmic_head::dot_count (nd) - && !to_boolean (me->get_grob_property ("merge-differently-dotted"))) + && !to_boolean (me->get_property ("merge-differently-dotted"))) merge_possible = false; /* Can only merge different heads if merge-differently-headed is set. */ if (merge_possible && upball_type != dnball_type - && !to_boolean (me->get_grob_property ("merge-differently-headed"))) + && !to_boolean (me->get_property ("merge-differently-headed"))) merge_possible = false; /* Should never merge quarter and half notes, as this would make @@ -224,14 +224,14 @@ check_meshing_chords (Grob *me, if (dot_wipe_head) { - if (Grob *d = unsmob_grob (dot_wipe_head->get_grob_property ("dot"))) + if (Grob *d = unsmob_grob (dot_wipe_head->get_property ("dot"))) d->suicide (); } if (wipe_ball && wipe_ball->live ()) { - wipe_ball->set_grob_property ("transparent", SCM_BOOL_T); - wipe_ball->set_grob_property ("stencil", SCM_EOL); + wipe_ball->set_property ("transparent", SCM_BOOL_T); + wipe_ball->set_property ("stencil", SCM_EOL); } } /* TODO: these numbers are magic; should devise a set of grob props @@ -257,7 +257,7 @@ check_meshing_chords (Grob *me, && Rhythmic_head::dot_count (nd) > Rhythmic_head::dot_count (nu) && (full_collide || close_half_collide)) { - Grob *d = unsmob_grob (nd->get_grob_property ("dot")); + Grob *d = unsmob_grob (nd->get_property ("dot")); Grob *parent = d->get_parent (X_AXIS); if (Dot_column::has_interface (parent)) Side_position_interface::add_support (parent, nu); @@ -316,7 +316,7 @@ Note_collision_interface::get_clash_groups (Grob *me) { Drul_array > clash_groups; - SCM s = me->get_grob_property ("elements"); + SCM s = me->get_property ("elements"); for (; gh_pair_p (s); s = ly_cdr (s)) { SCM car = ly_car (s); @@ -360,7 +360,7 @@ Note_collision_interface::automatic_shift (Grob *me, for (int i=0; i < clashes.size (); i++) { SCM sh - = clashes[i]->get_grob_property ("horizontal-shift"); + = clashes[i]->get_property ("horizontal-shift"); if (gh_number_p (sh)) shift.push (gh_scm2int (sh)); @@ -442,12 +442,12 @@ Note_collision_interface::forced_shift (Grob *me) { SCM tups = SCM_EOL; - SCM s = me->get_grob_property ("elements"); + SCM s = me->get_property ("elements"); for (; gh_pair_p (s); s = ly_cdr (s)) { Grob * se = unsmob_grob (ly_car (s)); - SCM force = se->get_grob_property ("force-hshift"); + SCM force = se->get_property ("force-hshift"); if (gh_number_p (force)) { tups = gh_cons (gh_cons (se->self_scm (), force), diff --git a/lily/note-column.cc b/lily/note-column.cc index 1d711642a3..84ac1db2df 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -26,14 +26,14 @@ bool Note_column::has_rests (Grob*me) { - return unsmob_grob (me->get_grob_property ("rest")); + return unsmob_grob (me->get_property ("rest")); } int Note_column::shift_compare (Grob *const &p1, Grob *const&p2) { - SCM s1 = p1->get_grob_property ("horizontal-shift"); - SCM s2 = p2->get_grob_property ("horizontal-shift"); + SCM s1 = p1->get_property ("horizontal-shift"); + SCM s2 = p2->get_property ("horizontal-shift"); int h1 = (gh_number_p (s1))? gh_scm2int (s1) :0; int h2 = (gh_number_p (s2)) ? gh_scm2int (s2):0; @@ -43,7 +43,7 @@ Note_column::shift_compare (Grob *const &p1, Grob *const&p2) Item * Note_column::get_stem (Grob*me) { - SCM s = me->get_grob_property ("stem"); + SCM s = me->get_property ("stem"); return unsmob_item (s); } @@ -54,7 +54,7 @@ Note_column::head_positions_interval (Grob *me) iv.set_empty (); - SCM h = me->get_grob_property ("note-heads"); + SCM h = me->get_property ("note-heads"); for (; gh_pair_p (h); h = ly_cdr (h)) { Grob *se = unsmob_grob (ly_car (h)); @@ -68,10 +68,10 @@ Note_column::head_positions_interval (Grob *me) Direction Note_column::dir (Grob* me) { - Grob *stem = unsmob_grob (me->get_grob_property ("stem")); + Grob *stem = unsmob_grob (me->get_property ("stem")); if (stem && Stem::has_interface (stem)) return Stem::get_direction (stem); - else if (gh_pair_p (me->get_grob_property ("note-heads"))) + else if (gh_pair_p (me->get_property ("note-heads"))) return (Direction)sign (head_positions_interval (me).center ()); programming_error ("Note column without heads and stem!"); @@ -82,7 +82,7 @@ Note_column::dir (Grob* me) void Note_column::set_stem (Grob*me,Grob * stem) { - me->set_grob_property ("stem", stem->self_scm ()); + me->set_property ("stem", stem->self_scm ()); me->add_dependency (stem); Axis_group_interface::add_element (me, stem); } @@ -91,7 +91,7 @@ Note_column::set_stem (Grob*me,Grob * stem) Grob* Note_column::get_rest (Grob*me) { - return unsmob_grob (me->get_grob_property ("rest")); + return unsmob_grob (me->get_property ("rest")); } void @@ -100,14 +100,14 @@ Note_column::add_head (Grob*me,Grob *h) bool both = false; if (Rest::has_interface (h)) { - if (gh_pair_p (me->get_grob_property ("note-heads"))) + if (gh_pair_p (me->get_property ("note-heads"))) both = true; else - me->set_grob_property ("rest", h->self_scm ()); + me->set_property ("rest", h->self_scm ()); } else if (Note_head::has_interface (h)) { - if (unsmob_grob (me->get_grob_property ("rest"))) + if (unsmob_grob (me->get_property ("rest"))) both = true; Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"),h); } @@ -125,8 +125,8 @@ Note_column::add_head (Grob*me,Grob *h) void Note_column::translate_rests (Grob*me, int dy) { - Grob * r = unsmob_grob (me->get_grob_property ("rest")); - if (r && !gh_number_p (r->get_grob_property ("staff-position"))) + Grob * r = unsmob_grob (me->get_property ("rest")); + if (r && !gh_number_p (r->get_property ("staff-position"))) { r->translate_axis (dy * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS); } @@ -156,12 +156,12 @@ Note_column::first_head (Grob*me) Grob* Note_column::accidentals (Grob *me) { - SCM heads = me->get_grob_property ("note-heads"); + SCM heads = me->get_property ("note-heads"); Grob * acc = 0; for (;gh_pair_p (heads); heads =gh_cdr (heads)) { Grob * h = unsmob_grob (gh_car (heads)); - acc = h ? unsmob_grob (h->get_grob_property ("accidental-grob")) : 0; + acc = h ? unsmob_grob (h->get_property ("accidental-grob")) : 0; if (acc) break; } diff --git a/lily/note-head.cc b/lily/note-head.cc index af32eeb209..3e2761b83c 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -121,14 +121,14 @@ Note_head::brew_ledger_lines (Grob *me, Stencil internal_print (Grob *me, bool with_ledgers) { - SCM style = me->get_grob_property ("style"); + SCM style = me->get_property ("style"); if (!gh_symbol_p (style)) { return Stencil (); } SCM log = gh_int2scm (Note_head::get_balltype (me)); - SCM proc = me->get_grob_property ("glyph-name-procedure"); + SCM proc = me->get_property ("glyph-name-procedure"); SCM scm_font_char = scm_call_2 (proc, log, style); String font_char = "noteheads-" + ly_scm2string (scm_font_char); @@ -148,7 +148,7 @@ internal_print (Grob *me, bool with_ledgers) ledger_size.widen ( ledger_size.length ()/4); Real left_shorten =0.0; - if (Grob * g = unsmob_grob(me->get_grob_property ("accidental-grob"))) + if (Grob * g = unsmob_grob(me->get_property ("accidental-grob"))) { /* make a little room for accidentals. @@ -200,7 +200,7 @@ Note_head::print (SCM smob) Interval Note_head::head_extent (Grob *me, Axis a) { - SCM brewer = me->get_grob_property ("print-function"); + SCM brewer = me->get_property ("print-function"); if (brewer == Note_head::print_proc) { Stencil mol = internal_print (me, false); @@ -242,8 +242,8 @@ Note_head::brew_ez_stencil (SCM smob) int b = (l >= 2); - SCM cause = me->get_grob_property ("cause"); - SCM spitch = unsmob_music (cause)->get_mus_property ("pitch"); + SCM cause = me->get_property ("cause"); + SCM spitch = unsmob_music (cause)->get_property ("pitch"); Pitch* pit = unsmob_pitch (spitch); char s[2] = "a"; @@ -276,19 +276,19 @@ Note_head::brew_ez_stencil (SCM smob) Real Note_head::stem_attachment_coordinate (Grob *me, Axis a) { - SCM brewer = me->get_grob_property ("print-function"); + SCM brewer = me->get_property ("print-function"); Font_metric * fm = Font_interface::get_default_font (me); if (brewer == Note_head::print_proc) { - SCM style = me->get_grob_property ("style"); + SCM style = me->get_property ("style"); if (!gh_symbol_p (style)) { return 0.0; } SCM log = gh_int2scm (Note_head::get_balltype (me)); - SCM proc = me->get_grob_property ("glyph-name-procedure"); + SCM proc = me->get_property ("glyph-name-procedure"); SCM scm_font_char = scm_call_2 (proc, log, style); String font_char = "noteheads-" + ly_scm2string (scm_font_char); @@ -307,7 +307,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) /* Fallback */ - SCM v = me->get_grob_property ("stem-attachment-function"); + SCM v = me->get_property ("stem-attachment-function"); if (!gh_procedure_p (v)) return 0.0; @@ -323,7 +323,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) int Note_head::get_balltype (Grob*me) { - SCM s = me->get_grob_property ("duration-log"); + SCM s = me->get_property ("duration-log"); return gh_number_p (s) ? gh_scm2int (s) get_mus_property ("duration")); + Duration dur = *unsmob_duration (req->get_property ("duration")); - note->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ())); + note->set_property ("duration-log", gh_int2scm (dur.duration_log ())); if (dur.dot_count ()) { Item * d = make_item ("Dots"); Rhythmic_head::set_dots (note, d); if (dur.dot_count () - != robust_scm2int (d->get_grob_property ("dot-count"), 0)) - d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ())); + != robust_scm2int (d->get_property ("dot-count"), 0)) + d->set_property ("dot-count", gh_int2scm (dur.dot_count ())); d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); dots_.push (d); } - Pitch *pit =unsmob_pitch (req->get_mus_property ("pitch")); + Pitch *pit =unsmob_pitch (req->get_property ("pitch")); int pos = pit ? pit->steps () : 0; SCM c0 = get_property ("centralCPosition"); if (gh_number_p (c0)) pos += gh_scm2int (c0); - note->set_grob_property ("staff-position", gh_int2scm (pos)); + note->set_property ("staff-position", gh_int2scm (pos)); announce_grob (note,req->self_scm()); notes_.push (note); } diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index 05f6c5987e..171bc102b7 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -42,7 +42,7 @@ Note_name_engraver::process_music () { if (i) s += " "; - Pitch p = *unsmob_pitch (events_[i]->get_mus_property ("pitch")); + Pitch p = *unsmob_pitch (events_[i]->get_property ("pitch")); if (!to_boolean (get_property ("printOctaveNames"))) p = Pitch (-1, p.get_notename (), p.get_alteration ()); @@ -52,7 +52,7 @@ Note_name_engraver::process_music () if (s.length ()) { Item * t = make_item ("NoteName"); - t->set_grob_property ("text", scm_makfrom0str (s.to_str0 ())); + t->set_property ("text", scm_makfrom0str (s.to_str0 ())); announce_grob (t, events_[0]->self_scm()); texts_.push (t); } diff --git a/lily/note-performer.cc b/lily/note-performer.cc index cab4f8e287..046e6935ac 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -46,7 +46,7 @@ Note_performer::create_audio_elements () while (note_evs_.size ()) { Music* n = note_evs_.pop (); - SCM pit = n->get_mus_property ("pitch"); + SCM pit = n->get_property ("pitch"); if (Pitch * pitp = unsmob_pitch (pit)) { diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 5950002548..706e9418ca 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -33,8 +33,8 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, Real base_space, Real increment, Real *space, Real *fixed) { - Drul_array props(me->get_grob_property ("left-items"), - me->get_grob_property ("right-items")); + Drul_array props(me->get_property ("left-items"), + me->get_property ("right-items")); Direction d = LEFT; Direction col_dir = right_col->break_status_dir (); Drul_array extents; @@ -70,7 +70,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, if (d == LEFT) { - SCM r = it->get_grob_property ("rest"); + SCM r = it->get_property ("rest"); Grob * g = unsmob_grob (r); if (!g) g = Note_column::first_head (it); @@ -184,7 +184,7 @@ Note_spacing::right_column (Grob*me) if (!me->live()) return 0; - SCM right = me->get_grob_property ("right-items"); + SCM right = me->get_property ("right-items"); Item *mincol = 0; int min_rank = INT_MAX; bool prune = false; @@ -215,7 +215,7 @@ Note_spacing::right_column (Grob*me) newright = gh_cons (gh_car (s), newright); } - me->set_grob_property ("right-items", newright); + me->set_property ("right-items", newright); } if (!mincol) @@ -247,8 +247,8 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, Drul_array stem_dirs(CENTER,CENTER); Drul_array stem_posns; Drul_array head_posns; - Drul_array props(me->get_grob_property ("left-items"), - me->get_grob_property ("right-items")); + Drul_array props(me->get_property ("left-items"), + me->get_property ("right-items")); Drul_array beams_drul(0,0); Drul_array stems_drul(0,0); @@ -375,7 +375,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, } correction = note_head_width* stem_dirs[LEFT]; - correction *= robust_scm2double (me->get_grob_property ("knee-spacing-correction"), 0); + correction *= robust_scm2double (me->get_property ("knee-spacing-correction"), 0); *fixed += correction; } else @@ -395,7 +395,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, correction = (correction/7) get_grob_property ("stem-spacing-correction"), 0); + robust_scm2double (me->get_property ("stem-spacing-correction"), 0); } if (!bar_yextent.is_empty ()) @@ -435,7 +435,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, (head_posns[LEFT][DOWN] > head_posns[RIGHT][UP]) ? RIGHT : LEFT; Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP] ; - Real corr = robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0); + Real corr = robust_scm2double (me->get_property ("stem-spacing-correction"), 0); corr = (delta <= 1) ? 0.0 : 0.25; correction= -lowest * corr ; diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index 7e72c8c937..efbac77ea0 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -61,19 +61,19 @@ Ottava_bracket::print (SCM smob) if (Note_column::has_interface (b)) { - common = common_refpoint_of_list (b->get_grob_property ("heads"), common, X_AXIS); + common = common_refpoint_of_list (b->get_property ("heads"), common, X_AXIS); } } while (flip (&d) != LEFT); SCM properties = Font_interface::font_alist_chain (me); - SCM markup = me->get_grob_property ("text"); + SCM markup = me->get_property ("text"); Stencil text; if (Text_item::markup_p (markup)) text = *unsmob_stencil (Text_item::interpret_markup (paper->self_scm (), properties, markup)); - Drul_array shorten = robust_scm2interval (me->get_grob_property ("shorten-pair"), + Drul_array shorten = robust_scm2interval (me->get_property ("shorten-pair"), Interval (0,0)); @@ -88,7 +88,7 @@ Ottava_bracket::print (SCM smob) Interval ext; if (Note_column::has_interface (b)) { - for (SCM s = b->get_grob_property ("note-heads"); gh_pair_p (s); s =gh_cdr (s)) + for (SCM s = b->get_property ("note-heads"); gh_pair_p (s); s =gh_cdr (s)) ext.unite (unsmob_grob (gh_car (s))->extent (common, X_AXIS)); } @@ -111,16 +111,16 @@ Ottava_bracket::print (SCM smob) span_points[LEFT] = span_points[LEFT] get_grob_property ("minimum-length"), -1.0)); + - robust_scm2double (me->get_property ("minimum-length"), -1.0)); Interval bracket_span_points = span_points; bracket_span_points[LEFT] += text_size; - Drul_array edge_height = robust_scm2interval (me->get_grob_property ("edge-height"), + Drul_array edge_height = robust_scm2interval (me->get_property ("edge-height"), Interval (1.0, 1.0)); - Drul_array flare = robust_scm2interval (me->get_grob_property ("bracket-flare"), + Drul_array flare = robust_scm2interval (me->get_property ("bracket-flare"), Interval (0,0)); diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc index 0cd2ece3b3..0cf14c160a 100644 --- a/lily/ottava-engraver.cc +++ b/lily/ottava-engraver.cc @@ -49,13 +49,13 @@ Ottava_spanner_engraver::process_music () if (gh_string_p (ott)) { span_ = make_spanner ("OttavaBracket"); - span_->set_grob_property ("text", ott); + span_->set_property ("text", ott); announce_grob (span_, SCM_EOL); SCM c0 (get_property ("centralCPosition")); SCM oc0 (get_property ("originalCentralCPosition")); if (scm_less_p (oc0, c0) == SCM_BOOL_T) - span_->set_grob_property ("direction", gh_int2scm (DOWN)); + span_->set_property ("direction", gh_int2scm (DOWN)); } } last_ottavation_ = ott; diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index 7af3914c8e..ee17d82b07 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -41,7 +41,7 @@ Output_property_engraver::acknowledge_grob (Grob_info inf) for (int i=props_.size (); i--;) { Music * o = props_[i]; - SCM pred = o->get_mus_property ("predicate"); + SCM pred = o->get_property ("predicate"); @@ -53,9 +53,9 @@ Output_property_engraver::acknowledge_grob (Grob_info inf) SCM result=scm_call_1 (pred, inf.grob_->self_scm ()); if (to_boolean (result)) { - SCM sym = o->get_mus_property ("grob-property"); - SCM val = o->get_mus_property ("grob-value"); - inf.grob_->internal_set_grob_property (sym, val); + SCM sym = o->get_property ("grob-property"); + SCM val = o->get_property ("grob-value"); + inf.grob_->internal_set_property (sym, val); } } else @@ -66,7 +66,7 @@ Output_property_engraver::acknowledge_grob (Grob_info inf) if (!d) d = dynamic_cast (inf.origin_trans_->daddy_context_); - SCM proc = o->get_mus_property ("procedure"); + SCM proc = o->get_property ("procedure"); scm_call_3 (proc, inf.grob_->self_scm(), d->self_scm(), diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 6ca95c712e..04cc897b99 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -74,7 +74,7 @@ Paper_column::Paper_column (SCM l) Moment Paper_column::when_mom (Grob*me) { - SCM m = me->get_grob_property ("when"); + SCM m = me->get_property ("when"); Moment s (0); if (unsmob_moment (m)) { @@ -86,7 +86,7 @@ Paper_column::when_mom (Grob*me) bool Paper_column::is_musical (Grob *me) { - SCM m = me->get_grob_property ("shortest-starter-duration"); + SCM m = me->get_property ("shortest-starter-duration"); Moment s (0); if (unsmob_moment (m)) { @@ -99,8 +99,8 @@ Paper_column::is_musical (Grob *me) bool Paper_column::is_used (Grob*me) { - return gh_pair_p (me->get_grob_property ("elements")) || Item::is_breakable (me) - || gh_pair_p (me->get_grob_property ("bounded-by-me")) + return gh_pair_p (me->get_property ("elements")) || Item::is_breakable (me) + || gh_pair_p (me->get_property ("bounded-by-me")) ; } @@ -144,7 +144,7 @@ Paper_column::before_line_breaking (SCM grob) { Grob *me = unsmob_grob (grob); - SCM c = me->get_grob_property ("bounded-by-me"); + SCM c = me->get_property ("bounded-by-me"); SCM *ptrptr = &c; while (gh_pair_p (*ptrptr)) @@ -161,6 +161,6 @@ Paper_column::before_line_breaking (SCM grob) } } - me->set_grob_property ("bounded-by-me", c); + me->set_property ("bounded-by-me", c); return SCM_UNSPECIFIED; } diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 202a16080a..9037d8dd8a 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -87,8 +87,8 @@ Paper_score::process (String outname) { /* doubly, also done in Score_engraver */ Link_array pc (system_->columns ()); - pc[0]->set_grob_property ("breakable", SCM_BOOL_T); - pc.top ()->set_grob_property ("breakable", SCM_BOOL_T); + pc[0]->set_property ("breakable", SCM_BOOL_T); + pc.top ()->set_property ("breakable", SCM_BOOL_T); } system_->pre_processing (); diff --git a/lily/parser.yy b/lily/parser.yy index 8d6e4651f7..c296bef3f9 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -104,7 +104,7 @@ My_lily_parser* my_lily_parser; void tag_music (Music*m, SCM tag, Input ip) { - SCM tags = m->get_mus_property ("tags"); + SCM tags = m->get_property ("tags"); if (gh_symbol_p (tag)) tags = scm_cons (tag, tags); else if (gh_list_p (tag)) @@ -112,7 +112,7 @@ tag_music (Music*m, SCM tag, Input ip) else ip.warning (_("Tag must be symbol or list of symbols.")); - m->set_mus_property ("tags", tags); + m->set_property ("tags", tags); } @@ -154,7 +154,7 @@ set_music_properties (Music *p, SCM a) { for (SCM k = a; gh_pair_p (k); k = ly_cdr (k)) { - p->internal_set_mus_property (ly_caar (k), ly_cdar (k)); + p->internal_set_property (ly_caar (k), ly_cdar (k)); } } @@ -196,8 +196,8 @@ Music* set_property_music (SCM sym, SCM value) { Music * p = MY_MAKE_MUSIC("PropertySet"); - p->set_mus_property ("symbol", sym); - p->set_mus_property ("value", value); + p->set_property ("symbol", sym); + p->set_property ("value", value); return p; } @@ -697,8 +697,8 @@ music_output_def_body: junk this ? there already is tempo stuff in music. */ - int m = gh_scm2int ( $2->get_mus_property ("metronome-count")); - Duration *d = unsmob_duration ($2->get_mus_property ("tempo-unit")); + int m = gh_scm2int ( $2->get_property ("metronome-count")); + Duration *d = unsmob_duration ($2->get_property ("tempo-unit")); Midi_def * md = dynamic_cast ($$); if (md) md->set_tempo (d->get_length (), m); @@ -712,8 +712,8 @@ music_output_def_body: tempo_event: TEMPO steno_duration '=' bare_unsigned { $$ = MY_MAKE_MUSIC("MetronomeChangeEvent"); - $$->set_mus_property ("tempo-unit", $2); - $$->set_mus_property ("metronome-count", gh_int2scm ( $4)); + $$->set_property ("tempo-unit", $2); + $$->set_property ("metronome-count", gh_int2scm ( $4)); } ; @@ -780,12 +780,12 @@ Repeated_music: Music *r =unsmob_music (mus); if (beg) { - r-> set_mus_property ("element", beg->self_scm ()); + r-> set_property ("element", beg->self_scm ()); scm_gc_unprotect_object (beg->self_scm ()); } - r->set_mus_property ("repeat-count", gh_int2scm (times >? 1)); + r->set_property ("repeat-count", gh_int2scm (times >? 1)); - r-> set_mus_property ("elements",alts); + r-> set_property ("elements",alts); if (gh_equal_p ($2, scm_makfrom0str ("tremolo"))) { /* we can not get durations and other stuff correct down the line, so we have to @@ -820,12 +820,12 @@ Repeated_music: Sequential_music: SEQUENTIAL '{' Music_list '}' { $$ = MY_MAKE_MUSIC("SequentialMusic"); - $$->set_mus_property ("elements", ly_car ($3)); + $$->set_property ("elements", ly_car ($3)); $$->set_spot(THIS->here_input()); } | '{' Music_list '}' { $$ = MY_MAKE_MUSIC("SequentialMusic"); - $$->set_mus_property ("elements", ly_car ($2)); + $$->set_property ("elements", ly_car ($2)); $$->set_spot(THIS->here_input()); } ; @@ -833,13 +833,13 @@ Sequential_music: Simultaneous_music: SIMULTANEOUS '{' Music_list '}'{ $$ = MY_MAKE_MUSIC("SimultaneousMusic"); - $$->set_mus_property ("elements", ly_car ($3)); + $$->set_property ("elements", ly_car ($3)); $$->set_spot(THIS->here_input()); } | simul_open Music_list simul_close { $$ = MY_MAKE_MUSIC("SimultaneousMusic"); - $$->set_mus_property ("elements", ly_car ($2)); + $$->set_property ("elements", ly_car ($2)); $$->set_spot(THIS->here_input()); } ; @@ -850,14 +850,14 @@ Simple_music: if (!ly_input_procedure_p ($2)) THIS->parser_error (_ ("\\applycontext takes function argument")); $$ = MY_MAKE_MUSIC ("ApplyOutputEvent"); - $$->set_mus_property ("procedure", $2); + $$->set_property ("procedure", $2); $$->set_spot (THIS->here_input()); } | APPLYCONTEXT embedded_scm { if (!ly_input_procedure_p ($2)) THIS->parser_error (_ ("\\applycontext takes function argument")); $$ = MY_MAKE_MUSIC ("ApplyContext"); - $$->set_mus_property ("procedure", $2); + $$->set_property ("procedure", $2); $$->set_spot (THIS->here_input()); } | MUSIC_IDENTIFIER { @@ -949,15 +949,15 @@ basic music objects too, since the meaning is different. } Music* seq = MY_MAKE_MUSIC("SequentialMusic"); - seq->set_mus_property ("elements", ms); + seq->set_property ("elements", ms); $$ = MY_MAKE_MUSIC("GraceMusic"); - $$->set_mus_property ("element", seq->self_scm ()); + $$->set_property ("element", seq->self_scm ()); scm_gc_unprotect_object (seq->self_scm ()); #else $$ = MY_MAKE_MUSIC("GraceMusic"); - $$->set_mus_property ("element", $2->self_scm ()); + $$->set_property ("element", $2->self_scm ()); scm_gc_unprotect_object ($2->self_scm ()); #endif } @@ -986,10 +986,10 @@ basic music objects too, since the meaning is different. $$= MY_MAKE_MUSIC("TimeScaledMusic"); $$->set_spot (THIS->pop_spot ()); - $$->set_mus_property ("element", mp->self_scm ()); + $$->set_property ("element", mp->self_scm ()); scm_gc_unprotect_object (mp->self_scm ()); - $$->set_mus_property ("numerator", gh_int2scm (n)); - $$->set_mus_property ("denominator", gh_int2scm (d)); + $$->set_property ("numerator", gh_int2scm (n)); + $$->set_property ("denominator", gh_int2scm (d)); $$->compress (Moment (Rational (n,d))); } @@ -1003,7 +1003,7 @@ basic music objects too, since the meaning is different. Pitch to = *unsmob_pitch ($3); p->transpose (interval (from, to)); - $$->set_mus_property ("element", p->self_scm ()); + $$->set_property ("element", p->self_scm ()); scm_gc_unprotect_object (p->self_scm ()); } | APPLY embedded_scm Music { @@ -1046,7 +1046,7 @@ basic music objects too, since the meaning is different. Music { Music * chm = MY_MAKE_MUSIC("UntransposableMusic"); - chm->set_mus_property ("element", $3->self_scm ()); + chm->set_property ("element", $3->self_scm ()); $$ = chm; scm_gc_unprotect_object ($3->self_scm()); @@ -1060,7 +1060,7 @@ basic music objects too, since the meaning is different. } Music { Music * chm = MY_MAKE_MUSIC("UnrelativableMusic"); - chm->set_mus_property ("element", $3->self_scm ()); + chm->set_property ("element", $3->self_scm ()); scm_gc_unprotect_object ($3->self_scm()); $$ = chm; @@ -1087,38 +1087,38 @@ relative_music: Pitch pit = *unsmob_pitch ($2); $$ = MY_MAKE_MUSIC("RelativeOctaveMusic"); - $$->set_mus_property ("element", p->self_scm ()); + $$->set_property ("element", p->self_scm ()); scm_gc_unprotect_object (p->self_scm ()); Pitch retpitch = p->to_relative_octave (pit); if (lily_1_8_relative) - $$->set_mus_property ("last-pitch", retpitch.smobbed_copy ()); + $$->set_property ("last-pitch", retpitch.smobbed_copy ()); } ; re_rhythmed_music: ADDLYRICS Music Music { Music*l =MY_MAKE_MUSIC("LyricCombineMusic"); - l->set_mus_property ("elements", gh_list ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED)); + l->set_property ("elements", gh_list ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED)); scm_gc_unprotect_object ($3->self_scm ()); scm_gc_unprotect_object ($2->self_scm ()); $$ = l; } | NEWADDLYRICS string Music { Music*l =MY_MAKE_MUSIC("NewLyricCombineMusic"); - l->set_mus_property ("element", $3->self_scm ()); + l->set_property ("element", $3->self_scm ()); scm_gc_unprotect_object ($3->self_scm ()); $$ = l; - l->set_mus_property ("associated-context", $2); + l->set_property ("associated-context", $2); } ; context_change: CHANGE STRING '=' STRING { Music*t= MY_MAKE_MUSIC("TranslatorChange"); - t-> set_mus_property ("change-to-type", scm_string_to_symbol ($2)); - t-> set_mus_property ("change-to-id", $4); + t-> set_property ("change-to-type", scm_string_to_symbol ($2)); + t-> set_property ("change-to-id", $4); $$ = t; $$->set_spot (THIS->here_input ()); @@ -1204,8 +1204,8 @@ music_property_def: $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL); } | ONCE music_property_def { - SCM e = $2->get_mus_property ("element"); - unsmob_music (e)->set_mus_property ("once", SCM_BOOL_T); + SCM e = $2->get_property ("element"); + unsmob_music (e)->set_property ("once", SCM_BOOL_T); $$ = $2; } @@ -1246,11 +1246,11 @@ pre_events: { event_chord: pre_events simple_element post_events { - SCM elts = $2-> get_mus_property ("elements"); + SCM elts = $2-> get_property ("elements"); elts = gh_append2 (elts, scm_reverse_x ($3, SCM_EOL)); - $2->set_mus_property ("elements", elts); + $2->set_property ("elements", elts); $$ = $2; } | command_element @@ -1262,14 +1262,14 @@ note_chord_element: chord_body optional_notemode_duration post_events { SCM dur = unsmob_duration ($2)->smobbed_copy(); - SCM es = $1->get_mus_property ("elements"); + SCM es = $1->get_property ("elements"); SCM postevs = scm_reverse_x ($3, SCM_EOL); for (SCM s = es; gh_pair_p (s); s = gh_cdr (s)) - unsmob_music (gh_car(s))->set_mus_property ("duration", dur); + unsmob_music (gh_car(s))->set_property ("duration", dur); es = gh_append2 (es, postevs); - $1-> set_mus_property ("elements", es); + $1-> set_property ("elements", es); $$ = $1; } ; @@ -1290,7 +1290,7 @@ chord_body: chord_open chord_body_elements chord_close { $$ = MY_MAKE_MUSIC("EventChord"); - $$->set_mus_property ("elements", + $$->set_property ("elements", scm_reverse_x ($2, SCM_EOL)); } ; @@ -1307,27 +1307,27 @@ chord_body_element: pitch exclamations questions post_events { Music * n = MY_MAKE_MUSIC("NoteEvent"); - n->set_mus_property ("pitch", $1); + n->set_property ("pitch", $1); if ($3 % 2) - n->set_mus_property ("cautionary", SCM_BOOL_T); + n->set_property ("cautionary", SCM_BOOL_T); if ($2 % 2 || $3 % 2) - n->set_mus_property ("force-accidental", SCM_BOOL_T); + n->set_property ("force-accidental", SCM_BOOL_T); if (gh_pair_p ($4)) { SCM arts = scm_reverse_x ($4, SCM_EOL); - n->set_mus_property ("articulations", arts); + n->set_property ("articulations", arts); } $$ = n; } | DRUM_PITCH post_events { Music *n = MY_MAKE_MUSIC("NoteEvent"); - n->set_mus_property ("duration" ,$2); - n->set_mus_property ("drum-type" , $1); + n->set_property ("duration" ,$2); + n->set_property ("drum-type" , $1); n->set_spot (THIS->here_input()); if (gh_pair_p ($2)) { SCM arts = scm_reverse_x ($2, SCM_EOL); - n->set_mus_property ("articulations", arts); + n->set_property ("articulations", arts); } $$ = n; } @@ -1336,7 +1336,7 @@ chord_body_element: command_element: command_req { $$ = MY_MAKE_MUSIC("EventChord"); - $$->set_mus_property ("elements", scm_cons ($1->self_scm (), SCM_EOL)); + $$->set_property ("elements", scm_cons ($1->self_scm (), SCM_EOL)); scm_gc_unprotect_object ($1->self_scm()); $$-> set_spot (THIS->here_input ()); @@ -1344,7 +1344,7 @@ command_element: } | SKIP duration_length { Music * skip = MY_MAKE_MUSIC("SkipMusic"); - skip->set_mus_property ("duration", $2); + skip->set_property ("duration", $2); $$ = skip; } @@ -1360,8 +1360,8 @@ command_element: if (scm_vector_p (evs) == SCM_BOOL_T) { quote = MY_MAKE_MUSIC("QuoteMusic"); - quote->set_mus_property ("duration", $2); - quote->set_mus_property ("quoted-events", evs); + quote->set_property ("duration", $2); + quote->set_property ("quoted-events", evs); } else { THIS->here_input ().warning (_f ("Can\'t find music.")); quote = MY_MAKE_MUSIC ("Event"); @@ -1374,25 +1374,25 @@ command_element: Music *l = MY_MAKE_MUSIC("RelativeOctaveCheck"); $$ = l; $$->set_spot (THIS->pop_spot ()); - $$->set_mus_property ("pitch", $3); + $$->set_property ("pitch", $3); } | E_LEFTSQUARE { Music *l = MY_MAKE_MUSIC("LigatureEvent"); - l->set_mus_property ("span-direction", gh_int2scm (START)); + l->set_property ("span-direction", gh_int2scm (START)); l->set_spot (THIS->here_input ()); $$ = MY_MAKE_MUSIC("EventChord"); - $$->set_mus_property ("elements", scm_cons (l->self_scm (), SCM_EOL)); + $$->set_property ("elements", scm_cons (l->self_scm (), SCM_EOL)); scm_gc_unprotect_object (l->self_scm()); $$->set_spot (THIS->here_input ()); } | E_RIGHTSQUARE { Music *l = MY_MAKE_MUSIC("LigatureEvent"); - l->set_mus_property ("span-direction", gh_int2scm (STOP)); + l->set_property ("span-direction", gh_int2scm (STOP)); l->set_spot (THIS->here_input ()); $$ = MY_MAKE_MUSIC("EventChord"); - $$->set_mus_property ("elements", scm_cons (l->self_scm (), SCM_EOL)); + $$->set_property ("elements", scm_cons (l->self_scm (), SCM_EOL)); $$->set_spot (THIS->here_input ()); scm_gc_unprotect_object (l->self_scm()); } @@ -1476,8 +1476,8 @@ command_req: Music *key= MY_MAKE_MUSIC("KeyChangeEvent"); if (scm_ilength ($3) > 0) { - key->set_mus_property ("pitch-alist", $3); - key->set_mus_property ("tonic", Pitch (0,0,0).smobbed_copy()); + key->set_property ("pitch-alist", $3); + key->set_property ("tonic", Pitch (0,0,0).smobbed_copy()); ((Music*)key)->transpose (* unsmob_pitch ($2)); } else { THIS->parser_error (_("Second argument must be pitch list.")); @@ -1527,12 +1527,12 @@ post_event: } | script_dir direction_reqd_event { if ($1) - $2->set_mus_property ("direction", gh_int2scm ($1)); + $2->set_property ("direction", gh_int2scm ($1)); $$ = $2; } | script_dir direction_less_event { if ($1) - $2->set_mus_property ("direction", gh_int2scm ($1)); + $2->set_property ("direction", gh_int2scm ($1)); $$ = $2; } | string_number_event @@ -1541,7 +1541,7 @@ post_event: string_number_event: E_UNSIGNED { Music * s = MY_MAKE_MUSIC("StringNumberEvent"); - s->set_mus_property ("string-number", gh_int2scm($1)); + s->set_property ("string-number", gh_int2scm($1)); s->set_spot (THIS->here_input ()); $$ = s; } @@ -1563,13 +1563,13 @@ configurable, i.e. */ Music * m = MY_MAKE_MUSIC ("BeamEvent"); m->set_spot (THIS->here_input()); - m->set_mus_property ("span-direction" , gh_int2scm (START)); + m->set_property ("span-direction" , gh_int2scm (START)); $$ = m; } | ']' { Music * m = MY_MAKE_MUSIC ("BeamEvent"); m->set_spot (THIS->here_input()); - m->set_mus_property ("span-direction" , gh_int2scm (STOP)); + m->set_property ("span-direction" , gh_int2scm (STOP)); $$ = m; } | '~' { @@ -1579,12 +1579,12 @@ configurable, i.e. } | close_event { $$ = $1; - dynamic_cast ($$)->set_mus_property ("span-direction", + dynamic_cast ($$)->set_property ("span-direction", gh_int2scm (START)); } | open_event { $$ = $1; - dynamic_cast ($$)->set_mus_property ("span-direction", + dynamic_cast ($$)->set_property ("span-direction", gh_int2scm (STOP)); } | EVENT_IDENTIFIER { @@ -1593,7 +1593,7 @@ configurable, i.e. | tremolo_type { Music * a = MY_MAKE_MUSIC("TremoloEvent"); a->set_spot (THIS->here_input ()); - a->set_mus_property ("tremolo-type", gh_int2scm ($1)); + a->set_property ("tremolo-type", gh_int2scm ($1)); $$ = a; } ; @@ -1606,7 +1606,7 @@ direction_reqd_event: SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1)); Music *a = MY_MAKE_MUSIC("ArticulationEvent"); if (gh_string_p (s)) - a->set_mus_property ("articulation-type", s); + a->set_property ("articulation-type", s); else THIS->parser_error (_ ("Expecting string as script definition")); $$ = a; } @@ -1725,7 +1725,7 @@ open_event: | E_CLOSE { Music * s= MY_MAKE_MUSIC("PhrasingSlurEvent"); $$ = s; - s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur")); + s->set_property ("span-type", scm_makfrom0str ( "phrasing-slur")); s->set_spot (THIS->here_input()); } ; @@ -1733,20 +1733,20 @@ open_event: gen_text_def: full_markup { Music *t = MY_MAKE_MUSIC("TextScriptEvent"); - t->set_mus_property ("text", $1); + t->set_property ("text", $1); t->set_spot (THIS->here_input ()); $$ = t; } | string { Music *t = MY_MAKE_MUSIC("TextScriptEvent"); - t->set_mus_property ("text", make_simple_markup ($1)); + t->set_property ("text", make_simple_markup ($1)); t->set_spot (THIS->here_input ()); $$ = t; } | DIGIT { Music * t = MY_MAKE_MUSIC("FingerEvent"); - t->set_mus_property ("digit", gh_int2scm ($1)); + t->set_property ("digit", gh_int2scm ($1)); t->set_spot (THIS->here_input ()); $$ = t; } @@ -1905,19 +1905,19 @@ bass_figure: Music *bfr = MY_MAKE_MUSIC("BassFigureEvent"); $$ = bfr->self_scm(); - bfr->set_mus_property ("figure", $1); + bfr->set_property ("figure", $1); scm_gc_unprotect_object ($$); } | bass_figure bass_mod { Music *m = unsmob_music ($1); if ($2) { - SCM salter =m->get_mus_property ("alteration"); + SCM salter =m->get_property ("alteration"); int alter = gh_number_p ( salter) ? gh_scm2int (salter) : 0; - m->set_mus_property ("alteration", + m->set_property ("alteration", gh_int2scm (alter + $2)); } else { - m->set_mus_property ("alteration", gh_int2scm (0)); + m->set_property ("alteration", gh_int2scm (0)); } } ; @@ -1925,14 +1925,14 @@ bass_figure: br_bass_figure: '[' bass_figure { $$ = $2; - unsmob_music ($$)->set_mus_property ("bracket-start", SCM_BOOL_T); + unsmob_music ($$)->set_property ("bracket-start", SCM_BOOL_T); } | bass_figure { $$ = $1; } | br_bass_figure ']' { $$ = $1; - unsmob_music ($1)->set_mus_property ("bracket-stop", SCM_BOOL_T); + unsmob_music ($1)->set_property ("bracket-stop", SCM_BOOL_T); } ; @@ -1949,7 +1949,7 @@ figure_spec: FIGURE_OPEN figure_list FIGURE_CLOSE { Music * m = MY_MAKE_MUSIC("EventChord"); $2 = scm_reverse_x ($2, SCM_EOL); - m->set_mus_property ("elements", $2); + m->set_property ("elements", $2); $$ = m->self_scm (); } ; @@ -1973,22 +1973,22 @@ simple_element: else n = MY_MAKE_MUSIC("NoteEvent"); - n->set_mus_property ("pitch", $1); - n->set_mus_property ("duration", $5); + n->set_property ("pitch", $1); + n->set_property ("duration", $5); if (gh_number_p ($4)) { int q = gh_scm2int ($4); - n->set_mus_property ("absolute-octave", gh_int2scm (q-1)); + n->set_property ("absolute-octave", gh_int2scm (q-1)); } if ($3 % 2) - n->set_mus_property ("cautionary", SCM_BOOL_T); + n->set_property ("cautionary", SCM_BOOL_T); if ($2 % 2 || $3 % 2) - n->set_mus_property ("force-accidental", SCM_BOOL_T); + n->set_property ("force-accidental", SCM_BOOL_T); Music *v = MY_MAKE_MUSIC("EventChord"); - v->set_mus_property ("elements", scm_list_1 (n->self_scm ())); + v->set_property ("elements", scm_list_1 (n->self_scm ())); scm_gc_unprotect_object (n->self_scm()); v->set_spot (i); @@ -1999,11 +1999,11 @@ simple_element: Input i = THIS->pop_spot (); Music *n = MY_MAKE_MUSIC("NoteEvent"); - n->set_mus_property ("duration" ,$2); - n->set_mus_property ("drum-type" , $1); + n->set_property ("duration" ,$2); + n->set_property ("drum-type" , $1); Music *v = MY_MAKE_MUSIC("EventChord"); - v->set_mus_property ("elements", scm_list_1 (n->self_scm ())); + v->set_property ("elements", scm_list_1 (n->self_scm ())); scm_gc_unprotect_object (n->self_scm()); v->set_spot (i); n->set_spot (i); @@ -2014,9 +2014,9 @@ simple_element: Music * m = unsmob_music ($1); Input i = THIS->pop_spot (); m->set_spot (i); - for (SCM s = m->get_mus_property ("elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = m->get_property ("elements"); gh_pair_p (s); s = ly_cdr (s)) { - unsmob_music (ly_car (s))->set_mus_property ("duration", $2); + unsmob_music (ly_car (s))->set_property ("duration", $2); } $$ = m; } @@ -2032,10 +2032,10 @@ simple_element: ev = MY_MAKE_MUSIC("RestEvent"); } - ev->set_mus_property ("duration" ,$2); + ev->set_property ("duration" ,$2); ev->set_spot (i); Music * velt = MY_MAKE_MUSIC("EventChord"); - velt->set_mus_property ("elements", scm_list_1 (ev->self_scm ())); + velt->set_property ("elements", scm_list_1 (ev->self_scm ())); velt->set_spot (i); scm_gc_unprotect_object (ev->self_scm()); @@ -2061,11 +2061,11 @@ simple_element: THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); Music * lreq = MY_MAKE_MUSIC("LyricEvent"); - lreq->set_mus_property ("text", $1); - lreq->set_mus_property ("duration",$2); + lreq->set_property ("text", $1); + lreq->set_property ("duration",$2); lreq->set_spot (i); Music * velt = MY_MAKE_MUSIC("EventChord"); - velt->set_mus_property ("elements", scm_list_1 (lreq->self_scm ())); + velt->set_property ("elements", scm_list_1 (lreq->self_scm ())); $$= velt; } @@ -2404,7 +2404,7 @@ My_lily_lexer::try_special_identifiers (SCM * destination, SCM sid) } else if (Music * mus =unsmob_music (sid)) { *destination = unsmob_music (sid)->clone ()->self_scm(); unsmob_music (*destination)-> - set_mus_property ("origin", make_input (last_input_)); + set_property ("origin", make_input (last_input_)); return dynamic_cast (mus) ? EVENT_IDENTIFIER : MUSIC_IDENTIFIER; } else if (unsmob_duration (sid)) { @@ -2454,12 +2454,12 @@ property_op_to_music (SCM op) grob_sym = gh_car (args); } - m->set_mus_property ("symbol", symbol); + m->set_property ("symbol", symbol); if (val != SCM_UNDEFINED) - m->set_mus_property ("value", val); + m->set_property ("value", val); if (grob_val != SCM_UNDEFINED) - m->set_mus_property ("grob-value", grob_val); + m->set_property ("grob-value", grob_val); if (grob_sym != SCM_UNDEFINED) { @@ -2469,13 +2469,13 @@ property_op_to_music (SCM op) bool autobeam = gh_equal_p (symbol, ly_symbol2scm ("autoBeamSettings")); if (autobeam) internal_type_checking_global_b = false; - m->set_mus_property ("grob-property", grob_sym); + m->set_property ("grob-property", grob_sym); if (autobeam) internal_type_checking_global_b = itc; } if (op == ly_symbol2scm ("poppush")) - m->set_mus_property ("pop-first", SCM_BOOL_T); + m->set_property ("pop-first", SCM_BOOL_T); return m; @@ -2486,15 +2486,15 @@ context_spec_music (SCM type, SCM id, Music * m, SCM ops) { Music * csm = MY_MAKE_MUSIC("ContextSpeccedMusic"); - csm->set_mus_property ("element", m->self_scm ()); + csm->set_property ("element", m->self_scm ()); scm_gc_unprotect_object (m->self_scm ()); - csm->set_mus_property ("context-type", + csm->set_property ("context-type", gh_symbol_p (type) ? type : scm_string_to_symbol (type)); - csm->set_mus_property ("property-operations", ops); + csm->set_property ("property-operations", ops); if (gh_string_p (id)) - csm->set_mus_property ("context-id", id); + csm->set_property ("context-id", id); return csm; } diff --git a/lily/part-combine-engraver.cc b/lily/part-combine-engraver.cc index c5216f5544..61cf5404dd 100644 --- a/lily/part-combine-engraver.cc +++ b/lily/part-combine-engraver.cc @@ -50,7 +50,7 @@ Part_combine_engraver::process_music () if (event_ && to_boolean (get_property ("soloADue"))) { - SCM what = event_->get_mus_property ("part-combine-status"); + SCM what = event_->get_property ("part-combine-status"); SCM text = SCM_EOL; if (what == ly_symbol2scm ("solo1")) text = get_property ("soloText"); @@ -62,7 +62,7 @@ Part_combine_engraver::process_music () if (Text_item::markup_p (text)) { text_ = make_item ("CombineTextScript"); - text_->set_grob_property ("text", text); + text_->set_property ("text", text); announce_grob (text_, event_->self_scm ()); } } diff --git a/lily/part-combine-iterator.cc b/lily/part-combine-iterator.cc index 600de9611e..7927732cec 100644 --- a/lily/part-combine-iterator.cc +++ b/lily/part-combine-iterator.cc @@ -153,7 +153,7 @@ Part_combine_iterator::kill_mmrest (Context * tg) if (!mmrest) { mmrest = make_music_by_name (ly_symbol2scm ("MultiMeasureRestEvent")); - mmrest->set_mus_property ("duration", SCM_EOL); + mmrest->set_property ("duration", SCM_EOL); } tg->try_music (mmrest); @@ -284,8 +284,8 @@ Part_combine_iterator::apart (bool silent) void Part_combine_iterator::construct_children () { - split_list_ = get_music ()->get_mus_property ("split-list"); - SCM lst = get_music ()->get_mus_property ("elements"); + split_list_ = get_music ()->get_property ("split-list"); + SCM lst = get_music ()->get_property ("elements"); SCM props = scm_list_n (/* used to have tweaks here. diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index 87e08fa3ec..a7cc0f44da 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -81,7 +81,7 @@ Percent_repeat_engraver::try_music (Music * m) { Repeated_music * rp = dynamic_cast (m); if (rp - && rp->get_mus_property ("iterator-ctor") + && rp->get_property ("iterator-ctor") == Percent_repeat_iterator::constructor_proc && !repeat_) { diff --git a/lily/percent-repeat-item.cc b/lily/percent-repeat-item.cc index 480acb826c..f927b923f8 100644 --- a/lily/percent-repeat-item.cc +++ b/lily/percent-repeat-item.cc @@ -19,13 +19,13 @@ Stencil Percent_repeat_item_interface::brew_slash ( Grob *me) { - Real slope = robust_scm2double (me->get_grob_property ("slope"), 1); + Real slope = robust_scm2double (me->get_property ("slope"), 1); Real wid = 2.0 / slope; /* todo: check out if in staff-rule thickness normally. */ - Real thick = robust_scm2double (me->get_grob_property ("thickness"), 1); + Real thick = robust_scm2double (me->get_property ("thickness"), 1); Stencil m = Lookup::repeat_slash (wid, slope, thick); m.translate_axis (-m.extent (Y_AXIS).center (), Y_AXIS); return m; diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index 80baaabdd1..9ae400b2b6 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -55,7 +55,7 @@ Phrasing_slur_engraver::try_music (Music *ev) Let's not start more than one phrasing slur per moment. */ - Direction d = to_dir (ev->get_mus_property ("span-direction")); + Direction d = to_dir (ev->get_property ("span-direction")); if (d == START) { @@ -115,7 +115,7 @@ Phrasing_slur_engraver::process_acknowledged_grobs () Music* phrasing_slur_ev = new_phrasing_slur_evs_[i]; // end phrasing slur: move the phrasing slur to other array - Direction d = to_dir (phrasing_slur_ev->get_mus_property ("span-direction")); + Direction d = to_dir (phrasing_slur_ev->get_property ("span-direction")); if (d == STOP) { @@ -136,9 +136,9 @@ Phrasing_slur_engraver::process_acknowledged_grobs () Slur::set_interface (phrasing_slur); // can't remove. - if (Direction updown = to_dir (phrasing_slur_ev->get_mus_property ("direction"))) + if (Direction updown = to_dir (phrasing_slur_ev->get_property ("direction"))) { - phrasing_slur->set_grob_property ("direction", gh_int2scm (updown)); + phrasing_slur->set_property ("direction", gh_int2scm (updown)); } start_phrasing_slurs.push (phrasing_slur); diff --git a/lily/piano-pedal-bracket.cc b/lily/piano-pedal-bracket.cc index 7ec72e0ca6..26dbbc790d 100644 --- a/lily/piano-pedal-bracket.cc +++ b/lily/piano-pedal-bracket.cc @@ -27,15 +27,15 @@ Piano_pedal_bracket::print (SCM smob) Drul_array broken (false,false); Drul_array height = robust_scm2drul - (me->get_grob_property ("edge-height"), Interval (0,0)); + (me->get_property ("edge-height"), Interval (0,0)); Drul_array shorten = robust_scm2drul - (me->get_grob_property ("shorten-pair"), Interval (0,0)); + (me->get_property ("shorten-pair"), Interval (0,0)); Drul_array flare = robust_scm2drul - (me->get_grob_property ("bracket-flare"), Interval (0,0)); + (me->get_property ("bracket-flare"), Interval (0,0)); Grob *common = me->get_bound (LEFT) ->common_refpoint (me->get_bound (RIGHT), X_AXIS); - Grob *textbit = unsmob_grob (me->get_grob_property("pedal-text")); + Grob *textbit = unsmob_grob (me->get_property("pedal-text")); if (textbit) common = common->common_refpoint (textbit, X_AXIS); @@ -62,7 +62,7 @@ Piano_pedal_bracket::print (SCM smob) { height[LEFT] = 0; - Real padding = robust_scm2double (me->get_grob_property ("if-text-padding"), 0); + Real padding = robust_scm2double (me->get_property ("if-text-padding"), 0); span_points[LEFT] = padding + textbit->extent (common, X_AXIS)[RIGHT]; diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index f4663da8c6..234cd5c852 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -165,10 +165,10 @@ Piano_pedal_engraver::try_music (Music *m) for (Pedal_info*p = info_list_; p->name_; p ++) { String nm = p->name_ + String ("Event"); - if (gh_equal_p (m->get_mus_property ("name") , + if (gh_equal_p (m->get_property ("name") , gh_symbol2scm (nm.to_str0()))) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); p->event_drul_[d] = m; return true; } @@ -299,7 +299,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed) String propname = String (p->name_) + "Pedal"; p->item_ = make_item (propname.to_str0 ()); - p->item_->set_grob_property ("text", s); + p->item_->set_property ("text", s); Axis_group_interface::add_element (p->line_spanner_, p->item_); announce_grob (p->item_, @@ -347,8 +347,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed) if (!p->event_drul_[START]) { - SCM flare = p->bracket_->get_grob_property ("bracket-flare"); - p->bracket_->set_grob_property ("bracket-flare", scm_cons (gh_car (flare), + SCM flare = p->bracket_->get_property ("bracket-flare"); + p->bracket_->set_property ("bracket-flare", scm_cons (gh_car (flare), gh_double2scm (0))); } @@ -371,8 +371,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed) if (!p->finished_bracket_) { - SCM flare = p->bracket_->get_grob_property ("bracket-flare"); - p->bracket_->set_grob_property ("bracket-flare", scm_cons (gh_double2scm (0),gh_cdr (flare))); + SCM flare = p->bracket_->get_property ("bracket-flare"); + p->bracket_->set_property ("bracket-flare", scm_cons (gh_double2scm (0),gh_cdr (flare))); } @@ -392,7 +392,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed) WTF is pedal-text not the bound of the object? --hwn */ if (p->item_) - p->bracket_->set_grob_property ("pedal-text", p->item_->self_scm ()); + p->bracket_->set_property ("pedal-text", p->item_->self_scm ()); } diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index 3ec96a9d49..f9b1aca616 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -130,10 +130,10 @@ Piano_pedal_performer::try_music (Music* r) for (Pedal_info*p = info_alist_; p->name_; p ++) { String nm = p->name_ + String ("Event"); - if (gh_equal_p (r->get_mus_property ("name") , + if (gh_equal_p (r->get_property ("name") , scm_makfrom0str (nm.to_str0()))) { - Direction d = to_dir (r->get_mus_property ("span-direction")); + Direction d = to_dir (r->get_property ("span-direction")); p->req_l_drul_[d] = r; return true; } diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index 197b589fa4..e3641fa121 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -25,7 +25,7 @@ Pitch_squash_engraver::acknowledge_grob (Grob_info i) if (gh_number_p (newpos) && Note_head::has_interface (i.grob_)) { - i.grob_->set_grob_property ("staff-position", newpos); + i.grob_->set_property ("staff-position", newpos); } } diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 9cc019ca6f..84c237cbcd 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -20,10 +20,10 @@ bool check_grob(Music *mus, SCM sym); void Property_iterator::process (Moment m) { - SCM sym = get_music ()->get_mus_property ("symbol"); + SCM sym = get_music ()->get_property ("symbol"); if (gh_symbol_p (sym)) { - SCM val = get_music ()->get_mus_property ("value"); + SCM val = get_music ()->get_property ("value"); bool ok= true; if (val != SCM_EOL) ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")); @@ -36,7 +36,7 @@ Property_iterator::process (Moment m) void Property_unset_iterator::process (Moment m) { - SCM sym = get_music ()->get_mus_property ("symbol"); + SCM sym = get_music ()->get_property ("symbol"); type_check_assignment (sym, SCM_EOL, ly_symbol2scm ("translation-type?")); get_outlet ()->unset_property (sym); @@ -50,7 +50,7 @@ Property_iterator::once_finalization(SCM translator, SCM music ) Music * m = unsmob_music (music); Context * tg = dynamic_cast (unsmob_context (translator)); - SCM sym = m->get_mus_property ("symbol"); + SCM sym = m->get_property ("symbol"); tg->unset_property (sym); return SCM_UNSPECIFIED; @@ -59,7 +59,7 @@ Property_iterator::once_finalization(SCM translator, SCM music ) void Property_iterator::do_quit () { - if (to_boolean (get_music ()->get_mus_property ("once"))) + if (to_boolean (get_music ()->get_property ("once"))) { SCM trans = get_outlet ()->self_scm(); SCM music = get_music()->self_scm(); @@ -99,14 +99,14 @@ check_grob(Music *mus, SCM sym) void Push_property_iterator::process (Moment m) { - SCM sym = get_music ()->get_mus_property ("symbol"); + SCM sym = get_music ()->get_property ("symbol"); if (check_grob (get_music (), sym)) { - SCM eprop = get_music ()->get_mus_property ("grob-property"); - SCM val = get_music ()->get_mus_property ("grob-value"); + SCM eprop = get_music ()->get_property ("grob-property"); + SCM val = get_music ()->get_property ("grob-value"); - if (to_boolean (get_music ()->get_mus_property ("pop-first")) - && !to_boolean (get_music ()->get_mus_property ("once")) + if (to_boolean (get_music ()->get_property ("pop-first")) + && !to_boolean (get_music ()->get_property ("once")) ) execute_pushpop_property (get_outlet (), sym, eprop, SCM_UNDEFINED); @@ -122,10 +122,10 @@ Push_property_iterator::once_finalization (SCM trans, SCM music) Music * mus = unsmob_music (music); Context * tg = dynamic_cast (unsmob_context (trans)); - SCM sym = mus->get_mus_property ("symbol"); + SCM sym = mus->get_property ("symbol"); if (check_grob (mus, sym)) { - SCM eprop = mus->get_mus_property ("grob-property"); + SCM eprop = mus->get_property ("grob-property"); execute_pushpop_property (tg, sym, eprop, SCM_UNDEFINED); } @@ -135,7 +135,7 @@ Push_property_iterator::once_finalization (SCM trans, SCM music) void Push_property_iterator::do_quit () { - if (to_boolean (get_music ()->get_mus_property ("once"))) + if (to_boolean (get_music ()->get_property ("once"))) { SCM trans = get_outlet ()->self_scm(); SCM music = get_music ()->self_scm(); @@ -149,11 +149,11 @@ Push_property_iterator::do_quit () void Pop_property_iterator::process (Moment m) { - SCM sym = get_music ()->get_mus_property ("symbol"); + SCM sym = get_music ()->get_property ("symbol"); if (check_grob (get_music (), sym)) { - SCM eprop = get_music ()->get_mus_property ("grob-property"); + SCM eprop = get_music ()->get_property ("grob-property"); execute_pushpop_property (get_outlet (), sym, eprop, SCM_UNDEFINED); } Simple_music_iterator::process (m); diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index 8439e5698f..266ca9ed1a 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -79,7 +79,7 @@ binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b)) void Quote_iterator::construct_children () { - SCM dur = get_music ()->get_mus_property ("duration"); + SCM dur = get_music ()->get_property ("duration"); if (!unsmob_duration (dur)) return ; @@ -89,7 +89,7 @@ Quote_iterator::construct_children () Moment stop = now + unsmob_duration (dur)->get_length (); start_moment_ = now; - event_vector_ = get_music ()->get_mus_property ("quoted-events"); + event_vector_ = get_music ()->get_property ("quoted-events"); if (scm_vector_p (event_vector_) == SCM_BOOL_T) { diff --git a/lily/relative-octave-check.cc b/lily/relative-octave-check.cc index f0234b8af6..51de14b849 100644 --- a/lily/relative-octave-check.cc +++ b/lily/relative-octave-check.cc @@ -9,7 +9,7 @@ Pitch Relative_octave_check::to_relative_octave (Pitch p) { - Pitch * check_p = unsmob_pitch (get_mus_property ("pitch")); + Pitch * check_p = unsmob_pitch (get_property ("pitch")); int delta_oct = 0; if (check_p) diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index 3a52d5d475..ad9f617e29 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -26,7 +26,7 @@ Relative_octave_music::to_relative_octave (Pitch p) \relative { A \relative { ...} B } */ - return * unsmob_pitch (get_mus_property ("last-pitch")); + return * unsmob_pitch (get_property ("last-pitch")); } else return p; diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 85a1c280bc..27070c9032 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -17,13 +17,13 @@ Music * Repeated_music::body ()const { - return unsmob_music (get_mus_property ("element")); + return unsmob_music (get_property ("element")); } SCM Repeated_music::alternatives ()const { - return get_mus_property ("elements"); + return get_property ("elements"); } @@ -116,7 +116,7 @@ Repeated_music::body_get_length () const int Repeated_music::repeat_count () const { - return gh_scm2int (get_mus_property ("repeat-count")); + return gh_scm2int (get_property ("repeat-count")); } @@ -165,13 +165,13 @@ SCM Repeated_music::minimum_start (SCM m) { Music * me = unsmob_music (m); - Music * body = unsmob_music (me->get_mus_property ("element")); + Music * body = unsmob_music (me->get_property ("element")); if (body) return body->start_mom ().smobbed_copy(); else { - return Music_sequence::minimum_start (me->get_mus_property ("elements")).smobbed_copy(); + return Music_sequence::minimum_start (me->get_property ("elements")).smobbed_copy(); } } @@ -179,10 +179,10 @@ SCM Repeated_music::first_start (SCM m) { Music * me = unsmob_music (m); - Music * body = unsmob_music (me->get_mus_property ("element")); + Music * body = unsmob_music (me->get_property ("element")); Moment rv = (body) ? body->start_mom () : - Music_sequence::first_start (me->get_mus_property ("elements")); + Music_sequence::first_start (me->get_property ("elements")); return rv.smobbed_copy (); } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index c2023fda57..9bdfad3cc9 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -28,11 +28,11 @@ Rest_collision::force_shift_callback (SCM element_smob, SCM axis) Axis a = (Axis) gh_scm2int (axis); assert (a == Y_AXIS); - Grob * rc = unsmob_grob (them->get_grob_property ("rest-collision")); + Grob * rc = unsmob_grob (them->get_property ("rest-collision")); - if (rc && !to_boolean (rc->get_grob_property ("positioning-done"))) + if (rc && !to_boolean (rc->get_property ("positioning-done"))) { - rc->set_grob_property ("positioning-done", SCM_BOOL_T); + rc->set_property ("positioning-done", SCM_BOOL_T); do_shift (rc); } @@ -55,7 +55,7 @@ Rest_collision::add_column (Grob*me,Grob *p) (not?) */ p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS); - p->set_grob_property ("rest-collision", me->self_scm ()); + p->set_property ("rest-collision", me->self_scm ()); } @@ -65,12 +65,12 @@ Rest_collision::add_column (Grob*me,Grob *p) static SCM head_characteristic (Grob * col) { - Grob * s = unsmob_grob (col->get_grob_property ("rest")); + Grob * s = unsmob_grob (col->get_property ("rest")); if (!s) return SCM_BOOL_F; else - return gh_cons (s->get_grob_property ("duration-log"), + return gh_cons (s->get_property ("duration-log"), gh_int2scm (Rhythmic_head::dot_count (s))); } @@ -85,7 +85,7 @@ head_characteristic (Grob * col) SCM Rest_collision::do_shift (Grob *me) { - SCM elts = me->get_grob_property ("elements"); + SCM elts = me->get_property ("elements"); Link_array rests; Link_array notes; @@ -93,13 +93,13 @@ Rest_collision::do_shift (Grob *me) for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s)) { Grob * e = unsmob_grob (ly_car (s)); - if (unsmob_grob (e->get_grob_property ("rest"))) + if (unsmob_grob (e->get_property ("rest"))) { /* Ignore rests under beam. */ - Grob* st = unsmob_grob (e->get_grob_property ("stem")); - if (st && unsmob_grob (st->get_grob_property ("beam"))) + Grob* st = unsmob_grob (e->get_property ("stem")); + if (st && unsmob_grob (st->get_property ("beam"))) continue; rests.push (e); @@ -215,7 +215,7 @@ Rest_collision::do_shift (Grob *me) return SCM_UNSPECIFIED; Real staff_space = Staff_symbol_referencer::staff_space (rcol); - Real minimum_dist = robust_scm2double (me->get_grob_property ("minimum-distance"), 1.0) * staff_space; + Real minimum_dist = robust_scm2double (me->get_property ("minimum-distance"), 1.0) * staff_space; Interval notedim; for (int i = 0; i < notes.size (); i++) diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index a660dfda44..c89715c5b9 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -67,12 +67,12 @@ Rest_engraver::process_music () { rest_ = make_item ("Rest"); - int durlog = unsmob_duration (rest_req_->get_mus_property ("duration"))-> duration_log (); + int durlog = unsmob_duration (rest_req_->get_property ("duration"))-> duration_log (); - rest_->set_grob_property ("duration-log", + rest_->set_property ("duration-log", gh_int2scm (durlog)); - int dots =unsmob_duration (rest_req_->get_mus_property ("duration"))->dot_count (); + int dots =unsmob_duration (rest_req_->get_property ("duration"))->dot_count (); if (dots) { @@ -80,11 +80,11 @@ Rest_engraver::process_music () Rhythmic_head::set_dots (rest_, dot_); dot_->set_parent (rest_, Y_AXIS); - dot_->set_grob_property ("dot-count", gh_int2scm (dots)); + dot_->set_property ("dot-count", gh_int2scm (dots)); announce_grob (dot_, SCM_EOL); } - Pitch *p = unsmob_pitch (rest_req_->get_mus_property ("pitch")); + Pitch *p = unsmob_pitch (rest_req_->get_property ("pitch")); /* This is ridiculous -- rests don't have pitch, but we act as if @@ -97,7 +97,7 @@ Rest_engraver::process_music () if (gh_number_p (c0)) pos += gh_scm2int (c0); - rest_->set_grob_property ("staff-position", gh_int2scm (pos)); + rest_->set_property ("staff-position", gh_int2scm (pos)); } announce_grob(rest_, rest_req_->self_scm()); diff --git a/lily/rest.cc b/lily/rest.cc index a349217c29..658c2e80af 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -21,7 +21,7 @@ SCM Rest::after_line_breaking (SCM smob) { Grob *me = unsmob_grob (smob); - int bt = gh_scm2int (me->get_grob_property ("duration-log")); + int bt = gh_scm2int (me->get_property ("duration-log")); int lc = Staff_symbol_referencer::line_count (me); Real ss = Staff_symbol_referencer::staff_space (me); if(lc % 2) @@ -36,15 +36,15 @@ Rest::after_line_breaking (SCM smob) me->translate_axis (ss/2 , Y_AXIS); } - Grob * d = unsmob_grob (me->get_grob_property ("dot")); + Grob * d = unsmob_grob (me->get_property ("dot")); if (d && bt > 4) // UGH. { - d->set_grob_property ("staff-position", + d->set_property ("staff-position", gh_int2scm ((bt == 7) ? 4 : 3)); } if (d && bt >= -1 && bt <= 1) // UGH again. { - d->set_grob_property ("staff-position", + d->set_property ("staff-position", gh_int2scm ((bt == 0) ? -1 : 1)); } return SCM_UNSPECIFIED; @@ -119,14 +119,14 @@ Rest::brew_internal_stencil (SCM smob) { Grob* me = unsmob_grob (smob); - SCM balltype_scm = me->get_grob_property ("duration-log"); + SCM balltype_scm = me->get_property ("duration-log"); if (!gh_number_p (balltype_scm)) return Stencil ().smobbed_copy (); int balltype = gh_scm2int (balltype_scm); String style; - SCM style_scm = me->get_grob_property ("style"); + SCM style_scm = me->get_property ("style"); if (gh_symbol_p (style_scm)) { style = ly_scm2string (scm_symbol_to_string (style_scm)); diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 8efcf1cd40..d2ef56522f 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -87,7 +87,7 @@ Rhythmic_column_engraver::process_acknowledged_grobs () announce_grob(note_column_, rheads_[0]->self_scm ()); spacing_ = make_item ("NoteSpacing"); - spacing_->set_grob_property ("left-items", gh_cons (note_column_->self_scm (), SCM_EOL)); + spacing_->set_property ("left-items", gh_cons (note_column_->self_scm (), SCM_EOL)); announce_grob (spacing_, SCM_EOL); diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index e887235cbf..02ed3bd664 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -17,14 +17,14 @@ Item* Rhythmic_head::get_dots (Grob*me) { - SCM s = me->get_grob_property ("dot"); + SCM s = me->get_property ("dot"); return unsmob_item (s); } Item* Rhythmic_head::get_stem (Grob*me) { - SCM s = me->get_grob_property ("stem"); + SCM s = me->get_property ("stem"); return unsmob_item (s); } @@ -32,19 +32,19 @@ int Rhythmic_head::dot_count (Grob*me) { return get_dots (me) - ? gh_scm2int (get_dots (me)->get_grob_property ("dot-count")) : 0; + ? gh_scm2int (get_dots (me)->get_property ("dot-count")) : 0; } void Rhythmic_head::set_dots (Grob*me,Item *dot) { - me->set_grob_property ("dot", dot->self_scm ()); + me->set_property ("dot", dot->self_scm ()); } int Rhythmic_head::duration_log (Grob*me) { - SCM s = me->get_grob_property ("duration-log"); + SCM s = me->get_property ("duration-log"); return gh_number_p (s) ? gh_scm2int (s) : 0; } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index c66301c608..e69db174c9 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -77,8 +77,8 @@ Score_engraver::prepare (Moment m) make_columns (); SCM w = m.smobbed_copy (); - command_column_->set_grob_property ("when", w); - musical_column_->set_grob_property ("when", w); + command_column_->set_property ("when", w); + musical_column_->set_property ("when", w); recurse_down_translators (daddy_context_, &Translator::start_translation_timestep, DOWN); } @@ -114,7 +114,7 @@ Score_engraver::initialize () make_columns (); system_ = pscore_->system_; system_->set_bound (LEFT, command_column_); - command_column_->set_grob_property ("breakable", SCM_BOOL_T); + command_column_->set_property ("breakable", SCM_BOOL_T); Engraver_group_engraver::initialize (); } @@ -128,7 +128,7 @@ Score_engraver::finalize () Grob * cc = unsmob_grob (get_property ("currentCommandColumn")); system_->set_bound (RIGHT, cc); - cc->set_grob_property ("breakable", SCM_BOOL_T); + cc->set_property ("breakable", SCM_BOOL_T); typeset_all (); } @@ -198,7 +198,7 @@ Score_engraver::typeset_all () { if (!elem->get_parent (X_AXIS)) { - bool br = to_boolean (elem->get_grob_property ("breakable")); + bool br = to_boolean (elem->get_property ("breakable")); Axis_group_interface::add_element (br ? command_column_ : musical_column_, elem); } @@ -216,7 +216,7 @@ Score_engraver::stop_translation_timestep () Engraver_group_engraver::stop_translation_timestep (); typeset_all (); - if (to_boolean (command_column_->get_grob_property ("breakable"))) + if (to_boolean (command_column_->get_property ("breakable"))) { breaks_ ++; if (! (breaks_%8)) @@ -268,19 +268,19 @@ Score_engraver::try_music (Music*r) { gotcha = true; - SCM pen = command_column_->get_grob_property ("penalty"); + SCM pen = command_column_->get_property ("penalty"); Real total_penalty = gh_number_p (pen) ? gh_scm2double (pen) : 0.0; - SCM rpen = r->get_mus_property ("penalty"); + SCM rpen = r->get_property ("penalty"); if (gh_number_p (rpen)) total_penalty += gh_scm2double (rpen); if (total_penalty > 10000.0) // ugh. arbitrary. forbid_breaks (); - command_column_->set_grob_property ("penalty", + command_column_->set_property ("penalty", gh_double2scm (total_penalty)); } return gotcha; @@ -290,7 +290,7 @@ void Score_engraver::forbid_breaks () { if (command_column_) - command_column_->set_grob_property ("breakable", SCM_EOL); + command_column_->set_property ("breakable", SCM_EOL); } void diff --git a/lily/script-column.cc b/lily/script-column.cc index 56248d3b2b..337ad20ee8 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -14,7 +14,7 @@ void Script_column::add_staff_sided (Grob *me, Item *i) { - SCM p = i->get_grob_property ("script-priority"); + SCM p = i->get_property ("script-priority"); if (!gh_number_p (p)) return; @@ -31,8 +31,8 @@ LY_DEFINE(grob_script_priority_less, Grob * i1 = unsmob_grob (a); Grob* i2 = unsmob_grob (b); - SCM p1 = i1->get_grob_property ("script-priority"); - SCM p2 = i2->get_grob_property ("script-priority"); + SCM p1 = i1->get_property ("script-priority"); + SCM p2 = i2->get_property ("script-priority"); return gh_scm2int (p1) < gh_scm2int (p2) ? SCM_BOOL_T : SCM_BOOL_F; } @@ -47,7 +47,7 @@ Script_column::before_line_breaking (SCM smob) Drul_array scripts (SCM_EOL, SCM_EOL); Link_array staff_sided; - for (SCM s = me->get_grob_property( "scripts"); gh_pair_p (s); s = gh_cdr( s)) + for (SCM s = me->get_property( "scripts"); gh_pair_p (s); s = gh_cdr( s)) { Grob *sc = unsmob_grob (gh_car (s)); @@ -63,7 +63,7 @@ Script_column::before_line_breaking (SCM smob) { programming_error ( "No direction for script?"); d = DOWN; - g->set_grob_property ("direction", gh_int2scm (d)); + g->set_property ("direction", gh_int2scm (d)); } scripts[d] = scm_cons (g->self_scm(), scripts[d]); diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index ac3c720d1d..19eddfed09 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -50,8 +50,8 @@ Script_engraver::try_music (Music *r) This is necessary for part-combining. */ for (int j = 0; j < scripts_.size (); j++) - if (gh_equal_p (scripts_[j]. event_->get_mus_property ("articulation-type"), - r->get_mus_property ("articulation-type") + if (gh_equal_p (scripts_[j]. event_->get_property ("articulation-type"), + r->get_property ("articulation-type") )) return true; @@ -67,12 +67,12 @@ Script_engraver::try_music (Music *r) void copy_property (Grob * g , SCM sym, SCM alist) { - if (g->internal_get_grob_property (sym) == SCM_EOL) + if (g->internal_get_property (sym) == SCM_EOL) { SCM entry = scm_assoc (sym,alist); if (gh_pair_p (entry)) { - g->internal_set_grob_property (sym, gh_cdr (entry)); + g->internal_set_property (sym, gh_cdr (entry)); } } } @@ -122,7 +122,7 @@ void make_script_from_event (Grob *p, prio += index; Side_position_interface::set_axis (p, Y_AXIS); - p->set_grob_property ("script-priority", gh_int2scm (prio)); + p->set_property ("script-priority", gh_int2scm (prio)); } void @@ -135,15 +135,15 @@ Script_engraver::process_music () Grob * p = make_item ("Script"); make_script_from_event (p, &scripts_[i].description_, daddy_context_, - l->get_mus_property ("articulation-type"), + l->get_property ("articulation-type"), i); scripts_[i].script_ = p; - SCM force_dir = l->get_mus_property ("direction"); + SCM force_dir = l->get_property ("direction"); if (is_direction (force_dir) && to_dir (force_dir)) - p->set_grob_property ("direction", force_dir); + p->set_property ("direction", force_dir); if (p) announce_grob (p, l->self_scm()); @@ -159,8 +159,8 @@ Script_engraver::acknowledge_grob (Grob_info inf) { Grob*e = scripts_[i].script_; - if (to_dir (e->get_grob_property ("side-relative-direction"))) - e->set_grob_property ("direction-source", inf.grob_->self_scm ()); + if (to_dir (e->get_property ("side-relative-direction"))) + e->set_property ("direction-source", inf.grob_->self_scm ()); /* add dep ? @@ -222,7 +222,7 @@ Script_engraver::stop_translation_timestep () if (gh_pair_p (follow) && to_boolean (gh_cdr (follow))) { sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS); - sc->set_grob_property ("staff-padding", SCM_EOL); + sc->set_property ("staff-padding", SCM_EOL); } typeset_grob (sc); } diff --git a/lily/script.cc b/lily/script.cc index 68ec61119f..a63c1d2011 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -22,7 +22,7 @@ Stencil Script_interface::get_stencil (Grob * me, Direction d) { - SCM s = me->get_grob_property ("script-stencil"); + SCM s = me->get_property ("script-stencil"); assert (gh_pair_p (s)); SCM key = ly_car (s); diff --git a/lily/self-aligment-interface.cc b/lily/self-aligment-interface.cc index 917dfabc79..7ef7b6f52a 100644 --- a/lily/self-aligment-interface.cc +++ b/lily/self-aligment-interface.cc @@ -26,7 +26,7 @@ Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis) Interval he = him->extent (him,a); SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y"); - SCM align_prop (me->internal_get_grob_property (sym)); + SCM align_prop (me->internal_get_property (sym)); if (!gh_number_p (align_prop)) return gh_int2scm (0); @@ -85,7 +85,7 @@ Self_alignment_interface::aligned_on_self (SCM element_smob, SCM axis) SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y"); - SCM align (me->internal_get_grob_property (sym)); + SCM align (me->internal_get_property (sym)); if (gh_number_p (align)) { Interval ext (me->extent (me,a)); diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index 38806f5d14..88a07d6d72 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -81,9 +81,9 @@ Separating_group_spanner::set_spacing_rods (SCM smob) /* Ugh: padding is added doubly, also for SeparationItem */ - Real padding = robust_scm2double (me->get_grob_property ("padding"), 0.1); + Real padding = robust_scm2double (me->get_property ("padding"), 0.1); - for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s) && gh_pair_p (ly_cdr (s)); s = ly_cdr (s)) + for (SCM s = me->get_property ("elements"); gh_pair_p (s) && gh_pair_p (ly_cdr (s)); s = ly_cdr (s)) { /* Order of elements is reversed! diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 9f24a4d823..59fdc72119 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -120,7 +120,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) return; - if (to_boolean (it->get_grob_property ("no-spacing-rods"))) + if (to_boolean (it->get_property ("no-spacing-rods"))) return ; if (Note_spacing::has_interface (it)) @@ -139,7 +139,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) if (ib) { - p_ref_->set_grob_property ("breakable", SCM_BOOL_T); + p_ref_->set_property ("breakable", SCM_BOOL_T); daddy_context_->set_property ("breakableSeparationItem", p_ref_->self_scm ()); } announce_grob(p_ref_, SCM_EOL); @@ -148,7 +148,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) { Item *it = make_item ("StaffSpacing"); current_spacings_.staff_spacing_ = it; - it->set_grob_property ("left-items", gh_cons (break_item_->self_scm (), SCM_EOL)); + it->set_property ("left-items", gh_cons (break_item_->self_scm (), SCM_EOL)); announce_grob(it, SCM_EOL); @@ -163,7 +163,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) else if (last_spacings_.staff_spacing_) { - last_spacings_.staff_spacing_->set_grob_property ("right-items", + last_spacings_.staff_spacing_->set_property ("right-items", gh_cons (break_item_->self_scm(), SCM_EOL)); } } diff --git a/lily/separation-item.cc b/lily/separation-item.cc index 34f3855ebc..c66abca75c 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -40,7 +40,7 @@ Separation_item::conditional_width (Grob * me, Grob * left) Paper_column * pc = item->get_column (); - for (SCM s = me->get_grob_property ("conditional-elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("conditional-elements"); gh_pair_p (s); s = ly_cdr (s)) { SCM elt = ly_car (s); if (!unsmob_grob (elt)) @@ -54,7 +54,7 @@ Separation_item::conditional_width (Grob * me, Grob * left) continue; /*UGH UGH*/ } - if (to_boolean (il->get_grob_property ("no-spacing-rods"))) + if (to_boolean (il->get_property ("no-spacing-rods"))) { continue; } @@ -65,7 +65,7 @@ Separation_item::conditional_width (Grob * me, Grob * left) } } - SCM pad = me->get_grob_property ("padding"); + SCM pad = me->get_property ("padding"); w.widen (robust_scm2double (pad, 0.0)); return w; @@ -74,7 +74,7 @@ Separation_item::conditional_width (Grob * me, Grob * left) Interval Separation_item::width (Grob *me) { - SCM sw = me->get_grob_property ("X-extent"); + SCM sw = me->get_property ("X-extent"); if (is_number_pair (sw)) { return ly_scm2interval (sw); @@ -84,7 +84,7 @@ Separation_item::width (Grob *me) Paper_column * pc = item->get_column (); Interval w; - for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("elements"); gh_pair_p (s); s = ly_cdr (s)) { SCM elt = ly_car (s); if (!unsmob_grob (elt)) @@ -98,7 +98,7 @@ Separation_item::width (Grob *me) continue; /*UGH UGH*/ } - if (to_boolean (il->get_grob_property ("no-spacing-rods"))) + if (to_boolean (il->get_property ("no-spacing-rods"))) { continue; } @@ -110,11 +110,11 @@ Separation_item::width (Grob *me) } } - SCM pad = me->get_grob_property ("padding"); + SCM pad = me->get_property ("padding"); w.widen (robust_scm2double (pad, 0.0)); - me->set_grob_property ("X-extent", ly_interval2scm (w)); + me->set_property ("X-extent", ly_interval2scm (w)); return w; } @@ -139,12 +139,12 @@ Separation_item::extremal_break_aligned_grob (Grob *separation_item, Direction d Grob *col = dynamic_cast (separation_item)->get_column (); last_ext->set_empty (); Grob *last_grob = 0; - for (SCM s = separation_item->get_grob_property ("elements"); + for (SCM s = separation_item->get_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) { Grob * break_item = unsmob_grob (gh_car (s)); - if (!gh_symbol_p (break_item->get_grob_property ("break-align-symbol"))) + if (!gh_symbol_p (break_item->get_property ("break-align-symbol"))) continue; Interval ext = break_item->extent (col, X_AXIS); diff --git a/lily/sequential-music.cc b/lily/sequential-music.cc index caba59421a..27bdbe3a58 100644 --- a/lily/sequential-music.cc +++ b/lily/sequential-music.cc @@ -10,12 +10,12 @@ Sequential_music::Sequential_music () Moment Sequential_music::get_length () const { - return Music_sequence::cumulative_length (get_mus_property ("elements")); + return Music_sequence::cumulative_length (get_property ("elements")); } ADD_MUSIC (Sequential_music); Moment Sequential_music::start_mom () const { - return Music_sequence::first_start (get_mus_property ("elements")); + return Music_sequence::first_start (get_property ("elements")); } diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 9efea370b3..7dbff769cc 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -26,18 +26,18 @@ Side_position_interface::add_support (Grob*me, Grob*e) Direction Side_position_interface::get_direction (Grob*me) { - SCM d = me->get_grob_property ("direction"); + SCM d = me->get_property ("direction"); if (is_direction (d) && to_dir (d)) return to_dir (d); Direction relative_dir = Direction (1); - SCM reldir = me->get_grob_property ("side-relative-direction"); // should use a lambda. + SCM reldir = me->get_property ("side-relative-direction"); // should use a lambda. if (is_direction (reldir)) { relative_dir = to_dir (reldir); } - SCM other_elt = me->get_grob_property ("direction-source"); + SCM other_elt = me->get_property ("direction-source"); Grob * e = unsmob_grob (other_elt); if (e) { @@ -67,12 +67,12 @@ SCM Side_position_interface::general_side_position (Grob * me, Axis a, bool use_extents) { Real ss = Staff_symbol_referencer::staff_space (me); - SCM support = me->get_grob_property ("side-support-elements"); + SCM support = me->get_property ("side-support-elements"); Grob *common = common_refpoint_of_list (support, me->get_parent (a), a); Grob * st = Staff_symbol_referencer::get_staff_symbol (me); bool include_staff = (st && a == Y_AXIS - && gh_number_p (me->get_grob_property ("staff-padding"))); + && gh_number_p (me->get_property ("staff-padding"))); Interval dim; if (include_staff) @@ -102,10 +102,10 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte Direction dir = Side_position_interface::get_direction (me); Real off = me->get_parent (a)->relative_coordinate (common, a); - Real minimum_space = ss * robust_scm2double (me->get_grob_property ("minimum-space"), -1); + Real minimum_space = ss * robust_scm2double (me->get_property ("minimum-space"), -1); Real total_off = dim.linear_combination (dir) - off; - total_off += dir * ss * robust_scm2double (me->get_grob_property ("padding"), 0); + total_off += dir * ss * robust_scm2double (me->get_property ("padding"), 0); if (minimum_space >= 0 && dir @@ -214,11 +214,11 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis) */ Grob * st = Staff_symbol_referencer::get_staff_symbol (me); if (st && a == Y_AXIS - && gh_number_p (me->get_grob_property ("staff-padding"))) + && gh_number_p (me->get_property ("staff-padding"))) { Real padding= Staff_symbol_referencer::staff_space (me) - * gh_scm2double (me->get_grob_property ("staff-padding")); + * gh_scm2double (me->get_property ("staff-padding")); Grob *common = me->common_refpoint (st, Y_AXIS); diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index 972da55278..4a33adb258 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -215,7 +215,7 @@ Simple_spacer::add_columns (Link_array const &icols) Link_array cols(icols); for (int i = cols.size (); i--;) - if (gh_pair_p (cols[i]->get_grob_property ("between-cols"))) + if (gh_pair_p (cols[i]->get_property ("between-cols"))) { loose_cols_.push (cols[i]); cols.del (i); @@ -226,7 +226,7 @@ Simple_spacer::add_columns (Link_array const &icols) { Spring_smob *spring = 0; - for (SCM s = cols[i]->get_grob_property ("ideal-distances"); + for (SCM s = cols[i]->get_property ("ideal-distances"); !spring && gh_pair_p (s); s = ly_cdr (s)) { @@ -368,7 +368,7 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) int sz = positions->cols_.size (); for (int i = sz; i--; ) { - SCM p = positions->cols_[i]->get_grob_property( "penalty"); + SCM p = positions->cols_[i]->get_property( "penalty"); if (gh_number_p (p)) { if (gh_scm2double (p) < -9999) diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index a60735b306..864473b135 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -38,7 +38,7 @@ Simultaneous_music_iterator::construct_children () { int j = 0; - SCM i = get_music ()->get_mus_property ("elements"); + SCM i = get_music ()->get_property ("elements"); children_list_ = SCM_EOL; SCM * tail = &children_list_; diff --git a/lily/simultaneous-music.cc b/lily/simultaneous-music.cc index 011734b966..6a4d1f1e1a 100644 --- a/lily/simultaneous-music.cc +++ b/lily/simultaneous-music.cc @@ -16,13 +16,13 @@ Moment Simultaneous_music::get_length () const { - return Music_sequence::maximum_length (get_mus_property ("elements")); + return Music_sequence::maximum_length (get_property ("elements")); } Moment Simultaneous_music::start_mom () const { - return Music_sequence::minimum_start (get_mus_property ("elements")); + return Music_sequence::minimum_start (get_property ("elements")); } Simultaneous_music::Simultaneous_music() diff --git a/lily/slash-repeat-engraver.cc b/lily/slash-repeat-engraver.cc index 3fabaad0ce..4c21ae0168 100644 --- a/lily/slash-repeat-engraver.cc +++ b/lily/slash-repeat-engraver.cc @@ -70,7 +70,7 @@ Slash_repeat_engraver::try_music (Music * m) Repeated_music * rp = dynamic_cast (m); if (rp && !repeat_ - && rp->get_mus_property ("iterator-ctor") + && rp->get_property ("iterator-ctor") == Percent_repeat_iterator::constructor_proc) { body_length_ = rp->body_get_length (); diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 3daf274d6b..ba4c795b92 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -50,7 +50,7 @@ Slur_engraver::try_music (Music *ev) /* Let's not start more than one slur per moment. */ - Direction d = to_dir (ev->get_mus_property ("span-direction")); + Direction d = to_dir (ev->get_property ("span-direction")); if (d == START) { if (now_mom () > last_start_) @@ -72,7 +72,7 @@ Slur_engraver::try_music (Music *ev) */ for (int j = new_slur_evs_.size(); j--;) { - Direction nd = to_dir (new_slur_evs_[j]->get_mus_property ("span-direction")); + Direction nd = to_dir (new_slur_evs_[j]->get_property ("span-direction")); if (nd == STOP) return true; @@ -130,7 +130,7 @@ Slur_engraver::process_music () { Music* slur_ev = new_slur_evs_[i]; // end slur: move the slur to other array - Direction d = to_dir (slur_ev->get_mus_property ("span-direction")); + Direction d = to_dir (slur_ev->get_property ("span-direction")); if (d== STOP) { if (slur_stack_.is_empty ()) @@ -153,9 +153,9 @@ Slur_engraver::process_music () Slur::set_interface (slur); // cannot remove yet! - if (Direction updown = to_dir (slur_ev->get_mus_property ("direction"))) + if (Direction updown = to_dir (slur_ev->get_property ("direction"))) { - slur->set_grob_property ("direction", gh_int2scm (updown)); + slur->set_property ("direction", gh_int2scm (updown)); } start_slurs.push (slur); diff --git a/lily/slur-performer.cc b/lily/slur-performer.cc index 43d538b4ce..4c8b23b69a 100644 --- a/lily/slur-performer.cc +++ b/lily/slur-performer.cc @@ -71,7 +71,7 @@ Slur_performer::try_music (Music *m) { if (m->is_mus_type ("slur-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); if (d == START) { diff --git a/lily/slur.cc b/lily/slur.cc index 3b3ff7f129..606aff5f64 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -42,8 +42,8 @@ void Slur::set_interface (Grob*me) { /* Copy to mutable list. */ - me->set_grob_property ("attachment", - ly_deep_copy (me->get_grob_property ("attachment"))); + me->set_property ("attachment", + ly_deep_copy (me->get_property ("attachment"))); } void @@ -67,7 +67,7 @@ Slur::de_uglyfy (Grob*me, Slur_bezier_bow* bb, Real default_height) Real h = bb->curve_.control_[i][Y_AXIS] * ff / length; Real f = default_height / length; - SCM up = me->get_grob_property ("de-uglify-parameters"); + SCM up = me->get_property ("de-uglify-parameters"); Real c1 = gh_scm2double (ly_car (up)); Real c2 = gh_scm2double (ly_cadr (up)); @@ -114,13 +114,13 @@ SCM Slur::after_line_breaking (SCM smob) { Grob *me = unsmob_grob (smob); - if (!scm_ilength (me->get_grob_property ("note-columns"))) + if (!scm_ilength (me->get_property ("note-columns"))) { me->suicide (); return SCM_UNSPECIFIED; } set_extremities (me); - if (!gh_pair_p (me->get_grob_property ("control-points"))) + if (!gh_pair_p (me->get_property ("control-points"))) set_control_points (me); return SCM_UNSPECIFIED; } @@ -132,7 +132,7 @@ Slur::check_slope (Grob *me) /* Avoid too steep slurs. */ - SCM s = me->get_grob_property ("slope-limit"); + SCM s = me->get_property ("slope-limit"); if (gh_number_p (s)) { Array encompass = get_encompass_offsets (me); @@ -152,9 +152,9 @@ Slur::check_slope (Grob *me) if (slope > limit) { Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me); - Direction dir = (Direction)gh_scm2int (me->get_grob_property ("direction")); + Direction dir = (Direction)gh_scm2int (me->get_property ("direction")); Direction d = (Direction) (- dir * (sign (dy))); - SCM a = me->get_grob_property ("attachment-offset"); + SCM a = me->get_property ("attachment-offset"); Drul_array o; o[LEFT] = ly_scm2offset (index_get_cell (a, LEFT)); o[RIGHT] = ly_scm2offset (index_get_cell (a, RIGHT)); @@ -162,7 +162,7 @@ Slur::check_slope (Grob *me) o[d][Y_AXIS] *= get_grob_direction (me); - me->set_grob_property ("attachment-offset", + me->set_property ("attachment-offset", gh_cons (ly_offset2scm (o[LEFT]), ly_offset2scm (o[RIGHT]))); } @@ -179,14 +179,14 @@ Slur::set_extremities (Grob *me) if (!get_grob_direction (me)) set_grob_direction (me, get_default_dir (me)); - SCM att = me->get_grob_property ("attachment"); + SCM att = me->get_property ("attachment"); /* */ if (!gh_pair_p (att)) { programming_error ("attachment is not a cons?!"); att = gh_cons (SCM_EOL, SCM_EOL); - me->set_grob_property ("attachment", att); + me->set_property ("attachment", att); } Direction dir = LEFT; @@ -195,7 +195,7 @@ Slur::set_extremities (Grob *me) if (!gh_symbol_p (index_get_cell (att, dir))) { - SCM p = me->get_grob_property ("extremity-function"); + SCM p = me->get_property ("extremity-function"); SCM res = ly_symbol2scm ("head"); if (gh_procedure_p (p)) @@ -216,7 +216,7 @@ Slur::set_extremities (Grob *me) Real Slur::get_boundary_notecolumn_y (Grob *me, Direction dir) { - SCM cols = me->get_grob_property ("note-columns"); + SCM cols = me->get_property ("note-columns"); if(!gh_pair_p (cols)) { @@ -264,12 +264,12 @@ Slur::broken_trend_offset (Grob *me, Direction dir) Grob *neighbour = mother->broken_intos_[j]; if (dir == RIGHT) - neighbour->set_grob_property ("direction", - me->get_grob_property ("direction")); + neighbour->set_property ("direction", + me->get_property ("direction")); Real neighbour_y = get_boundary_notecolumn_y (neighbour, dir); Real y = get_boundary_notecolumn_y (me, -dir); - int neighbour_cols = scm_ilength (neighbour->get_grob_property ("note-columns")); - int cols = scm_ilength (me->get_grob_property ("note-columns")); + int neighbour_cols = scm_ilength (neighbour->get_property ("note-columns")); + int cols = scm_ilength (me->get_property ("note-columns")); o = Offset (0, (y*neighbour_cols + neighbour_y*cols) / (cols + neighbour_cols)); } @@ -287,7 +287,7 @@ Offset Slur::get_attachment (Grob *me, Direction dir, Grob **common) { - SCM s = me->get_grob_property ("attachment"); + SCM s = me->get_property ("attachment"); if (!gh_pair_p (s) || !gh_symbol_p (index_get_cell (s, dir))) { s = set_extremities (me); @@ -301,7 +301,7 @@ Slur::get_attachment (Grob *me, Direction dir, Real hs = staff_space / 2.0; Offset o; - Direction slurdir = to_dir (me->get_grob_property ("direction")); + Direction slurdir = to_dir (me->get_property ("direction")); Grob *stem = 0; if (Note_column::has_interface (sp->get_bound (dir))) @@ -370,7 +370,7 @@ Slur::get_attachment (Grob *me, Direction dir, o = broken_trend_offset (me, dir); } - SCM alist = me->get_grob_property ("extremity-offset-alist"); + SCM alist = me->get_property ("extremity-offset-alist"); int stemdir = stem ? Stem::get_direction (stem) : 1; SCM l = scm_assoc (scm_list_n (a, @@ -396,7 +396,7 @@ Slur::get_attachment (Grob *me, Direction dir, - me->relative_coordinate (common[Y_AXIS], Y_AXIS); } - Offset off = ly_scm2offset (index_get_cell (me->get_grob_property + Offset off = ly_scm2offset (index_get_cell (me->get_property ("attachment-offset"), dir)) * staff_space; @@ -411,7 +411,7 @@ Slur::encompass_offset (Grob*me, Grob **common) { Offset o; - Grob* stem = unsmob_grob (col->get_grob_property ("stem")); + Grob* stem = unsmob_grob (col->get_property ("stem")); Direction dir = get_grob_direction (me); @@ -448,7 +448,7 @@ Slur::encompass_offset (Grob*me, /* leave a gap: slur mustn't touch head/stem */ - o[Y_AXIS] += dir * robust_scm2double (me->get_grob_property ("y-free"), 0) * + o[Y_AXIS] += dir * robust_scm2double (me->get_property ("y-free"), 0) * 1.0; return o; } @@ -457,7 +457,7 @@ Array Slur::get_encompass_offsets (Grob *me) { Spanner*sp = dynamic_cast (me); - SCM eltlist = me->get_grob_property ("note-columns"); + SCM eltlist = me->get_property ("note-columns"); Grob *common[] = {common_refpoint_of_list (eltlist, me, X_AXIS), common_refpoint_of_list (eltlist, me, Y_AXIS)}; @@ -543,20 +543,20 @@ SCM Slur::print (SCM smob) { Grob * me = unsmob_grob (smob); - if (!scm_ilength (me->get_grob_property ("note-columns"))) + if (!scm_ilength (me->get_property ("note-columns"))) { me->suicide (); return SCM_EOL; } - Real base_thick = robust_scm2double (me->get_grob_property ("thickness"), 1); + Real base_thick = robust_scm2double (me->get_property ("thickness"), 1); Real thick = base_thick * Staff_symbol_referencer::line_thickness (me); Real ss = Staff_symbol_referencer::staff_space (me); Bezier one = get_curve (me); // get_curve may suicide - if (!scm_ilength (me->get_grob_property ("note-columns"))) + if (!scm_ilength (me->get_property ("note-columns"))) return SCM_EOL; Stencil a; @@ -564,7 +564,7 @@ Slur::print (SCM smob) /* TODO: replace dashed with generic property. */ - SCM d = me->get_grob_property ("dashed"); + SCM d = me->get_property ("dashed"); if (gh_number_p (d)) a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0)); else @@ -579,9 +579,9 @@ Slur::set_control_points (Grob*me) { Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me); - SCM details = me->get_grob_property ("details"); - SCM h_inf_scm = me->get_grob_property ("height-limit"); - SCM r_0_scm = me->get_grob_property ("ratio"); + SCM details = me->get_property ("details"); + SCM h_inf_scm = me->get_property ("height-limit"); + SCM r_0_scm = me->get_property ("ratio"); Real r_0 = robust_scm2double (r_0_scm, 1); Real h_inf = staff_space * gh_scm2double (h_inf_scm); @@ -596,7 +596,7 @@ Slur::set_control_points (Grob*me) Real length = bb.curve_.control_[3][X_AXIS]; Real default_height = slur_height (length, h_inf, r_0); - SCM ssb = me->get_grob_property ("beautiful"); + SCM ssb = me->get_property ("beautiful"); Real sb = 0; if (gh_number_p (ssb)) sb = gh_scm2double (ssb); @@ -640,7 +640,7 @@ Slur::set_control_points (Grob*me) } } - me->set_grob_property ("control-points", controls); + me->set_property ("control-points", controls); } Bezier @@ -649,7 +649,7 @@ Slur::get_curve (Grob*me) Bezier b; int i = 0; - SCM attach = me->get_grob_property ("attachment"); + SCM attach = me->get_property ("attachment"); if (!gh_pair_p (attach)) attach = set_extremities(me); @@ -659,14 +659,14 @@ Slur::get_curve (Grob*me) || ! gh_symbol_p (index_get_cell (attach, RIGHT))) set_extremities (me); - if (!gh_pair_p (me->get_grob_property ("control-points"))) + if (!gh_pair_p (me->get_property ("control-points"))) set_control_points (me); // set_control_points may suicide - if (!scm_ilength (me->get_grob_property ("note-columns"))) + if (!scm_ilength (me->get_property ("note-columns"))) return b; - for (SCM s= me->get_grob_property ("control-points"); s != SCM_EOL; s = ly_cdr (s)) + for (SCM s= me->get_property ("control-points"); s != SCM_EOL; s = ly_cdr (s)) { b.control_[i] = ly_scm2offset (ly_car (s)); i++; diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index 2c40260f23..fa597a6e1f 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -18,7 +18,7 @@ SCM Spaceable_grob::get_minimum_distances (Grob*me) { - return me->get_grob_property ("minimum-distances"); + return me->get_property ("minimum-distances"); } /*todo: merge code of spring & rod? @@ -43,7 +43,7 @@ Spaceable_grob::add_rod (Grob *me , Grob * p, Real d) } mins = gh_cons (gh_cons (p->self_scm (), newdist), mins); - me->set_grob_property ("minimum-distances", mins); + me->set_property ("minimum-distances", mins); } void @@ -69,7 +69,7 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expan } #ifndef NDEBUG - SCM mins = me->get_grob_property ("ideal-distances"); + SCM mins = me->get_property ("ideal-distances"); for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s)) { Spring_smob * sp = unsmob_spring(ly_car (s)); @@ -94,9 +94,9 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expan void Spaceable_grob::remove_interface (Grob*me) { - me->set_grob_property ("minimum-distances" , SCM_EOL); - me->set_grob_property ("spacing-wishes", SCM_EOL); - me->set_grob_property ("ideal-distances", SCM_EOL); + me->set_property ("minimum-distances" , SCM_EOL); + me->set_property ("spacing-wishes", SCM_EOL); + me->set_property ("ideal-distances", SCM_EOL); } diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index e2dbd037a6..a8f19e1674 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -162,8 +162,8 @@ Spacing_engraver::stop_translation_timestep () SCM sh = shortest_playing.smobbed_copy (); SCM st = starter.smobbed_copy (); - sc->set_grob_property ("shortest-playing-duration", sh); - sc->set_grob_property ("shortest-starter-duration", st); + sc->set_property ("shortest-playing-duration", sh); + sc->set_property ("shortest-starter-duration", st); } void diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index eb83b6097b..ba8fcc352e 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -72,8 +72,8 @@ public: static bool loose_column (Grob *l, Grob *c, Grob *r) { - SCM rns = c->get_grob_property ("right-neighbors"); - SCM lns = c->get_grob_property ("left-neighbors"); + SCM rns = c->get_property ("right-neighbors"); + SCM lns = c->get_property ("left-neighbors"); /* If this column doesn't have a proper neighbor, we should really @@ -133,12 +133,12 @@ loose_column (Grob *l, Grob *c, Grob *r) in any case, we don't want to move bar lines. */ - for (SCM e = c->get_grob_property ("elements"); gh_pair_p (e); e = gh_cdr (e)) + for (SCM e = c->get_property ("elements"); gh_pair_p (e); e = gh_cdr (e)) { Grob * g = unsmob_grob (gh_car (e)); if (g && Break_align_interface::has_interface (g)) { - for (SCM s = g->get_grob_property ("elements"); gh_pair_p (s); + for (SCM s = g->get_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) { Grob *h = unsmob_grob (gh_car (s)); @@ -146,7 +146,7 @@ loose_column (Grob *l, Grob *c, Grob *r) /* ugh. -- fix staff-bar name? */ - if (h && h->get_grob_property ("break-align-symbol") == ly_symbol2scm ("staff-bar")) + if (h && h->get_property ("break-align-symbol") == ly_symbol2scm ("staff-bar")) return false; } } @@ -164,7 +164,7 @@ void Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational shortest) { Link_array newcols; - Real increment = robust_scm2double (me->get_grob_property ("spacing-increment"), 1.2); + Real increment = robust_scm2double (me->get_property ("spacing-increment"), 1.2); for (int i=0; i < cols->size (); i++) { if (Item::is_breakable (cols->elem(i)) || Paper_column::is_musical (cols->elem (i))) @@ -176,18 +176,18 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational s Grob *c = cols->elem(i); if (loose_column (cols->elem (i-1), c, cols->elem (i+1))) { - SCM lns = c->get_grob_property ("left-neighbors"); + SCM lns = c->get_property ("left-neighbors"); lns = gh_pair_p (lns) ? gh_car (lns) : SCM_BOOL_F; - SCM rns = c->get_grob_property ("right-neighbors"); + SCM rns = c->get_property ("right-neighbors"); rns = gh_pair_p (rns) ? gh_car (rns) : SCM_BOOL_F; /* Either object can be non existent, if the score ends prematurely. */ - rns = gh_car (unsmob_grob (rns)->get_grob_property ("right-items")); - c->set_grob_property ("between-cols", gh_cons (lns, + rns = gh_car (unsmob_grob (rns)->get_property ("right-items")); + c->set_property ("between-cols", gh_cons (lns, rns)); /* @@ -205,7 +205,7 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational s Item *lc = dynamic_cast ((d == LEFT) ? next_door[LEFT] : c); Item *rc = dynamic_cast (d == LEFT ? c : next_door[RIGHT]); - for (SCM s = lc->get_grob_property ("spacing-wishes"); + for (SCM s = lc->get_property ("spacing-wishes"); gh_pair_p (s); s = gh_cdr (s)) { Grob *sp = unsmob_grob (gh_car (s)); @@ -272,7 +272,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) int min_rank = 100000; // inf. - SCM wishes= cols[i]->get_grob_property ("spacing-wishes"); + SCM wishes= cols[i]->get_property ("spacing-wishes"); for (SCM s =wishes; gh_pair_p (s); s = gh_cdr (s)) { Item * wish = dynamic_cast (unsmob_grob (gh_car (s))); @@ -304,7 +304,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) update the right column of the wish. */ int maxrank = 0; - SCM left_neighs = rc->get_grob_property ("left-neighbors"); + SCM left_neighs = rc->get_property ("left-neighbors"); if (gh_pair_p (left_neighs) && unsmob_grob (gh_car (left_neighs))) { @@ -318,13 +318,13 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) left_neighs = SCM_EOL; left_neighs = gh_cons (wish->self_scm (), left_neighs); - rc->set_grob_property ("left-neighbors", right_neighbors); + rc->set_property ("left-neighbors", right_neighbors); } } if (gh_pair_p (right_neighbors)) { - cols[i]->set_grob_property ("right-neighbors", right_neighbors); + cols[i]->set_property ("right-neighbors", right_neighbors); } } } @@ -347,16 +347,16 @@ Spacing_spanner::set_implicit_neighbor_columns (Link_array cols) /* sloppy with typnig left/right-neighbors should take list, but paper-column found instead. */ - SCM ln = cols[i] ->get_grob_property ("left-neighbors"); + SCM ln = cols[i] ->get_property ("left-neighbors"); if (!gh_pair_p (ln) && i ) { - cols[i]->set_grob_property ("left-neighbors", gh_cons (cols[i-1]->self_scm(), SCM_EOL)); + cols[i]->set_property ("left-neighbors", gh_cons (cols[i-1]->self_scm(), SCM_EOL)); } - SCM rn = cols[i] ->get_grob_property ("right-neighbors"); + SCM rn = cols[i] ->get_property ("right-neighbors"); if (!gh_pair_p (rn) && i < cols.size () - 1) { - cols[i]->set_grob_property ("right-neighbors", gh_cons (cols[i + 1]->self_scm(), SCM_EOL)); + cols[i]->set_property ("right-neighbors", gh_cons (cols[i + 1]->self_scm(), SCM_EOL)); } } } @@ -372,7 +372,7 @@ Spacing_spanner::set_springs (SCM smob) set_explicit_neighbor_columns (all); - SCM preset_shortest = me->get_grob_property ("common-shortest-duration"); + SCM preset_shortest = me->get_property ("common-shortest-duration"); Rational global_shortest; if (unsmob_moment (preset_shortest)) { @@ -432,7 +432,7 @@ Spacing_spanner::find_shortest (Grob *me, Link_array const &cols) { if (Paper_column::is_musical (cols[i])) { - Moment *when = unsmob_moment (cols[i]->get_grob_property ("when")); + Moment *when = unsmob_moment (cols[i]->get_property ("when")); /* ignore grace notes for shortest notes. @@ -440,7 +440,7 @@ Spacing_spanner::find_shortest (Grob *me, Link_array const &cols) if (when && when->grace_part_) continue; - SCM st = cols[i]->get_grob_property ("shortest-starter-duration"); + SCM st = cols[i]->get_property ("shortest-starter-duration"); Moment this_shortest = *unsmob_moment (st); assert (this_shortest.to_bool()); shortest_in_measure = shortest_in_measure const &cols) // printf ("duration %d/%d, count %d\n", durations[i].num (), durations[i].den (), counts[i]); } - SCM bsd = me->get_grob_property ("base-shortest-duration"); + SCM bsd = me->get_property ("base-shortest-duration"); Rational d = Rational (1,8); if (Moment *m = unsmob_moment (bsd)) d = m->main_part_; @@ -508,7 +508,7 @@ void Spacing_spanner::do_measure (Rational global_shortest, Grob*me, Link_array *cols) { - Real headwid = robust_scm2double (me->get_grob_property ("spacing-increment"), 1); + Real headwid = robust_scm2double (me->get_property ("spacing-increment"), 1); for (int i= 0; i < cols->size () - 1; i++) { Item * l = dynamic_cast (cols->elem (i)); @@ -564,7 +564,7 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc Real compound_fixed_note_space = 0.0; int wish_count = 0; - SCM seq = lc->get_grob_property ("right-neighbors"); + SCM seq = lc->get_property ("right-neighbors"); /* We adjust the space following a note only if the next note @@ -690,12 +690,12 @@ Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r, if (l->is_breakable (l) && r->is_breakable (r)) { - Moment *dt = unsmob_moment (l->get_grob_property ("measure-length")); + Moment *dt = unsmob_moment (l->get_property ("measure-length")); Moment mlen (1); if (dt) mlen = *dt; - Real incr = robust_scm2double (me->get_grob_property ("spacing-increment"), 1); + Real incr = robust_scm2double (me->get_property ("spacing-increment"), 1); *space = *fixed + incr * double (mlen.main_part_ / shortest.main_part_) * 0.8; } @@ -734,7 +734,7 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor if (dt == Moment (0,0)) { - for (SCM s = l->get_grob_property ("spacing-wishes"); + for (SCM s = l->get_property ("spacing-wishes"); gh_pair_p (s); s = gh_cdr (s)) { Item * spacing_grob = dynamic_cast (unsmob_grob (gh_car (s))); @@ -812,8 +812,8 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor Real Spacing_spanner::get_duration_space (Grob*me, Moment d, Rational shortest, bool * expand_only) { - Real k = robust_scm2double (me->get_grob_property ("shortest-duration-space"), 1); - Real incr = robust_scm2double (me->get_grob_property ("spacing-increment"), 1); + Real k = robust_scm2double (me->get_property ("shortest-duration-space"), 1); + Real incr = robust_scm2double (me->get_property ("spacing-increment"), 1); if (d < shortest) { @@ -858,7 +858,7 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc, Moment shortest, bool * expand_only) { Moment shortest_playing_len = 0; - SCM s = lc->get_grob_property ("shortest-playing-duration"); + SCM s = lc->get_property ("shortest-playing-duration"); if (unsmob_moment (s)) shortest_playing_len = *unsmob_moment (s); @@ -881,7 +881,7 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc, several measures. */ - Moment *dt = unsmob_moment (rc->get_grob_property ("measure-length")); + Moment *dt = unsmob_moment (rc->get_property ("measure-length")); if (dt) { delta_t = delta_t get_grob_property ("grace-space-factor"), 1); + = robust_scm2double (me->get_property ("grace-space-factor"), 1); dist *= grace_fact; } diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 763f7c5c1a..66c1e46da3 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -81,10 +81,10 @@ Span_arpeggio_engraver::stop_translation_timestep () */ for (int i=0; i < arpeggios_.size (); i ++) { - for (SCM s = arpeggios_[i]->get_grob_property ("stems"); + for (SCM s = arpeggios_[i]->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), ly_car (s)); - for (SCM s = arpeggios_[i]->get_grob_property ("side-support-elements"); + for (SCM s = arpeggios_[i]->get_property ("side-support-elements"); gh_pair_p (s); s = ly_cdr (s)) Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), ly_car (s)); @@ -92,7 +92,7 @@ Span_arpeggio_engraver::stop_translation_timestep () we can't kill the children, since we don't want to the previous note to bump into the span arpeggio; so we make it transparent. */ - arpeggios_[i]->set_grob_property ("print-function", SCM_EOL); + arpeggios_[i]->set_property ("print-function", SCM_EOL); } typeset_grob (span_arpeggio_); diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index f8e7b445b1..c8d0b1527a 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -72,9 +72,9 @@ Span_bar_engraver::stop_translation_timestep () Span_bar::add_bar (spanbar_,bars_[i]); SCM vissym =ly_symbol2scm ("break-visibility"); - SCM vis = bars_[0]->internal_get_grob_property (vissym); - if (scm_equal_p (spanbar_->internal_get_grob_property (vissym), vis) != SCM_BOOL_T) - spanbar_->internal_set_grob_property (vissym, vis); + SCM vis = bars_[0]->internal_get_property (vissym); + if (scm_equal_p (spanbar_->internal_get_property (vissym), vis) != SCM_BOOL_T) + spanbar_->internal_set_property (vissym, vis); typeset_grob (spanbar_); spanbar_ =0; diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 9e289e452e..c90a283726 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -29,7 +29,7 @@ MAKE_SCHEME_CALLBACK (Span_bar,print,1); /* Limitations/Bugs: - (1) Elements from 'me->get_grob_property ("elements")' must be + (1) Elements from 'me->get_property ("elements")' must be ordered according to their y coordinates relative to their common axis group parent. Otherwise, the computation goes mad. @@ -49,7 +49,7 @@ SCM Span_bar::print (SCM smobbed_me) { Grob *me = unsmob_grob (smobbed_me); - SCM first_elt = me->get_grob_property ("elements"); + SCM first_elt = me->get_property ("elements"); /* compute common refpoint of elements */ Grob *refp = me; @@ -61,7 +61,7 @@ Span_bar::print (SCM smobbed_me) } Span_bar::evaluate_glyph (me); - SCM glyph = me->get_grob_property ("glyph"); + SCM glyph = me->get_property ("glyph"); /* glyph may not be a string, when ME is killed by Hara Kiri in between. */ @@ -116,7 +116,7 @@ Span_bar::width_callback (SCM element_smob, SCM scm_axis) Grob *se = unsmob_grob (element_smob); Axis a = (Axis) gh_scm2int (scm_axis); assert (a == X_AXIS); - String gl = ly_scm2string (se->get_grob_property ("glyph")); + String gl = ly_scm2string (se->get_property ("glyph")); /* urg. @@ -167,7 +167,7 @@ Span_bar::evaluate_empty (Grob*me) /* TODO: filter all hara-kiried out of ELEMENS list, and then optionally do suicide. Call this cleanage function from center_on_spanned_callback () as well. */ - if (!gh_pair_p (me->get_grob_property ("elements"))) + if (!gh_pair_p (me->get_property ("elements"))) { me->suicide (); } @@ -176,16 +176,16 @@ Span_bar::evaluate_empty (Grob*me) void Span_bar::evaluate_glyph (Grob*me) { - SCM gl = me->get_grob_property ("glyph"); + SCM gl = me->get_property ("glyph"); if (gh_string_p (gl)) return ; - for (SCM s = me->get_grob_property ("elements"); + for (SCM s = me->get_property ("elements"); !gh_string_p (gl) && gh_pair_p (s); s = gh_cdr (s)) { gl = unsmob_grob (gh_car (s)) - ->get_grob_property ("glyph"); + ->get_property ("glyph"); } if (!gh_string_p (gl)) @@ -209,9 +209,9 @@ Span_bar::evaluate_glyph (Grob*me) } gl = scm_makfrom0str (type.to_str0 ()); - if (scm_equal_p (me->get_grob_property ("glyph"), gl) + if (scm_equal_p (me->get_property ("glyph"), gl) != SCM_BOOL_T) - me->set_grob_property ("glyph", gl); + me->set_property ("glyph", gl); } Interval diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 7c2375d90b..640fb12875 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -177,7 +177,7 @@ Span_dynamic_performer::try_music (Music* r) if (r->is_mus_type ("crescendo-event") || r->is_mus_type ("decrescendo-event")) { - Direction d = to_dir (r->get_mus_property ("span-direction")); + Direction d = to_dir (r->get_property ("span-direction")); span_events_[d] = r; return true; } diff --git a/lily/spanner.cc b/lily/spanner.cc index dfa24281a0..c7e333b9f2 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -341,7 +341,7 @@ Spanner::set_spacing_rods (SCM smob) r.item_l_drul_[LEFT] = sp->get_bound (LEFT); r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT); r.distance_ = - robust_scm2double (me->get_grob_property ("minimum-length"), 0); + robust_scm2double (me->get_property ("minimum-length"), 0); r.add_to_cols (); return SCM_UNSPECIFIED; diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 6a7535f030..587a5f7466 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -51,7 +51,7 @@ Staff_spacing::next_note_correction (Grob * me, max_corr = max_corr >? (- v[LEFT]); } - if (Grob* a = unsmob_grob (g->get_grob_property ("arpeggio"))) + if (Grob* a = unsmob_grob (g->get_property ("arpeggio"))) { max_corr = max_corr >? (- a->extent (col, X_AXIS)[LEFT]); } @@ -78,7 +78,7 @@ Staff_spacing::next_note_correction (Grob * me, Real corr = abs (stem_posns.length ()/7.) get_grob_property ("stem-spacing-correction"), 1); + robust_scm2double (me->get_property ("stem-spacing-correction"), 1); if (d != DOWN) corr = 0.0; @@ -99,7 +99,7 @@ Staff_spacing::bar_y_positions (Grob *bar_grob) bar_size.set_empty(); if (Bar_line::has_interface (bar_grob)) { - SCM glyph = bar_grob->get_grob_property ("glyph"); + SCM glyph = bar_grob->get_property ("glyph"); String glyph_string = gh_string_p (glyph) ? ly_scm2string (glyph) : ""; if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".") @@ -127,13 +127,13 @@ Staff_spacing::next_notes_correction (Grob *me, Grob * last_grob) Interval bar_size = bar_y_positions (last_grob); Real max_corr =0.0; - for (SCM s = me->get_grob_property ("right-items"); + for (SCM s = me->get_property ("right-items"); gh_pair_p (s); s = gh_cdr (s)) { Grob * g = unsmob_grob (gh_car (s)); max_corr = max_corr >? next_note_correction (me, g, bar_size); - for (SCM t = g->get_grob_property ("elements"); + for (SCM t = g->get_property ("elements"); gh_pair_p (t); t = gh_cdr (t)) max_corr = max_corr >? next_note_correction (me, unsmob_grob (gh_car (t)), bar_size); @@ -151,7 +151,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed) Grob * separation_item=0; Item * me_item = dynamic_cast (me); - for (SCM s = me->get_grob_property ("left-items"); + for (SCM s = me->get_property ("left-items"); gh_pair_p (s); s = gh_cdr(s)) { Grob * cand = unsmob_grob(gh_car (s)); @@ -189,7 +189,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed) *fixed = last_ext[RIGHT]; *space = *fixed + 1.0; - SCM alist = last_grob->get_grob_property ("space-alist"); + SCM alist = last_grob->get_property ("space-alist"); if (!scm_list_p (alist)) return ; diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 3b52bbd234..17e96949b4 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -68,7 +68,7 @@ Staff_symbol_engraver::finalize () void Staff_symbol_engraver::acknowledge_grob (Grob_info s) { - s.grob_->set_grob_property ("staff-symbol", span_->self_scm ()); + s.grob_->set_property ("staff-symbol", span_->self_scm ()); // remove this. probly not necessary? s.grob_->add_dependency (span_); // UGH. UGH. UGH @@ -106,7 +106,7 @@ Tab_staff_symbol_engraver::process_music () { int k = scm_ilength (get_property ("stringTunings")); if (k>=0) - span_->set_grob_property ("line-count", gh_int2scm (k)); + span_->set_property ("line-count", gh_int2scm (k)); } } diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 78fc02ad2a..aa4749cb83 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -37,7 +37,7 @@ Staff_symbol_referencer::on_staffline (Grob*me, int pos) Grob* Staff_symbol_referencer::get_staff_symbol (Grob*me) { - SCM st = me->get_grob_property ("staff-symbol"); + SCM st = me->get_property ("staff-symbol"); return unsmob_grob (st); } @@ -76,7 +76,7 @@ Staff_symbol_referencer::get_position (Grob*me) return p; } - return robust_scm2double ( me->get_grob_property ("staff-position"), p); + return robust_scm2double ( me->get_property ("staff-position"), p); } @@ -106,13 +106,13 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM) { Grob *me = unsmob_grob (element_smob); - SCM pos = me->get_grob_property ("staff-position"); + SCM pos = me->get_property ("staff-position"); Real off =0.0; if (gh_number_p (pos)) { Real space = Staff_symbol_referencer::staff_space (me); off = gh_scm2double (pos) * space/2.0; - me->set_grob_property ("staff-position", gh_int2scm (0)); + me->set_property ("staff-position", gh_int2scm (0)); } return gh_double2scm (off); @@ -140,11 +140,11 @@ Staff_symbol_referencer::set_position (Grob*me,Real p) if (st && me->common_refpoint (st, Y_AXIS)) { Real oldpos = get_position (me); - me->set_grob_property ("staff-position", gh_double2scm (p - oldpos)); + me->set_property ("staff-position", gh_double2scm (p - oldpos)); } else { - me->set_grob_property ("staff-position", + me->set_property ("staff-position", gh_double2scm (p)); } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index f6e8d6890f..0b15a94cfc 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -37,7 +37,7 @@ Staff_symbol::print (SCM smob) --hwn. */ - SCM width_scm = me->get_grob_property ("width"); + SCM width_scm = me->get_property ("width"); if (gh_number_p (width_scm)) { @@ -63,7 +63,7 @@ Staff_symbol::print (SCM smob) } Real t = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); - t *= robust_scm2double ( me->get_grob_property("thickness"), 1.0); + t *= robust_scm2double ( me->get_property("thickness"), 1.0); int l = Staff_symbol::line_count (me); @@ -90,7 +90,7 @@ Staff_symbol::get_steps (Grob*me) int Staff_symbol::line_count (Grob*me) { - SCM c = me->get_grob_property ("line-count"); + SCM c = me->get_property ("line-count"); if (gh_number_p (c)) return gh_scm2int (c); else @@ -100,7 +100,7 @@ Staff_symbol::line_count (Grob*me) Real Staff_symbol::staff_space (Grob*me) { - return robust_scm2double ( me->get_grob_property ("staff-space"), 1.0); + return robust_scm2double ( me->get_property ("staff-space"), 1.0); } Real @@ -108,13 +108,13 @@ Staff_symbol::get_line_thickness (Grob* me) { Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); - return robust_scm2double (me->get_grob_property ("thickness"), 1.0) * lt; + return robust_scm2double (me->get_property ("thickness"), 1.0) * lt; } Real Staff_symbol::get_ledger_line_thickness (Grob * me) { - SCM lt_pair = me->get_grob_property ("ledger-line-thickness"); + SCM lt_pair = me->get_property ("ledger-line-thickness"); Offset z = robust_scm2offset (lt_pair, Offset (1.0, 0.1)); return z[X_AXIS] * get_line_thickness(me) + z[Y_AXIS]* staff_space (me); diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index f5d7257154..c51c66327f 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -50,7 +50,7 @@ Stanza_number_engraver::process_music () last_stanza_ = stanza; text_ = make_item ("StanzaNumber"); - text_->set_grob_property ("text", stanza); + text_->set_property ("text", stanza); announce_grob (text_, SCM_EOL); } } diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index ddd5c55154..8f122d473b 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -61,13 +61,13 @@ Stem_engraver::acknowledge_grob (Grob_info i) Music * m = i.music_cause (); if (m->is_mus_type ("rhythmic-event")) - duration_log = unsmob_duration (m->get_mus_property ("duration"))-> duration_log (); + duration_log = unsmob_duration (m->get_property ("duration"))-> duration_log (); if (!stem_) { stem_ = make_item ("Stem"); - stem_->set_grob_property ("duration-log", gh_int2scm (duration_log)); + stem_->set_property ("duration-log", gh_int2scm (duration_log)); if (tremolo_ev_) { @@ -80,7 +80,7 @@ Stem_engraver::acknowledge_grob (Grob_info i) the first and last (quarter) note bothe get one tremolo flag. */ - int requested_type = gh_scm2int (tremolo_ev_->get_mus_property ("tremolo-type")); + int requested_type = gh_scm2int (tremolo_ev_->get_property ("tremolo-type")); SCM f = get_property ("tremoloFlags"); if (!requested_type) if (gh_number_p (f)) @@ -108,10 +108,10 @@ Stem_engraver::acknowledge_grob (Grob_info i) the tremolo-type minus the number of flags of the note itself. */ - tremolo_->set_grob_property ("flag-count", + tremolo_->set_property ("flag-count", gh_int2scm (tremolo_flags)); tremolo_->set_parent (stem_, X_AXIS); - stem_->set_grob_property ("tremolo-flag", tremolo_->self_scm ()); + stem_->set_property ("tremolo-flag", tremolo_->self_scm ()); } } diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 2445018e08..05634c92e5 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -58,14 +58,14 @@ Stem_tremolo::height (SCM smob, SCM ax) Stencil Stem_tremolo::raw_stencil (Grob *me) { - Grob *stem = unsmob_grob (me->get_grob_property ("stem")); + Grob *stem = unsmob_grob (me->get_property ("stem")); Grob *beam = Stem::get_beam (stem); Real dydx; if (beam) { Real dy = 0; - SCM s = beam->get_grob_property ("positions"); + SCM s = beam->get_property ("positions"); if (is_number_pair (s)) { dy = -gh_scm2double (gh_car (s)) +gh_scm2double (gh_cdr (s)); @@ -80,8 +80,8 @@ Stem_tremolo::raw_stencil (Grob *me) dydx = 0.25; Real ss = Staff_symbol_referencer::staff_space (me); - Real thick = robust_scm2double (me->get_grob_property ("beam-thickness"),1); - Real width = robust_scm2double (me->get_grob_property ("beam-width"),1); + Real thick = robust_scm2double (me->get_property ("beam-thickness"),1); + Real width = robust_scm2double (me->get_property ("beam-width"),1); Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")); width *= ss; @@ -91,7 +91,7 @@ Stem_tremolo::raw_stencil (Grob *me) a.translate (Offset (-width/2, width / 2 * dydx)); int tremolo_flags = 0; - SCM s = me->get_grob_property ("flag-count"); + SCM s = me->get_property ("flag-count"); if (gh_number_p (s)) tremolo_flags = gh_scm2int (s); @@ -126,7 +126,7 @@ SCM Stem_tremolo::print (SCM grob) { Grob *me = unsmob_grob (grob); - Grob *stem = unsmob_grob (me->get_grob_property ("stem")); + Grob *stem = unsmob_grob (me->get_property ("stem")); Grob *beam = Stem::get_beam (stem); Direction stemdir = Stem::get_direction (stem); Real beam_translation @@ -147,7 +147,7 @@ Stem_tremolo::print (SCM grob) Real beamthickness = 0.0; - SCM sbt = (beam) ? beam->get_grob_property ("thickness") : SCM_EOL ; + SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL ; if (gh_number_p (sbt)) { beamthickness = gh_scm2double (sbt) * ss; @@ -194,7 +194,7 @@ Stem_tremolo::print (SCM grob) void Stem_tremolo::set_stem (Grob*me,Grob *s) { - me->set_grob_property ("stem", s->self_scm ()); + me->set_property ("stem", s->self_scm ()); } diff --git a/lily/stem.cc b/lily/stem.cc index 78c8a63678..4b94623763 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -38,12 +38,12 @@ void Stem::set_beaming (Grob*me, int beam_count, Direction d) { - SCM pair = me->get_grob_property ("beaming"); + SCM pair = me->get_property ("beaming"); if (!gh_pair_p (pair)) { pair = gh_cons (SCM_EOL, SCM_EOL); - me->set_grob_property ("beaming", pair); + me->set_property ("beaming", pair); } SCM l = index_get_cell (pair, d); @@ -81,12 +81,12 @@ Stem::chord_start_y (Grob*me) Real Stem::stem_end_position (Grob*me) { - SCM p =me->get_grob_property ("stem-end-position"); + SCM p =me->get_property ("stem-end-position"); Real pos; if (!gh_number_p (p)) { pos = get_default_stem_end_position (me); - me->set_grob_property ("stem-end-position", gh_double2scm (pos)); + me->set_property ("stem-end-position", gh_double2scm (pos)); } else pos = gh_scm2double (p); @@ -118,7 +118,7 @@ Stem::set_stemend (Grob*me, Real se) if (d && d * head_positions (me)[get_direction (me)] >= se*d) me->warning (_ ("Weird stem size; check for narrow beams")); - me->set_grob_property ("stem-end-position", gh_double2scm (se)); + me->set_property ("stem-end-position", gh_double2scm (se)); } @@ -136,7 +136,7 @@ Stem::support_head (Grob*me) UGH. */ - return unsmob_grob (ly_car (me->get_grob_property ("note-heads"))); + return unsmob_grob (ly_car (me->get_property ("note-heads"))); } else return first_head (me); @@ -189,7 +189,7 @@ Stem::extremal_heads (Grob*me) Drul_array exthead; exthead[LEFT] = exthead[RIGHT] =0; - for (SCM s = me->get_grob_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s)) { Grob * n = unsmob_grob (ly_car (s)); @@ -222,7 +222,7 @@ Array Stem::note_head_positions (Grob *me) { Array ps ; - for (SCM s = me->get_grob_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s)) { Grob * n = unsmob_grob (ly_car (s)); int p = int (Staff_symbol_referencer::get_position (n)); @@ -238,7 +238,7 @@ Stem::note_head_positions (Grob *me) void Stem::add_head (Grob*me, Grob *n) { - n->set_grob_property ("stem", me->self_scm ()); + n->set_property ("stem", me->self_scm ()); n->add_dependency (me); /* @@ -254,7 +254,7 @@ bool Stem::is_invisible (Grob*me) { return ! (head_count (me) - && gh_scm2int (me->get_grob_property ("duration-log")) >= 1); + && gh_scm2int (me->get_property ("duration-log")) >= 1); } Direction @@ -273,7 +273,7 @@ Stem::get_default_dir (Grob*me) if (sign (ddistance - udistance)) return Direction (sign (ddistance -udistance)); - return to_dir (me->get_grob_property ("neutral-direction")); + return to_dir (me->get_property ("neutral-direction")); } Real @@ -288,14 +288,14 @@ Stem::get_default_stem_end_position (Grob*me) Real length = 7; // WARNING: IN HALF SPACES - SCM scm_len = me->get_grob_property ("length"); + SCM scm_len = me->get_property ("length"); if (gh_number_p (scm_len)) { length = gh_scm2double (scm_len); } else { - s = me->get_grob_property ("lengths"); + s = me->get_property ("lengths"); if (gh_pair_p (s)) { length = 2* gh_scm2double (robust_list_ref (durlog -2, s)); @@ -322,7 +322,7 @@ Stem::get_default_stem_end_position (Grob*me) { - SCM sshorten = me->get_grob_property ("stem-shorten"); + SCM sshorten = me->get_property ("stem-shorten"); SCM scm_shorten = gh_pair_p (sshorten) ? robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL; Real shorten = 2* robust_scm2double (scm_shorten,0); @@ -338,8 +338,8 @@ Stem::get_default_stem_end_position (Grob*me) /* Tremolo stuff: */ - Grob * trem = unsmob_grob (me->get_grob_property ("tremolo-flag")); - if (trem && !unsmob_grob (me->get_grob_property ("beam"))) + Grob * trem = unsmob_grob (me->get_property ("tremolo-flag")); + if (trem && !unsmob_grob (me->get_property ("beam"))) { /* Crude hack: add extra space if tremolo flag is there. @@ -376,7 +376,7 @@ Stem::get_default_stem_end_position (Grob*me) /* TODO: change name to extend-stems to staff/center/'() */ - bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend")); + bool no_extend_b = to_boolean (me->get_property ("no-stem-extend")); if (!no_extend_b && dir * st < 0) // junkme? st = 0.0; @@ -434,7 +434,7 @@ Stem::get_default_stem_end_position (Grob*me) int Stem::duration_log (Grob*me) { - SCM s = me->get_grob_property ("duration-log"); + SCM s = me->get_property ("duration-log"); return (gh_number_p (s)) ? gh_scm2int (s) : 2; } @@ -540,7 +540,7 @@ Stem::before_line_breaking (SCM smob) } else { - me->set_grob_property ("print-function", SCM_EOL); + me->set_property ("print-function", SCM_EOL); } return SCM_UNSPECIFIED; @@ -581,7 +581,7 @@ Stem::flag (Grob*me) '() or "grace"). */ String flag_style; - SCM flag_style_scm = me->get_grob_property ("flag-style"); + SCM flag_style_scm = me->get_property ("flag-style"); if (gh_symbol_p (flag_style_scm)) { flag_style = ly_symbol2string (flag_style_scm); @@ -592,7 +592,7 @@ Stem::flag (Grob*me) return Stencil (); } - bool adjust = to_boolean (me->get_grob_property ("adjust-if-on-staffline")); + bool adjust = to_boolean (me->get_property ("adjust-if-on-staffline")); String staffline_offs; if (String::compare (flag_style, "mensural") == 0) @@ -654,7 +654,7 @@ Stem::flag (Grob*me) me->warning (_f ("flag `%s' not found", font_char)); } - SCM stroke_style_scm = me->get_grob_property ("stroke-style"); + SCM stroke_style_scm = me->get_property ("stroke-style"); if (gh_string_p (stroke_style_scm)) { String stroke_style = ly_scm2string (stroke_style_scm); @@ -684,7 +684,7 @@ Stem::dim_callback (SCM e, SCM ax) assert (a == X_AXIS); Grob *me = unsmob_grob (e); Interval r (0, 0); - if (unsmob_grob (me->get_grob_property ("beam")) || abs (duration_log (me)) <= 2) + if (unsmob_grob (me->get_property ("beam")) || abs (duration_log (me)) <= 2) ; // TODO! else { @@ -697,7 +697,7 @@ Stem::dim_callback (SCM e, SCM ax) Real Stem::thickness (Grob* me) { - return gh_scm2double (me->get_grob_property ("thickness")) + return gh_scm2double (me->get_property ("thickness")) * Staff_symbol_referencer::line_thickness (me); } @@ -715,7 +715,7 @@ Stem::print (SCM smob) This is required to avoid stems passing in tablature chords... */ - Grob *lh = to_boolean (me->get_grob_property ("avoid-note-head")) + Grob *lh = to_boolean (me->get_property ("avoid-note-head")) ? last_head (me) : lh = first_head (me); if (!lh) @@ -821,7 +821,7 @@ Stem::off_callback (SCM element_smob, SCM) Grob* Stem::get_beam (Grob*me) { - SCM b= me->get_grob_property ("beam"); + SCM b= me->get_property ("beam"); return unsmob_grob (b); } @@ -829,11 +829,11 @@ Stem_info Stem::get_stem_info (Grob *me) { /* Return cached info if available */ - SCM scm_info = me->get_grob_property ("stem-info"); + SCM scm_info = me->get_property ("stem-info"); if (!gh_pair_p (scm_info)) { calc_stem_info (me); - scm_info = me->get_grob_property ("stem-info"); + scm_info = me->get_property ("stem-info"); } Stem_info si; @@ -866,7 +866,7 @@ Stem::calc_stem_info (Grob *me) /* Simple standard stem length */ - SCM lengths = me->get_grob_property ("beamed-lengths"); + SCM lengths = me->get_property ("beamed-lengths"); Real ideal_length = gh_scm2double (robust_list_ref (beam_count - 1,lengths)) @@ -875,7 +875,7 @@ Stem::calc_stem_info (Grob *me) - 0.5 * beam_thickness; /* Condition: sane minimum free stem length (chord to beams) */ - lengths = me->get_grob_property ("beamed-minimum-free-lengths"); + lengths = me->get_property ("beamed-minimum-free-lengths"); Real ideal_minimum_free = gh_scm2double (robust_list_ref (beam_count - 1, lengths)) * staff_space; @@ -922,8 +922,8 @@ Stem::calc_stem_info (Grob *me) Obviously not for grace beams. Also, not for knees. Seems to be a good thing. */ - bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend")); - bool is_knee = to_boolean (beam->get_grob_property ("knee")); + bool no_extend_b = to_boolean (me->get_property ("no-stem-extend")); + bool is_knee = to_boolean (beam->get_property ("knee")); if (!no_extend_b && !is_knee) { /* Highest beam of (UP) beam must never be lower than middle @@ -935,12 +935,12 @@ Stem::calc_stem_info (Grob *me) } - ideal_y -= robust_scm2double (beam->get_grob_property ("shorten"), 0); + ideal_y -= robust_scm2double (beam->get_property ("shorten"), 0); Real minimum_free = gh_scm2double (robust_list_ref (beam_count - 1, - me->get_grob_property + me->get_property ("beamed-extreme-minimum-free-lengths"))) * staff_space; @@ -955,7 +955,7 @@ Stem::calc_stem_info (Grob *me) ideal_y *= my_dir; Real shortest_y = minimum_y * my_dir; - me->set_grob_property ("stem-info", + me->set_property ("stem-info", scm_list_n (gh_double2scm (ideal_y), gh_double2scm (shortest_y), SCM_UNDEFINED)); @@ -964,7 +964,7 @@ Stem::calc_stem_info (Grob *me) Slice Stem::beam_multiplicity (Grob *stem) { - SCM beaming= stem->get_grob_property ("beaming"); + SCM beaming= stem->get_property ("beaming"); Slice l = int_list_to_slice (gh_car (beaming)); Slice r = int_list_to_slice (gh_cdr (beaming)); l.unite (r); diff --git a/lily/sustain-pedal.cc b/lily/sustain-pedal.cc index c2cad1be29..dee7a88bc3 100644 --- a/lily/sustain-pedal.cc +++ b/lily/sustain-pedal.cc @@ -41,7 +41,7 @@ Sustain_pedal::print (SCM smob) Grob * e = unsmob_grob (smob); Stencil mol; - SCM glyph = e->get_grob_property ("text"); + SCM glyph = e->get_property ("text"); if (!gh_string_p (glyph)) return mol.smobbed_copy (); diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 3dc7288556..ccbb0eb3e7 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -42,8 +42,8 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf) } else if (System_start_delimiter::has_interface (inf.grob_)) { - SCM gl = inf.grob_->get_grob_property ("glyph"); - SCM my_gl = delim_->get_grob_property ("glyph"); + SCM gl = inf.grob_->get_property ("glyph"); + SCM my_gl = delim_->get_property ("glyph"); /* UGH UGH @@ -55,8 +55,8 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf) && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str ("bracket"))) { inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh - inf.grob_->set_grob_property ("arch-height", - gh_double2scm (gh_scm2double(inf.grob_->get_grob_property + inf.grob_->set_property ("arch-height", + gh_double2scm (gh_scm2double(inf.grob_->get_property ("arch-height"))+0.5)); } } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 29e14bfb43..be97cdcfce 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -21,15 +21,15 @@ Stencil System_start_delimiter::staff_bracket (Grob*me,Real height) { - Real arc_height = gh_scm2double (me->get_grob_property ("arch-height")) ; + Real arc_height = gh_scm2double (me->get_property ("arch-height")) ; SCM at = scm_list_n (ly_symbol2scm ("bracket"), - me->get_grob_property ("arch-angle"), - me->get_grob_property ("arch-width"), + me->get_property ("arch-angle"), + me->get_property ("arch-width"), gh_double2scm (arc_height), gh_double2scm (height), - me->get_grob_property ("arch-thick"), - me->get_grob_property ("thickness"), + me->get_property ("arch-thick"), + me->get_property ("thickness"), SCM_UNDEFINED); /* @@ -63,7 +63,7 @@ Stencil System_start_delimiter::simple_bar (Grob*me,Real h) { Real lt =me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) ; - Real w = lt * robust_scm2double (me->get_grob_property ("thickness"), 1); + Real w = lt * robust_scm2double (me->get_property ("thickness"), 1); return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)), lt); } @@ -74,7 +74,7 @@ SCM System_start_delimiter::after_line_breaking (SCM smob) { Grob * me = unsmob_grob (smob); - SCM gl = me->get_grob_property ("glyph"); + SCM gl = me->get_property ("glyph"); if (gh_equal_p (gl,scm_makfrom0str ("bar-line"))) { int count = 0; @@ -82,7 +82,7 @@ System_start_delimiter::after_line_breaking (SCM smob) /* Get all coordinates, to trigger Hara kiri. */ - SCM elts = me->get_grob_property ("elements"); + SCM elts = me->get_property ("elements"); Grob *common = common_refpoint_of_list (elts, me, Y_AXIS); for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s)) { @@ -108,7 +108,7 @@ System_start_delimiter::print (SCM smob) { Grob * me = unsmob_grob (smob); - SCM s = me->get_grob_property ("glyph"); + SCM s = me->get_property ("glyph"); if (!gh_string_p (s)) return SCM_EOL; SCM gsym = scm_string_to_symbol (s) ; @@ -119,7 +119,7 @@ System_start_delimiter::print (SCM smob) Real l = ext.length () / staff_space; if (ext.is_empty () - || (robust_scm2double (me->get_grob_property ("collapse-height"), 0.0) >= l)) + || (robust_scm2double (me->get_property ("collapse-height"), 0.0) >= l)) { me->suicide (); return SCM_EOL; diff --git a/lily/system.cc b/lily/system.cc index be67c1cb6c..8988fa288a 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -43,14 +43,14 @@ System::System (SCM s) int System::element_count () const { - return scm_ilength (get_grob_property ("all-elements")); + return scm_ilength (get_property ("all-elements")); } int System::spanner_count () const { int k =0; - for (SCM s = get_grob_property ("all-elements"); + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { if (dynamic_cast (unsmob_grob (gh_car(s)))) @@ -121,7 +121,7 @@ System::typeset_grob (Grob * elem) void System::output_lines () { - for (SCM s = get_grob_property ("all-elements"); + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { Grob * g = unsmob_grob (ly_car (s)); @@ -149,7 +149,7 @@ System::output_lines () for (int i=0; i < broken_intos_.size (); i++) { Grob *se = broken_intos_[i]; - SCM all = se->get_grob_property ("all-elements"); + SCM all = se->get_property ("all-elements"); for (SCM s = all; gh_pair_p (s); s = ly_cdr (s)) { fixup_refpoint (ly_car (s)); @@ -160,10 +160,10 @@ System::output_lines () /* needed for doing items. */ - fixup_refpoints (get_grob_property ("all-elements")); + fixup_refpoints (get_property ("all-elements")); - for (SCM s = get_grob_property ("all-elements"); + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { unsmob_grob (ly_car (s))->handle_broken_dependencies (); @@ -171,7 +171,7 @@ System::output_lines () handle_broken_dependencies (); /* - Because the this->get_grob_property (all-elements) contains items + Because the this->get_property (all-elements) contains items in 3 versions, handle_broken_dependencies () will leave duplicated items in all-elements. Strictly speaking this is harmless, but it leads to duplicated symbols in the output. uniquify_list() makes @@ -182,7 +182,7 @@ System::output_lines () /* don't do this: strange side effects. */ - // SCM al = broken_intos_[i]->get_grob_property ("all-elements"); + // SCM al = broken_intos_[i]->get_property ("all-elements"); // al = uniquify_list (al); } @@ -207,11 +207,11 @@ System::output_lines () if (i < broken_intos_.size () - 1) { - SCM lastcol = ly_car (system->get_grob_property ("columns")); + SCM lastcol = ly_car (system->get_property ("columns")); Grob* e = unsmob_grob (lastcol); SCM between = ly_symbol2scm ("between-system-string"); - SCM inter = e->internal_get_grob_property (between); + SCM inter = e->internal_get_property (between); if (gh_string_p (inter)) { pscore_->outputter_ @@ -244,7 +244,7 @@ set_loose_columns (System* which, Column_x_positions const *posns) Item * right = 0; do { - SCM between = loose->get_grob_property ("between-cols"); + SCM between = loose->get_property ("between-cols"); if (!gh_pair_p (between)) break; @@ -394,12 +394,12 @@ void System::add_column (Paper_column*p) { Grob *me = this; - SCM cs = me->get_grob_property ("columns"); + SCM cs = me->get_property ("columns"); Grob * prev = gh_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0; p->rank_ = prev ? Paper_column::get_rank (prev) + 1 : 0; - me->set_grob_property ("columns", gh_cons (p->self_scm (), cs)); + me->set_property ("columns", gh_cons (p->self_scm (), cs)); Axis_group_interface::add_element (me, p); } @@ -407,29 +407,29 @@ System::add_column (Paper_column*p) void System::pre_processing () { - for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) unsmob_grob (ly_car (s))->discretionary_processing (); if (verbose_global_b) progress_indication (_f ("Grob count %d ", element_count ())); - for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) unsmob_grob (ly_car (s))->handle_prebroken_dependencies (); - fixup_refpoints (get_grob_property ("all-elements")); + fixup_refpoints (get_property ("all-elements")); - for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { Grob* sc = unsmob_grob (ly_car (s)); sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback")); } progress_indication ("\n" + _ ("Calculating line breaks...") + " "); - for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { Grob * e = unsmob_grob (ly_car (s)); - SCM proc = e->get_grob_property ("spacing-procedure"); + SCM proc = e->get_property ("spacing-procedure"); if (gh_procedure_p (proc)) gh_call1 (proc, e->self_scm ()); } @@ -443,7 +443,7 @@ System::pre_processing () void System::post_processing (bool last_line) { - for (SCM s = get_grob_property ("all-elements"); + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { Grob* sc = unsmob_grob (ly_car (s)); @@ -467,7 +467,7 @@ System::post_processing (bool last_line) /* generate all stencils to trigger all font loads. */ - SCM all = get_grob_property ("all-elements") ; + SCM all = get_property ("all-elements") ; all = uniquify_list (all); /* @@ -511,7 +511,7 @@ System::post_processing (bool last_line) } for (int i = 0; i < 3; i++) - for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); + for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { Grob *sc = unsmob_grob (ly_car (s)); @@ -519,7 +519,7 @@ System::post_processing (bool last_line) if (!m) continue; - SCM s = sc->get_grob_property ("layer"); + SCM s = sc->get_property ("layer"); int layer = gh_number_p (s) ? gh_scm2int (s) : 1; if (layer != i) continue; @@ -527,7 +527,7 @@ System::post_processing (bool last_line) Offset o (sc->relative_coordinate (this, X_AXIS), sc->relative_coordinate (this, Y_AXIS)); - SCM e = sc->get_grob_property ("extra-offset"); + SCM e = sc->get_property ("extra-offset"); if (gh_pair_p (e)) { Offset z = ly_scm2offset (e); @@ -559,7 +559,7 @@ System::broken_col_range (Item const*l, Item const*r) const l = l->get_column (); r = r->get_column (); - SCM s = get_grob_property ("columns"); + SCM s = get_property ("columns"); while (gh_pair_p (s) && ly_car (s) != r->self_scm ()) s = ly_cdr (s); diff --git a/lily/tab-note-heads-engraver.cc b/lily/tab-note-heads-engraver.cc index 1e3f78cbc6..b3f96b55ec 100644 --- a/lily/tab-note-heads-engraver.cc +++ b/lily/tab-note-heads-engraver.cc @@ -80,7 +80,7 @@ Tab_note_heads_engraver::process_music () Music * tabstring_event=0; - for (SCM s =event->get_mus_property ("articulations"); + for (SCM s =event->get_property ("articulations"); !tabstring_event && gh_pair_p (s); s = gh_cdr (s)) { Music * art = unsmob_music (gh_car (s)); @@ -100,7 +100,7 @@ Tab_note_heads_engraver::process_music () bool string_found; if (tabstring_event) { - tab_string = gh_scm2int(tabstring_event->get_mus_property ("string-number")); + tab_string = gh_scm2int(tabstring_event->get_property ("string-number")); string_found = true; } else @@ -109,8 +109,8 @@ Tab_note_heads_engraver::process_music () string_found = false; } - Duration dur = *unsmob_duration (event->get_mus_property ("duration")); - note->set_grob_property ("duration-log", + Duration dur = *unsmob_duration (event->get_property ("duration")); + note->set_property ("duration-log", gh_int2scm (dur.duration_log ())); if (dur.dot_count ()) @@ -119,8 +119,8 @@ Tab_note_heads_engraver::process_music () Rhythmic_head::set_dots (note, d); if (dur.dot_count () - != gh_scm2int (d->get_grob_property ("dot-count"))) - d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ())); + != gh_scm2int (d->get_property ("dot-count"))) + d->set_property ("dot-count", gh_int2scm (dur.dot_count ())); d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); @@ -128,7 +128,7 @@ Tab_note_heads_engraver::process_music () } - SCM scm_pitch = event->get_mus_property ("pitch"); + SCM scm_pitch = event->get_property ("pitch"); SCM proc = get_property ("tablatureFormat"); SCM min_fret_scm = get_property ("minimumFret"); int min_fret = gh_number_p(min_fret_scm) ? gh_scm2int(min_fret_scm) : 0; @@ -149,9 +149,9 @@ Tab_note_heads_engraver::process_music () if(to_boolean(get_property("stringOneTopmost"))) pos = -pos; - note->set_grob_property ("text", text); + note->set_property ("text", text); - note->set_grob_property ("staff-position", gh_int2scm (pos)); + note->set_property ("staff-position", gh_int2scm (pos)); announce_grob (note, event->self_scm()); notes_.push (note); } diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index 5a4a614d63..77058f8ee4 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -44,8 +44,8 @@ Tempo_performer::create_audio_elements () if (tempo_req_) { - SCM met = tempo_req_->get_mus_property ("metronome-count"); - Duration *d = unsmob_duration (tempo_req_->get_mus_property ("tempo-unit")); + SCM met = tempo_req_->get_property ("metronome-count"); + Duration *d = unsmob_duration (tempo_req_->get_property ("tempo-unit")); Rational r = (d->get_length () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_; diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 516c55d3dc..14a0180fed 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -92,23 +92,23 @@ Text_engraver::process_acknowledged_grobs () // Hmm int priority = 200; - SCM s = text->get_grob_property ("script-priority"); + SCM s = text->get_property ("script-priority"); if (gh_number_p (s)) priority = gh_scm2int (s); /* see script-engraver.cc */ priority += i; - text->set_grob_property ("script-priority", gh_int2scm (priority)); + text->set_property ("script-priority", gh_int2scm (priority)); - Direction dir = to_dir (r->get_mus_property ("direction")); + Direction dir = to_dir (r->get_property ("direction")); if (dir) set_grob_direction (text, dir); - SCM mark = r->get_mus_property ("text"); + SCM mark = r->get_property ("text"); - text->set_grob_property ("text", mark); + text->set_property ("text", mark); announce_grob (text, r->self_scm ()); texts_.push (text); } diff --git a/lily/text-item.cc b/lily/text-item.cc index 0b81994daa..d79cdb16e3 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -60,7 +60,7 @@ Text_item::print (SCM grob) { Grob * me = unsmob_grob (grob); - SCM t = me->get_grob_property ("text"); + SCM t = me->get_property ("text"); SCM chain = Font_interface::font_alist_chain (me); return interpret_markup (me->get_paper ()->self_scm (), chain, t); } diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 29814d752b..0b0b0239b7 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -46,7 +46,7 @@ Text_spanner_engraver::try_music (Music *m) if (m->is_mus_type ("text-span-event")) { - Direction d = to_dir (m->get_mus_property ("span-direction")); + Direction d = to_dir (m->get_property ("span-direction")); req_drul_[d] = m; return true; } diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 1752385242..2ec0391b36 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -44,8 +44,8 @@ Text_spanner::print (SCM smob) Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS); Paper_def * paper = me->get_paper(); - SCM flare = me->get_grob_property ("bracket-flare"); - SCM shorten = me->get_grob_property ("shorten-pair"); + SCM flare = me->get_property ("bracket-flare"); + SCM shorten = me->get_property ("shorten-pair"); Interval span_points; Drul_array broken; @@ -64,7 +64,7 @@ Text_spanner::print (SCM smob) } else { - Real encl = robust_scm2double (me->get_grob_property ("enclose-bounds"), 0.0); + Real encl = robust_scm2double (me->get_property ("enclose-bounds"), 0.0); span_points[d] = b->extent (common, X_AXIS).linear_combination (d * encl); if (is_number_pair (shorten)) @@ -78,7 +78,7 @@ Text_spanner::print (SCM smob) SCM properties = Font_interface::font_alist_chain (me); - SCM edge_text = me->get_grob_property ("edge-text"); + SCM edge_text = me->get_property ("edge-text"); Drul_array edge; if (gh_pair_p (edge_text)) { @@ -99,12 +99,12 @@ Text_spanner::print (SCM smob) while (flip (&d) != LEFT); } - Drul_array edge_height = robust_scm2interval (me->get_grob_property ("edge-height"), + Drul_array edge_height = robust_scm2interval (me->get_property ("edge-height"), Interval (0.0, 0.0)); Drul_array edge_line; { Direction d = LEFT; - int dir = to_dir (me->get_grob_property ("direction")); + int dir = to_dir (me->get_property ("direction")); do { if (broken[d]) diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 78a5e49ec5..b30d40c35e 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -97,15 +97,15 @@ Tie_engraver::acknowledge_grob (Grob_info i) for (int i = heads_to_tie_.size (); i--;) { Grob *th = heads_to_tie_[i]; - Music * right_mus = unsmob_music (h->get_grob_property ("cause")); - Music * left_mus = unsmob_music (th->get_grob_property ("cause")); + Music * right_mus = unsmob_music (h->get_property ("cause")); + Music * left_mus = unsmob_music (th->get_property ("cause")); /* maybe should check positions too. */ if (right_mus && left_mus - && gh_equal_p (right_mus->get_mus_property ("pitch"), - left_mus->get_mus_property ("pitch"))) + && gh_equal_p (right_mus->get_property ("pitch"), + left_mus->get_property ("pitch"))) { Grob * p = make_spanner ("Tie"); Tie::set_interface (p); // cannot remove yet! @@ -182,8 +182,8 @@ Tie_engraver::typeset_tie (Grob *her) new_head_drul[d] = Tie::head (her, (Direction)-d); } while (flip (&d) != LEFT); - index_set_cell (her->get_grob_property ("head-pair"), LEFT, new_head_drul[LEFT]->self_scm ()); - index_set_cell (her->get_grob_property ("head-pair"), RIGHT, new_head_drul[RIGHT]->self_scm ()); + index_set_cell (her->get_property ("head-pair"), LEFT, new_head_drul[LEFT]->self_scm ()); + index_set_cell (her->get_property ("head-pair"), RIGHT, new_head_drul[RIGHT]->self_scm ()); typeset_grob (her); } diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index 40b265f9ae..b38e9f2cb7 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -120,8 +120,8 @@ Tie_performer::create_audio_elements () for (int j = now_notes_.size(); j--;) { int comp - = Pitch::compare (*unsmob_pitch (tied_notes_[i].event_->get_mus_property ("pitch")), - *unsmob_pitch (now_notes_[j].event_->get_mus_property ("pitch"))); + = Pitch::compare (*unsmob_pitch (tied_notes_[i].event_->get_property ("pitch")), + *unsmob_pitch (now_notes_[j].event_->get_property ("pitch"))); if (comp == 0) { @@ -208,8 +208,8 @@ int CNote_melodic_tuple::pitch_compare (CNote_melodic_tuple const&h1, CNote_melodic_tuple const &h2) { - SCM p1 = h1.event_->get_mus_property ("pitch"); - SCM p2 = h2.event_->get_mus_property ("pitch"); + SCM p1 = h1.event_->get_property ("pitch"); + SCM p2 = h2.event_->get_property ("pitch"); return Pitch::compare (*unsmob_pitch (p1), *unsmob_pitch (p2)); } diff --git a/lily/tie.cc b/lily/tie.cc index e95135b12d..2b388c3238 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -41,7 +41,7 @@ void Tie::set_head (Grob*me,Direction d, Grob * h) { assert (!head (me,d)); - index_set_cell (me->get_grob_property ("head-pair"), d, h->self_scm ()); + index_set_cell (me->get_property ("head-pair"), d, h->self_scm ()); dynamic_cast (me)->set_bound (d, h); me->add_dependency (h); @@ -50,14 +50,14 @@ Tie::set_head (Grob*me,Direction d, Grob * h) void Tie::set_interface (Grob*me) { - me->set_grob_property ("head-pair", gh_cons (SCM_EOL, SCM_EOL)); + me->set_property ("head-pair", gh_cons (SCM_EOL, SCM_EOL)); } Grob* Tie::head (Grob*me, Direction d) { - SCM c = me->get_grob_property ("head-pair"); + SCM c = me->get_property ("head-pair"); if (gh_pair_p (c)) return unsmob_grob (index_get_cell (c, d)); @@ -145,7 +145,7 @@ Tie::get_control_points (SCM smob) Real staff_space = Staff_symbol_referencer::staff_space (me); - Real x_gap_f = robust_scm2double (me->get_grob_property ("x-gap"), 0); + Real x_gap_f = robust_scm2double (me->get_property ("x-gap"), 0); Grob* l = me->get_bound (LEFT); Grob* r = me->get_bound (RIGHT); @@ -201,7 +201,7 @@ Tie::get_control_points (SCM smob) - SCM details = me->get_grob_property ("details"); + SCM details = me->get_property ("details"); SCM lim // groetjes aan de chirurgendochter. = scm_assq (ly_symbol2scm ("height-limit"),details); @@ -220,7 +220,7 @@ Tie::get_control_points (SCM smob) */ Real ypos = Tie::get_position (me) * staff_space/2 - + dir * gh_scm2double (me->get_grob_property ("y-offset"));; + + dir * gh_scm2double (me->get_property ("y-offset"));; /* Make sure we don't start on a dots @@ -268,7 +268,7 @@ Tie::get_control_points (SCM smob) Real diff = ry - y; Real newy = y; - Real clear = staff_space * gh_scm2double (me->get_grob_property ("staffline-clearance")); + Real clear = staff_space * gh_scm2double (me->get_property ("staffline-clearance")); if (fabs (y) <= Staff_symbol_referencer::staff_radius (me) * staff_space + clear @@ -325,11 +325,11 @@ Tie::print (SCM smob) { Grob*me = unsmob_grob (smob); - SCM cp = me->get_grob_property ("control-points"); + SCM cp = me->get_property ("control-points"); if (!gh_pair_p (cp)) // list is more accurate { cp = get_control_points (smob); - me->set_grob_property ("control-points", cp); + me->set_property ("control-points", cp); } if (!gh_pair_p (cp)) @@ -337,7 +337,7 @@ Tie::print (SCM smob) Real thick = Staff_symbol_referencer::line_thickness (me) - * robust_scm2double (me->get_grob_property ("thickness"), 1); + * robust_scm2double (me->get_property ("thickness"), 1); Bezier b; int i = 0; diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 8684c9d5cd..55b339566e 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -63,7 +63,7 @@ Time_signature_engraver::process_music () last_time_fraction_ = fr; time_signature_ = make_item ("TimeSignature"); - time_signature_->set_grob_property ("fraction",fr); + time_signature_->set_property ("fraction",fr); if (time_signature_) announce_grob(time_signature_, SCM_EOL); diff --git a/lily/time-signature.cc b/lily/time-signature.cc index f122d256e5..9c2ab3822c 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -30,8 +30,8 @@ SCM Time_signature::print (SCM smob) { Grob * me = unsmob_grob (smob); - SCM st = me->get_grob_property ("style"); - SCM frac = me->get_grob_property ("fraction"); + SCM st = me->get_property ("style"); + SCM frac = me->get_property ("fraction"); int n = 4; int d = 4; if (gh_pair_p (frac)) @@ -84,7 +84,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d) } String char_name = style + to_string (n) + "/" + to_string (d); - me->set_grob_property ("font-family", ly_symbol2scm ("music")); + me->set_property ("font-family", ly_symbol2scm ("music")); Stencil out = Font_interface::get_default_font (me) ->find_by_name ("timesig-" + char_name); if (!out.is_empty ()) @@ -101,7 +101,7 @@ Stencil Time_signature::numbered_time_signature (Grob*me,int num, int den) { SCM chain = Font_interface::font_alist_chain (me); - me->set_grob_property ("font-family", ly_symbol2scm ("number")); + me->set_property ("font-family", ly_symbol2scm ("number")); SCM sn = Text_item::interpret_markup (me->get_paper ()->self_scm(), chain, diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 83ff379f51..53b326cd51 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -59,7 +59,7 @@ Timing_engraver::start_translation_timestep () { Moment mlen = Moment (measure_length ()); unsmob_grob (get_property ("currentCommandColumn")) - ->set_grob_property ("measure-length", mlen.smobbed_copy ()); + ->set_property ("measure-length", mlen.smobbed_copy ()); } if (!gh_string_p (which) && to_boolean (automatic_bars)) diff --git a/lily/translator-group.cc b/lily/translator-group.cc index f26842df02..cc54f00733 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -84,7 +84,7 @@ Translator_group::try_music (Music* m) if (accept_list == SCM_BOOL_F) { accept_list = find_accept_translators (get_simple_trans_list (), - m->get_mus_property ("types")); + m->get_property ("types")); scm_hashq_set_x (tab, name, accept_list); } diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 76983e959e..2e76226bfd 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -111,15 +111,15 @@ Tuplet_bracket::print (SCM smob) { - SCM lp = me->get_grob_property ("left-position"); - SCM rp = me->get_grob_property ("right-position"); + SCM lp = me->get_property ("left-position"); + SCM rp = me->get_property ("right-position"); if (!gh_number_p (rp) || !gh_number_p (lp)) after_line_breaking (smob); } - Real ly = robust_scm2double (me->get_grob_property ("left-position"), 0); - Real ry = robust_scm2double (me->get_grob_property ("right-position"), 0); + Real ly = robust_scm2double (me->get_property ("left-position"), 0); + Real ry = robust_scm2double (me->get_property ("right-position"), 0); bool equally_long = false; Grob * par_beam = parallel_beam (me, columns, &equally_long); @@ -132,7 +132,7 @@ Tuplet_bracket::print (SCM smob) /* Fixme: the type of this prop is sucky. */ - SCM bracket = me->get_grob_property ("bracket-visibility"); + SCM bracket = me->get_property ("bracket-visibility"); if (gh_boolean_p (bracket)) { bracket_visibility = gh_scm2bool (bracket); @@ -140,7 +140,7 @@ Tuplet_bracket::print (SCM smob) else if (bracket == ly_symbol2scm ("if-no-beam")) bracket_visibility = !par_beam; - SCM numb = me->get_grob_property ("number-visibility"); + SCM numb = me->get_property ("number-visibility"); if (gh_boolean_p (numb)) { number_visibility = gh_scm2bool (numb); @@ -166,7 +166,7 @@ Tuplet_bracket::print (SCM smob) Real w = x1 -x0; - SCM number = me->get_grob_property ("text"); + SCM number = me->get_property ("text"); Paper_def *pap = me->get_paper (); if (gh_string_p (number) && number_visibility) @@ -198,12 +198,12 @@ Tuplet_bracket::print (SCM smob) if (bracket_visibility) { Real ss = Staff_symbol_referencer::staff_space (me); - Real gap = robust_scm2double (me->get_grob_property ("gap"), 1.0) + Real gap = robust_scm2double (me->get_property ("gap"), 1.0) * ss; - SCM fl = me->get_grob_property ("bracket-flare"); - SCM eh = me->get_grob_property ("edge-height"); - SCM sp = me->get_grob_property ("shorten-pair"); + SCM fl = me->get_property ("bracket-flare"); + SCM eh = me->get_property ("edge-height"); + SCM sp = me->get_property ("shorten-pair"); Direction d = LEFT; Drul_array height, flare, shorten; @@ -300,7 +300,7 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); - SCM cols = me->get_grob_property ("note-columns"); + SCM cols = me->get_property ("note-columns"); Grob * commony = common_refpoint_of_list (cols, me, Y_AXIS); Grob * commonx = common_refpoint_of_list (cols, me, X_AXIS); @@ -378,7 +378,7 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) } // padding - *offset += gh_scm2double (me->get_grob_property ("padding")) *dir; + *offset += gh_scm2double (me->get_property ("padding")) *dir; /* @@ -466,7 +466,7 @@ Tuplet_bracket::after_line_breaking (SCM smob) } else { - SCM ps = par_beam->get_grob_property ("positions"); + SCM ps = par_beam->get_property ("positions"); Real lp = gh_scm2double (gh_car (ps)); Real rp = gh_scm2double (gh_cdr (ps)); @@ -474,13 +474,13 @@ Tuplet_bracket::after_line_breaking (SCM smob) /* duh. magic. */ - offset = lp + dir * (0.5 + gh_scm2double (me->get_grob_property ("padding"))); + offset = lp + dir * (0.5 + gh_scm2double (me->get_property ("padding"))); dy = rp- lp; } - SCM lp = me->get_grob_property ("left-position"); - SCM rp = me->get_grob_property ("right-position"); + SCM lp = me->get_property ("left-position"); + SCM rp = me->get_property ("right-position"); if (gh_number_p (lp) && !gh_number_p (rp)) { @@ -496,8 +496,8 @@ Tuplet_bracket::after_line_breaking (SCM smob) rp = gh_double2scm (offset +dy); } - me->set_grob_property ("left-position", lp); - me->set_grob_property ("right-position", rp); + me->set_property ("left-position", lp); + me->set_property ("right-position", rp); return SCM_UNSPECIFIED; } @@ -510,7 +510,7 @@ Direction Tuplet_bracket::get_default_dir (Grob*me) { Drul_array dirs(0,0); - for (SCM s = me->get_grob_property ("note-columns"); gh_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("note-columns"); gh_pair_p (s); s = ly_cdr (s)) { Grob * nc = unsmob_grob (ly_car (s)); Direction d = Note_column::dir (nc); diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 0db8d88ef2..128238a343 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -44,7 +44,7 @@ Tuplet_engraver::try_music (Music *c) { if (c->is_mus_type ("time-scaled-music")) { - Music *el = unsmob_music (c->get_mus_property ("element")); + Music *el = unsmob_music (c->get_property ("element")); if (el && !el->is_mus_type ("event-chord")) { time_scaled_musics_.push (c); @@ -82,7 +82,7 @@ Tuplet_engraver::process_acknowledged_grobs () if (gh_procedure_p (proc)) { SCM t = gh_apply (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED)); - glep->set_grob_property ("text", t); + glep->set_property ("text", t); } announce_grob(glep, time_scaled_musics_ [i]->self_scm()); diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index b1b261d800..8eb234c3b4 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -27,10 +27,10 @@ Unfolded_repeat_iterator::get_music_list () const SCM l = SCM_EOL; SCM *tail = &l; - SCM body = get_music ()->get_mus_property ("element"); - SCM alts = get_music ()->get_mus_property ("elements"); + SCM body = get_music ()->get_property ("element"); + SCM alts = get_music ()->get_property ("elements"); int alt_count = scm_ilength (alts); - int rep_count = gh_scm2int (get_music ()->get_mus_property ("repeat-count")); + int rep_count = gh_scm2int (get_music ()->get_property ("repeat-count")); for (int i = 0; i < rep_count; i++) { @@ -81,8 +81,8 @@ Volta_repeat_iterator::Volta_repeat_iterator() SCM Volta_repeat_iterator::get_music_list()const { - return gh_cons (get_music ()->get_mus_property ("element"), - get_music ()->get_mus_property ("elements")); + return gh_cons (get_music ()->get_property ("element"), + get_music ()->get_property ("elements")); } void @@ -90,10 +90,10 @@ Volta_repeat_iterator::construct_children () { Sequential_iterator::construct_children(); - SCM alts = get_music ()->get_mus_property ("elements"); + SCM alts = get_music ()->get_property ("elements"); alt_count_ = scm_ilength (alts); - rep_count_ = gh_scm2int (get_music ()->get_mus_property ("repeat-count")); + rep_count_ = gh_scm2int (get_music ()->get_property ("repeat-count")); done_count_ = 0; } diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index a7d4dfff10..66acf675bd 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -176,15 +176,15 @@ Vaticana_ligature_engraver::align_heads (Array primitives, { Item *primitive = dynamic_cast (primitives[i].grob_); int prefix_set = - gh_scm2int (primitive->get_grob_property ("prefix-set")); + gh_scm2int (primitive->get_property ("prefix-set")); int context_info = - gh_scm2int (primitive->get_grob_property ("context-info")); + gh_scm2int (primitive->get_property ("context-info")); /* * Get glyph_name, delta_pitch and context_info for this head. */ - SCM glyph_name_scm = primitive->get_grob_property ("glyph-name"); + SCM glyph_name_scm = primitive->get_property ("glyph-name"); if (glyph_name_scm == SCM_EOL) { primitive->programming_error ("Vaticana_ligature:" @@ -197,7 +197,7 @@ Vaticana_ligature_engraver::align_heads (Array primitives, int delta_pitch = 0; if (prev_primitive) /* urgh, need prev_primitive only here */ { - SCM delta_pitch_scm = prev_primitive->get_grob_property ("delta-pitch"); + SCM delta_pitch_scm = prev_primitive->get_property ("delta-pitch"); if (delta_pitch_scm != SCM_EOL) { delta_pitch = gh_scm2int (delta_pitch_scm); @@ -257,7 +257,7 @@ Vaticana_ligature_engraver::align_heads (Array primitives, /* * Save the head's final x-offset. */ - primitive->set_grob_property ("x-offset", + primitive->set_property ("x-offset", gh_double2scm (x_offset)); /* @@ -276,7 +276,7 @@ Vaticana_ligature_engraver::align_heads (Array primitives, } else { - prev_primitive->set_grob_property ("add-join", + prev_primitive->set_property ("add-join", gh_bool2scm(true)); /* @@ -335,7 +335,7 @@ void check_for_prefix_loss (Item *primitive) { int prefix_set = - gh_scm2int (primitive->get_grob_property ("prefix-set")); + gh_scm2int (primitive->get_property ("prefix-set")); if (prefix_set & ~PES_OR_FLEXA) { String prefs = Gregorian_ligature::prefixes_to_str (primitive); @@ -349,9 +349,9 @@ void Vaticana_ligature_engraver::transform_heads (Spanner *ligature, Array primitives) { - Real flexa_width= robust_scm2double ( ligature->get_grob_property ("flexa-width"), 2); + Real flexa_width= robust_scm2double ( ligature->get_property ("flexa-width"), 2); - Real thickness= robust_scm2double ( ligature->get_grob_property ("thickness"), 1); + Real thickness= robust_scm2double ( ligature->get_property ("thickness"), 1); Item *prev_primitive = 0; int prev_prefix_set = 0; @@ -362,7 +362,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, Item *primitive = dynamic_cast (primitives[i].grob_); int delta_pitch; - SCM delta_pitch_scm = primitive->get_grob_property ("delta-pitch"); + SCM delta_pitch_scm = primitive->get_property ("delta-pitch"); if (delta_pitch_scm != SCM_EOL) { delta_pitch = gh_scm2int (delta_pitch_scm); @@ -377,13 +377,13 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, /* retrieve & complete prefix_set and context_info */ int prefix_set = - gh_scm2int (primitive->get_grob_property ("prefix-set")); + gh_scm2int (primitive->get_property ("prefix-set")); int context_info = - gh_scm2int (primitive->get_grob_property ("context-info")); + gh_scm2int (primitive->get_property ("context-info")); if (is_stacked_head (prefix_set, context_info)) { context_info |= STACKED_HEAD; - primitive->set_grob_property ("context-info", + primitive->set_property ("context-info", gh_int2scm (context_info)); } @@ -397,7 +397,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, if (prefix_set & VIRGA) { glyph_name = "vaticana_punctum"; - primitive->set_grob_property ("add-stem", gh_bool2scm(true)); + primitive->set_property ("add-stem", gh_bool2scm(true)); } else if (prefix_set & QUILISMA) glyph_name = "vaticana_quilisma"; @@ -458,7 +458,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, * Therefore, the following line of code should be * placed somewhere else. */ - prev_primitive->set_grob_property ("add-cauda", + prev_primitive->set_property ("add-cauda", gh_bool2scm(false)); } glyph_name = "vaticana_reverse_plica"; @@ -490,7 +490,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, */ if ((context_info & FLEXA_LEFT) && !(context_info & PES_UPPER)) if (!String::compare (glyph_name, "vaticana_punctum")) - primitive->set_grob_property ("add-cauda", gh_bool2scm(true)); + primitive->set_property ("add-cauda", gh_bool2scm(true)); /* * Execptional rule for porrectus: @@ -503,16 +503,16 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, { check_for_prefix_loss (prev_primitive); prev_glyph_name = "flexa"; - prev_primitive->set_grob_property ("flexa-height", + prev_primitive->set_property ("flexa-height", gh_int2scm (prev_delta_pitch)); - prev_primitive->set_grob_property ("flexa-width", + prev_primitive->set_property ("flexa-width", gh_double2scm (flexa_width)); bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA); - prev_primitive->set_grob_property ("add-cauda", + prev_primitive->set_property ("add-cauda", gh_bool2scm (add_cauda)); check_for_prefix_loss (primitive); glyph_name = ""; - primitive->set_grob_property ("flexa-width", + primitive->set_property ("flexa-width", gh_double2scm (flexa_width)); } @@ -537,7 +537,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, } if (prev_primitive) - prev_primitive->set_grob_property ("glyph-name", + prev_primitive->set_property ("glyph-name", scm_makfrom0str (prev_glyph_name.to_str0 ())); /* @@ -546,7 +546,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, * ligature grob's value for thickness to each ligature head (even * if not all of them need to know). */ - primitive->set_grob_property ("thickness", gh_double2scm (thickness)); + primitive->set_property ("thickness", gh_double2scm (thickness)); prev_primitive = primitive; prev_prefix_set = prefix_set; @@ -555,7 +555,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, prev_glyph_name = glyph_name; } - prev_primitive->set_grob_property ("glyph-name", + prev_primitive->set_property ("glyph-name", scm_makfrom0str (prev_glyph_name.to_str0 ())); #if 0 @@ -573,7 +573,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, "setting `spacing-increment = %f': ptr=%ul", ligature_width, paper_column)); paper_column-> - set_grob_property("forced-spacing", gh_double2scm (ligature_width)); + set_property("forced-spacing", gh_double2scm (ligature_width)); #endif } diff --git a/lily/vaticana-ligature.cc b/lily/vaticana-ligature.cc index d683aec1cf..a851202510 100644 --- a/lily/vaticana-ligature.cc +++ b/lily/vaticana-ligature.cc @@ -75,7 +75,7 @@ vaticana_brew_flexa (Grob *me, Real right_height = 0.6 * staff_space; Real interval; - SCM flexa_height_scm = me->get_grob_property ("flexa-height"); + SCM flexa_height_scm = me->get_property ("flexa-height"); if (flexa_height_scm != SCM_EOL) { interval = gh_scm2int (flexa_height_scm); @@ -92,7 +92,7 @@ vaticana_brew_flexa (Grob *me, me->warning (_ ("ascending vaticana style flexa")); } - Real width = robust_scm2double ( me->get_grob_property ("flexa-width"), 2); + Real width = robust_scm2double ( me->get_property ("flexa-width"), 2); /* * Compensate curve thickness that appears to be smaller in steep @@ -215,7 +215,7 @@ vaticana_add_ledger_lines (Grob *me, Stencil *out, int pos, Real offs, Stencil vaticana_brew_primitive (Grob *me, bool ledger_take_space) { - SCM glyph_name_scm = me->get_grob_property ("glyph-name"); + SCM glyph_name_scm = me->get_property ("glyph-name"); if (glyph_name_scm == SCM_EOL) { me->programming_error ("Vaticana_ligature: " @@ -227,7 +227,7 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space) Stencil out; int flexa_height = 0; - Real thickness = robust_scm2double ( me->get_grob_property ("thickness"), 1); + Real thickness = robust_scm2double ( me->get_property ("thickness"), 1); Real line_thickness = thickness * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); @@ -237,18 +237,18 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space) int pos = (int)rint (Staff_symbol_referencer::get_position (me)); - SCM delta_pitch_scm = me->get_grob_property ("delta-pitch"); + SCM delta_pitch_scm = me->get_property ("delta-pitch"); int delta_pitch; if (delta_pitch_scm != SCM_EOL) delta_pitch = gh_scm2int (delta_pitch_scm); else delta_pitch = 0; - Real x_offset = robust_scm2double ( me->get_grob_property ("x-offset"), 0); + Real x_offset = robust_scm2double ( me->get_property ("x-offset"), 0); - bool add_stem = to_boolean (me->get_grob_property ("add-stem")); - bool add_cauda = to_boolean (me->get_grob_property ("add-cauda")); - bool add_join = to_boolean (me->get_grob_property ("add-join")); + bool add_stem = to_boolean (me->get_property ("add-stem")); + bool add_cauda = to_boolean (me->get_property ("add-cauda")); + bool add_join = to_boolean (me->get_property ("add-join")); if (!String::compare (glyph_name, "")) { @@ -260,7 +260,7 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space) * flexa_width.) */ Real staff_space = Staff_symbol_referencer::staff_space (me); - Real flexa_width = robust_scm2double ( me->get_grob_property ("flexa-width"), 2) *staff_space; + Real flexa_width = robust_scm2double ( me->get_property ("flexa-width"), 2) *staff_space; out = Lookup::blank (Box (Interval (0, 0.5*flexa_width), Interval (0,0))); } diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index 92184e301c..ed83d76e28 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -51,9 +51,9 @@ Volta_bracket_interface::print (SCM smob) bool no_vertical_start = orig_span && !broken_first_bracket; bool no_vertical_end = orig_span && !broken_last_bracket; - SCM s = me->get_grob_property ("bars"); + SCM s = me->get_property ("bars"); Grob * endbar = unsmob_grob (ly_car (s)); - SCM glyph = endbar->get_grob_property("glyph"); + SCM glyph = endbar->get_property("glyph"); String str; if (gh_string_p (glyph)) @@ -89,7 +89,7 @@ Volta_bracket_interface::print (SCM smob) } Real w = dynamic_cast (me)->spanner_length () - left - half_space; - Real h = robust_scm2double (me->get_grob_property ("height"), 1); + Real h = robust_scm2double (me->get_property ("height"), 1); Stencil start,end ; if (!no_vertical_start) @@ -104,7 +104,7 @@ Volta_bracket_interface::print (SCM smob) if (!orig_span || broken_first_bracket) { - SCM text = me->get_grob_property ("text"); + SCM text = me->get_property ("text"); SCM properties = me->get_property_alist_chain (SCM_EOL); SCM snum = Text_item::interpret_markup (paper->self_scm (), properties, text); Stencil num = *unsmob_stencil (snum); diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 0a33d68e76..50839bf5bd 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -168,7 +168,7 @@ Volta_engraver::process_music () volta_span_ = make_spanner ("VoltaBracket"); announce_grob (volta_span_, SCM_EOL); - volta_span_->set_grob_property ("text", start_string_); + volta_span_->set_property ("text", start_string_); } } diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index f84f84298c..9d93613efb 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -1927,6 +1927,17 @@ def conv (str): conversions.append (((2,1,25), conv, """Scheme grob function renaming""")) +def conv (str): + str = re.sub ('ly:set-grob-property!', 'ly:grob-set-property!',str) + str = re.sub ('ly:set-mus-property!', 'ly:music-set-property!',str) + str = re.sub ('ly:set-context-property!', 'ly:context-set-property!', str) + str = re.sub ('ly:get-grob-property', 'ly:grob-property',str) + str = re.sub ('ly:get-mus-property', 'ly:music-property',str) + str = re.sub ('ly:get-context-property', 'ly:context-property',str) + + return str + +conversions.append (((2,1,26), conv, """More Scheme function renaming""")) ################################ # END OF CONVERSIONS ################################ -- 2.39.2