-- | Initialization and Reinitialization
module CsoundExpr.Opcodes.Control.Reinitn
    (tival,
     passign,
     pset,
     rireturn)
where



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



-- | * opcode : tival
--  
--  
-- * syntax : 
--  
--  >   ir tival
--  
--  
-- * description : 
--  
--  Puts the value of the instrument's internal tie-in flag into the
-- named i-rate variable.
--  
--  
-- * url : <http://www.csounds.com/manual/html/tival.html>
 
tival :: Irate
tival = opcode "tival" args
  where args = []


-- | * opcode : passign
--  
--  
-- * syntax : 
--  
--  >   ivar1,... passign [istart]
--  
--  
-- * description : 
--  
--  Assigns a range of p-fields to ivariables.
--  
--  
-- * url : <http://www.csounds.com/manual/html/passign.html>
 
passign :: [Irate] -> Irate
passign i0init = opcode "passign" args
  where args = map to i0init


-- | * opcode : pset
--  
--  
-- * syntax : 
--  
--  >   pset icon1 [, icon2] [...]
--  
--  
-- * description : 
--  
--  Defines and initializes numeric arrays at orchestra load time.
--  
--  
-- * url : <http://www.csounds.com/manual/html/pset.html>
 
pset :: Irate -> SignalOut
pset i0vals = outOpcode "pset" args
  where args = [to i0vals]


-- | * opcode : rireturn
--  
--  
-- * syntax : 
--  
--  >   rireturn
--  
--  
-- * description : 
--  
--  Terminates a reinit pass (i.e., no-op at standard i-time). This
-- statement, or an endin, will cause normal performance to be
-- resumed.
--  
--  
-- * url : <http://www.csounds.com/manual/html/rireturn.html>
 
rireturn :: SignalOut
rireturn = outOpcode "rireturn" args
  where args = []