module Csound.Typed.Opcode.Vectorial (
    
    
    -- * Tables.
    vtaba, vtabi, vtabk, vtable1k, vtablea, vtablei, vtablek, vtablewa, vtablewi, vtablewk, vtabwa, vtabwi, vtabwk,
    
    -- * Scalar operations.
    vadd, vadd_i, vexp, vexp_i, vmult, vmult_i, vpow, vpow_i,
    
    -- * Vectorial operations.
    vaddv, vaddv_i, vcopy, vcopy_i, vdivv, vdivv_i, vexpv, vexpv_i, vmap, vmultv, vmultv_i, vpowv, vpowv_i, vsubv, vsubv_i,
    
    -- * Envelopes.
    vexpseg, vlinseg,
    
    -- * Limiting and Wrapping.
    vlimit, vmirror, vwrap,
    
    -- * Delay Paths.
    vdelayk, vecdelay, vport,
    
    -- * Random.
    vrandh, vrandi,
    
  * Cellular Automata .
    cell, vcella) where

import Control.Monad.Trans.Class
import Csound.Dynamic
import Csound.Typed

-- Tables.

-- | 
-- Read vectors (from tables -or arrays of vectors).
--
-- This opcode reads vectors from tables at a-rate.
--
  >   vtaba    andx , ifn ,  [ , aout2 , aout3 , .... , aoutN ]
--
-- csound doc: <>
vtaba ::  Sig -> Tab -> Sig -> SE ()
vtaba b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtaba" [(Xr,[Ar,Ir] ++ (repeat Ar))] [a1,a2,a3]

-- | 
-- Read vectors (from tables -or arrays of vectors).
--
-- This opcode reads vectors from tables.
--
  >   vtabi    indx , ifn , iout1 [ , iout2 , iout3 , .... , ioutN ]
--
-- csound doc: <>
vtabi ::  D -> Tab -> D -> SE ()
vtabi b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vtabi" [(Xr,(repeat Ir))] [a1,a2,a3]

-- | 
-- Read vectors (from tables -or arrays of vectors).
--
-- This opcode reads vectors from tables at k-rate.
--
        kndx , ifn , kout1 [ ,  , kout3 , .... ,  ]
--
-- csound doc: <>
vtabk ::  Sig -> Tab -> Sig -> SE ()
vtabk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtabk" [(Xr,[Kr,Ir] ++ (repeat Kr))] [a1,a2,a3]

-- | 
-- Read a vector (several scalars simultaneously) from a table.
--
-- This opcode reads vectors from tables at k-rate.
--
  >   vtable1k    kfn ,   ,  , kout3 , .... ,  ]
--
-- csound doc: <>
vtable1k ::  Tab -> Sig -> SE ()
vtable1k b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2
    where f a1 a2 = opcs "vtable1k" [(Xr,(repeat Kr))] [a1,a2]

-- | 
-- Read vectors (from tables -or arrays of vectors).
--
-- This opcode reads vectors from tables at a-rate.
--
  >   vtablea    andx , kfn , kinterp ,  ,  [ , aout2 , aout3 , .... , aoutN ]
--
-- csound doc: <>
vtablea ::  Sig -> Tab -> Sig -> D -> Sig -> SE ()
vtablea b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unD b4 <*> unSig b5
    where f a1 a2 a3 a4 a5 = opcs "vtablea" [(Xr,[Ar,Kr,Kr,Ir] ++ (repeat Ar))] [a1,a2,a3,a4,a5]

-- | 
-- Read vectors (from tables -or arrays of vectors).
--
-- This opcode reads vectors from tables.
--
  >   vtablei    indx , ifn , interp , ixmode , iout1 [ , iout2 , iout3 , .... , ioutN ]
--
-- csound doc: <>
vtablei ::  D -> Tab -> D -> D -> D -> SE ()
vtablei b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3 <*> unD b4 <*> unD b5
    where f a1 a2 a3 a4 a5 = opcs "vtablei" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]

-- | 
-- Read vectors (from tables -or arrays of vectors).
--
-- This opcode reads vectors from tables at k-rate.
--
  >   vtablek    kndx , kfn , kinterp , ixmode ,   ,  , kout3 , .... ,  ]
--
  csound doc : <  >
vtablek ::  Sig -> Tab -> Sig -> D -> Sig -> SE ()
vtablek b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unD b4 <*> unSig b5
    where f a1 a2 a3 a4 a5 = opcs "vtablek" [(Xr,[Kr,Kr,Kr,Ir] ++ (repeat Kr))] [a1,a2,a3,a4,a5]

