music-pitch-1.3: Abstract representation of musical pitch.

Safe HaskellNone

Music.Pitch.Relative.Quality

Contents

Synopsis

Augmentable class

class Augmentable a whereSource

Class of types that can be augmented.

Methods

augment :: a -> aSource

Increase the size of this interval by one.

diminish :: a -> aSource

Decrease the size of this interval by one.

Quality

data Quality Source

Interval quality is either perfect, major, minor, augmented, and diminished. This representation allows for an arbitrary number of augmentation or diminishions, 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.

isPerfect :: HasQuality a => a -> BoolSource

Returns whether the given quality is perfect.

isMajor :: HasQuality a => a -> BoolSource

Returns whether the given quality is major.

isMinor :: HasQuality a => a -> BoolSource

Returns whether the given quality is minor.

isAugmented :: HasQuality a => a -> BoolSource

Returns whether the given quality is augmented (including double augmented etc).

isDiminished :: HasQuality a => a -> BoolSource

Returns whether the given quality is diminished (including double diminished etc).

diffToQuality :: Bool -> Int -> QualitySource

Convert an offset to a quality.

This is different for perfect and imperfect interals:

Imperfect Perfect === === -3 dd ddd -2 d dd -1 m d 0 M P 1 a a 2 aa aa

replicate' :: Integral a1 => a1 -> a -> [a]Source