+
+ if (inversion_event)
+ {
+ SCM oct = inversion_event->get_property ("octavation");
+ if (scm_is_number (oct))
+ {
+ Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
+ int octavation = scm_to_int (oct);
+ Pitch orig = p->transposed (Pitch (-octavation, 0, 0));
+
+ pitches = scm_cons (orig.smobbed_copy (), pitches);
+ }
+ else
+ programming_error ("inversion does not have original pitch");
+ }
+
+ pitches = scm_sort_list (pitches, Pitch::less_p_proc);
+
+ SCM name_proc = get_property ("chordNameFunction");
+ SCM markup = scm_call_4 (name_proc, pitches, bass, inversion,
+ context ()->self_scm ());
+
+ /*
+ Ugh.
+ */
+ SCM chord_as_scm = scm_cons (pitches, scm_cons (bass, inversion));
+
+ chord_name_ = make_item ("ChordName", notes_[0]->self_scm ());
+ chord_name_->set_property ("text", markup);
+
+ SCM s = get_property ("chordChanges");
+ if (to_boolean (s) && scm_is_pair (last_chord_)
+ && ly_is_equal (chord_as_scm, last_chord_))
+ chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T);
+
+ last_chord_ = chord_as_scm;