-- | 
-- Write vectors (to tables -or arrays of vectors).
--
-- This opcode writes vectors to tables at a-rate.
--
  >   vtablewa    andx , kfn ,  ,  [ ,  ,  , .... , ainargN ]
--
-- csound doc: <>
vtablewa ::  Sig -> Tab -> D -> Sig -> SE ()
vtablewa b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unD b3 <*> unSig b4
    where f a1 a2 a3 a4 = opcs "vtablewa" [(Xr,[Ar,Kr,Ir] ++ (repeat Ar))] [a1,a2,a3,a4]

-- | 
-- Write vectors (to tables -or arrays of vectors).
--
-- This opcode writes vectors to tables at init time.
--
        indx , ifn ,  , inarg1 [ ,  ,  , .... , inargN ]
--
-- csound doc: <>
vtablewi ::  D -> Tab -> D -> D -> SE ()
vtablewi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vtablewi" [(Xr,(repeat Ir))] [a1,a2,a3,a4]

-- | 
-- Write vectors (to tables -or arrays of vectors).
--
-- This opcode writes vectors to tables at k-rate.
--
  >   vtablewk    kndx , kfn ,  ,  [ ,  , kinarg3 , .... , kinargN ]
--
-- csound doc: <>
vtablewk ::  Sig -> Tab -> D -> Sig -> SE ()
vtablewk b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unD b3 <*> unSig b4
    where f a1 a2 a3 a4 = opcs "vtablewk" [(Xr,[Kr,Kr,Ir] ++ (repeat Kr))] [a1,a2,a3,a4]

-- | 
-- Write vectors (to tables -or arrays of vectors).
--
-- This opcode writes vectors to tables at a-rate.
--
  >   vtabwa    andx , ifn ,  [ ,  ,  , .... , ainargN ]
--
-- csound doc: <>
vtabwa ::  Sig -> Tab -> Sig -> SE ()
vtabwa b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtabwa" [(Xr,[Ar,Ir] ++ (repeat Ar))] [a1,a2,a3]

-- | 
-- Write vectors (to tables -or arrays of vectors).
--
-- This opcode writes vectors to tables at init time.
--
  >   vtabwi    indx , ifn , inarg1 [ ,  ,  , .... , inargN ]
--
-- csound doc: <>
vtabwi ::  D -> Tab -> D -> SE ()
vtabwi b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vtabwi" [(Xr,(repeat Ir))] [a1,a2,a3]

-- | 
-- Write vectors (to tables -or arrays of vectors).
--
-- This opcode writes vectors to tables at k-rate.
--
  >   vtabwk    kndx , ifn ,  [ ,  , kinarg3 , .... , kinargN ]
--
-- csound doc: <>
vtabwk ::  Sig -> Tab -> Sig -> SE ()
vtabwk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtabwk" [(Xr,[Kr,Ir] ++ (repeat Kr))] [a1,a2,a3]

  Scalar operations .

-- | 
-- Adds a scalar value to a vector in a table.
--
  >   vadd    ifn , kval ,   , kdstoffset ] [ , kverbose ]
--
-- csound doc: <>
vadd ::  Tab -> Sig -> Sig -> SE ()
vadd b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vadd" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
-- Adds a scalar value to a vector in a table.
--
  >   vadd_i    ifn , ival , ielements [ ,  ]
--
-- csound doc: <>
vadd_i ::  Tab -> D -> D -> SE ()
vadd_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vadd_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
-- Performs power-of operations between a vector and a scalar
--
  >   vexp    ifn , kval ,   , kdstoffset ] [ , kverbose ]
--
-- csound doc: <>
vexp ::  Tab -> Sig -> Sig -> SE ()
vexp b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vexp" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
-- Performs power-of operations between a vector and a scalar
--
  >   vexp_i    ifn , ival , ielements [ ,  ]
--
-- csound doc: <>
vexp_i ::  Tab -> D -> D -> SE ()
vexp_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vexp_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Multiplies a vector in a table by a scalar value .
--
  >   vmult    ifn , kval ,   , kdstoffset ] [ , kverbose ]
--
-- csound doc: <>
vmult ::  Tab -> Sig -> Sig -> SE ()
vmult b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vmult" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Multiplies a vector in a table by a scalar value .
--
  >   vmult_i    ifn , ival , ielements [ ,  ]
--
-- csound doc: <>
vmult_i ::  Tab -> D -> D -> SE ()
vmult_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vmult_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
-- Raises each element of a vector to a scalar power.
--
  >   vpow    ifn , kval ,   , kdstoffset ] [ , kverbose ]
