module Sound.SC3.Server.Command.Completion
(
d_recv'
, d_load'
, d_loadDir'
, b_alloc'
, b_allocRead'
, b_allocReadChannel'
, b_free'
, b_close'
, b_read'
, b_readChannel'
, b_write'
, b_zero'
) where
import Sound.OpenSoundControl
import Sound.SC3.Server.Enum
import Sound.SC3.Server.Synthdef
import Sound.SC3.Server.Synthdef.Type
encode_blob :: OSC o => o -> Datum
encode_blob = Blob . encodeOSC
d_recv' :: OSC o => o -> Synthdef -> Message
d_recv' osc d = message "/d_recv" [Blob (synthdefData d), encode_blob osc]
d_load' :: OSC o => o -> String -> Message
d_load' osc p = message "/d_load" [String p, encode_blob osc]
d_loadDir' :: OSC o => o -> String -> Message
d_loadDir' osc p = message "/d_loadDir" [String p, encode_blob osc]
b_alloc' :: OSC o => o -> Int -> Int -> Int -> Message
b_alloc' osc nid frames channels = message "/b_alloc" [Int nid, Int frames, Int channels, encode_blob osc]
b_allocRead' :: OSC o => o -> Int -> String -> Int -> Int -> Message
b_allocRead' osc nid p f n = message "/b_allocRead" [Int nid, String p, Int f, Int n, encode_blob osc]
b_allocReadChannel' :: OSC o => o -> Int -> String -> Int -> Int -> [Int] -> Message
b_allocReadChannel' osc nid p f n cs = message "/b_allocReadChannel" ([Int nid, String p, Int f, Int n] ++ map Int cs ++ [encode_blob osc])
b_free' :: OSC o => o -> Int -> Message
b_free' osc nid = message "/b_free" [Int nid, encode_blob osc]
b_close' :: OSC o => o -> Int -> Message
b_close' osc nid = message "/b_close" [Int nid, encode_blob osc]
b_read' :: OSC o => o -> Int -> String -> Int -> Int -> Int -> Bool -> Message
b_read' osc nid p f n f' z = message "/b_read" [Int nid, String p, Int f, Int n, Int f', Int (fromEnum z), encode_blob osc]
b_readChannel' :: OSC o => o -> Int -> String -> Int -> Int -> Int -> Bool -> [Int] -> Message
b_readChannel' osc nid p f n f' z cs = message "/b_readChannel" ([Int nid, String p, Int f, Int n, Int f', Int (fromEnum z)] ++ map Int cs ++ [encode_blob osc])
b_write' :: OSC o => o -> Int -> String -> SoundFileFormat -> SampleFormat -> Int -> Int -> Bool -> Message
b_write' osc nid p h t f s z = message "/b_write" [Int nid, String p, String (soundFileFormatString h), String (sampleFormatString t), Int f, Int s, Int (fromEnum z), encode_blob osc]
b_zero' :: OSC o => o -> Int -> Message
b_zero' osc nid = message "/b_zero" [Int nid, encode_blob osc]