X-Git-Url: https://git.cworth.org/git?p=scherzo;a=blobdiff_plain;f=scherzo.c;fp=scherzo.c;h=bdd1a0fe5c7dbe86e97cf1c2a219e17815b9873e;hp=dacefa8e8e8e186ec9fa6f20b9f79f05ab34e420;hb=ff7437e171dab5bc3868ce65ecacf8e77c6e8df3;hpb=f492c33c1fd33c1dc0a2c892753300c7225dbd51 diff --git a/scherzo.c b/scherzo.c index dacefa8..bdd1a0f 100644 --- a/scherzo.c +++ b/scherzo.c @@ -397,17 +397,6 @@ on_key_release_event (unused (GtkWidget *widget), return FALSE; } -/* Return true if 'a' and 'b' sound identical, (even if spelled differently) - * - * This comparison considers octaves as significant. So Bb and A# in - * the same octave are considered enharmonic, but Bb and A# in - * different octaves are not. */ -static int -_pitches_are_enharmonic (pitch_t a, pitch_t b) -{ - return pitch_to_midi (a) == pitch_to_midi (b); -} - /* Determine a chord name (if any) from the current notes pressed */ typedef struct analyzed_pitch { @@ -871,7 +860,7 @@ pitch_group_remove_pitch_enharmonic (pitch_group_t *group, pitch_t pitch) int i; for (i = 0; i < group->num_pitches; i++) - if (_pitches_are_enharmonic (group->pitches[i], pitch)) + if (pitch_enharmonic_to (group->pitches[i], pitch)) pitch_group_remove_pitch_at (group, i); }