-- | MIDI Message Output
module CsoundExpr.Opcodes.Midi.Output
    (mdelay,
     nrpn,
     outiat,
     outic,
     outic14,
     outipat,
     outipb,
     outipc,
     outkat,
     outkc,
     outkc14,
     outkpat,
     outkpb,
     outkpc)
where



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



-- | * opcode : mdelay
--  
--  
-- * syntax : 
--  
--  >   mdelay kstatus, kchan, kd1, kd2, kdelay
--  
--  
-- * description : 
--  
--  A MIDI delay opcode.
--  
--  
-- * url : <http://www.csounds.com/manual/html/mdelay.html>
 
mdelay ::
         (K k0, K k1, K k2, K k3, K k4) =>
         k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut
mdelay k0status k1chan k2d1 k3d2 k4delay = outOpcode "mdelay" args
  where args = [to k0status, to k1chan, to k2d1, to k3d2, to k4delay]


-- | * opcode : nrpn
--  
--  
-- * syntax : 
--  
--  >   nrpn kchan, kparmnum, kparmvalue
--  
--  
-- * description : 
--  
--  Sends a NPRN (Non-Registered Parameter Number) message to the
-- MIDI OUT port each time one of the input arguments changes.
--  
--  
-- * url : <http://www.csounds.com/manual/html/nrpn.html>
 
nrpn :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SignalOut
nrpn k0chan k1parmnum k2parmvalue = outOpcode "nrpn" args
  where args = [to k0chan, to k1parmnum, to k2parmvalue]


-- | * opcode : outiat
--  
--  
-- * syntax : 
--  
--  >   outiat ichn, ivalue, imin, imax
--  
--  
-- * description : 
--  
--  Sends MIDI aftertouch messages at i-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outiat.html>
 
outiat :: Irate -> Irate -> Irate -> Irate -> SignalOut
outiat i0chn i1value i2min i3max = outOpcode "outiat" args
  where args = [to i0chn, to i1value, to i2min, to i3max]


-- | * opcode : outic
--  
--  
-- * syntax : 
--  
--  >   outic ichn, inum, ivalue, imin, imax
--  
--  
-- * description : 
--  
--  Sends MIDI controller output at i-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outic.html>
 
outic :: Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut
outic i0chn i1num i2value i3min i4max = outOpcode "outic" args
  where args = [to i0chn, to i1num, to i2value, to i3min, to i4max]


-- | * opcode : outic14
--  
--  
-- * syntax : 
--  
--  >   outic14 ichn, imsb, ilsb, ivalue, imin, imax
--  
--  
-- * description : 
--  
--  Sends 14-bit MIDI controller output at i-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outic14.html>
 
outic14 ::
          Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut
outic14 i0chn i1msb i2lsb i3value i4min i5max
  = outOpcode "outic14" args
  where args
          = [to i0chn, to i1msb, to i2lsb, to i3value, to i4min, to i5max]


-- | * opcode : outipat
--  
--  
-- * syntax : 
--  
--  >   outipat ichn, inotenum, ivalue, imin, imax
--  
--  
-- * description : 
--  
--  Sends polyphonic MIDI aftertouch messages at i-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outipat.html>
 
outipat :: Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut
outipat i0chn i1notenum i2value i3min i4max
  = outOpcode "outipat" args
  where args
          = [to i0chn, to i1notenum, to i2value, to i3min, to i4max]


-- | * opcode : outipb
--  
--  
-- * syntax : 
--  
--  >   outipb ichn, ivalue, imin, imax
--  
--  
-- * description : 
--  
--  Sends MIDI pitch-bend messages at i-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outipb.html>
 
outipb :: Irate -> Irate -> Irate -> Irate -> SignalOut
outipb i0chn i1value i2min i3max = outOpcode "outipb" args
  where args = [to i0chn, to i1value, to i2min, to i3max]


-- | * opcode : outipc
--  
--  
-- * syntax : 
--  
--  >   outipc ichn, iprog, imin, imax
--  
--  
-- * description : 
--  
--  Sends MIDI program change messages at i-rate
--  
--  
-- * url : <http://www.csounds.com/manual/html/outipc.html>
 
outipc :: Irate -> Irate -> Irate -> Irate -> SignalOut
outipc i0chn i1prog i2min i3max = outOpcode "outipc" args
  where args = [to i0chn, to i1prog, to i2min, to i3max]


-- | * opcode : outkat
--  
--  
-- * syntax : 
--  
--  >   outkat kchn, kvalue, kmin, kmax
--  
--  
-- * description : 
--  
--  Sends MIDI aftertouch messages at k-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outkat.html>
 
outkat ::
         (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut
outkat k0chn k1value k2min k3max = outOpcode "outkat" args
  where args = [to k0chn, to k1value, to k2min, to k3max]


-- | * opcode : outkc
--  
--  
-- * syntax : 
--  
--  >   outkc kchn, knum, kvalue, kmin, kmax
--  
--  
-- * description : 
--  
--  Sends MIDI controller messages at k-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outkc.html>
 
outkc ::
        (K k0, K k1, K k2, K k3, K k4) =>
        k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut
outkc k0chn k1num k2value k3min k4max = outOpcode "outkc" args
  where args = [to k0chn, to k1num, to k2value, to k3min, to k4max]


-- | * opcode : outkc14
--  
--  
-- * syntax : 
--  
--  >   outkc14 kchn, kmsb, klsb, kvalue, kmin, kmax
--  
--  
-- * description : 
--  
--  Sends 14-bit MIDI controller output at k-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outkc14.html>
 
outkc14 ::
          (K k0, K k1, K k2, K k3, K k4, K k5) =>
          k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> SignalOut
outkc14 k0chn k1msb k2lsb k3value k4min k5max
  = outOpcode "outkc14" args
  where args
          = [to k0chn, to k1msb, to k2lsb, to k3value, to k4min, to k5max]


-- | * opcode : outkpat
--  
--  
-- * syntax : 
--  
--  >   outkpat kchn, knotenum, kvalue, kmin, kmax
--  
--  
-- * description : 
--  
--  Sends polyphonic MIDI aftertouch messages at k-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outkpat.html>
 
outkpat ::
          (K k0, K k1, K k2, K k3, K k4) =>
          k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut
outkpat k0chn k1notenum k2value k3min k4max
  = outOpcode "outkpat" args
  where args
          = [to k0chn, to k1notenum, to k2value, to k3min, to k4max]


-- | * opcode : outkpb
--  
--  
-- * syntax : 
--  
--  >   outkpb kchn, kvalue, kmin, kmax
--  
--  
-- * description : 
--  
--  Sends MIDI pitch-bend messages at k-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outkpb.html>
 
outkpb ::
         (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut
outkpb k0chn k1value k2min k3max = outOpcode "outkpb" args
  where args = [to k0chn, to k1value, to k2min, to k3max]


-- | * opcode : outkpc
--  
--  
-- * syntax : 
--  
--  >   outkpc kchn, kprog, kmin, kmax
--  
--  
-- * description : 
--  
--  Sends MIDI program change messages at k-rate.
--  
--  
-- * url : <http://www.csounds.com/manual/html/outkpc.html>
 
outkpc ::
         (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut
outkpc k0chn k1prog k2min k3max = outOpcode "outkpc" args
  where args = [to k0chn, to k1prog, to k2min, to k3max]