-- | Signal Flow Graph Opcodes
module CsoundExpr.Opcodes.SignalFlowGraphOpcodes.SignalFlowGraphOpcodes
    (outleta,
     outletk,
     inleta,
     inletk,
     ftgenonce)
where



import CsoundExpr.Base.Types
import CsoundExpr.Base.MultiOut
import CsoundExpr.Base.SideEffect
import CsoundExpr.Base.UserDefined



-- | * opcode : outleta
--  
--  
-- * syntax : 
--  
--  >   outleta Sname, asignal
--  
--  
-- * description : 
--  
--  Sends an arate signal out from an instrument to a named port.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outleta.html>
 
outleta :: String -> Arate -> SignalOut
outleta s0name a1signal = outOpcode "outleta" args
  where args = [to s0name, to a1signal]


-- | * opcode : outletk
--  
--  
-- * syntax : 
--  
--  >   outletk Sname, ksignal
--  
--  
-- * description : 
--  
--  Sends a krate signal out from an instrument to a named port.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outletk.html>
 
outletk :: (K k0) => String -> k0 -> SignalOut
outletk s0name k1signal = outOpcode "outletk" args
  where args = [to s0name, to k1signal]


-- | * opcode : inleta
--  
--  
-- * syntax : 
--  
--  >   asignal inleta Sname
--  
--  
-- * description : 
--  
--  Receives an arate signal into an instrument through a named
-- port.
--  
--  
-- * url : <http://www.csounds.com/manual/html/inleta.html>
 
inleta :: String -> Arate
inleta s0name = opcode "inleta" args
  where args = [to s0name]


-- | * opcode : inletk
--  
--  
-- * syntax : 
--  
--  >   ksignal inletk Sname
--  
--  
-- * description : 
--  
--  Receives a krate signal into an instrument from a named port.
--  
--  
-- * url : <http://www.csounds.com/manual/html/inletk.html>
 
inletk :: String -> Krate
inletk s0name = opcode "inletk" args
  where args = [to s0name]


-- | * opcode : ftgenonce
--  
--  
-- * syntax : 
--  
--  >   ifno ftgenonce ip1dummy, ip2dummy, isize, igen, iarga, iargb,...
--  
--  
-- * description : 
--  
--  Generate a function table from within an instrument definition,
-- without duplication of data.
--  
--  
-- * url : <http://www.csounds.com/manual/html/ftgenonce.html>
 
ftgenonce :: Irate -> Irate -> Irate -> Irate -> [Irate] -> Irate
ftgenonce i0p1 i1p2 i2size i3gen i4vals = opcode "ftgenonce" args
  where args
          = [to i0p1, to i1p2, to i2size, to i3gen] ++ map to i4vals