Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains functions for computing intervals and classifying chords.
Synopsis
- data Interval_name = Interval_name Interval_quality Interval_number
- data Interval_number
- data Interval_quality
- accidental_semitones :: Accidental -> Int
- compute_interval_name :: Note_name -> Note_name -> Interval_name
- invert_interval_name :: Interval_name -> Interval_name
- semitones_from_c :: Note_name -> Int
- steps_from_c :: Note_name -> Int
Documentation
data Interval_name Source #
Interval name.
Instances
Show Interval_name Source # | |
Defined in Composition.Theory showsPrec :: Int -> Interval_name -> ShowS # show :: Interval_name -> String # showList :: [Interval_name] -> ShowS # |
data Interval_number Source #
Interval numbers.
Instances
data Interval_quality Source #
Interval qualities, allowing for up to three levels of augmentation.
Thrice_diminished | |
Twice_diminished | |
Diminished | |
Minor | |
Perfect | |
Major | |
Augmented | |
Twice_augmented | |
Thrice_augmented |
Instances
Show Interval_quality Source # | |
Defined in Composition.Theory showsPrec :: Int -> Interval_quality -> ShowS # show :: Interval_quality -> String # showList :: [Interval_quality] -> ShowS # |
accidental_semitones :: Accidental -> Int Source #
Returns the number of semitones by which the accidental adjusts the pitch.
compute_interval_name :: Note_name -> Note_name -> Interval_name Source #
Computes the interval between two note names.
invert_interval_name :: Interval_name -> Interval_name Source #
Inverts the interval name.
semitones_from_c :: Note_name -> Int Source #
Computes the number of semitones from C. C♭ is considered to be -1 semitone from C and B♯ 12 semitones from C.
steps_from_c :: Note_name -> Int Source #
Computes the number of steps from C.