--
-- csound doc: <>
vpow ::  Tab -> Sig -> Sig -> SE ()
vpow b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vpow" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
-- Raises each element of a vector to a scalar power
--
  >   vpow_i    ifn , ival , ielements [ ,  ]
--
-- csound doc: <>
vpow_i ::  Tab -> D -> D -> SE ()
vpow_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vpow_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Vectorial operations .

-- | 
  Performs addition between two vectorial control signals .
--
  >   vaddv    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vaddv ::  Tab -> Tab -> Sig -> SE ()
vaddv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vaddv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Performs addition between two vectorial control signals at init time .
--
  >   vaddv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
--
-- csound doc: <>
vaddv_i ::  Tab -> Tab -> D -> SE ()
vaddv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vaddv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Copies between two vectorial control signals
--
  >   vcopy    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vcopy ::  Tab -> Tab -> Sig -> SE ()
vcopy b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vcopy" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Copies a vector from one table to another .
--
  >   vcopy_i    ifn1 , ifn2 , ielements [ , idstoffset , isrcoffset ]
--
-- csound doc: <>
vcopy_i ::  Tab -> Tab -> D -> SE ()
vcopy_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vcopy_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Performs division between two vectorial control signals
--
        ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vdivv ::  Tab -> Tab -> Sig -> SE ()
vdivv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vdivv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Performs division between two vectorial control signals at init time .
--
  >   vdivv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
--
-- csound doc: <>
vdivv_i ::  Tab -> Tab -> D -> SE ()
vdivv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vdivv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Performs exponential operations between two vectorial control signals
--
  >   vexpv    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vexpv ::  Tab -> Tab -> Sig -> SE ()
vexpv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vexpv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Performs exponential operations between two vectorial control signals at init time .
--
  >   vexpv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
--
-- csound doc: <>
vexpv_i ::  Tab -> Tab -> D -> SE ()
vexpv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vexpv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
-- Maps elements from a vector according to indexes contained in another vector.
--
-- Maps elements from a vector onto another according to the indexes of a this vector.
--
  >   vmap    ifn1 , ifn2 , ielements [ , idstoffset , isrcoffset ]
--
-- csound doc: <>
vmap ::  Tab -> Tab -> D -> SE ()
vmap b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vmap" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Performs mutiplication between two vectorial control signals
--
        ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vmultv ::  Tab -> Tab -> Sig -> SE ()
vmultv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vmultv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Performs mutiplication between two vectorial control signals at init time .
--
  >   vmultv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
--
-- csound doc: <>
vmultv_i ::  Tab -> Tab -> D -> SE ()
vmultv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vmultv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Performs power - of operations between two vectorial control signals
--
  >   vpowv   ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vpowv ::  Tab -> Tab -> Sig -> SE ()
vpowv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vpowv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Performs power - of operations between two vectorial control signals at init time .
--
  >   vpowv_i   ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
--
-- csound doc: <>
vpowv_i ::  Tab -> Tab -> D -> SE ()
vpowv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vpowv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Performs subtraction between two vectorial control signals
--
  >   vsubv    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
--
-- csound doc: <>
vsubv ::  Tab -> Tab -> Sig -> SE ()
vsubv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vsubv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

-- | 
  Performs subtraction between two vectorial control signals at init time .
--
  >   vsubv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
--
-- csound doc: <>
vsubv_i ::  Tab -> Tab -> D -> SE ()
vsubv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vsubv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

-- Envelopes.

-- | 
  Vectorial envelope generator
--
-- Generate exponential vectorial segments
--
  >   vexpseg    ifnout , ielements , ifn1 , idur1 , ifn2 [ , idur2 , ifn3 [ ... ] ]
--
-- csound doc: <>
vexpseg ::  Tab -> D -> Tab -> D -> Tab -> SE ()
vexpseg b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unTab b5
    where f a1 a2 a3 a4 a5 = opcs "vexpseg" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]

-- | 
  Vectorial envelope generator
--
-- Generate linear vectorial segments
--
  >   vlinseg     , ielements , ifn1 , idur1 , ifn2 [ , idur2 , ifn3 [ ... ] ]
--
-- csound doc: <>
vlinseg ::  Tab -> D -> Tab -> D -> Tab -> SE ()
vlinseg b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unTab b5
    where f a1 a2 a3 a4 a5 = opcs "vlinseg" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]

-- Limiting and Wrapping.

-- | 
-- Limiting and Wrapping Vectorial Signals
--
-- Limits elements of vectorial control signals.
--
  >   vlimit    ifn , kmin , kmax , ielements
