Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Euler plane diagrams as dot language graph.
- rat_mul :: Rational -> Rational -> Rational
- rat_div :: Rational -> Rational -> Rational
- tun_seq :: Int -> Rational -> Rational -> [Rational]
- mod12 :: Integral a => a -> a
- ratio_to_pc :: Int -> Rational -> Int
- all_pairs :: [t] -> [u] -> [(t, u)]
- euler_align_rat :: T2 Rational -> T3 [Rational] -> T2 [T2 Rational]
- pc_pp :: (Integral i, Show i) => i -> String
- cents_pp :: Rational -> String
- rat_label :: (Int, Bool) -> Rational -> String
- rat_id :: Rational -> String
- rat_edge_label :: (Rational, Rational) -> String
- zip_sme :: (t, t, t) -> [u] -> [(t, u)]
- type Euler_Plane t = ([[t]], [(t, t)])
- euler_plane_to_dot :: (t -> String, t -> String, (t, t) -> String) -> Euler_Plane t -> [String]
- euler_plane_to_dot_rat :: (Int, Bool) -> Euler_Plane Rational -> [String]
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]
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]
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 #
euler_plane_to_dot_rat :: (Int, Bool) -> Euler_Plane Rational -> [String] Source #