-- | Signal Limiters
module CsoundExpr.Opcodes.Sigmod.Siglimit
    (limitA,
     limitI,
     limitK,
     mirrorA,
     mirrorI,
     mirrorK,
     wrapA,
     wrapI,
     wrapK)
where



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



-- | * opcode : limit
--  
--  
-- * syntax : 
--  
--  >   ares limit asig, klow, khigh
--  >   ires limit isig, ilow, ihigh
--  >   kres limit ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Sets the lower and upper limits of the value it processes.
--  
--  
-- * url : <http://www.csounds.com/manual/html/limit.html>
 
limitA :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate
limitA a0sig k1low k2high = opcode "limit" args
  where args = [to a0sig, to k1low, to k2high]


-- | * opcode : limit
--  
--  
-- * syntax : 
--  
--  >   ares limit asig, klow, khigh
--  >   ires limit isig, ilow, ihigh
--  >   kres limit ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Sets the lower and upper limits of the value it processes.
--  
--  
-- * url : <http://www.csounds.com/manual/html/limit.html>
 
limitI :: Irate -> Irate -> Irate -> Irate
limitI i0sig i1low i2high = opcode "limit" args
  where args = [to i0sig, to i1low, to i2high]


-- | * opcode : limit
--  
--  
-- * syntax : 
--  
--  >   ares limit asig, klow, khigh
--  >   ires limit isig, ilow, ihigh
--  >   kres limit ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Sets the lower and upper limits of the value it processes.
--  
--  
-- * url : <http://www.csounds.com/manual/html/limit.html>
 
limitK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate
limitK k0sig k1low k2high = opcode "limit" args
  where args = [to k0sig, to k1low, to k2high]


-- | * opcode : mirror
--  
--  
-- * syntax : 
--  
--  >   ares mirror asig, klow, khigh
--  >   ires mirror isig, ilow, ihigh
--  >   kres mirror ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Reflects the signal that exceeds the low and high thresholds.
--  
--  
-- * url : <http://www.csounds.com/manual/html/mirror.html>
 
mirrorA :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate
mirrorA a0sig k1low k2high = opcode "mirror" args
  where args = [to a0sig, to k1low, to k2high]


-- | * opcode : mirror
--  
--  
-- * syntax : 
--  
--  >   ares mirror asig, klow, khigh
--  >   ires mirror isig, ilow, ihigh
--  >   kres mirror ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Reflects the signal that exceeds the low and high thresholds.
--  
--  
-- * url : <http://www.csounds.com/manual/html/mirror.html>
 
mirrorI :: Irate -> Irate -> Irate -> Irate
mirrorI i0sig i1low i2high = opcode "mirror" args
  where args = [to i0sig, to i1low, to i2high]


-- | * opcode : mirror
--  
--  
-- * syntax : 
--  
--  >   ares mirror asig, klow, khigh
--  >   ires mirror isig, ilow, ihigh
--  >   kres mirror ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Reflects the signal that exceeds the low and high thresholds.
--  
--  
-- * url : <http://www.csounds.com/manual/html/mirror.html>
 
mirrorK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate
mirrorK k0sig k1low k2high = opcode "mirror" args
  where args = [to k0sig, to k1low, to k2high]


-- | * opcode : wrap
--  
--  
-- * syntax : 
--  
--  >   ares wrap asig, klow, khigh
--  >   ires wrap isig, ilow, ihigh
--  >   kres wrap ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Wraps-around the signal that exceeds the low and high
-- thresholds.
--  
--  
-- * url : <http://www.csounds.com/manual/html/wrap.html>
 
wrapA :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate
wrapA a0sig k1low k2high = opcode "wrap" args
  where args = [to a0sig, to k1low, to k2high]


-- | * opcode : wrap
--  
--  
-- * syntax : 
--  
--  >   ares wrap asig, klow, khigh
--  >   ires wrap isig, ilow, ihigh
--  >   kres wrap ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Wraps-around the signal that exceeds the low and high
-- thresholds.
--  
--  
-- * url : <http://www.csounds.com/manual/html/wrap.html>
 
wrapI :: Irate -> Irate -> Irate -> Irate
wrapI i0sig i1low i2high = opcode "wrap" args
  where args = [to i0sig, to i1low, to i2high]


-- | * opcode : wrap
--  
--  
-- * syntax : 
--  
--  >   ares wrap asig, klow, khigh
--  >   ires wrap isig, ilow, ihigh
--  >   kres wrap ksig, klow, khigh
--  
--  
-- * description : 
--  
--  Wraps-around the signal that exceeds the low and high
-- thresholds.
--  
--  
-- * url : <http://www.csounds.com/manual/html/wrap.html>
 
wrapK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate
wrapK k0sig k1low k2high = opcode "wrap" args
  where args = [to k0sig, to k1low, to k2high]