-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Implementation of SuperCollider server specifications
--   
--   An interface-agnostic implementation of specs for SuperCollider server
--   types and commands. - Server Command Reference - Synth Definition File
--   Format
--   
--   Note this is an in-progress (incomplete) implementation. Currently
--   only the server commands needed for the "vivid" package are supported.
@package vivid-supercollider
@version 0.3.0.0

module Vivid.SC.Server.Types
newtype NodeId
NodeId :: Int32 -> NodeId
[_unNodeId] :: NodeId -> Int32
newtype BufferId
BufferId :: Int32 -> BufferId
[_unBufferId] :: BufferId -> Int32
newtype SyncId
SyncId :: Int32 -> SyncId
[_unSyncId] :: SyncId -> Int32
newtype Group
Group :: NodeId -> Group
[_unGroup] :: Group -> NodeId
newtype ParGroup
ParGroup :: NodeId -> ParGroup
[_unParGroup] :: ParGroup -> NodeId
instance GHC.Classes.Ord Vivid.SC.Server.Types.ParGroup
instance GHC.Classes.Eq Vivid.SC.Server.Types.ParGroup
instance GHC.Read.Read Vivid.SC.Server.Types.ParGroup
instance GHC.Show.Show Vivid.SC.Server.Types.ParGroup
instance GHC.Classes.Ord Vivid.SC.Server.Types.Group
instance GHC.Classes.Eq Vivid.SC.Server.Types.Group
instance GHC.Read.Read Vivid.SC.Server.Types.Group
instance GHC.Show.Show Vivid.SC.Server.Types.Group
instance GHC.Classes.Ord Vivid.SC.Server.Types.SyncId
instance GHC.Classes.Eq Vivid.SC.Server.Types.SyncId
instance GHC.Read.Read Vivid.SC.Server.Types.SyncId
instance GHC.Show.Show Vivid.SC.Server.Types.SyncId
instance GHC.Read.Read Vivid.SC.Server.Types.BufferId
instance GHC.Classes.Ord Vivid.SC.Server.Types.BufferId
instance GHC.Classes.Eq Vivid.SC.Server.Types.BufferId
instance GHC.Show.Show Vivid.SC.Server.Types.BufferId
instance GHC.Read.Read Vivid.SC.Server.Types.NodeId
instance GHC.Classes.Ord Vivid.SC.Server.Types.NodeId
instance GHC.Classes.Eq Vivid.SC.Server.Types.NodeId
instance GHC.Show.Show Vivid.SC.Server.Types.NodeId

module Vivid.SC.SynthDef.Types

-- | Binary signal operations. For the simple ones (like <a>Add</a>,
--   <a>Mul</a>, etc.), there are functions (like <a>~+</a>, <a>~*</a>,
--   etc.) that wrap them up so you don't have to make a ugen for them
--   yourself.
--   
--   In the future these may not be exported -- we'll just have functions
--   for all of them.
data BinaryOp
Add :: BinaryOp
Sub :: BinaryOp
Mul :: BinaryOp

-- | Integer division
IDiv :: BinaryOp

-- | Float division
FDiv :: BinaryOp
Mod :: BinaryOp
Eq :: BinaryOp
Ne :: BinaryOp
Lt :: BinaryOp
Gt :: BinaryOp
Le :: BinaryOp
Ge :: BinaryOp
Min :: BinaryOp
Max :: BinaryOp
BitAnd :: BinaryOp
BitOr :: BinaryOp
BitXor :: BinaryOp
Lcm :: BinaryOp
Gcd :: BinaryOp
Round :: BinaryOp
RoundUp :: BinaryOp
Trunc :: BinaryOp
Atan2 :: BinaryOp
Hypot :: BinaryOp
Hypotx :: BinaryOp
Pow :: BinaryOp
ShiftLeft :: BinaryOp
ShiftRight :: BinaryOp
UnsignedShift :: BinaryOp
Fill :: BinaryOp

-- | a * (b + 1) == a * b + a
Ring1 :: BinaryOp

-- | a * b + a + b
Ring2 :: BinaryOp

-- | a * a * b
Ring3 :: BinaryOp

-- | a * a * b - a * b * b
Ring4 :: BinaryOp

-- | a * a - b * b
DifSqr :: BinaryOp

-- | a * a + b * b
SumSqr :: BinaryOp

-- | (a + b) ^ 2
SqrSum :: BinaryOp

