File: doc/examples/svgdemo2.lhs A demonstration of the PcSet to Svg capability. You can build the svg files in this directory using 'make svg'. Simplest case: a standard, well known pitch class set -- now featuring an inversion axis. > import qualified Data.PcSets as P > import qualified Data.PcSets.Svg as S The C Major Scale is a standard pitch class set: seven tones in 12-TET (modulus 12). If the C Major set is inverted about the axis containing pitch 2, the resulting set has the same elements. It's easier to see this with a diagram -- which is the purpose of this module! > cMajor :: P.StdSet > cMajor = P.stdset [0,2,4,5,7,9,11] The Data.PcSets.Svg module generates the *contents* of the .svg file as a string. It's up to you to print this string to stdout or save it as a file directly. Here I'm adding the 'invertXY 2 2' axis. This could also have been entered as (0,4), (4,0), (5,11), or any number of other specifications for pitches that exchange in the operation. > main :: IO () > main = putStrLn $ S.pcSvgAx cMajor (2,2) --- This file is part of gpcsets: Pitch Class Sets for Haskell Copyright 2009 by Bruce H. McCosar. Distributed under a BSD3 license; see the file 'LICENSE' for details.