hmt-0.15: Haskell Music Theory

Safe HaskellSafe-Inferred
LanguageHaskell98

Music.Theory.Key

Description

Common music keys.

Synopsis

Documentation

data Mode_T Source

Enumeration of common music notation modes.

Constructors

Minor_Mode 
Major_Mode 

Instances

type Key = (Note_T, Alteration_T, Mode_T) Source

A common music notation key is a Note_T, Alteration_T, Mode_T triple.

key_fifths :: Key -> Int Source

Distance along circle of fifths path of indicated Key. A positive number indicates the number of sharps, a negative number the number of flats.

key_fifths (A,Natural,Minor_Mode) == 0
key_fifths (A,Natural,Major_Mode) == 3
key_fifths (C,Natural,Minor_Mode) == -3