-- | (a - b) ^ 2
SqrDif :: BinaryOp

-- | abs(a - b)
AbsDif :: BinaryOp
Thresh :: BinaryOp
AMClip :: BinaryOp
ScaleNeg :: BinaryOp
Clip2 :: BinaryOp
Excess :: BinaryOp
Fold2 :: BinaryOp
Wrap2 :: BinaryOp
FirstArg :: BinaryOp
RandRange :: BinaryOp
ExpRandRange :: BinaryOp
NumBinarySelectors :: BinaryOp

-- | The rate that a UGen computes at
data CalculationRate

-- | constant value
IR :: CalculationRate

-- | control rate
KR :: CalculationRate

-- | audio rate
AR :: CalculationRate

-- | demand rate
DR :: CalculationRate

-- | Unary signal operations. Many of these have functions so you don't
--   need to use this internal representation (e.g. <a>Neg</a> has
--   <tt>neg</tt>, etc).
--   
--   This type might not be exposed in the future.
data UnaryOp
Neg :: UnaryOp
Not :: UnaryOp
IsNil :: UnaryOp
NotNil :: UnaryOp

-- | There's a bug in some SC versions where .bitNot isn't implemented
--   correctly. Vivid backfills it with a fix, so you can use BitNot with
--   any SC version
BitNot :: UnaryOp
Abs :: UnaryOp
AsFloat :: UnaryOp
AsInt :: UnaryOp
Ciel :: UnaryOp
Floor :: UnaryOp
Frac :: UnaryOp
Sign :: UnaryOp
Squared :: UnaryOp
Cubed :: UnaryOp
Sqrt :: UnaryOp
Exp :: UnaryOp
Recip :: UnaryOp
MIDICPS :: UnaryOp
CPSMIDI :: UnaryOp
MIDIRatio :: UnaryOp
RatioMIDI :: UnaryOp
DbAmp :: UnaryOp
AmpDb :: UnaryOp
OctCPS :: UnaryOp
CPSOct :: UnaryOp
Log :: UnaryOp
Log2 :: UnaryOp
Log10 :: UnaryOp
Sin :: UnaryOp
Cos :: UnaryOp
Tan :: UnaryOp
ArcSin :: UnaryOp
ArcCos :: UnaryOp
ArcTan :: UnaryOp
SinH :: UnaryOp
CosH :: UnaryOp
TanH :: UnaryOp
Rand :: UnaryOp
Rand2 :: UnaryOp
LinRand :: UnaryOp
BiLinRand :: UnaryOp
Sum3Rand :: UnaryOp
Distort :: UnaryOp
SoftClip :: UnaryOp
Coin :: UnaryOp
DigitValue :: UnaryOp
Silence :: UnaryOp
Thru :: UnaryOp
RectWindow :: UnaryOp
HanWindow :: UnaryOp
WelchWindow :: UnaryOp
TriWindow :: UnaryOp
Ramp :: UnaryOp
SCurve :: UnaryOp
NumUnarySelectors :: UnaryOp
instance GHC.Enum.Enum Vivid.SC.SynthDef.Types.UnaryOp
instance GHC.Classes.Ord Vivid.SC.SynthDef.Types.UnaryOp
instance GHC.Classes.Eq Vivid.SC.SynthDef.Types.UnaryOp
instance GHC.Show.Show Vivid.SC.SynthDef.Types.UnaryOp
instance GHC.Enum.Enum Vivid.SC.SynthDef.Types.BinaryOp
instance GHC.Classes.Ord Vivid.SC.SynthDef.Types.BinaryOp
instance GHC.Classes.Eq Vivid.SC.SynthDef.Types.BinaryOp
instance GHC.Show.Show Vivid.SC.SynthDef.Types.BinaryOp
instance GHC.Classes.Ord Vivid.SC.SynthDef.Types.CalculationRate
instance GHC.Enum.Enum Vivid.SC.SynthDef.Types.CalculationRate
instance GHC.Classes.Eq Vivid.SC.SynthDef.Types.CalculationRate
instance GHC.Read.Read Vivid.SC.SynthDef.Types.CalculationRate
instance GHC.Show.Show Vivid.SC.SynthDef.Types.CalculationRate


