hmt-0.20: Haskell Music Theory
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Pitch.Spelling.Table

Description

Simple table based spelling rules for common music notation.

Synopsis

Documentation

pc_spell_natural_tbl :: Integral i => Spelling_Table i Source #

Spelling table for natural (♮) notes only.

pc_spell_sharp_tbl :: Integral i => Spelling_Table i Source #

Spelling table for sharp (♯) notes only.

pc_spell_flat_tbl :: Integral i => Spelling_Table i Source #

Spelling table for flat (♭) notes only.

pc_spell_ks_tbl :: Integral i => Spelling_Table i Source #

Spelling table from simplest key-signature. Note that this is ambiguous for 8, which could be either G Sharp (♯) in A Major or A Flat (♭) in E Flat (♭) Major.

pc_spell_tbl_ks :: Integral i => Spelling_Table i -> Spelling i Source #

Spell using indicated table prepended to and pc_spell_natural_tbl and pc_spell_ks_tbl

pc_spell_natural_m :: Integral i => Spelling_M i Source #

Spelling for natural (♮) notes only.

map pc_spell_natural_m [0,1] == [Just (C,Natural),Nothing]

pc_spell_natural :: Integral i => Spelling i Source #

Erroring variant of pc_spell_natural_m.

map pc_spell_natural [0,5,7] == [(C,Natural),(F,Natural),(G,Natural)]

pc_spell_ks :: Integral i => Spelling i Source #

Lookup pc_spell_ks_tbl.

map pc_spell_ks [6,8] == [(F,Sharp),(A,Flat)]

pc_spell_sharp :: Integral i => Spelling i Source #

Use always sharp (♯) spelling.

map pc_spell_sharp [6,8] == [(F,Sharp),(G,Sharp)]
Data.List.nub (map (snd . pc_spell_sharp) [1,3,6,8,10]) == [Sharp]

pc_spell_flat :: Integral i => Spelling i Source #

Use always flat (♭) spelling.

 map pc_spell_flat [6,8] == [(G,Flat),(A,Flat)]
 Data.List.nub (map (snd . pc_spell_flat) [1,3,6,8,10]) == [Flat]