The Note module implements the basic Music.Diatonic musical objects:
- Note
- Accidental
- data Note
- class Nte a where
- class Nts a where
- next :: Note -> Note
- prev :: Note -> Note
- above :: Interval -> Note -> Note
- below :: Interval -> Note -> Note
- distance :: Note -> Note -> Interval
- raise :: Note -> Note
- lower :: Note -> Note
- sharp :: Note -> Note
- flat :: Note -> Note
- natural :: Note -> Note
- accidental :: Note -> Accidental
- canonize :: Note -> Note
- circleOfFifths :: Note -> [Note]
- transpose :: Nte a => Interval -> (Interval -> Note -> Note) -> a -> a
- data Accidental
Documentation
Many musical objects have a note at their core (scales, chords, ...). The Nte
class allows these objects
to make use of all the note-manipulating functions.
Used to extract a list of notes from something (scale, chord, ...).
Returns the next natural Note
in the cycle:
C -> D -> E -> F -> G -> A -> B ^------------------------------
Returns the previous natural Note
in the cycle:
C -> B -> A -> G -> F -> E -> D ^------------------------------
Raises a Note
by a semitone by applying an accidental.
The note name stays the same.
Lowers a Note
by a semitone by applying an accidental.
The note name stays the same.
accidental :: Note -> AccidentalSource
Return the Accidental
applied to the Note
.
canonize :: Note -> NoteSource
Brings a Note
to it's most straight forward representation. For example:
canonize (sharp B) == C
circleOfFifths :: Note -> [Note]Source