hmt-0.14: Haskell Music Theory

Safe HaskellSafe-Inferred

Music.Theory.Clef

Description

Common music notation clefs.

Synopsis

Documentation

data Clef_T Source

Clef enumeration type.

Constructors

Bass 
Tenor 
Alto 
Treble 
Percussion 

Instances

data Integral i => Clef i Source

Clef with octave offset.

Constructors

Clef 

Fields

clef_t :: Clef_T
 
clef_octave :: i
 

Instances

Integral i => Eq (Clef i) 
Integral i => Ord (Clef i) 
(Integral i, Show i) => Show (Clef i) 

clef_range :: Clef_T -> Maybe (Pitch, Pitch)Source

Give clef range as a Pitch pair indicating the notes below and above the staff.

 map clef_range [Treble,Bass] == [Just (d4,g5),Just (f2,b3)]
 clef_range Percussion == Nothing

clef_suggest :: Integral i => Pitch -> Clef iSource

Suggest a Clef given a Pitch.

 map clef_suggest [c2,c4] == [Clef Bass (-1),Clef Treble 0]

clef_zero :: Integral i => Clef i -> Clef iSource

Set clef_octave to 0.