Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Non-realtime score generation.
Synopsis
- oscWithSize :: Bundle -> ByteString
- newtype Nrt = Nrt {
- nrt_bundles :: [Bundle]
- nrt_span :: (Time -> Bool) -> Nrt -> ([Bundle], [Bundle])
- encodeNrt :: Nrt -> ByteString
- writeNrt :: FilePath -> Nrt -> IO ()
- putNrt :: Handle -> Nrt -> IO ()
- decode_nrt_bundles :: ByteString -> [Bundle]
- decodeNrt :: ByteString -> Nrt
- readNrt :: FilePath -> IO Nrt
- nrt_non_ascending :: Nrt -> [(Bundle, Bundle)]
Documentation
oscWithSize :: Bundle -> ByteString Source #
Encode Bundle and prefix with encoded length.
Nrt | |
|
nrt_span :: (Time -> Bool) -> Nrt -> ([Bundle], [Bundle]) Source #
span
of f
of bundleTime
.
Can be used to separate the initialisation and remainder parts of a score.
writeNrt :: FilePath -> Nrt -> IO () Source #
Write an Nrt
score.
import Sound.Osc import Sound.Sc3 m1 = g_new [(1, AddToTail, 0)] m2 = d_recv (synthdef "sin" (out 0 (sinOsc ar 660 0 * 0.15))) m3 = s_new "sin" 100 AddToTail 1 [] m4 = n_free [100] m5 = nrt_end sc = Nrt [bundle 0 [m1,m2],bundle 1 [m3],bundle 10 [m4],bundle 15 [m5]] writeNrt "/tmp/t.osc" sc
decode_nrt_bundles :: ByteString -> [Bundle] Source #
Decode an Nrt
ByteString
to a list of Bundle
s.
decodeNrt :: ByteString -> Nrt Source #
Decode an Nrt
ByteString
.