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

Safe HaskellSafe-Inferred

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 whereSource

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 -> nSource

Returns the First Degree of s.

degree :: Note -> Note -> DegreeSource

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

from :: Degree -> Note -> NoteSource

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

second :: Deg s n => s -> Maybe nSource

Returns the Second Degree of s.

third :: Deg s n => s -> Maybe nSource

Returns the Third Degree of s.

fourth :: Deg s n => s -> Maybe nSource

Returns the Fourth Degree of s.

fifth :: Deg s n => s -> Maybe nSource

Returns the Fifth Degree of s.

sixth :: Deg s n => s -> Maybe nSource

Returns the Sixth Degree of s.

seventh :: Deg s n => s -> Maybe nSource

Returns the Seventh Degree of s.

tonic :: Deg s n => s -> nSource

An alias for first.

supertonic :: Deg s n => s -> Maybe nSource

An alias for second.

mediant :: Deg s n => s -> Maybe nSource

An alias for third.

subdominant :: Deg s n => s -> Maybe nSource

An alias for fourth.

dominant :: Deg s n => s -> Maybe nSource

An alias for fifth.

submediant :: Deg s n => s -> Maybe nSource

An alias for sixth.

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

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

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

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