Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class HasQuality a where
- isPerfect :: HasQuality a => a -> Bool
- isMajor :: HasQuality a => a -> Bool
- isMinor :: HasQuality a => a -> Bool
- isAugmented :: HasQuality a => a -> Bool
- isDiminished :: HasQuality a => a -> Bool
- data Quality
- invertQuality :: Quality -> Quality
- data QualityType
- expectedQualityType :: HasNumber a => a -> QualityType
- qualityTypes :: Quality -> [QualityType]
- qualityToDiff :: Bool -> QualityType -> Quality -> ChromaticSteps
Documentation
class HasQuality a where Source
Types of value that has an interval quality (mainly Interval
and Quality
itself).
isPerfect :: HasQuality a => a -> Bool Source
Returns whether the given quality is perfect.
isMajor :: HasQuality a => a -> Bool Source
Returns whether the given quality is major.
isMinor :: HasQuality a => a -> Bool Source
Returns whether the given quality is minor.
isAugmented :: HasQuality a => a -> Bool Source
Returns whether the given quality is augmented (including double augmented etc).
isDiminished :: HasQuality a => a -> Bool Source
Returns whether the given quality is diminished (including double diminished etc).
Interval quality is either perfect, major, minor, augmented, and
diminished. This representation allows for an arbitrary number of
augmentations or diminutions, so augmented is represented by Augmented
1
, doubly augmented by Augmented 2
and so on.
The quality of a compound interval is the quality of the simple interval on which it is based.
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 |
invertQuality :: Quality -> Quality Source
Invert a quality.
Perfect is unaffected, major becomes minor and vice versa, augmented becomes diminished and vice versa.
data QualityType Source
expectedQualityType :: HasNumber a => a -> QualityType Source
qualityTypes :: Quality -> [QualityType] Source
qualityToDiff :: Bool -> QualityType -> Quality -> ChromaticSteps Source