Safe Haskell | None |
---|---|
Language | Haskell2010 |
Common (Western classical) pitches, intervals and related types.
- data Octaves
- data DiatonicSteps
- data ChromaticSteps
- type Semitones = ChromaticSteps
- data Number
- data Quality
- data QualityType
- data IntervalBasis
- newtype Interval = Interval {}
- data Name
- data Accidental
- newtype Pitch = Pitch {}
Even octaves and steps
Number of octaves. May be negative, indicating a downward interval.
data DiatonicSteps Source
Number of diatonic steps. May be negative, indicating a downward interval.
Enum DiatonicSteps | |
Eq DiatonicSteps | |
Integral DiatonicSteps | |
Num DiatonicSteps | |
Ord DiatonicSteps | |
Real DiatonicSteps | |
Show DiatonicSteps | |
AdditiveGroup DiatonicSteps | |
ToJSON DiatonicSteps | |
FromJSON DiatonicSteps |
data ChromaticSteps Source
Number of chromatic steps. May be negative, indicating a downward interval.
type Semitones = ChromaticSteps Source
Number of semitones. May be negative, indicating a downward interval.
Intervals
The number component of an interval (fourth, fifth) etc. May be negative, indicating a downward interval.
The quality component of an interval (minor, major, augmented). Generalized from single/double augmented/diminished to any number of steps.
Eq Quality | |
Ord Quality | |
Show Quality | |
Augmentable Quality | Augmentable Quality instance This Augmentable instance exists solely for use of the extractQuality function, which ensures that there is never any ambiguity around diminishedaugmented intervals turning into majorminor/perfect intervals. |
HasQuality Quality |
data QualityType Source
The alteration implied by a quality is dependent on whether it is attached to a major/minor vs. a perfect-style number. This type represents the two possibilities.
data IntervalBasis Source
This type represents standard basis for intervbals.
Interval type.
Eq Interval | |
Num Interval | Avoid using '(*)', or |
Ord Interval | Lexicographical ordering, comparing the |
Show Interval | |
Monoid Interval | |
AdditiveGroup Interval | |
IsInterval Interval | |
Augmentable Interval | |
Semigroup Interval | |
HasNumber Interval | |
HasQuality Interval | |
HasSemitones Interval | |
VectorSpace Interval | |
HasBasis Interval | |
ToJSON Interval | |
FromJSON Interval | |
Typeable * Interval | |
type Scalar Interval = Integer | |
type Basis Interval = IntervalBasis |
Pitch
data Accidental Source
Accidental, represented as number of alterations. Generalized from natural and single/double sharp/flat to any number of steps.
Enum Accidental | |
Eq Accidental | |
Integral Accidental | |
Num Accidental | |
Ord Accidental | |
Real Accidental | |
Show Accidental | |
Alterable Accidental | |
(IsPitch a, Alterable a) => IsPitch (Accidental -> a) | Magic instance that allow us to write |