music-score-1.9.0: Musical score and part representation.

Copyright(c) Hans Hoglund 2012-2014
LicenseBSD-style
Maintainerhans@hanshoglund.se
Stabilityexperimental
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone
LanguageHaskell2010

Music.Score.Export.SuperCollider

Contents

Description

A backend to generate SuperCollider code.

This is a very simple thing that generates patterns (which are basically lazy event lists) in the SuperCollider language.

It would of course also be nice to have a backend based the Haskell bindings (see http://hackage.haskell.org/package/hsc3). In that case we could bypass the SuperCollider language and just use scsynth.

Synopsis

SuperCollider patterns backend

type HasSuperCollider a = (HasBackendNote SuperCollider (BackendScoreEvent SuperCollider a), HasBackendScore SuperCollider a) Source

Constraint for types that has a SuperCollider representation.

toSuperCollider :: HasSuperCollider a => a -> String Source

Convert music to a SuperCollider code string.

writeSuperCollider :: HasSuperCollider a => FilePath -> a -> IO () Source

Write music as a SuperCollider code string to the given path.

writeSuperCollider "test.sc" $ scat [c,d,e]

openSuperCollider :: HasSuperCollider a => a -> IO () Source

Write music as a SuperCollider code string and open it.

(This is simple wrapper around writeSuperCollider that may not work well on all platforms.)