hmt-0.15: Haskell Music Theory

Safe HaskellSafe-Inferred
LanguageHaskell98

Music.Theory.Tuning.Polansky_1984

Description

Larry Polansky. "Tuning Systems in American Gamelan, Part I: Interval Sizes in Javanese Slendro". Balungan, 1(2):9-11, 1984

Synopsis

Documentation

k_set :: Fractional n => [[n]] Source

The set of K slendro tunings.

map length k_set == replicate (length k_set) 5
minimum (concat k_set) == 206
maximum (concat k_set) == 268.5

calculate_averages :: Fractional n => [[n]] -> [n] Source

Given a set of equal length lists calculate the average value of each position.

calculate_averages [[1,2,3],[3,2,1]] == [2,2,2]

k_averages :: Fractional n => [n] Source

Averages of K set, p. 10.

k_averages == [233.8125,245.0625,234.0,240.8125,251.875]

gm_1 :: Fractional n => [n] Source

gm_8 :: Fractional n => [n] Source

gm_7 :: Fractional n => [n] Source

gm_6 :: Fractional n => [n] Source

gm_5 :: Fractional n => [n] Source

gm_4 :: Fractional n => [n] Source

gm_3 :: Fractional n => [n] Source

gm_2 :: Fractional n => [n] Source

gm_set :: Fractional n => [[n]] Source

The set of GM (Gadja Mada University) slendro tunings.

map length gm_set == replicate (length gm_set) 5
minimum (concat gm_set) == 218
maximum (concat gm_set) == 262

gm_averages :: Fractional n => [n] Source

Averages of GM set, p. 10.

gm_averages == [234.0,240.25,247.625,243.125,254.0625]

i_categories :: Num n => [((n, n), String)] Source

Association list giving interval boundaries for interval class categories (pp.10-11).

i_category :: (Ord a, Num a) => a -> String Source

Categorise an interval.

pad :: Int -> String -> String Source

Pad String to right with spaces until at least n characters.

map (pad 3) ["S","E-L"] == ["S  ","E-L"]

i_category_table :: (Ord a, Num a) => [[a]] -> [String] Source

Pretty interval category table (pp. 10-11).

i_category_table k_set ==
 ["S    L    S    S    L  "
 ,"S    L    S    S    L  "
 ,"L    L    S    S    S  "
 ,"L    S    S    S    L  "
 ,"S    S    L    S    L  "
 ,"S    E-L  S    L    L  "
 ,"L    E    E    S    S  "
 ,"S    S    S-E  L    L  "]
i_category_table gm_set ==
 ["S    L    E-L  E    L  "
 ,"L    S-E  E    S    L  "
 ,"S    S-E  S    L    S-E"
 ,"S    L    L    S    L  "
 ,"S    S-E  E-L  S    L  "
 ,"S    S-E  E    E    L  "
 ,"S-E  S    L    E    L  "
 ,"S    S    E-L  L    L  "]

polansky_1984_r :: [Rational] Source

Rational tuning derived from gm_averages, p.11.

polansky_1984_r == sort polansky_1984_r
polansky_1984_r == [1/1,8/7,21/16,512/343,12/7,96/49]
import Music.Theory.List
d_dx polansky_1984_r == [1/7,19/112,989/5488,76/343,12/49]

polansky_1984_c :: [Cents] Source

ratio_to_cents of polansky_1984_r.

import Music.Theory.List
map round (d_dx polansky_1984_c) == [231,240,223,240,231]