Music.Theory.Z.TTO

Synopsis

# Documentation

data TTO t Source #

Twelve-tone operator, of the form TMI.

Constructors

 TTO Fieldstto_T :: t tto_M :: Bool tto_I :: Bool

Instances

 Eq t => Eq (TTO t) Source # Methods(==) :: TTO t -> TTO t -> Bool #(/=) :: TTO t -> TTO t -> Bool # Show t => Show (TTO t) Source # MethodsshowsPrec :: Int -> TTO t -> ShowS #show :: TTO t -> String #showList :: [TTO t] -> ShowS #

tto_pp :: Show t => TTO t -> String Source #

Pretty printer.

tto_parse :: Integral i => String -> TTO i Source #

Parser, transposition must be decimal.

map (tto_pp . tto_parse) (words "T5 T3I T11M T9MI")

z_tto_univ :: Integral t => Z t -> [TTO t] Source #

The set of all TTO, given Z function.

length (z_tto_univ mod12) == 48
map tto_pp (z_tto_univ mod12)

z_tto_f :: Integral t => t -> Z t -> TTO t -> t -> t Source #

M is ordinarily 5, but can be specified here.

map (z_tto_f 5 mod12 (tto_parse "T1M")) [0,1,2,3] == [1,6,11,4]

z_tto_apply :: Integral t => t -> Z t -> TTO t -> [t] -> [t] Source #

sort of map z_tto_f.

z_tto_apply 5 mod12 (tto_parse "T1M") [0,1,2,3] == [1,4,6,11]

tto_apply :: Integral t => t -> TTO t -> [t] -> [t] Source #

z_tto_rel :: (Ord t, Integral t) => t -> Z t -> [t] -> [t] -> [TTO t] Source #

Find TTO that that map x to y given m and z.

map tto_pp (z_tto_rel 5 mod12 [0,1,2,3] [6,4,1,11]) == ["T1M","T4MI"]

z_pcset :: Ord t => Z t -> [t] -> [t] Source #

nub of sort of map z.

map (z_pcset mod12) [[0,6],[6,12],[12,18]] == replicate 3 [0,6]