X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=pitch.c;h=03eb48100e56efd011206928d391b3ffa5eaba65;hb=ff7437e171dab5bc3868ce65ecacf8e77c6e8df3;hp=211e68c1aeb1252ff60c62b1d214475ffe5d5ce9;hpb=5b1797d26aff3a1b2f0cbe83583496b42abcd056;p=scherzo diff --git a/pitch.c b/pitch.c index 211e68c..03eb481 100644 --- a/pitch.c +++ b/pitch.c @@ -18,6 +18,7 @@ * along with this program. If not, see http://www.gnu.org/licenses/ . */ +#include #include #include "pitch.h" @@ -288,3 +289,9 @@ pitch_from_midi (unsigned char midi_note) break; } } + +int +pitch_enharmonic_to (pitch_t a, pitch_t b) +{ + return pitch_to_midi (a) == pitch_to_midi (b); +}