Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
John Clough. "Aspects of Diatonic Sets". _Journal of Music Theory_, 23(1):45--61, 1979.
Synopsis
- transpose_to_zero :: Num n => [n] -> [n]
- dpcset_to_chord :: Integral n => [n] -> [n]
- chord_to_dpcset :: Integral n => [n] -> [n]
- dpcset_complement :: Integral n => [n] -> [n]
- is_ic :: Integral n => n -> Bool
- i_to_ic :: Integral n => n -> n
- is_chord :: Integral n => [n] -> Bool
- iv :: Integral n => [n] -> [n]
- inf_cmp :: Ord a => [a] -> [a] -> Ordering
- inf :: Integral n => [n] -> [n]
- invert :: [n] -> [n]
- complement :: Integral n => [n] -> [n]
- iseq :: Integral n => [n] -> [n]
- is_z_n :: Integral n => n -> n -> Bool
- z_n_univ :: Integral n => n -> [n]
- is_z4 :: Integral n => n -> Bool
- z7_univ :: Integral n => [n]
- is_z7 :: Integral n => n -> Bool
- mod7 :: Integral n => n -> n
Documentation
transpose_to_zero :: Num n => [n] -> [n] Source #
Shift sequence so the initial value is zero.
transpose_to_zero [1,2,5] == [0,1,4]
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
).
map is_ic [-1 .. 4] == [False,True,True,True,True,False]
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]
iv :: Integral n => [n] -> [n] Source #
Interval vector, given list of intervals.
iv [2,2,3] == [0,2,1]
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]]
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]]