hmt-0.20: Haskell Music Theory
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Z.Morris_1974

Description

Robert Morris and D. Starr. "The Structure of All-Interval Series". Journal of Music Theory, 18:364-389, 1974.

Synopsis

Documentation

fromList :: MonadPlus m => [a] -> m a Source #

msum . map return.

L.observeAll (fromList [1..7]) == [1..7]

int_n :: Integral a => a -> a -> a -> a Source #

Interval from i to j in modulo-n.

let f = int_n 12 in (f 0 11,f 11 0) == (11,1)

all_interval_m :: (MonadPlus m, MonadLogic m) => Int -> m [Int] Source #

MonadLogic all-interval series.

map (length . L.observeAll . all_interval_m) [4,6,8,10] == [2,4,24,288]
[0,1,3,2,9,5,10,4,7,11,8,6] `elem` L.observeAll (all_interval_m 12)
length (L.observeAll (all_interval_m 12)) == 3856

all_interval :: Int -> [[Int]] Source #

observeAll of all_interval_m.

let r = [[0,1,5,2,4,3],[0,2,1,4,5,3],[0,4,5,2,1,3],[0,5,1,4,2,3]]
all_interval 6 == r
d_dx_n n l = zipWith (int_n n) l (tail l)
map (d_dx_n 6) r == [[1,4,3,2,5],[2,5,3,1,4],[4,1,3,5,2],[5,2,3,4,1]]