--
-- csound doc: <>
vlimit ::  Tab -> Sig -> Sig -> D -> SE ()
vlimit b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vlimit" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]

-- | 
-- Limiting and Wrapping Vectorial Signals
--
-- 'Reflects' elements of vectorial control signals on thresholds.
--
  >   vmirror    ifn , kmin , kmax , ielements
--
-- csound doc: <>
vmirror ::  Tab -> Sig -> Sig -> D -> SE ()
vmirror b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vmirror" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]

-- | 
-- Limiting and Wrapping Vectorial Signals
--
-- Wraps elements of vectorial control signals.
--
  >   vwrap    ifn , kmin , kmax , ielements
--
-- csound doc: <>
vwrap ::  Tab -> Sig -> Sig -> D -> SE ()
vwrap b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vwrap" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]

-- Delay Paths.

-- | 
-- k-rate variable time delay.
--
-- Variable delay applied to a k-rate signal
--
  >       ksig , kdel , imaxdel [ , iskip , imode ]
--
-- csound doc: <>
vdelayk ::  Sig -> Sig -> D -> Sig
vdelayk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3
    where f a1 a2 a3 = opcs "vdelayk" [(Kr,[Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3]

-- | 
  Vectorial Control - rate Delay Paths
--
-- Generate a sort of 'vectorial' delay
--
  >   vecdelay    ifn , ifnIn , ifnDel , ielements , imaxdel [ , iskip ]
--
-- csound doc: <>
vecdelay ::  Tab -> Tab -> Tab -> D -> D -> SE ()
vecdelay b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unTab b3 <*> unD b4 <*> unD b5
    where f a1 a2 a3 a4 a5 = opcs "vecdelay" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]

-- | 
  Vectorial Control - rate Delay Paths
--
-- Generate a sort of 'vectorial' portamento
--
  >   vport   ifn ,  , ielements [ , ifnInit ]
--
-- csound doc: <>
vport ::  Tab -> Sig -> D -> SE ()
vport b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unD b3
    where f a1 a2 a3 = opcs "vport" [(Xr,[Ir,Kr,Ir,Ir])] [a1,a2,a3]

-- Random.

-- | 
-- Generates a vector of random numbers stored into a table, holding the values for a period of time.
--
-- Generates a vector of random numbers stored into a table, holding the values for a period of time. Generates a sort of 'vectorial band-limited noise'.
--
  >   vrandh    ifn ,   krange ,  , ielements [ ,  ] [ , iseed ] \
-- >           [, isize] [, ioffset]
--
-- csound doc: <>
vrandh ::  Tab -> Sig -> Sig -> D -> SE ()
vrandh b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vrandh" [(Xr,[Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]

-- | 
-- Generate a sort of 'vectorial band-limited noise'
--
  >   vrandi    ifn ,   krange ,  , ielements [ ,  ] [ , iseed ] \
-- >           [, isize] [, ioffset]
--
-- csound doc: <>
vrandi ::  Tab -> Sig -> Sig -> D -> SE ()
vrandi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vrandi" [(Xr,[Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]

  Cellular Automata .

-- | 
  Cellular Automaton
--
-- One-Dimensional Cellular Automaton. This opcode is the
           modified version of vcella by   .
--
  >   cell   ktrig , kreinit , ioutFunc , initStateFunc , iRuleFunc , ielements
--
-- csound doc: <>
cell ::  Sig -> Sig -> D -> D -> D -> D -> SE ()
cell b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6
    where f a1 a2 a3 a4 a5 a6 = opcs "cell" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]

-- | 
  Cellular Automata
--
  Unidimensional Cellular Automata applied to Csound vectors
--
  >   vcella   ktrig , kreinit , ioutFunc , initStateFunc , \
  >            iRuleFunc , ielements , irulelen [ , iradius ]
--
  csound doc : <  >