-- | <b>You probably don't need to use this directly</b> -- use
--   <a>Vivid.SynthDef</a> instead
--   
--   This is a representation of how SynthDefs are sent over the wire, as
--   described in the <a>Synth Definition File Format</a> helpfile.
module Vivid.SC.SynthDef.Literally
data LiteralSynthDef
LiteralSynthDef :: ByteString -> [Float] -> [Float] -> [ParamName] -> [UGenSpec] -> [VariantSpec] -> LiteralSynthDef
[_synthDefName] :: LiteralSynthDef -> ByteString
[_synthDefConstants] :: LiteralSynthDef -> [Float]
[_synthDefParameters] :: LiteralSynthDef -> [Float]
[_synthDefParamNames] :: LiteralSynthDef -> [ParamName]
[_synthDefUGens] :: LiteralSynthDef -> [UGenSpec]
[_synthDefVariants] :: LiteralSynthDef -> [VariantSpec]
encodeSynthDefFile :: SynthDefFile -> ByteString
decodeSynthDefFile :: ByteString -> Either String SynthDefFile
encodeLiteralSynthDef :: LiteralSynthDef -> ByteString
decodeLiteralSynthDef :: ByteString -> (LiteralSynthDef, ByteString)
getLiteralSynthDef' :: Get LiteralSynthDef
putLiteralSynthDef' :: LiteralSynthDef -> Put
data UGenSpec
UGenSpec :: ByteString -> CalculationRate -> [InputSpec] -> [OutputSpec] -> Int16 -> UGenSpec
[_uGenSpec_name] :: UGenSpec -> ByteString
[_uGenSpec_calcRate] :: UGenSpec -> CalculationRate
[_uGenSpec_inputs] :: UGenSpec -> [InputSpec]
[_uGenSpec_outputs] :: UGenSpec -> [OutputSpec]
[_uGenSpec_specialIndex] :: UGenSpec -> Int16

-- | These record fields are deprecated as it's a variant -- don't use!
data InputSpec
InputSpec_UGen :: Int32 -> Int32 -> InputSpec
[_inputSpec_uGen_index] :: InputSpec -> Int32
[_inputSpec_uGen_outputIndex] :: InputSpec -> Int32
InputSpec_Constant :: Int32 -> InputSpec
[_inputSpec_constant_index] :: InputSpec -> Int32
data ParamName
ParamName :: ByteString -> Int32 -> ParamName
[_paramName_name] :: ParamName -> ByteString
[_paramName_indexInParamArray] :: ParamName -> Int32
data SynthDefFile
SynthDefFile :: [LiteralSynthDef] -> SynthDefFile
data OutputSpec
OutputSpec :: CalculationRate -> OutputSpec
[_outputSpec_calcRate] :: OutputSpec -> CalculationRate
data VariantSpec
VariantSpec :: ByteString -> [Float] -> VariantSpec
[_variantSpec_name] :: VariantSpec -> ByteString
[_variantSpec_initialParamVals] :: VariantSpec -> [Float]
uOpToSpecialI :: UnaryOp -> Int16
biOpToSpecialI :: BinaryOp -> Int16
specialIToUOp :: Int16 -> UnaryOp
specialIToBiOp :: Int16 -> BinaryOp
sdLitPretty :: LiteralSynthDef -> String
putPString' :: ByteString -> Put

-- | A "pascal format string"
getPString' :: Get ByteString
encodePString :: ByteString -> ByteString
getPString :: ByteString -> (ByteString, ByteString)
getParamName :: ByteString -> (ParamName, ByteString)
getParamName' :: Get ParamName
putParamName' :: ParamName -> Put
encodeParamName :: ParamName -> ByteString
getInputSpec' :: Get InputSpec
putInputSpec' :: InputSpec -> Put
getInputSpec :: ByteString -> (InputSpec, ByteString)
encodeInputSpec :: InputSpec -> ByteString
getOutputSpec' :: Get OutputSpec
putOutputSpec' :: OutputSpec -> Put
getOutputSpec :: ByteString -> (OutputSpec, ByteString)
encodeOutputSpec :: OutputSpec -> ByteString
getCalcRate' :: Get CalculationRate
putCalcRate' :: CalculationRate -> Put
getUGenSpec :: ByteString -> (UGenSpec, ByteString)
getUGenSpec' :: Get UGenSpec
encodeUGenSpec :: UGenSpec -> ByteString
putUGenSpec' :: UGenSpec -> Put
getVariantSpec :: Int32 -> ByteString -> (VariantSpec, ByteString)
getVariantSpec' :: Int32 -> Get VariantSpec
putVariantSpec' :: VariantSpec -> Put
encodeVariantSpec :: VariantSpec -> ByteString
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.SynthDefFile
instance GHC.Classes.Eq Vivid.SC.SynthDef.Literally.LiteralSynthDef
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.LiteralSynthDef
instance GHC.Classes.Eq Vivid.SC.SynthDef.Literally.VariantSpec
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.VariantSpec
instance GHC.Classes.Eq Vivid.SC.SynthDef.Literally.UGenSpec
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.UGenSpec
instance GHC.Classes.Eq Vivid.SC.SynthDef.Literally.OutputSpec
instance GHC.Read.Read Vivid.SC.SynthDef.Literally.OutputSpec
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.OutputSpec
instance GHC.Classes.Eq Vivid.SC.SynthDef.Literally.InputSpec
instance GHC.Read.Read Vivid.SC.SynthDef.Literally.InputSpec
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.InputSpec
instance GHC.Classes.Eq Vivid.SC.SynthDef.Literally.ParamName
instance GHC.Show.Show Vivid.SC.SynthDef.Literally.ParamName

