Copyright | (c) Hans Hoglund 2012-2014 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | non-portable (TF,GNTD) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- data SuperCollider
- type HasSuperCollider a = (HasBackendNote SuperCollider (BackendScoreEvent SuperCollider a), HasBackendScore SuperCollider a)
- toSuperCollider :: HasSuperCollider a => a -> String
- writeSuperCollider :: HasSuperCollider a => FilePath -> a -> IO ()
- openSuperCollider :: HasSuperCollider a => a -> IO ()
SuperCollider patterns backend
data SuperCollider Source
A token to represent the SuperCollider 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.)