X-Git-Url: https://git.cworth.org/git?p=scherzo;a=blobdiff_plain;f=scherzo-key.h;h=8aaaf6d857e5ae673a505abd3a310852567208fb;hp=07cdd702ce0864785cddb864125429c37338983f;hb=5b1797d26aff3a1b2f0cbe83583496b42abcd056;hpb=45d36bd8372f38186ceebf74b48f1a67bd67c573 diff --git a/scherzo-key.h b/scherzo-key.h index 07cdd70..8aaaf6d 100644 --- a/scherzo-key.h +++ b/scherzo-key.h @@ -38,7 +38,20 @@ typedef struct scherzo_key void scherzo_key_init (scherzo_key_t *key, pitch_t pitch); +/* Return true if 'pitch' is within the key as spelled. + * + * For example, a PITCH(A, SHARP) is not considered as contained + * within the key of PITCH(B, FLAT). + */ bool scherzo_key_contains_pitch (scherzo_key_t *key, pitch_t pitch); +/* For a pitch that is enharmonic with a pitch within 'key', return + * the key's spelling of that pitch. + * + * Otherwise, return the pitch unmodified. + */ +pitch_t +scherzo_key_spell_pitch (scherzo_key_t *key, pitch_t pitch); + #endif /* KEY_H */