module Vivid.SC.Server.Commands
quit :: OSC
dumpOSC :: DumpOSCMode -> OSC
data DumpOSCMode
DumpOSC_Off :: DumpOSCMode
DumpOSC_Parsed :: DumpOSCMode
DumpOSC_Hex :: DumpOSCMode
DumpOSC_ParsedAndHex :: DumpOSCMode
sync :: SyncId -> OSC
clearSched :: OSC

-- | Send Synth Definitions to the server.
--   
--   The second argument is an optional message to execute on completion.
d_recv :: [LiteralSynthDef] -> Maybe OSC -> OSC
d_load :: FilePath -> Maybe OSC -> OSC
d_loadDir :: FilePath -> Maybe OSC -> OSC
n_free :: NodeId -> OSC
n_run :: NodeId -> Bool -> OSC
n_set :: NodeId -> [(String, Either Int32 Float)] -> OSC
addActionInt :: Integral i => AddAction -> i
data AddAction
AddToHead :: AddAction
AddToTail :: AddAction
AddBefore :: AddAction
AddAfter :: AddAction
ReplaceNode :: AddAction
s_new :: ByteString -> NodeId -> AddAction -> NodeId -> [(ByteString, Either Int32 Float)] -> OSC
g_new :: NodeId -> AddAction -> NodeId -> OSC
p_new :: NodeId -> AddAction -> NodeId -> OSC
g_freeAll :: [NodeId] -> OSC

-- | Second and third arguments are number of frames and number of
--   channels, respectively
b_alloc :: BufferId -> Int32 -> Int32 -> Maybe OSC -> OSC

-- | The first Int32 is the starting frame to read (often this is zero);
--   the second is an optional number of frames to read (<a>Nothing</a>
--   means the rest of the file is read)
b_allocRead :: BufferId -> FilePath -> Int32 -> Maybe Int32 -> Maybe OSC -> OSC
b_zero :: BufferId -> Maybe OSC -> OSC
b_free :: BufferId -> Maybe OSC -> OSC
b_close :: BufferId -> Maybe OSC -> OSC

-- | First String is header format (e.g. "wav"), second String is sample
--   format (e.g. "float"). The (Maybe Int32) is number of frames to write
--   (<a>Nothing</a> writes to the end of the buffer), the Int32 that
--   follows it is the start frame (which is often zero). The Bool is
--   whether to leave the file open.
--   
--   More details (e.g. the available header and sample formats) are
--   available in the SuperCollider docs.
b_write :: BufferId -> FilePath -> String -> String -> Maybe Int32 -> Int32 -> Bool -> Maybe OSC -> OSC
instance GHC.Show.Show Vivid.SC.Server.Commands.AddAction
instance GHC.Classes.Ord Vivid.SC.Server.Commands.AddAction
instance GHC.Classes.Eq Vivid.SC.Server.Commands.AddAction
instance GHC.Classes.Ord Vivid.SC.Server.Commands.DumpOSCMode
instance GHC.Read.Read Vivid.SC.Server.Commands.DumpOSCMode
instance GHC.Show.Show Vivid.SC.Server.Commands.DumpOSCMode
instance GHC.Classes.Eq Vivid.SC.Server.Commands.DumpOSCMode
