Arkham/elm-chords/3.0.0

Chords.Note

Represents the note that gives a name to a chord.

type Note
= A
| Bb
| B
| C
| Db
| D
| Eb
| E
| F
| Gb
| G
| Ab

This note is also known as pitch class, because it describes every occurrence of that note in any octave. Every accidental is described using the flat notation for consistency.

= Flat
| Sharp

This type describes accidentals. Sometimes accidentals can be enharmonic, which means that they describe the same pitch: one example of this is A Sharp B Flat.

Manipulating Notes

transpose : Int -> Note -> Note

Returns the note transposed by a number of semitones.

distance : Note -> Note -> Int

Returns the distance in semitones between two notes.

Exporting

toString : Note -> String

Converts a note to String.

Converts a note to String. You can decide how to display accidentals.