hmt-0.16: Haskell Music Theory

Safe HaskellSafe
LanguageHaskell98

Music.Theory.Z.Clough_1979

Contents

Description

John Clough. "Aspects of Diatonic Sets". _Journal of Music Theory_, 23(1):45--61, 1979.

Synopsis

Documentation

transpose_to_zero :: Num n => [n] -> [n] Source #

dpcset_to_chord :: Integral n => [n] -> [n] Source #

Diatonic pitch class (Z7) set to chord.

map dpcset_to_chord [[0,1],[0,2,4],[2,3,4,5,6]] == [[1,6],[2,2,3],[1,1,1,1,3]]

chord_to_dpcset :: Integral n => [n] -> [n] Source #

Inverse of dpcset_to_chord.

map chord_to_dpcset [[1,6],[2,2,3]] == [[0,1],[0,2,4]]

dpcset_complement :: Integral n => [n] -> [n] Source #

Complement, ie. in relation to z7_univ.

map dpcset_complement [[0,1],[0,2,4]] == [[2,3,4,5,6],[1,3,5,6]]

is_ic :: Integral n => n -> Bool Source #

Interval class predicate (ie. is_z4).

i_to_ic :: Integral n => n -> n Source #

Interval to interval class.

map i_to_ic [0..7] == [0,1,2,3,3,2,1,0]

is_chord :: Integral n => [n] -> Bool Source #

Is chord, ie. is sum 7.

is_chord [2,2,3]

iv :: Integral n => [n] -> [n] Source #

Interval vector.

iv [2,2,3] == [0,2,1]

inf_cmp :: Ord a => [a] -> [a] -> Ordering Source #

Comparison function for inv.

inf :: Integral n => [n] -> [n] Source #

Interval normal form.

map inf [[2,2,3],[1,2,4],[2,1,4]] == [[2,2,3],[1,2,4],[2,1,4]]

invert :: [n] -> [n] Source #

Inverse of chord (retrograde).

let p = [1,2,4] in (inf p,invert p,inf (invert p)) == ([1,2,4],[4,2,1],[2,1,4])

complement :: Integral n => [n] -> [n] Source #

Complement of chord.

let r = [[1,1,1,1,3],[1,1,1,2,2],[1,1,2,1,2],[1,1,1,4],[2,1,1,3],[1,2,1,3],[1,2,2,2]]
in map complement [[1,6],[2,5],[3,4],[1,1,5],[1,2,4],[1,3,3],[2,2,3]] == r

iseq :: Integral n => [n] -> [n] Source #

Z7 pitch sequence to Z7 interval sequence, ie. mod7 of d_dx.

map iseq (permutations [0,1,2]) == [[1,1],[6,2],[6,6],[1,5],[5,1],[2,6]]
map iseq (permutations [0,1,3]) == [[1,2],[6,3],[5,6],[2,4],[4,1],[3,5]]
map iseq (permutations [0,2,3]) == [[2,1],[5,3],[6,5],[1,4],[4,2],[3,6]]
map iseq (permutations [0,1,4]) == [[1,3],[6,4],[4,6],[3,3],[3,1],[4,4]]
map iseq (permutations [0,2,4]) == [[2,2],[5,4],[5,5],[2,3],[3,2],[4,5]]

Z

is_z_n :: Integral n => n -> n -> Bool Source #

is_z4 :: Integral n => n -> Bool Source #

z_n_univ :: Integral n => n -> [n] Source #

z7_univ :: Integral n => [n] Source #

is_z7 :: Integral n => n -> Bool Source #

mod7 :: Integral n => n -> n Source #