The Note module implements the basic Music.Diatonic musical objects:
- Note
- Accidental
It also exports Music.Diatonic.Interval for convenience.
- 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
- equiv :: Note -> Note -> Bool
- canonize :: Note -> Note
- circleOfFifths :: Note -> [Note]
- transpose :: (Nte a, Functor m) => Interval -> (Interval -> Note -> Note) -> m a -> m a
- data Accidental
- module Music.Diatonic.Interval
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
.
equiv :: Note -> Note -> BoolSource
Returns true if both Note
s are enharmonically equivalent, false otherwise.
equiv B (flat C) == True
canonize :: Note -> NoteSource
Brings a Note
to it's most straight forward representation. For example:
canonize (sharp B) == C
circleOfFifths :: Note -> [Note]Source
data Accidental Source
module Music.Diatonic.Interval