gpcsets- Generalized Pitch Class Sets for Haskell.




This module produces simple representations of Pitch Class Sets suitable for use in Scalable Vector Graphics. By default it does not generate the files -- instead, it generates a printable string, which can be captured to standard output or directed to a file at your discretion.


Simple Usage

pcSvg :: PcSet a => a -> StringSource

The basic idea: generate SVG data for an input pitch class set.

pcSvgAx :: PcSet a => a -> (Int, Int) -> StringSource

Same as pcSvg, but includes an invertXY style axis.

Advanced Usage

pcSvg' :: PcSet a => Rendering -> a -> StringSource

Same as pcSvg but allows a custom Rendering.

pcSvgAx' :: PcSet a => Rendering -> a -> (Int, Int) -> StringSource

Same as pcSvgAx, but allows a custom Rendering.

Rendering Style

data Rendering Source

Stores the rendering information for the SVG file.




pxSize :: Int

sets the (square) image dimensions

lnColor :: String

line color for the main structures

psColor :: String

pitch class set color

csColor :: String

complementary set color

axColor :: String

axis color

relMain :: Float

proportion of main circle compared to image

relElem :: Float

proportion of elements compared to main circle

relAxis :: Float

proportion of axis (if any) compared to image

Default Rendering Values

stdRen :: RenderingSource

The Standard Rendering is a 500x500 image using black lines, with elements of the set in red, the complement in black, and any axis in blue. The pitch class set circle is 80% of the frame, each element is 10% of the main circle's size, and any axis is 95% frame size.