/* * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ using LibPDBinding.Native; using System; using System.Runtime.CompilerServices; namespace LibPDBinding { public static partial class LibPD { #region Send Midi /// /// sends a note on event to pd /// /// /// starting at 0 /// /// 0..0x7f /// /// 0..0x7f /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendNoteOn()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendNoteOn (int channel, int pitch, int velocity) { return Midi.noteon (channel, pitch, velocity); } /// /// sends a control change event to pd /// /// /// starting at 0 /// /// 0..0x7f /// /// 0..0x7f /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendControlChange()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendControlChange (int channel, int controller, int value) { return Midi.controlchange (channel, controller, value); } /// /// sends a program change event to Pd /// /// /// starting at 0 /// /// 0..0x7f /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendProgramChange()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendProgramChange (int channel, int value) { return Midi.programchange (channel, value); } /// /// sends a pitch bend event to pd /// /// /// starting at 0 /// /// -8192..8191 (note that Pd has some offset bug in its pitch /// bend objects, but libpd corrects for this) /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendPitchbend()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendPitchbend (int channel, int value) { return Midi.pitchbend (channel, value); } /// /// sends an aftertouch event to pd /// /// /// starting at 0 /// /// 0..0x7f /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendAftertouch()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendAftertouch (int channel, int value) { return Midi.aftertouch (channel, value); } /// /// sends a polyphonic aftertouch event to pd /// /// /// starting at 0 /// /// 0..0x7f /// /// 0..0x7f /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendPolyAftertouch()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendPolyAftertouch (int channel, int pitch, int value) { return Midi.polyaftertouch (channel, pitch, value); } /// /// sends one raw MIDI byte to pd /// /// /// 0..0x0fff /// /// 0..0xff /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendMidiByte()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendMidiByte (int port, int value) { return Midi.midibyte (port, value); } /// /// sends one byte of a sysex message to pd /// /// /// 0..0x0fff /// /// 0..0x7f /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendSysex()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendSysex (int port, int value) { return Midi.sysex (port, value); } /// /// sends one byte to the realtimein object of pd /// /// /// 0..0x0fff /// /// 0..0xff /// error code, 0 on success [Obsolete ("Use LibPDBinding.Managed.Midi.SendSysRealtime()")] [MethodImpl (MethodImplOptions.Synchronized)] public static int SendSysRealtime (int port, int value) { return Midi.sysrealtime (port, value); } #endregion Send Midi } }