- Molecule mol;
- mol.add_at_edge (X_AXIS, RIGHT, name.tonic_mol, 0);
- // huh?
- if (!name.modifier_mol.empty_b ())
- mol.add_at_edge (X_AXIS, RIGHT, name.modifier_mol, 0);
- if (!name.addition_mol.empty_b ())
- mol.add_at_edge (X_AXIS, RIGHT, name.addition_mol, 0);
- if (!name.inversion_mol.empty_b ())
- mol.add_at_edge (X_AXIS, RIGHT, name.inversion_mol, 0);
- if (!name.bass_mol.empty_b ())
- mol.add_at_edge (X_AXIS, RIGHT, name.bass_mol, 0);
- return mol;
+ SCM inversion = me-> get_elt_property ("inversion");
+ if (inversion == SCM_EOL)
+ inversion = SCM_BOOL_F;
+
+ SCM bass = me->get_elt_property ("bass");
+ if (bass == SCM_EOL)
+ bass = SCM_BOOL_F;
+
+ SCM pitches = me->get_elt_property ("pitches");
+ SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function"));
+ SCM text = gh_call3 (func, style, ly_quote_scm (pitches), ly_quote_scm (gh_cons (inversion, bass)));
+
+ return ly_text2molecule (me, text).create_scheme ();