hsc3-0.20: Haskell SuperCollider
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Sc3.Server.Nrt

Contents

Description

Non-realtime score generation.

Synopsis

Documentation

oscWithSize :: Bundle -> ByteString Source #

Encode Bundle and prefix with encoded length.

newtype Nrt Source #

An Nrt score is a sequence of Bundles.

Constructors

Nrt 

Fields

Instances

Instances details
Show Nrt Source # 
Instance details

Defined in Sound.Sc3.Server.Nrt

Methods

showsPrec :: Int -> Nrt -> ShowS #

show :: Nrt -> String #

showList :: [Nrt] -> ShowS #

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.

encodeNrt :: Nrt -> ByteString Source #

Encode an Nrt 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

putNrt :: Handle -> Nrt -> IO () Source #

Write an Nrt score to a file handle.

readNrt :: FilePath -> IO Nrt Source #

decodeNrt of readFile.

readNrt "/tmp/t.osc"

Query

nrt_non_ascending :: Nrt -> [(Bundle, Bundle)] Source #

Find any non-ascending sequences.