MonoMac 0.0.0.0 MonoMac.CoreMidi.MidiObject Main entry point to use MIDI in MacOS X and iOS.

The MidiClient class is your gateway to communicate with the MIDI subsystem on MacOS and iOS.

You typically will create an instance of MidiClient with a name that identifies this particular client, connect to the various events that are exposed to this class and create both input and output midi ports using the methods.

`client = new MidiClient ("CoreMidiSample MIDI CLient"); client.ObjectAdded += delegate(object sender, ObjectAddedOrRemovedEventArgs e) { Console.WriteLine ("Object {0} added to {1}", e.Child, e.Parent); }; client.ObjectRemoved += delegate(object sender, ObjectAddedOrRemovedEventArgs e) { Console.WriteLine ("Object {0} removed to {1}", e.Child, e.Parent); }; client.PropertyChanged += delegate(object sender, ObjectPropertyChangedEventArgs e) { Console.WriteLine ("Property {0} changed on {1}", e.PropertyName, e.MidiObject); }; client.ThruConnectionsChanged += delegate { Console.WriteLine ("Thru connections changed"); }; client.SerialPortOwnerChanged += delegate { Console.WriteLine ("Serial port changed"); }; // // Create your input and output ports // outputPort = client.CreateOutputPort ("CoreMidiSample Output Port"); inputPort = client.CreateInputPort ("CoreMidiSample Input Port"); // Print out packets when we receive them inputPort.MessageReceived += delegate(object sender, MidiPacketsEventArgs e) { Console.WriteLine ("Got {0} packets", e.Packets.Length); };`

The following events will be raised on your MidiClient instance: , , , , , and

CoreMidiSample
- Constructor
  0.0.0.0
  Name for this client
  Creates a new MidiClient.
- Method
  0.0.0.0
  MonoMac.CoreMidi.MidiPort `` name for the input port. Creates a new MIDI input port. The input port can be used to read events from MIDI, the returned MidiPort raises an event to notify you of new data available.
- Method
  0.0.0.0
  MonoMac.CoreMidi.MidiPort `` name for the output port. Creates a new MIDI output port. You can use an output MIDI port to transmit MIDI packets.
- Method
  0.0.0.0
  MonoMac.CoreMidi.MidiEndpoint `` name for the virtual source. Creates a MIDI virtual source
- Method
  0.0.0.0
  System.Void ``

  If set to , the method is invoked directly and will dispose manage and unmanaged resources; If set to the method is being called by the garbage collector finalizer and should only release unmanaged resources.

  Releases the resources used by the MidiClient object.

  This Dispose method releases the resources used by the MidiClient class.

  This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposting is set to and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to .

  Calling the Dispose method when you are finished using the MidiClient ensures that all external resources used by this managed object are released as soon as possible. Once you have invoked the Dispose method, the object is no longer useful and you should no longer make any calls to it.

  For more information on how to override this method and on the Dispose/IDisposable pattern, read the ``Implementing a Dispose Method'' document at http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx

- Event
  0.0.0.0
  System.EventHandler<MonoMac.CoreMidi.IOErrorEventArgs> Event raised when there there is an error in the MIDI pipeline.
- Property
  0.0.0.0
  System.String Name of this MidiClient.
- Event
  0.0.0.0
  System.EventHandler<MonoMac.CoreMidi.ObjectAddedOrRemovedEventArgs> Event raised when a MidiDevice, MidiEntity or MidiEndpoint has been added to the session. Both the parent MidiObject and the actual MidiObject are available as part of the passed arguments.
- Event
  0.0.0.0
  System.EventHandler<MonoMac.CoreMidi.ObjectAddedOrRemovedEventArgs> Event raised when a MidiDevice, MidiEntity or MidiEndpoint has been removed the session. Both the parent MidiObject and the actual MidiObject are available as part of the passed arguments.
- Event
  0.0.0.0
  System.EventHandler<MonoMac.CoreMidi.ObjectPropertyChangedEventArgs> The property of an object has changed.
- Event
  0.0.0.0
  System.EventHandler
- Event
  0.0.0.0
  System.EventHandler The MIDI setup has changed. Not necessary to implement if you listen to ObjectAdded, ObjectRemoved, PropertyChanged, ThruConnectionsChanged and SerialPortOwnerChanged events.
- Event
  0.0.0.0
  System.EventHandler Event raised when a persistent connection has been added or removed.
- Method
  0.0.0.0
  System.String