Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Simple table based spelling rules for common music notation.
Synopsis
- type Spelling_Table i = [(i, (Note, Alteration))]
- pc_spell_natural_tbl :: Integral i => Spelling_Table i
- pc_spell_sharp_tbl :: Integral i => Spelling_Table i
- pc_spell_flat_tbl :: Integral i => Spelling_Table i
- pc_spell_ks_tbl :: Integral i => Spelling_Table i
- pc_spell_tbl :: Integral i => Spelling_Table i -> Spelling i
- pc_spell_tbl_ks :: Integral i => Spelling_Table i -> Spelling i
- pc_spell_natural_m :: Integral i => Spelling_M i
- pc_spell_natural :: Integral i => Spelling i
- pc_spell_ks :: Integral i => Spelling i
- pc_spell_sharp :: Integral i => Spelling i
- pc_spell_flat :: Integral i => Spelling i
- octpc_to_pitch_ks :: Integral i => Octave_PitchClass i -> Pitch
- midi_to_pitch_ks :: Integral i => i -> Pitch
- fmidi_to_pitch_ks :: (Show n, RealFrac n) => n -> Pitch
- midi_detune_to_pitch_ks :: (Integral m, Real c) => (m, c) -> Pitch
- midi_to_pitch_sharp :: Integral i => i -> Pitch
Documentation
type Spelling_Table i = [(i, (Note, Alteration))] Source #
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 :: Integral i => Spelling_Table i -> Spelling i Source #
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]
octpc_to_pitch_ks :: Integral i => Octave_PitchClass i -> Pitch Source #
midi_to_pitch_ks :: Integral i => i -> Pitch Source #
midi_to_pitch_sharp :: Integral i => i -> Pitch Source #