-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Generalized Pitch Class Sets for Haskell.
--
-- An implementation of musical pitch class sets for Haskell. This
-- library is capable of handling standard 12-tone pitch class sets and
-- tone rows. However, it is also capable of handling GENERAL pitch class
-- sets, which may come from alternative equal temperament systems.
@package gpcsets
@version 0.9.0.0
module Data.PcSets.Svg
test :: Int
module Data.PcSets.Notes
test :: Int
module Data.PcSets.Compact
test :: Int
module Data.PcSets.Catalog
test :: Int
-- | The basic module for working with Pitch Class Sets of all kinds,
-- including Tone Rows. The broadest datatypes (GenSet and
-- GenRow) can model any equal temperament system; the standard
-- datatypes (StdSet and StdRow) model 12 Tone Equal
-- Temperament (12-TET).
module Data.PcSets
-- | The broadest class of Pitch Class Set. All members of this class have
-- a modulus which restricts their elements in some way.
-- They also have pMap, a method for lifting integer list
-- functions to act on set elements. The modulus corresponds to
-- the underlying system of equivalent pitch classes, for example, 12-TET
-- = modulus 12.
class PcSet a
modulus :: (PcSet a) => a -> Int
elements :: (PcSet a) => a -> [Int]
pMap :: (PcSet a) => ([Int] -> [Int]) -> a -> a
-- | Selective Pitch Class Sets can have elements in a range of
-- values permitted by their modulus. They can have as few as 0
-- (the empty set) or as many as all. The set complement operation
-- only makes sense for Selective sets.
class (PcSet a) => Selective a
complement :: (Selective a) => a -> a
-- | Inclusive Pitch Class Sets, or Tone Rows, have all the possible
-- elements permitted by their modulus. The most important
-- characteristic of a Tone Row is not its elements, but the
-- ordering of its elements.
class (PcSet a) => Inclusive a
reconcile :: (Inclusive a) => Int -> a -> a
-- | General Pitch Class Set. This represents a Pitch Class Set that can
-- have a modulus of any positive integer value, representing the
-- number of equivalent pitch classes in a given system; for example,
-- 19-TET would be a modulus 19 set. The members of a the set can be as
-- few as zero and as many as all possible values.
data GenSet
-- | Standard Pitch Class Set. This represents the traditional definition
-- of a pitch class set, based on 12-TET, with the pitch classes numbered
-- C = 0, C#/Db = 1, D = 2, and so on up to B = 11. This set can have
-- anywhere from zero to 12 members (the empty set vs. the chromatic
-- scale).
data StdSet
-- | General Tone Row. A Tone Row is a collection of all possible
-- Pitch Class Set elements within a given modulus. Since
-- it contains all elements, the significant information in this type of
-- set is the ordering of the elements. This set always has a
-- length equal to its modulus.
data GenRow
-- | Standard Tone Row. This is the traditional Tone Row, a collection of
-- all the elements [0..11], based on 12-TET. As with
-- GenRow, the most significant information in this type of set is
-- the ordering of the elements. Since this is always a complete set,
-- this set always has a length of 12.
data StdRow
-- | Constructor for General Pitch Class Sets. This constructor accepts any
-- Int value for modulus, and any [Int] values
-- for an input list. Zero modulus always returns an empty set; a
-- negative modulus is always taken as positive (since the number
-- represent the absolute size of the equivalence class).
genset :: Int -> [Int] -> GenSet
-- | Constructor for Standard Pitch Class Sets. This constructor accepts
-- any [Int] values for elements. The modulus is always
-- 12 (12-TET).
stdset :: [Int] -> StdSet
-- | Constructor for General Tone Rows. This constructor accepts any
-- Int value for modulus, and any [Int] values
-- for an input list. Zero modulus always returns an empty set; a
-- negative modulus is always taken as positive (see
-- GenSet). If the input list of elements is incomplete,
-- the remaining elements are filled in at the end, in order.
genrow :: Int -> [Int] -> GenRow
-- | Constructor for Standard Tone Rows. This constructor accepts any
-- [Int] values for an input list. The modulus is always
-- 12 (12-TET). If the input list of elements is incomplete, the
-- remaining elements are filled in at the end, in order.
stdrow :: [Int] -> StdRow
-- | Returns a new PcSet which is the original transposed by
-- n.
transpose :: (PcSet a) => Int -> a -> a
-- | Returns a new PcSet which is the standard inverse of the
-- original, that is, about an axis containing pitch class 0.
invert :: (PcSet a) => a -> a
-- | Inversion around an axis specified by pitch classes x and
-- y. This inverts the set in such a way that x becomes
-- y and y becomes x.
invertXY :: (PcSet a) => Int -> Int -> a -> a
-- | Returns a new PcSet in which the elements have been transposed
-- so that the first element is zero.
zero :: (PcSet a) => a -> a
-- | Returns a new PcSet with the elements of the original reversed.
retrograde :: (PcSet a) => a -> a
-- | Returns a new PcSet with the elements shifted n places
-- to the left.
rotate :: (PcSet a) => Int -> a -> a
-- | Returns a Selective PcSet in which the elements of the
-- original have been sorted in ascending order. (Note this is restricted
-- to Sets, as sorting a Tone Row produces only an ascending chromatic
-- scale.)
sort :: (PcSet a, Selective a) => a -> a
-- | Returns a Selective PcSet in which the elements of the
-- original have been put into normal form. This can be defined as
-- an ascending order in which the elements fit into the smallest overall
-- interval. In the event of a tie, the arrangement with the closest
-- leftward packing is chosen.
normal :: (PcSet a, Selective a) => a -> a
-- | Returns a Selective PcSet in which the elements of the
-- original have been put into reduced form. This can be thought
-- of as the normal form, transposed so that the first element
-- starts on zero.
reduced :: (PcSet a, Selective a) => a -> a
-- | Returns a Selective PcSet in which the elements of the
-- original have been put into prime form. A prime form is able to
-- generate all the members of its set family through the some
-- combination of the operations transpose, invert, and
-- simple permutation.
prime :: (PcSet a, Selective a) => a -> a
-- | Returns the number of elements in a Selective PcSet.
cardinality :: (PcSet a, Selective a) => a -> Int
-- | Binary Value. For a given Selective PcSet, this returns
-- a unique number relating to the elements of the set -- a
-- measure of the leftward packing of the sorted set (overall
-- closeness of each element to zero).
binaryValue :: (PcSet a, Selective a) => a -> Integer
-- | Ascending Vector. If the elements of a Selective PcSet
-- are taken to be in strictly ascending order, the ascending vector is
-- the interval difference between each element.
avec :: (PcSet a, Selective a) => a -> [Int]
-- | Common Tone Vector: finds the number of common tones for each possible
-- value of n in the operation transpose n .
-- invert. Returns a list where element 0 is the number of common
-- tones with n=0, element 1 is with n=1, and so on.
cvec :: (PcSet a, Selective a) => a -> [Int]
-- | Interval Vector. Each element of the interval vector represents the
-- number of intervals in the set for that particular interval class.
-- Element 0 measures the number of 1-interval leaps; element 1 measures
-- the number of 2-interval leaps, and so on, up to half of the modulus
-- m.
ivec :: (PcSet a, Selective a) => a -> [Int]
-- | Returns a new Tone Row in which the elements are Prograde (in
-- their original order) and transposed so that the first element is
-- n.
rowP :: (PcSet a, Inclusive a) => Int -> a -> a
-- | Returns a new Tone Row in which the elements are Retrograde
-- (reversed compared to their original order) and transposed so that the
-- first element is n.
rowR :: (PcSet a, Inclusive a) => Int -> a -> a
-- | Returns a new Tone Row in which the elements have been Inverted
-- (see invert) and transposed so that the first element is
-- n.
rowI :: (PcSet a, Inclusive a) => Int -> a -> a
-- | Returns a new Tone Row in which the elements are both
-- Retrograde and Inverted, and transposed so that the
-- first element is n.
rowRI :: (PcSet a, Inclusive a) => Int -> a -> a
instance Eq StdRow
instance Ord StdRow
instance Show StdRow
instance Eq GenRow
instance Ord GenRow
instance Show GenRow
instance Eq StdSet
instance Ord StdSet
instance Show StdSet
instance Eq GenSet
instance Ord GenSet
instance Show GenSet
instance Inclusive StdRow
instance PcSet StdRow
instance Inclusive GenRow
instance PcSet GenRow
instance Selective StdSet
instance PcSet StdSet
instance Selective GenSet
instance PcSet GenSet