hmt-0.15: Haskell Music Theory

Safe Haskell | None
Language | Haskell98

Music.Theory.Z12.Rahn_1980

Description

John Rahn. Basic Atonal Theory. Longman, New York, 1980.

Synopsis

- rahn_cmp :: Ord a => [a] -> [a] -> Ordering
- rahn_prime :: [Z12] -> [Z12]

# Documentation

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

Rahn prime form (comparison is rightmost inwards).

    rahn_cmp [0,1,3,6,8,9] [0,2,3,6,7,9] == GT

rahn_prime :: [Z12] -> [Z12] Source #

Rahn prime form, ie. `ti_cmp_prime` of `rahn_cmp`.

    rahn_prime [0,1,3,6,8,9] == [0,2,3,6,7,9]

    import Music.Theory.Z12.Forte_1973

    let s = [[0,1,3,7,8]
            ,[0,1,3,6,8,9],[0,1,3,5,8,9]
            ,[0,1,2,4,7,8,9]
            ,[0,1,2,4,5,7,9,10]]
    in all (\p -> forte_prime p /= rahn_prime p) s == True