hmt-0.16: Haskell Music Theory

Safe HaskellSafe
LanguageHaskell98

Music.Theory.Tuning.Euler

Description

Euler plane diagrams as dot language graph.

Synopsis

Documentation

tun_seq :: Int -> Rational -> Rational -> [Rational] Source #

n = length, m equals multiplier, r = initial ratio.

tun_seq 5 (3/2) 1 == [1/1,3/2,9/8,27/16,81/64]

mod12 :: Integral a => a -> a Source #

ratio_to_pc :: Int -> Rational -> Int Source #

ratio_to_cents rounded to nearest multiple of 100, modulo 12.

map (ratio_to_pc 0) [1,4/3,3/2,2] == [0,5,7,0]

all_pairs :: [t] -> [u] -> [(t, u)] Source #

euler_align_rat :: T2 Rational -> T3 [Rational] -> T2 [T2 Rational] Source #

Give all pairs from (l2,l1) and (l3,l2) that are at interval ratios r1 and r2 respectively.

pc_pp :: (Integral i, Show i) => i -> String Source #

Pretty printer for pitch class.

unwords (map pc_pp [0..11]) == "C♮ C♯ D♮ E♭ E♮ F♮ F♯ G♮ A♭ A♮ B♭ B♮"

zip_sme :: (t, t, t) -> [u] -> [(t, u)] Source #

Zip start-middle-end.

zip_sme (0,1,2) "abcd" == [(0,'a'),(1,'b'),(1,'c'),(2,'d')]

type Euler_Plane t = ([[t]], [(t, t)]) Source #

euler_plane_to_dot :: (t -> String, t -> String, (t, t) -> String) -> Euler_Plane t -> [String] Source #