music-pitch-1.8.1: Musical pitch representation.

Safe HaskellNone
LanguageHaskell2010

Music.Pitch.Common.Quality

Contents

Synopsis

Quality

data Quality Source

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.

Instances

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 

class HasQuality a where Source

Types of value that has an interval quality (mainly Interval and Quality itself).

Methods

quality :: a -> Quality Source

invertQuality :: Quality -> Quality Source

Invert a quality.

Perfect is unaffected, major becomes minor and vice versa, augmented becomes diminished and vice versa.

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).

Quality type