- return gh_list (gh_int2scm (p.notename_i_), gh_int2scm (p.accidental_i_), gh_int2scm (p.octave_i_), SCM_UNDEFINED);
-}
-
-Musical_pitch
-from_scm (SCM s)
-{
- return Musical_pitch (gh_scm2int (gh_car (s)),
- gh_scm2int (gh_cadr (s)),
- gh_scm2int (gh_caddr (s)));
-}
-
-template<class T>SCM
-array_to_scm (Array<T> arr)
-{
- SCM list = SCM_EOL;
- for (int i = arr.size (); i--;)
- list = gh_cons (to_scm (arr[i]), list);
- return list;
-}
-
-/*
- Silly templates
- Array<T> scm_to_array (SCM s)
- */
-template<class T>void
-scm_to_array (SCM s, Array<T>* arr)
-{
- for (; gh_pair_p (s); s= gh_cdr (s))
- arr->push (from_scm (gh_car (s)));
-}
-
-/*
- ugh, move to chord-name-engraver
-
- Hmm, why not represent complete chord as list?
- ((tonic third fifth) (inversion bass))
- */
-void
-Chord_name::set (Chord const& c)
-{
- set_elt_property ("pitches", array_to_scm (c.pitch_arr_));
- if (c.inversion_b_)
- set_elt_property ("inversion", to_scm (c.inversion_pitch_));
- if (c.bass_b_)
- set_elt_property ("bass", to_scm (c.bass_pitch_));