vcella ::  Sig -> Sig -> D -> D -> D -> D -> D -> SE ()
vcella b1 b2 b3 b4 b5 b6 b7 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7
    where f a1 a2 a3 a4 a5 a6 a7 = opcs "vcella" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1
                                                                                  ,a2
                                                                                  ,a3
                                                                                  ,a4
                                                                                  ,a5
                                                                                  ,a6
                                                                                  ,a7]
 * Tables.
 * Scalar operations.
 * Vectorial operations.
 * Envelopes.
 * Limiting and Wrapping.
 * Delay Paths.
 * Random.
 Tables.
 | 
 Read vectors (from tables -or arrays of vectors).

 This opcode reads vectors from tables at a-rate.


 csound doc: <>
 | 
 Read vectors (from tables -or arrays of vectors).

 This opcode reads vectors from tables.


 csound doc: <>
 | 
 Read vectors (from tables -or arrays of vectors).

 This opcode reads vectors from tables at k-rate.


 csound doc: <>
 | 
 Read a vector (several scalars simultaneously) from a table.

 This opcode reads vectors from tables at k-rate.


 csound doc: <>
 | 
 Read vectors (from tables -or arrays of vectors).

 This opcode reads vectors from tables at a-rate.


 csound doc: <>
 | 
 Read vectors (from tables -or arrays of vectors).

 This opcode reads vectors from tables.


 csound doc: <>
 | 
 Read vectors (from tables -or arrays of vectors).

 This opcode reads vectors from tables at k-rate.


 | 
 Write vectors (to tables -or arrays of vectors).

 This opcode writes vectors to tables at a-rate.


 csound doc: <>
 | 
 Write vectors (to tables -or arrays of vectors).

 This opcode writes vectors to tables at init time.


 csound doc: <>
 | 
 Write vectors (to tables -or arrays of vectors).

 This opcode writes vectors to tables at k-rate.


 csound doc: <>
 | 
 Write vectors (to tables -or arrays of vectors).

 This opcode writes vectors to tables at a-rate.


 csound doc: <>
 | 
 Write vectors (to tables -or arrays of vectors).

 This opcode writes vectors to tables at init time.


 csound doc: <>
 | 
 Write vectors (to tables -or arrays of vectors).

 This opcode writes vectors to tables at k-rate.


 csound doc: <>
 | 
 Adds a scalar value to a vector in a table.


 csound doc: <>
 | 
 Adds a scalar value to a vector in a table.


 csound doc: <>
 | 
 Performs power-of operations between a vector and a scalar


 csound doc: <>
 | 
 Performs power-of operations between a vector and a scalar


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 
 Raises each element of a vector to a scalar power.


 csound doc: <>
 | 
 Raises each element of a vector to a scalar power


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 
 Maps elements from a vector according to indexes contained in another vector.

 Maps elements from a vector onto another according to the indexes of a this vector.


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 | 


 csound doc: <>
 Envelopes.
 | 

 Generate exponential vectorial segments


 csound doc: <>
 | 

 Generate linear vectorial segments


 csound doc: <>
 Limiting and Wrapping.
 | 
 Limiting and Wrapping Vectorial Signals

 Limits elements of vectorial control signals.


 csound doc: <>
 | 
 Limiting and Wrapping Vectorial Signals

 'Reflects' elements of vectorial control signals on thresholds.


 csound doc: <>
 | 
 Limiting and Wrapping Vectorial Signals

 Wraps elements of vectorial control signals.


 csound doc: <>
 Delay Paths.
 | 
 k-rate variable time delay.

 Variable delay applied to a k-rate signal


 csound doc: <>
 | 

 Generate a sort of 'vectorial' delay


 csound doc: <>
 | 

 Generate a sort of 'vectorial' portamento


 csound doc: <>
 Random.
 | 
 Generates a vector of random numbers stored into a table, holding the values for a period of time.

 Generates a vector of random numbers stored into a table, holding the values for a period of time. Generates a sort of 'vectorial band-limited noise'.

 >           [, isize] [, ioffset]

 csound doc: <>
 | 
 Generate a sort of 'vectorial band-limited noise'

 >           [, isize] [, ioffset]

 csound doc: <>
 | 

 One-Dimensional Cellular Automaton. This opcode is the


 csound doc: <>
 | 



module Csound.Typed.Opcode.Vectorial (
    
    
    vtaba, vtabi, vtabk, vtable1k, vtablea, vtablei, vtablek, vtablewa, vtablewi, vtablewk, vtabwa, vtabwi, vtabwk,
    
    vadd, vadd_i, vexp, vexp_i, vmult, vmult_i, vpow, vpow_i,
    
    vaddv, vaddv_i, vcopy, vcopy_i, vdivv, vdivv_i, vexpv, vexpv_i, vmap, vmultv, vmultv_i, vpowv, vpowv_i, vsubv, vsubv_i,
    
    vexpseg, vlinseg,
    
    vlimit, vmirror, vwrap,
    
    vdelayk, vecdelay, vport,
    
    vrandh, vrandi,
    
  * Cellular Automata .
    cell, vcella) where

import Control.Monad.Trans.Class
import Csound.Dynamic
import Csound.Typed


  >   vtaba    andx , ifn ,  [ , aout2 , aout3 , .... , aoutN ]
