music-pitch-1.9.0: Musical pitch representation.

Safe HaskellNone
LanguageHaskell2010

Music.Pitch.Scale

Contents

Description

Scales and chords.

Synopsis

Modes and scales

data Mode a Source

 A mode is a list of intervals and a characteristic repeating interval.

modeFromSteps :: [Diff a] -> Diff a -> Mode a Source

[Interval] -> Interval -> Mode Pitch

modeIntervals :: Lens' (Mode a) [Diff a] Source

Lens' (Mode Pitch) [Interval]

modeRepeat :: Lens' (Mode a) (Diff a) Source

Lens' (Mode Pitch) Interval

data Scale a Source

 A scale is a mode with a specified tonic.

scaleTonic :: Lens' (Scale a) a Source

Lens' (Scale Pitch) Pitch

scaleMode :: Lens' (Scale a) (Mode a) Source

Lens' (Scale Pitch) (Mode Pitch)

leadingInterval :: AffineSpace a => Mode a -> Diff a Source

>>> leadingInterval majorScale
m2
>>> leadingInterval harmonicMinorScale
m2
>>> leadingInterval pureMinorScale
_M2

invertMode :: AffineSpace a => Int -> Mode a -> Mode a Source

modeToScale :: AffineSpace a => a -> Mode a -> Scale a Source

scaleToList :: AffineSpace a => Scale a -> [a] Source

Chord types and chords

functionFromSteps :: [Diff a] -> Diff a -> Function a Source

[Interval] -> Interval -> Function Pitch

functionIntervals :: Lens' (Function a) [Diff a] Source

Lens' (Function Pitch) [Interval]

functionRepeat :: Lens' (Function a) (Diff a) Source

Lens' (Function Pitch) Interval

data Chord a Source

chordTonic :: Lens' (Chord a) a Source

Lens' (Chord Pitch) Pitch

chordFunction :: Lens' (Chord a) (Function a) Source

Lens' (Chord Pitch) (Function Pitch)

complementInterval :: AffineSpace a => Function a -> Diff a Source

>>> complementInterval majorTriad
_P4
>>> complementInterval minorTriad
_P4
>>> complementInterval majorMinorSeventhChord
_M2
Lens' (Function Pitch) Interval

invertChord :: AffineSpace a => Int -> Function a -> Function a Source

functionToChord :: AffineSpace a => a -> Function a -> Chord a Source

chordToList :: AffineSpace a => Chord a -> [a] Source

Returns a single inversion of the given chord (no repeats!).

Common modes

Classical modes

Church modes

Miscellaneous modes

Modes of limited transposition

Common chords