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

Music.Theory.Tuning.Syntonic

Description

Syntonic tuning.

Synopsis

Documentation

mk_isomorphic_layout :: Integral a => a -> a -> (a, a) -> [[(a, a)]] Source #

Construct an isomorphic layout of r rows and c columns with an upper left value of (i,j).

r = [[(0,0),(-1,2),(-2,4)],[(-1,1),(-2,3),(-3,5)],[(-2,2),(-3,4),(-4,6)]]
mk_isomorphic_layout 3 3 (0,0) == r
map (map fst) r == [[0,-1,-2],[-1,-2,-3],[-2,-3,-4]]
map (map snd) r == [[0,2,4],[1,3,5],[2,4,6]]
map (map fst) r == map (map fst) (transpose r)
map (map snd) (transpose r) == [[0,1,2],[2,3,4],[4,5,6]]

minimal_isomorphic_note_layout :: [[(Int, Int)]] Source #

A minimal isomorphic note layout.

let [i,j,k] = mk_isomorphic_layout 3 5 (3,-4)
[i,take 4 j,(2,-4):take 4 k] == minimal_isomorphic_note_layout

rank_two_regular_temperament :: Integral a => a -> a -> [(a, a)] -> [a] Source #

Make a rank two regular temperament from a list of (i,j) positions by applying the scalars a and b.

mk_syntonic_tuning :: Int -> [Cents] Source #

Syntonic tuning system based on mk_isomorphic_layout of 5 rows and 7 columns starting at (3,-4) and a rank_two_regular_temperament with a of 1200 and indicated b.

syntonic_697 :: Tuning Source #

mk_syntonic_tuning of 697.

tn_divisions syntonic_697 == 17
let c = [0,79,194,273,309,388,467,503,582,697,776,812,891,970,1006,1085,1164]
tn_cents_i syntonic_697 == c

syntonic_702 :: Tuning Source #

mk_syntonic_tuning of 702.

tn_divisions syntonic_702 == 17
let c = [0,24,114,204,294,318,408,498,522,612,702,792,816,906,996,1020,1110]
tn_cents_i syntonic_702 == c