vtaba ::  Sig -> Tab -> Sig -> SE ()
vtaba b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtaba" [(Xr,[Ar,Ir] ++ (repeat Ar))] [a1,a2,a3]

  >   vtabi    indx , ifn , iout1 [ , iout2 , iout3 , .... , ioutN ]
vtabi ::  D -> Tab -> D -> SE ()
vtabi b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vtabi" [(Xr,(repeat Ir))] [a1,a2,a3]

        kndx , ifn , kout1 [ ,  , kout3 , .... ,  ]
vtabk ::  Sig -> Tab -> Sig -> SE ()
vtabk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtabk" [(Xr,[Kr,Ir] ++ (repeat Kr))] [a1,a2,a3]

  >   vtable1k    kfn ,   ,  , kout3 , .... ,  ]
vtable1k ::  Tab -> Sig -> SE ()
vtable1k b1 b2 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2
    where f a1 a2 = opcs "vtable1k" [(Xr,(repeat Kr))] [a1,a2]

  >   vtablea    andx , kfn , kinterp ,  ,  [ , aout2 , aout3 , .... , aoutN ]
vtablea ::  Sig -> Tab -> Sig -> D -> Sig -> SE ()
vtablea b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unD b4 <*> unSig b5
    where f a1 a2 a3 a4 a5 = opcs "vtablea" [(Xr,[Ar,Kr,Kr,Ir] ++ (repeat Ar))] [a1,a2,a3,a4,a5]

  >   vtablei    indx , ifn , interp , ixmode , iout1 [ , iout2 , iout3 , .... , ioutN ]
vtablei ::  D -> Tab -> D -> D -> D -> SE ()
vtablei b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3 <*> unD b4 <*> unD b5
    where f a1 a2 a3 a4 a5 = opcs "vtablei" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]

  >   vtablek    kndx , kfn , kinterp , ixmode ,   ,  , kout3 , .... ,  ]
  csound doc : <  >
vtablek ::  Sig -> Tab -> Sig -> D -> Sig -> SE ()
vtablek b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3 <*> unD b4 <*> unSig b5
    where f a1 a2 a3 a4 a5 = opcs "vtablek" [(Xr,[Kr,Kr,Kr,Ir] ++ (repeat Kr))] [a1,a2,a3,a4,a5]

  >   vtablewa    andx , kfn ,  ,  [ ,  ,  , .... , ainargN ]
vtablewa ::  Sig -> Tab -> D -> Sig -> SE ()
vtablewa b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unD b3 <*> unSig b4
    where f a1 a2 a3 a4 = opcs "vtablewa" [(Xr,[Ar,Kr,Ir] ++ (repeat Ar))] [a1,a2,a3,a4]

        indx , ifn ,  , inarg1 [ ,  ,  , .... , inargN ]
vtablewi ::  D -> Tab -> D -> D -> SE ()
vtablewi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vtablewi" [(Xr,(repeat Ir))] [a1,a2,a3,a4]

  >   vtablewk    kndx , kfn ,  ,  [ ,  , kinarg3 , .... , kinargN ]
vtablewk ::  Sig -> Tab -> D -> Sig -> SE ()
vtablewk b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unD b3 <*> unSig b4
    where f a1 a2 a3 a4 = opcs "vtablewk" [(Xr,[Kr,Kr,Ir] ++ (repeat Kr))] [a1,a2,a3,a4]

  >   vtabwa    andx , ifn ,  [ ,  ,  , .... , ainargN ]
vtabwa ::  Sig -> Tab -> Sig -> SE ()
vtabwa b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtabwa" [(Xr,[Ar,Ir] ++ (repeat Ar))] [a1,a2,a3]

  >   vtabwi    indx , ifn , inarg1 [ ,  ,  , .... , inargN ]
vtabwi ::  D -> Tab -> D -> SE ()
vtabwi b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unD b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vtabwi" [(Xr,(repeat Ir))] [a1,a2,a3]

  >   vtabwk    kndx , ifn ,  [ ,  , kinarg3 , .... , kinargN ]
vtabwk ::  Sig -> Tab -> Sig -> SE ()
vtabwk b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vtabwk" [(Xr,[Kr,Ir] ++ (repeat Kr))] [a1,a2,a3]

  Scalar operations .

  >   vadd    ifn , kval ,   , kdstoffset ] [ , kverbose ]
