module Music.Theory.Tuning.Polansky_1978 where
import Data.List
import qualified Music.Theory.Tuning as T
import qualified Music.Theory.Tuning.Type as T
psaltery_r :: [Rational]
psaltery_r :: [Rational]
psaltery_r =
let sq_at :: b -> [b]
sq_at b
n = forall a b. (a -> b) -> [a] -> [b]
map (forall a. Num a => a -> a -> a
* b
n) [b
1..b
17]
in forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat [forall {b}. (Num b, Enum b) => b -> [b]
sq_at Rational
1,forall {b}. (Num b, Enum b) => b -> [b]
sq_at (Rational
5forall a. Fractional a => a -> a -> a
/Rational
4),forall {b}. (Num b, Enum b) => b -> [b]
sq_at (Rational
3forall a. Fractional a => a -> a -> a
/Rational
2)]
psaltery_o_r :: [Rational]
psaltery_o_r :: [Rational]
psaltery_o_r = forall a. Eq a => [a] -> [a]
nub (forall a. Ord a => [a] -> [a]
sort (forall a b. (a -> b) -> [a] -> [b]
map forall n. (Ord n, Fractional n) => n -> n
T.fold_ratio_to_octave_err [Rational]
psaltery_r))
psaltery_o :: T.Tuning
psaltery_o :: Tuning
psaltery_o = Either [Rational] [Cents]
-> Maybe (Either Rational Cents) -> Tuning
T.Tuning (forall a b. a -> Either a b
Left [Rational]
psaltery_o_r) forall a. Maybe a
Nothing