X-Git-Url: https://git.cworth.org/git?p=scherzo;a=blobdiff_plain;f=scherzo.c;h=a13196e5b802563f7f8906e7cd42157e5c7ed7c0;hp=676f5b459001412ad4ce7c4605dbc07e007cba8c;hb=936c8b69ec6177d82b1905ed555dc8fbe1f32283;hpb=f9ffdfde546d16f24ab5d30ed9caef2c687b4755 diff --git a/scherzo.c b/scherzo.c index 676f5b4..a13196e 100644 --- a/scherzo.c +++ b/scherzo.c @@ -521,6 +521,8 @@ scherzo_analyze_chord (scherzo_t *scherzo) for (i = 0; i < num_notes; i++) { notes[i].relative_pitch = notes[i].midi_pitch - bass_pitch; + while (notes[i].relative_pitch > 12) + notes[i].relative_pitch -= 12; } for (i = 0; i < ARRAY_SIZE (intervals); i++) {