music-diatonic-0.1.2: Implementation of basic western musical theory objects.

Safe HaskellSafe
LanguageHaskell98

Music.Diatonic.Degree

Description

This module implements scale degrees.

Synopsis

Documentation

data Degree Source #

Use these constructors to create Degrees. To alter them, use the flat or sharp functions along with the $# operator.

Constructors

First 
Second 
Third 
Fourth 
Fifth 
Sixth 
Seventh 

class Eq n => Deg s n | s -> n where Source #

Minimal complete definition

degrees, first

Methods

degrees :: s -> [(Degree, n)] Source #

Returns all the naturally occuring Degrees in s, along with the element that corresponds to the Degree.

first :: s -> n Source #

Returns the First Degree of s.

degree :: Note -> Note -> Degree Source #

Assuming n1 as the tonic, returns the Degree of n2.

from :: Degree -> Note -> Note Source #

Returns the Note that corresponds to Degree d in a scale where the specified Note is the tonic.

second :: Deg s n => s -> Maybe n Source #

Returns the Second Degree of s.

third :: Deg s n => s -> Maybe n Source #

Returns the Third Degree of s.

fourth :: Deg s n => s -> Maybe n Source #

Returns the Fourth Degree of s.

fifth :: Deg s n => s -> Maybe n Source #

Returns the Fifth Degree of s.

sixth :: Deg s n => s -> Maybe n Source #

Returns the Sixth Degree of s.

seventh :: Deg s n => s -> Maybe n Source #

Returns the Seventh Degree of s.

tonic :: Deg s n => s -> n Source #

An alias for first.

supertonic :: Deg s n => s -> Maybe n Source #

An alias for second.

mediant :: Deg s n => s -> Maybe n Source #

An alias for third.

subdominant :: Deg s n => s -> Maybe n Source #

An alias for fourth.

dominant :: Deg s n => s -> Maybe n Source #

An alias for fifth.

submediant :: Deg s n => s -> Maybe n Source #

An alias for sixth.

subtonic :: (Deg s n, Nte n) => s -> Maybe n Source #

An alias for seventh, but only if the Seventh is a Min7th above the tonic.

leadingTone :: (Deg s n, Nte n) => s -> Maybe n Source #

An alias for seventh, but only if the Seventh is a Maj7th above the tonic.