-- | Operations Between a Vectorial and a Scalar Signal
module CsoundExpr.Opcodes.Vectorial.Vectorialscalar
    (vadd,
     vmult,
     vpow,
     vexp,
     vadd_i,
     vmult_i,
     vpow_i,
     vexp_i)
where



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



-- | * opcode : vadd
--  
--  
-- * syntax : 
--  
--  >   vadd ifn, kval, kelements [, kdstoffset] [, kverbose]
--  
--  
-- * description : 
--  
--  Adds a scalar value to a vector in a table.
--  
--  
-- * url : <http://www.csounds.com/manual/html/vadd.html>
 
vadd ::
       (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut
vadd k0init i1fn k2val k3elements = outOpcode "vadd" args
  where args = [to i1fn, to k2val, to k3elements] ++ map to k0init


-- | * opcode : vmult
--  
--  
-- * syntax : 
--  
--  >   vmult ifn, kval, kelements [, kdstoffset] [, kverbose]
--  
--  
-- * description : 
--  
--  Multiplies a vector in a table by a scalar value.
--  
--  
-- * url : <http://www.csounds.com/manual/html/vmult.html>
 
vmult ::
        (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut
vmult k0init i1fn k2val k3elements = outOpcode "vmult" args
  where args = [to i1fn, to k2val, to k3elements] ++ map to k0init


-- | * opcode : vpow
--  
--  
-- * syntax : 
--  
--  >   vpow ifn, kval, kelements [, kdstoffset] [, kverbose]
--  
--  
-- * description : 
--  
--  Raises each element of a vector to a scalar power
--  
--  
-- * url : <http://www.csounds.com/manual/html/vpow.html>
 
vpow ::
       (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut
vpow k0init i1fn k2val k3elements = outOpcode "vpow" args
  where args = [to i1fn, to k2val, to k3elements] ++ map to k0init


-- | * opcode : vexp
--  
--  
-- * syntax : 
--  
--  >   vexp ifn, kval, kelements [, kdstoffset] [, kverbose]
--  
--  
-- * description : 
--  
--  Performs power-of operations between a vector and a scalar
--  
--  
-- * url : <http://www.csounds.com/manual/html/vexp.html>
 
vexp ::
       (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut
vexp k0init i1fn k2val k3elements = outOpcode "vexp" args
  where args = [to i1fn, to k2val, to k3elements] ++ map to k0init


-- | * opcode : vadd_i
--  
--  
-- * syntax : 
--  
--  >   vadd_i ifn, ival, ielements [, idstoffset]
--  
--  
-- * description : 
--  
--  Adds a scalar value to a vector in a table.
--  
--  
-- * url : <http://www.csounds.com/manual/html/vadd_i.html>
 
vadd_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut
vadd_i i0init i1fn i2val i3elements = outOpcode "vadd_i" args
  where args = [to i1fn, to i2val, to i3elements] ++ map to i0init


-- | * opcode : vmult_i
--  
--  
-- * syntax : 
--  
--  >   vmult_i ifn, ival, ielements [, idstoffset]
--  
--  
-- * description : 
--  
--  Multiplies a vector in a table by a scalar value.
--  
--  
-- * url : <http://www.csounds.com/manual/html/vmult_i.html>
 
vmult_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut
vmult_i i0init i1fn i2val i3elements = outOpcode "vmult_i" args
  where args = [to i1fn, to i2val, to i3elements] ++ map to i0init


-- | * opcode : vpow_i
--  
--  
-- * syntax : 
--  
--  >   vpow_i ifn, ival, ielements [, idstoffset]
--  
--  
-- * description : 
--  
--  Raises each element of a vector to a scalar power
--  
--  
-- * url : <http://www.csounds.com/manual/html/vpow_i.html>
 
vpow_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut
vpow_i i0init i1fn i2val i3elements = outOpcode "vpow_i" args
  where args = [to i1fn, to i2val, to i3elements] ++ map to i0init


-- | * opcode : vexp_i
--  
--  
-- * syntax : 
--  
--  >   vexp_i ifn, ival, ielements[, idstoffset]
--  
--  
-- * description : 
--  
--  Performs power-of operations between a vector and a scalar
--  
--  
-- * url : <http://www.csounds.com/manual/html/vexp_i.html>
 
vexp_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut
vexp_i i0init i1fn i2val i3elements = outOpcode "vexp_i" args
  where args = [to i1fn, to i2val, to i3elements] ++ map to i0init