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

Portabilitynon-portable (TF,GNTD)
Safe HaskellNone




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 In that case we could bypass the SuperCollider language and just use scsynth.


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 -> StringSource

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 "" $ 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.)