csound-expression-0.0: src/CsoundExpr/Opcodes/Midi/Onoff.hs
-- | Note-on/Note-off Output
module CsoundExpr.Opcodes.Midi.Onoff
(midion,
midion2,
moscil,
noteoff,
noteon,
noteondur,
noteondur2)
where
import CsoundExpr.Base.Types
import CsoundExpr.Base.MultiOut
import CsoundExpr.Base.SideEffect
import CsoundExpr.Base.UserDefined
-- | * opcode : midion
--
--
-- * syntax :
--
-- > midion kchn, knum, kvel
--
--
-- * description :
--
-- Generates MIDI note messages at k-rate.
--
--
-- * url : <http://www.csounds.com/manual/html/midion.html>
midion :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SignalOut
midion k0chn k1num k2vel = outOpcode "midion" args
where args = [to k0chn, to k1num, to k2vel]
-- | * opcode : midion2
--
--
-- * syntax :
--
-- > midion2 kchn, knum, kvel, ktrig
--
--
-- * description :
--
-- Sends noteon and noteoff messages to the MIDI OUT port when
-- triggered by a value different than zero.
--
--
-- * url : <http://www.csounds.com/manual/html/midion2.html>
midion2 ::
(K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut
midion2 k0chn k1num k2vel k3trig = outOpcode "midion2" args
where args = [to k0chn, to k1num, to k2vel, to k3trig]
-- | * opcode : moscil
--
--
-- * syntax :
--
-- > moscil kchn, knum, kvel, kdur, kpause
--
--
-- * description :
--
-- Sends a stream of the MIDI notes.
--
--
-- * url : <http://www.csounds.com/manual/html/moscil.html>
moscil ::
(K k0, K k1, K k2, K k3, K k4) =>
k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut
moscil k0chn k1num k2vel k3dur k4pause = outOpcode "moscil" args
where args = [to k0chn, to k1num, to k2vel, to k3dur, to k4pause]
-- | * opcode : noteoff
--
--
-- * syntax :
--
-- > noteoff ichn, inum, ivel
--
--
-- * description :
--
-- Send a noteoff message to the MIDI OUT port.
--
--
-- * url : <http://www.csounds.com/manual/html/noteoff.html>
noteoff :: Irate -> Irate -> Irate -> SignalOut
noteoff i0chn i1num i2vel = outOpcode "noteoff" args
where args = [to i0chn, to i1num, to i2vel]
-- | * opcode : noteon
--
--
-- * syntax :
--
-- > noteon ichn, inum, ivel
--
--
-- * description :
--
-- Send a noteon message to the MIDI OUT port.
--
--
-- * url : <http://www.csounds.com/manual/html/noteon.html>
noteon :: Irate -> Irate -> Irate -> SignalOut
noteon i0chn i1num i2vel = outOpcode "noteon" args
where args = [to i0chn, to i1num, to i2vel]
-- | * opcode : noteondur
--
--
-- * syntax :
--
-- > noteondur ichn, inum, ivel, idur
--
--
-- * description :
--
-- Sends a noteon and a noteoff MIDI message both with the same
-- channel, number and velocity.
--
--
-- * url : <http://www.csounds.com/manual/html/noteondur.html>
noteondur :: Irate -> Irate -> Irate -> Irate -> SignalOut
noteondur i0chn i1num i2vel i3dur = outOpcode "noteondur" args
where args = [to i0chn, to i1num, to i2vel, to i3dur]
-- | * opcode : noteondur2
--
--
-- * syntax :
--
-- > noteondur2 ichn, inum, ivel, idur
--
--
-- * description :
--
-- Sends a noteon and a noteoff MIDI message both with the same
-- channel, number and velocity.
--
--
-- * url : <http://www.csounds.com/manual/html/noteondur2.html>
noteondur2 :: Irate -> Irate -> Irate -> Irate -> SignalOut
noteondur2 i0chn i1num i2vel i3dur = outOpcode "noteondur2" args
where args = [to i0chn, to i1num, to i2vel, to i3dur]