vadd ::  Tab -> Sig -> Sig -> SE ()
vadd b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vadd" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  >   vadd_i    ifn , ival , ielements [ ,  ]
vadd_i ::  Tab -> D -> D -> SE ()
vadd_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vadd_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

  >   vexp    ifn , kval ,   , kdstoffset ] [ , kverbose ]
vexp ::  Tab -> Sig -> Sig -> SE ()
vexp b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vexp" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  >   vexp_i    ifn , ival , ielements [ ,  ]
vexp_i ::  Tab -> D -> D -> SE ()
vexp_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vexp_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Multiplies a vector in a table by a scalar value .
  >   vmult    ifn , kval ,   , kdstoffset ] [ , kverbose ]
vmult ::  Tab -> Sig -> Sig -> SE ()
vmult b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vmult" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Multiplies a vector in a table by a scalar value .
  >   vmult_i    ifn , ival , ielements [ ,  ]
vmult_i ::  Tab -> D -> D -> SE ()
vmult_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vmult_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

  >   vpow    ifn , kval ,   , kdstoffset ] [ , kverbose ]
vpow ::  Tab -> Sig -> Sig -> SE ()
vpow b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vpow" [(Xr,[Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  >   vpow_i    ifn , ival , ielements [ ,  ]
vpow_i ::  Tab -> D -> D -> SE ()
vpow_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unD b3
    where f a1 a2 a3 = opcs "vpow_i" [(Xr,[Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Vectorial operations .

  Performs addition between two vectorial control signals .
  >   vaddv    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vaddv ::  Tab -> Tab -> Sig -> SE ()
vaddv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vaddv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Performs addition between two vectorial control signals at init time .
  >   vaddv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
vaddv_i ::  Tab -> Tab -> D -> SE ()
vaddv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vaddv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Copies between two vectorial control signals
  >   vcopy    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vcopy ::  Tab -> Tab -> Sig -> SE ()
vcopy b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vcopy" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Copies a vector from one table to another .
  >   vcopy_i    ifn1 , ifn2 , ielements [ , idstoffset , isrcoffset ]
vcopy_i ::  Tab -> Tab -> D -> SE ()
vcopy_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vcopy_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Performs division between two vectorial control signals
        ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vdivv ::  Tab -> Tab -> Sig -> SE ()
vdivv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vdivv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Performs division between two vectorial control signals at init time .
  >   vdivv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
vdivv_i ::  Tab -> Tab -> D -> SE ()
vdivv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vdivv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Performs exponential operations between two vectorial control signals
  >   vexpv    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vexpv ::  Tab -> Tab -> Sig -> SE ()
vexpv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vexpv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Performs exponential operations between two vectorial control signals at init time .
  >   vexpv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
vexpv_i ::  Tab -> Tab -> D -> SE ()
vexpv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vexpv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  >   vmap    ifn1 , ifn2 , ielements [ , idstoffset , isrcoffset ]
vmap ::  Tab -> Tab -> D -> SE ()
vmap b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vmap" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Performs mutiplication between two vectorial control signals
        ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vmultv ::  Tab -> Tab -> Sig -> SE ()
vmultv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vmultv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Performs mutiplication between two vectorial control signals at init time .
  >   vmultv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
vmultv_i ::  Tab -> Tab -> D -> SE ()
vmultv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vmultv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Performs power - of operations between two vectorial control signals
  >   vpowv   ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vpowv ::  Tab -> Tab -> Sig -> SE ()
vpowv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vpowv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Performs power - of operations between two vectorial control signals at init time .
  >   vpowv_i   ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
vpowv_i ::  Tab -> Tab -> D -> SE ()
vpowv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vpowv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]

  Performs subtraction between two vectorial control signals
  >   vsubv    ifn1 , ifn2 ,   , kdstoffset ] [ , ksrcoffset ] [ , kverbose ]
vsubv ::  Tab -> Tab -> Sig -> SE ()
vsubv b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unSig b3
    where f a1 a2 a3 = opcs "vsubv" [(Xr,[Ir,Ir,Kr,Kr,Kr,Kr])] [a1,a2,a3]

  Performs subtraction between two vectorial control signals at init time .
  >   vsubv_i    ifn1 , ifn2 , ielements [ ,  ] [ , isrcoffset ]
vsubv_i ::  Tab -> Tab -> D -> SE ()
vsubv_i b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unD b3
    where f a1 a2 a3 = opcs "vsubv_i" [(Xr,[Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3]


  Vectorial envelope generator
  >   vexpseg    ifnout , ielements , ifn1 , idur1 , ifn2 [ , idur2 , ifn3 [ ... ] ]
vexpseg ::  Tab -> D -> Tab -> D -> Tab -> SE ()
vexpseg b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unTab b5
    where f a1 a2 a3 a4 a5 = opcs "vexpseg" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]

  Vectorial envelope generator
  >   vlinseg     , ielements , ifn1 , idur1 , ifn2 [ , idur2 , ifn3 [ ... ] ]
vlinseg ::  Tab -> D -> Tab -> D -> Tab -> SE ()
vlinseg b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unD b2 <*> unTab b3 <*> unD b4 <*> unTab b5
    where f a1 a2 a3 a4 a5 = opcs "vlinseg" [(Xr,(repeat Ir))] [a1,a2,a3,a4,a5]


  >   vlimit    ifn , kmin , kmax , ielements
vlimit ::  Tab -> Sig -> Sig -> D -> SE ()
vlimit b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vlimit" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]

  >   vmirror    ifn , kmin , kmax , ielements
vmirror ::  Tab -> Sig -> Sig -> D -> SE ()
vmirror b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vmirror" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]

  >   vwrap    ifn , kmin , kmax , ielements
vwrap ::  Tab -> Sig -> Sig -> D -> SE ()
vwrap b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vwrap" [(Xr,[Ir,Kr,Kr,Ir])] [a1,a2,a3,a4]


  >       ksig , kdel , imaxdel [ , iskip , imode ]
vdelayk ::  Sig -> Sig -> D -> Sig
vdelayk b1 b2 b3 = Sig $ f <$> unSig b1 <*> unSig b2 <*> unD b3
    where f a1 a2 a3 = opcs "vdelayk" [(Kr,[Kr,Kr,Ir,Ir,Ir])] [a1,a2,a3]

  Vectorial Control - rate Delay Paths
  >   vecdelay    ifn , ifnIn , ifnDel , ielements , imaxdel [ , iskip ]
vecdelay ::  Tab -> Tab -> Tab -> D -> D -> SE ()
vecdelay b1 b2 b3 b4 b5 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unTab b2 <*> unTab b3 <*> unD b4 <*> unD b5
    where f a1 a2 a3 a4 a5 = opcs "vecdelay" [(Xr,[Ir,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5]

  Vectorial Control - rate Delay Paths
  >   vport   ifn ,  , ielements [ , ifnInit ]
vport ::  Tab -> Sig -> D -> SE ()
vport b1 b2 b3 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unD b3
    where f a1 a2 a3 = opcs "vport" [(Xr,[Ir,Kr,Ir,Ir])] [a1,a2,a3]


  >   vrandh    ifn ,   krange ,  , ielements [ ,  ] [ , iseed ] \
vrandh ::  Tab -> Sig -> Sig -> D -> SE ()
vrandh b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vrandh" [(Xr,[Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]

  >   vrandi    ifn ,   krange ,  , ielements [ ,  ] [ , iseed ] \
vrandi ::  Tab -> Sig -> Sig -> D -> SE ()
vrandi b1 b2 b3 b4 = SE $ (depT_ =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3 <*> unD b4
    where f a1 a2 a3 a4 = opcs "vrandi" [(Xr,[Ir,Kr,Kr,Ir,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4]

  Cellular Automata .

  Cellular Automaton
           modified version of vcella by   .
  >   cell   ktrig , kreinit , ioutFunc , initStateFunc , iRuleFunc , ielements
cell ::  Sig -> Sig -> D -> D -> D -> D -> SE ()
cell b1 b2 b3 b4 b5 b6 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6
    where f a1 a2 a3 a4 a5 a6 = opcs "cell" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir])] [a1,a2,a3,a4,a5,a6]

  Cellular Automata
  Unidimensional Cellular Automata applied to Csound vectors
  >   vcella   ktrig , kreinit , ioutFunc , initStateFunc , \
  >            iRuleFunc , ielements , irulelen [ , iradius ]
  csound doc : <  >
vcella ::  Sig -> Sig -> D -> D -> D -> D -> D -> SE ()
vcella b1 b2 b3 b4 b5 b6 b7 = SE $ (depT_ =<<) $ lift $ f <$> unSig b1 <*> unSig b2 <*> unD b3 <*> unD b4 <*> unD b5 <*> unD b6 <*> unD b7
    where f a1 a2 a3 a4 a5 a6 a7 = opcs "vcella" [(Xr,[Kr,Kr,Ir,Ir,Ir,Ir,Ir,Ir])] [a1
                                                                                  ,a2
                                                                                  ,a3
                                                                                  ,a4
                                                                                  ,a5
                                                                                  ,a6
                                                                                  ,a7]