]> git.cworth.org Git - scherzo/commit
Add a new SCORE_PITCH macro and rename SCORE_PITCH_VALUE to SCORE_PITCH_LITERAL
authorCarl Worth <cworth@cworth.org>
Sun, 22 Sep 2013 21:29:41 +0000 (14:29 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 22 Sep 2013 21:34:56 +0000 (14:34 -0700)
commitd28562d25616842549f30b3d5c402aba20548970
treebe93ae946dbe456720a45d3b5d0af371821bc991
parent4f246b4a5607782e18131cc4d90ec50ea197258d
Add a new SCORE_PITCH macro and rename SCORE_PITCH_VALUE to SCORE_PITCH_LITERAL

The original SCORE_PITCH_VALUE macro was of limited use. It could only
be used with literal values such as "G" and "FLAT" and could not be
used to construct a score_pitch_t value from two variables. This was
particularly useless since a user could just use a literal value of
SCORE_PITCH_Gf instead of SCORE_PITCH_VALUE(G, FLAT).

So we rename SCORE_PITCH_VALUE to SCORE_PITCH_LITERAL to make its
limitations more clear in its name. (The one important use remaining
for the macro is in the initial construction of the score_pitch_t
values for the enum declaration).

And here we add the SCORE_PITCH macro which *can* be used to construct
a score_pitch_t value from two variables, (one holding the pitch name,
and one holding the accidental).
scherzo.c
score.h