]> git.cworth.org Git - scherzo/blobdiff - scherzo-key.h
Spell input notes according to key
[scherzo] / scherzo-key.h
index 07cdd702ce0864785cddb864125429c37338983f..8aaaf6d857e5ae673a505abd3a310852567208fb 100644 (file)
@@ -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 */