hmt-0.15: Haskell Music Theory

Safe Haskell | None
Language | Haskell98

Music.Theory.Z12.Read_1978

Description

Ronald C. Read. "Every one a winner or how to avoid isomorphism search when cataloguing combinatorial configurations." /Annals of Discrete Mathematics/ 2:107–20, 1978.

Synopsis

- type Code = Code
- encode :: [Z12] -> Code
- decode :: Code -> [Z12]
- encode_prime :: [Z12] -> [Z12]

# Documentation

type Code = Code Source #

encode :: [Z12] -> Code Source #

Encoder for `encode_prime`.

    encode [0,1,3,6,8,9] == 843

decode :: Code -> [Z12] Source #

Decoder for `encode_prime`.

    decode 843 == [0,1,3,6,8,9]

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

Binary encoding prime form algorithm, equalivalent to Rahn.

    encode_prime [0,1,3,6,8,9] == [0,2,3,6,7,9]
    Music.Theory.Z12.Rahn_1980.rahn_prime [0,1,3,6,8,9] == [0,2,3,6,7,9]