MonoMac 0.0.0.0 System.Object Global methods and constants for using CoreMidi. CoreMidiSample
- Property
  0.0.0.0
  System.Int32 The number of MIDI destinations.
- Property
  0.0.0.0
  System.Int32 The number of MIDI devices in the system (do not confused with external connected devices). You can retrieve a specific MIDI device by using the .
- Property
  0.0.0.0
  System.Int32 The number of external devices connected to this system. You can retrieve a specific MIDI device by using the .
- Method
  0.0.0.0
  MonoMac.CoreMidi.MidiDevice `` The device index. Returns an object representing the specified MIDI device. An instance of MidiDevice, or null on error.
- Method
  0.0.0.0
  MonoMac.CoreMidi.MidiDevice `` The external MIDI device index. Returns an object representing the specified external MIDI device. An instance of MidiDevice, or null on error.
- Property
  0.0.0.0
  MonoMac.Foundation.NSString Represents the value associated with the constant MIDINetworkBonjourServiceType You can pass this type to to find MIDI devices available over bonjour.
- Property
  0.0.0.0
  MonoMac.Foundation.NSString Notification raised when the MIDI network has changed.

  This constant can be used with the to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.

  If you want to subscribe to this notification, you can use the convenience . method which offers strongly typed access to the parameters of the notification.

  The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:

  `// // Lambda style // // listening notification = Midi.Notifications.ObserveNetworkNotificationConta ((sender, args) => { /* Access strongly typed args */ Console.WriteLine ("Notification: {0}", args.Notification); }); // To stop listening: notification.Dispose (); // // Method style // NSObject notification; void Callback (object sender, NetworkNotificationConta args) { // Access strongly typed args Console.WriteLine ("Notification: {0}", args.Notification); } void Setup () { notification = Midi.Notifications.ObserveNetworkNotificationConta (Callback); } void Teardown () { notification.Dispose (); }`

  The following example shows how to use the notification with the DefaultCenter API:

  `// Lambda style NSNotificationCenter.DefaultCenter.AddObserver ( Midi.NetworkNotificationContactsDidChange, (notification) => {Console.WriteLine ("Received the notification Midi", notification); } // Method style void Callback (NSNotification notification) { Console.WriteLine ("Received a notification Midi", notification); } void Setup () { NSNotificationCenter.DefaultCenter.AddObserver (Midi.NetworkNotificationContactsDidChange, Callback); }`
- Property
  0.0.0.0
  MonoMac.Foundation.NSString Notification raised when the MIDI session has changed

  This constant can be used with the to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.

  If you want to subscribe to this notification, you can use the convenience . method which offers strongly typed access to the parameters of the notification.

  The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:

  `// // Lambda style // // listening notification = Midi.Notifications.ObserveNetworkNotificationSess ((sender, args) => { /* Access strongly typed args */ Console.WriteLine ("Notification: {0}", args.Notification); }); // To stop listening: notification.Dispose (); // // Method style // NSObject notification; void Callback (object sender, NetworkNotificationSess args) { // Access strongly typed args Console.WriteLine ("Notification: {0}", args.Notification); } void Setup () { notification = Midi.Notifications.ObserveNetworkNotificationSess (Callback); } void Teardown () { notification.Dispose (); }`

  The following example shows how to use the notification with the DefaultCenter API:

  `// Lambda style NSNotificationCenter.DefaultCenter.AddObserver ( Midi.NetworkNotificationSessionDidChange, (notification) => {Console.WriteLine ("Received the notification Midi", notification); } // Method style void Callback (NSNotification notification) { Console.WriteLine ("Received a notification Midi", notification); } void Setup () { NSNotificationCenter.DefaultCenter.AddObserver (Midi.NetworkNotificationSessionDidChange, Callback); }`
- Method
  0.0.0.0
  System.Void Restarts the MIDI Subsystem. This stops the MIDI subsystems and forces it to be reinitialized.
- Property
  0.0.0.0
  System.Int32 Returns the number of sources in the system. Use the to fetch a specific source (represented by a MidiEndpoint).