-/*
- should add optional args
- */
-
-static SCM
-make_pitch (SCM o, SCM n, SCM a)
-{
- Pitch p;
- p.octave_i_ = gh_scm2int (o);
- p.notename_i_ = gh_scm2int (n);
- p.alteration_i_ = gh_scm2int (a);
- return p.smobbed_copy ();
-}
-
-static SCM
-pitch_octave (SCM pp)
-{
- Pitch *p = unsmob_pitch (pp);
- int q = 0;
- if (!p)
- warning ("Not a pitch");
- else
- q = p->octave_i();
-
- return gh_int2scm (q);
-}
-
-static SCM
-pitch_alteration (SCM pp)
-{
- Pitch *p = unsmob_pitch (pp);
- int q = 0;
- if (!p)
- warning ("Not a pitch");
- else
- q = p->alteration_i();
-
- return gh_int2scm (q);
-}
-
-static SCM
-pitch_notename (SCM pp)
-{
- Pitch *p = unsmob_pitch (pp);
- int q = 0;
- if (!p)
- warning ("Not a pitch");
- else
- q = p->notename_i();
-
- return gh_int2scm (q);
-}
-
-static SCM
-pitch_semitones (SCM pp)
-{
- Pitch *p = unsmob_pitch (pp);
- int q = 0;
- if (!p)
- warning ("Not a pitch");
- else
- q = p->steps();
-
- return gh_int2scm (q);
-}
-
-static void
-add_funcs()
-{
- // should take list?: (make-pitch '(octave name accidental))
- scm_make_gsubr ("make-pitch", 3, 0, 0, (Scheme_function_unknown)make_pitch);
-
- scm_make_gsubr ("pitch-octave", 1, 0, 0, (Scheme_function_unknown)pitch_octave);
- scm_make_gsubr ("pitch-notename", 1, 0, 0, (Scheme_function_unknown)pitch_notename);
- scm_make_gsubr ("pitch-alteration", 1, 0, 0, (Scheme_function_unknown)pitch_alteration);
- scm_make_gsubr ("pitch-semitones", 1, 0, 0, (Scheme_function_unknown)pitch_semitones);
- scm_make_gsubr ("Pitch::transpose", 2, 0, 0, (Scheme_function_unknown) pitch_transpose);
-}
-
-ADD_SCM_INIT_FUNC(pitch, add_funcs);
-
-SCM
-Pitch::smobbed_copy ()const