X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fpitch-scheme.cc;h=0433325523d9c9dbf4e20c9993fed55ee6308043;hb=a1625514bdd5c9c66837ff67b65ab0ec75537255;hp=a188469fbd2fa4f02b404692512cc8900951ba69;hpb=8ab4967c376fc54b96601b7533d1e3e9af92bbfa;p=lilypond.git diff --git a/lily/pitch-scheme.cc b/lily/pitch-scheme.cc index a188469fbd..0433325523 100644 --- a/lily/pitch-scheme.cc +++ b/lily/pitch-scheme.cc @@ -32,18 +32,20 @@ LY_DEFINE (ly_pitch_transpose, "ly:pitch-transpose", return t->transposed (*d).smobbed_copy (); } -/* Should add optional args. */ LY_DEFINE (ly_make_pitch, "ly:make-pitch", 2, 1, 0, (SCM octave, SCM note, SCM alter), "@var{octave} is specified by an integer, zero for the octave" - " containing middle@tie{}C. @var{note} is a number indexing the" + " containing middle@tie{}C. @var{note} is a number indexing the" " global default scale, with 0 corresponding to pitch@tie{}C" - " and 6 usually corresponding to pitch@tie{}B. @var{alter} is" + " and 6 usually corresponding to pitch@tie{}B." + " Optional @var{alter} is" " a rational number of 200-cent whole tones for alteration.") { LY_ASSERT_TYPE (scm_is_integer, octave, 1); LY_ASSERT_TYPE (scm_is_integer, note, 2); + if (SCM_UNBNDP (alter)) + alter = SCM_INUM0; LY_ASSERT_TYPE (scm_is_rational, alter, 3); Pitch p (scm_to_int (octave), scm_to_int (note), @@ -103,7 +105,7 @@ LY_DEFINE (ly_pitch_notename, "ly:pitch-notename", } LY_DEFINE (ly_pitch_tones, "ly:pitch-tones", - 1, 0, 0, (SCM pp), + 1, 0, 0, (SCM pp), "Calculate the number of tones of@tie{}@var{pp} from" " middle@tie{}C as a rational number.") { @@ -111,7 +113,6 @@ LY_DEFINE (ly_pitch_tones, "ly:pitch-tones", return ly_rational2scm (unsmob_pitch (pp)->tone_pitch ()); } - LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones", 1, 0, 0, (SCM pp), "Calculate the number of quarter tones of@tie{}@var{pp} from"