hmt-0.15: Haskell Music Theory

Safe Haskell | Safe
Language | Haskell98

Music.Theory.Z12.Morris_1974

Description

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

Synopsis

- fromList :: MonadPlus m => [a] -> m a
- all_interval_m :: MonadPlus m => Int -> m [Int]
- all_interval :: Int -> [[Int]]

# Documentation

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

`msum` `.` `map` `return`.

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

all_interval_m :: MonadPlus m => Int -> m [Int] Source #

`MonadPlus` all-interval series.

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

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]]
    in all_interval 6 == r