-
Notifications
You must be signed in to change notification settings - Fork 516
CoreMIDI iOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Jul 11, 2024
·
3 revisions
#CoreMIDI.framework https://github.com/xamarin/xamarin-macios/pull/20882
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h 2024-04-13 15:02:19
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h 2024-05-30 10:28:25
@@ -22,12 +22,23 @@
#include <CoreMIDI/MIDIMessages.h>
#include <CoreMIDI/MIDIBluetoothConnection.h>
+#include <CoreMIDI/MIDIUMPCI.h>
+
#if __OBJC__
#import <CoreMIDI/MIDINetworkSession.h>
#endif
#if __OBJC2__
+#import <CoreMIDI/MIDIUMPEndpoint.h>
+#import <CoreMIDI/MIDIUMPEndpointManager.h>
+#import <CoreMIDI/MIDIUMPFunctionBlock.h>
+#import <CoreMIDI/MIDIUMPMutableEndpoint.h>
+#import <CoreMIDI/MIDIUMPMutableFunctionBlock.h>
+
+#import <CoreMIDI/MIDICIDevice.h>
+#import <CoreMIDI/MIDICIDeviceManager.h>
#import <CoreMIDI/MIDICapabilityInquiry.h>
+#import <CoreMIDI/MIDIUMPCIProfile.h>
#endif
#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDevice.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDevice.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDevice.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDevice.h 2024-05-30 10:34:48
@@ -0,0 +1,124 @@
+/*
+ File: CoreMIDI/MIDICIDevice.h
+
+ Contains: API for discovered MIDI Capability Inquiry (MIDI-CI) devices.
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDICIDevice_h)
+#define MIDICIDevice_h
+
+/*!
+ @header MIDICIDevice.h
+
+ This is the header file for MIDI-CI device support.
+
+ API Overview
+ ------------
+ The MIDI server automatically discovers Universal MIDI Packet (UMP) Endpoints (MIDIUMPEndpoint)
+ and Function Blocks (MIDIUMPFunctionBlock), and it performs MIDI-CI Discovery. When a client process
+ retrieves the process instance of the MIDI-CI device manager (MIDICIDeviceManager), the manager
+ makes a copy of the system-wide MIDI-CI device cache. Each Responder to a MIDI-CI Discovery request
+ is enumerated as a MIDICIDevice object. UMP-native MIDI-CI Devices are typically Function Blocks on
+ a UMP Endpoint.
+
+ MIDICIDevice is a UMP-native MIDI 2.0 API, and CI device objects are always associated with enabled,
+ bidirectional Function Blocks. If a discovered UMP Endpoint does not explictly declare any Function
+ Blocks, it will be assigned an implicit bidirectional Function Block spanning all 16 UMP Groups. In this
+ API, MIDICIDevice always extends the Capabilities of a Function Block, explicit or implicit.
+
+ Legacy MIDI 1.0 CI devices are also discovered by the MIDI server. Since the server automatically
+ converts UMP to legacy MIDI 1.0 protocol prior to delivery whenever necessary, the MIDI 1.0 source and
+ destination pair is treated as a UMP Endpoint with a bidirectional Function Block spanning only Group 0.
+ The actual type of MIDI-CI device, if known, is indicated in the object's MIDICIDeviceType.
+
+ Implementation overview
+ -----------------------
+ To view the MIDI-CI devices discovered by the MIDI server, retrieve the local process instance of the
+ MIDI-CI device manager (MIDICIDeviceManager) and retrieve a copy of the discovered device Array.
+ Any discovered Capabilities that are cached by the server can be viewed by investigating the CI device
+ properties and by using the associated API.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0, Universal
+ MIDI Packet and MIDI Capability Inquiry..
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+#import <CoreMIDI/MIDIUMPEndpoint.h>
+#import <CoreMIDI/MIDIUMPFunctionBlock.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDIUMPCIProfile;
+
+#pragma mark MIDICIDevice
+
+/*!
+ @class MIDICIDevice
+ @brief An object representing a MIDI-CI Device.
+
+ @discussion The client instance MIDICIDeviceManager maintains a list of discovered CI devices.
+ MIDICIDevice objects are not constructible via API.
+*/
+MIDIUMP1_1
+@interface MIDICIDevice : NSObject
+
+/// @property deviceInfo
+/// @brief The basic information describing the CI device.
+@property (nonatomic, readonly) MIDI2DeviceInfo* deviceInfo;
+
+/// @property MUID
+/// @brief The MIDI unique identifier (MUID) assigned to the CI device.
+@property (nonatomic, readonly) MIDICIMUID MUID;
+
+/// @property supportsProtocolNegotiation
+/// @brief MIDI-CI Protocol Negotiation capability.
+@property (nonatomic, readonly) BOOL supportsProtocolNegotiation;
+
+/// @property supportsProfileConfiguration
+/// @brief MIDI-CI Profile Configuration capability.
+@property (nonatomic, readonly) BOOL supportsProfileConfiguration;
+
+/// @property supportsPropertyExchange
+/// @brief MIDI-CI Property Exchange capability.
+@property (nonatomic, readonly) BOOL supportsPropertyExchange;
+
+/// @property supportsProcessInquiry
+/// @brief MIDI-CI Process Inquiry capability.
+@property (nonatomic, readonly) BOOL supportsProcessInquiry;
+
+/// @property maxSysExSize
+/// @brief The maximum receivable MIDI System Exclusive size for this CI device.
+@property (nonatomic, readonly) NSUInteger maxSysExSize;
+
+/// @property maxPropertyExchangeRequests
+/// @brief The maximum number of simultaneous Property Exchange requests, if supported.
+@property (nonatomic, readonly) NSUInteger maxPropertyExchangeRequests;
+
+/// @property deviceType
+/// @brief The type of MIDI-CI device.
+@property (nonatomic, readonly) MIDICIDeviceType deviceType;
+
+/// @property profiles
+/// @brief The MIDI-CI Profiles that are registered to the Function Block.
+@property (nonatomic, readonly) NSArray<MIDIUMPCIProfile*>* profiles;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDeviceManager.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDeviceManager.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDeviceManager.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICIDeviceManager.h 2024-05-30 02:32:41
@@ -0,0 +1,141 @@
+/*
+ File: CoreMIDI/MIDICIDeviceManager.h
+
+ Contains: API for MIDI Capability Inquiry (MIDI-CI) Device Manager
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDICIDeviceManager_h)
+#define MIDICIDeviceManager_h
+
+/*!
+ @header MIDICIDeviceManager.h
+
+ This is the header file for MIDI-CI Device manager system services.
+
+ API Overview
+ ------------
+ The singleton object MIDICIDeviceManager maintains a local copy of the system-wide MIDI-CI device
+ cache. Various notifications can be observed from the shared MIDICIDeviceManager object which are
+ posted when changes to the cache are made by the MIDI server. (Note that in environments where virtual
+ MIDI endpoint creation is not allowed (for example, on iOS, if your app doesn't list 'audio' in UIBackgroundModes), notifications will only be posted when the client process is not suspended.)
+
+ Implementation overview
+ -----------------------
+ To investigate the local copy of the MIDI-CI Device cache, retrieve the local instance of the UMPCI manager
+ object and examine the manager's properties.
+
+ This API is not realtime-safe. The local cache is updated on the client process main thread and all interaction with
+ the manager should be done on the main thread.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0 and UMP.
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+#import <CoreMIDI/MIDIUMPCIProfile.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDICIDevice;
+
+#pragma mark MIDICIDeviceManager Notifications
+
+/*!
+ @constant MIDICIDeviceWasAddedNotification
+ @brief A notification posted when a MIDI-CI Device has been added to the subsystem.
+
+ @discussion The userInfo dictionary will contain a MIDICIDeviceObjectKey with the
+ MIDI-CI Device which has been added to the subsystem.
+*/
+OS_EXPORT NSNotificationName const MIDICIDeviceWasAddedNotification MIDIUMP1_1;
+
+/*!
+ @constant MIDICIDeviceWasRemovedNotification
+ @brief A notification posted when a MIDI-CI Device has been removed or has had its MUID invalidated.
+
+ @discussion Any previously discovered MIDICIDevice that fails to respond to a discovery message
+ will be removed. The userInfo dictionary will contain a MIDICIDeviceObjectKey with the
+ MIDI-CI Device which has been removed or has had its MUID invalidated.
+*/
+OS_EXPORT NSNotificationName const MIDICIDeviceWasRemovedNotification MIDIUMP1_1;
+
+/*!
+ @constant MIDICIProfileStateChangedNotification
+ @brief A notification posted when a MIDI-CI Device has been enabled/disabled.
+
+ @discussion The userInfo dictionary will contain a MIDICIDeviceObjectKey and
+ MIDICIProfileObjectKey with the MIDICIDevice and MIDI-CI Profile which
+ was recently enabled or disabled.
+*/
+OS_EXPORT NSNotificationName const MIDICIProfileStateChangedNotification MIDIUMP1_1;
+
+/*!
+ @constant MIDICIProfileWasRemovedNotification
+ @brief A notification posted when a MIDI-CI Device has been removed.
+
+ @discussion The userInfo dictionary will contain a MIDICIDeviceObjectKey and
+ MIDICIProfileObjectKey with the MIDICIDevice and MIDI-CI Profile which
+ has been removed.
+*/
+OS_EXPORT NSNotificationName const MIDICIProfileWasRemovedNotification MIDIUMP1_1;
+
+#pragma mark Keys for NSNotification userInfo dictionaries
+
+/*!
+ @constant MIDICIDeviceObjectKey
+ @brief Value is an MIDIUMPEndpoint.
+*/
+OS_EXPORT NSString* const MIDICIDeviceObjectKey MIDIUMP1_1;
+
+/*!
+ @constant MIDICIProfileObjectKey
+ @brief Value is an MIDIUMPCIProfile
+*/
+OS_EXPORT NSString* const MIDICIProfileObjectKey MIDIUMP1_1;
+
+#pragma mark MIDICIDeviceManager
+
+/*!
+ @class MIDICIDeviceManager
+ @brief A singleton object that performs system-wide MIDI-CI Device bookkeeping.
+
+ @discussion MIDICIDeviceManager is used to retrieve information about MIDI-CI devices that
+ to MIDI-CI Discovery.
+*/
+MIDIUMP1_1
+@interface MIDICIDeviceManager : NSObject
+
+/*!
+ @property sharedInstance
+ @brief Retrieve the shared MIDI-CI device manager for the client process.
+
+ @discussion After the first access of the property, the client process may observe notifications which are
+ posted when the system-wide cache changes. In environments where virtual MIDI endpoint
+ creation is not allowed, callbacks are only invoked when the process is not suspended.
+ However, any suspended process will receive an updated copy of the cache when it
+ resumes its running state.
+ */
+@property (class, nonatomic, readonly) MIDICIDeviceManager* sharedInstance;
+
+/*!
+ @property discoveredCIDevices
+ @brief A list of MIDICIDevices that responded to the last MIDI-CI discovery request.
+ */
+@property (nonatomic, readonly, copy) NSArray<MIDICIDevice*>* discoveredCIDevices;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h 2024-04-13 20:16:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h 2024-05-30 03:38:46
@@ -1,167 +1,127 @@
/*
File: CoreMIDI/MIDICapabilityInquiry.h
-
- Contains: API for MIDI Capability Inquiry (MIDI-CI)
-
- Copyright: (c) 2018-2020 by Apple Inc., all rights reserved.
-
+
+ Contains: Deprecated beta API for MIDI Capability Inquiry (MIDI-CI)
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
Bugs?: For bug reports, consult the following page on
the World Wide Web:
-
+
http://feedbackassistant.apple.com/
- */
+*/
-// This API requires the modern Objective-C runtime.
#if !defined(MIDICapabilityInquiry_h)
#define MIDICapabilityInquiry_h
-/*!
- @header MIDICapabilityInquiry.h
+/*
+ @header MIDICapabilityInquiry.h
- This is the header file for MIDI Capability Inquiry (MIDI-CI) system services.
+ This is the header file for deprecated MIDI Capability Inquiry (MIDI-CI) system services.
- API Overview
- ------------
-
- MIDI-CI is the portion of MIDI 2.0 that allows for the selection of data protocol and the
- advertisement and manipulation of profiles and properties. These three capabilities are
- sometimes referred to as the three P's. MIDI 2.0 (and specifically MIDI-CI) are bidirectional
- protocols, unlike MIDI 1.0 which could be unidirectional or bidirectional.
-
- The two sides of MIDI-CI communication are the Initiator and Responder. Most MIDI-CI messages
- can only be sent from the Initiator or from the Responder, but a small number of messages could
- originate from the Initiator or the Responder.
-
- MIDI client processes playing the Initiator roles of a MIDI-CI connection use the MIDICISession
- API, which allows for profile and property manipulation on the associated responder. MIDI client
- processes that wish to advertise their own profile and property capabilities use the MIDICIResponder
- API, which is capable of sending Responder-originated MIDI-CI messages to Initiators.
-
- Implementation overview
- -----------------------
-
- With MIDI-CI beta enabled, Universal MIDI System Exclusive (SysEx) messages are filtered from the
- I/O stream and sent to the MIDI-CI subsystem for routing and handling. Other SysEx messages are
- untouched. In the release API, filtering will be on by default, and Universal MIDI SysEx messages
- with associated CoreMIDI API will only be received and routed by the MIDI-CI subsystem.
-
- Discovering MIDI-CI capable nodes managed by CoreMIDI is accomplished with MIDICIDiscoveryManager,
- which sends a MIDI-CI discovery message to all MIDI destinations in the system and aggregates the
- respondents as MIDICIDiscoveredNode objects.
-
- After MIDI-CI discovery has been performed, a MIDI client process may act as Initiator by creating
- a MIDICISession using a MIDICIDiscoveredNode. The MIDICISession is synchronously returned prior to
- capability inquiry, and the supplied handler is invoked once the results are received or after
- timeout. Any available profiles may then be examined/toggled for each channel and the whole port
- (represented by MIDI channel 0x7F).
-
- No API for protocol negotiation is currently supplied. CoreMIDI is MIDI 2.0-capable system-wide
- and will not only select the appropriate protocol for connected hardware but will also automatically
- convert between MIDI 1.0 and MIDI 2.0 protocol as needed. See MIDIServices.h for API guidelines and
- usage for MIDI 2.0 protocol and Universal MIDI Packets (UMP).
-
- Additionally, no explicit property exchange API is provided. However, property exchange can be
- accomplished by performing first performing MIDI-CI discovery and then sending the appropriate
- Universal MIDI SysEx messages to the supplied destination and monitoring the MIDICISession's
- supplied source. Responses to Has Property, Get Property, Set Property, and Subscribe to
- Property messages are not filtered by the MIDI-CI subsystem and can be received by any MIDI client.
- However, Property Exchange capabilities must still be discovered using API first since the
- Inquiry: Property Exchange Capabilities (msg ID 0x30) and Reply to Property Exchange Capabilities
- (msg ID 0x31) are reserved by CoreMIDI.
-
- A MIDI client process may also/instead play the role of responder by creating a MIDICIResponderDelegate
- and then a MIDICIResponder. Similarly to MIDICISession, a MIDICIResponder may advertise property
- capabilities, but the details of property exchange rely on the implementation.
-
- Please visit http://www.midi.org/specifications for more information on MIDI Capability Inquiry
- and a list of currently defined capabilities.
+ Please visit http://www.midi.org/specifications for more information on MIDI Capability Inquiry
+ and a list of currently defined capabilities.
*/
+#import "MIDIUMPCI.h"
+#import <CoreMIDI/MIDIMessages.h>
-#import <CoreMIDI/MIDIServices.h>
-
-/// MIDI Channel, 0~15 (channels 1 through 16, respectively), or MIDIChannelsWholePort.
-/// Per the MIDI-CI specification, this is always a single byte.
-typedef uint8_t MIDIChannelNumber;
-
-/// All MIDI-CI methods involving a channel number use 0x7f to mean "the whole port", i.e. all
-/// channels.
-static const MIDIChannelNumber MIDIChannelsWholePort = 0x7f;
-
-/*!
+/*
@struct MIDICIDeviceIdentification
@brief struct describing a MIDI-CI device.
- */
-struct MIDICIDeviceIdentification {
- uint8_t manufacturer[3];
- uint8_t family[2];
- uint8_t modelNumber[2];
- uint8_t revisionLevel[4];
- uint8_t reserved[5]; // always zero
+*/
+struct MIDICIDeviceIdentification
+{
+ uint8_t manufacturer[3];
+ uint8_t family[2];
+ uint8_t modelNumber[2];
+ uint8_t revisionLevel[4];
+ uint8_t reserved[5]; // always zero
};
typedef struct MIDICIDeviceIdentification MIDICIDeviceIdentification;
+/*!
+ @constant MIDIChannelsWholePort
+ @brief An outdated MIDI-CI constant indicating "the whole port", i.e. all channels.
+ */
+static const MIDIChannelNumber MIDIChannelsWholePort = 0x7f;
+
+
+// This API requires the modern Objective-C runtime.
#if defined(__OBJC2__)
#import <Foundation/Foundation.h>
#import <stdint.h>
-#define MIDICI1_0_AVAILABILITY API_AVAILABLE(macos(10.14), ios(12.0)) API_UNAVAILABLE(watchos, tvos)
-#define MIDICI1_1_AVAILABILITY API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(watchos, tvos)
-
NS_ASSUME_NONNULL_BEGIN
-// Forward declarations.
@class MIDICISession;
-@class MIDICIProfile;
@class MIDICIProfileState;
-@class MIDICIResponder;
-@class MIDICIDiscoveredNode;
-//! The unique MIDI-CI negotiation identifier (MUID) used for a MIDICIResponder connection.
-//! Per the MIDI-CI specification, this is a randomly assigned 28-bit integer.
-typedef NSNumber * MIDICIInitiatiorMUID;
+// The unique MIDI-CI negotiation identifier (MUID) used for a MIDICIResponder connection.
+// Per the MIDI-CI specification, this is a randomly assigned 28-bit integer.
+typedef NSNumber* MIDICIInitiatiorMUID;
-//! An array of MIDICIProfileState objects that describes the profile
-//! configuration for all channels for a reachable MIDI-CI node.
-typedef NSArray<MIDICIProfileState *> MIDICIProfileStateList;
+// An array of MIDICIProfileState objects that describes the profile
+// configuration for all channels for a reachable MIDI-CI node.
+typedef NSArray<MIDICIProfileState*> MIDICIProfileStateList;
-// =================================================================================================
+#pragma mark MIDICIDeviceInfo (deprecated)
-/*!
- @class MIDICIDeviceInfo
- @brief An NSObject containing basic information about a MIDI-CI-capable node.
+/*
+ @class MIDICIDeviceInfo
+ @brief An NSObject containing basic information about a MIDI-CI-capable node.
*/
-MIDICI1_1_AVAILABILITY
+MIDICI1_0_DEPRECATED
@interface MIDICIDeviceInfo : NSObject <NSSecureCoding>
-/// The MIDI System Exclusive ID of the device manufacturer, 3 bytes long. One-byte SysEx IDs are
-/// padded with trailing zeroes (e.g., Apple's System Exclusive ID, 0x11, would be expressed as 0x110000).
-@property (nonatomic, readonly) NSData *manufacturerID; // 3 bytes
+// The MIDI System Exclusive ID of the device manufacturer, 3 bytes long. One-byte SysEx IDs are
+// padded with trailing zeroes (e.g., Apple's System Exclusive ID, 0x11, would be expressed as 0x110000).
+@property (nonatomic, readonly) NSData* manufacturerID; // 3 bytes
-/// The group of models to which the device belongs, 2 bytes.
-@property (nonatomic, readonly) NSData *family; // 2 bytes
+// The group of models to which the device belongs, 2 bytes.
+@property (nonatomic, readonly) NSData* family; // 2 bytes
-/// The specific model from the device manufacturer, 2 bytes.
-@property (nonatomic, readonly) NSData *modelNumber; // 2 bytes
+// The specific model from the device manufacturer, 2 bytes.
+@property (nonatomic, readonly) NSData* modelNumber; // 2 bytes
-/// The version number of a device model number, 2 bytes.
-@property (nonatomic, readonly) NSData *revisionLevel; // 4 bytes
+// The version number of a device model number, 2 bytes.
+@property (nonatomic, readonly) NSData* revisionLevel; // 4 bytes
-/// The MIDI destination used by device's MIDI entity for capability inquiries.
+// The MIDI destination used by device's MIDI entity for capability inquiries.
@property (nonatomic, readonly) MIDIEndpointRef midiDestination;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithDestination:(MIDIEntityRef)midiDestination manufacturer:(NSData *)manufacturer family:(NSData *)family model:(NSData *)modelNumber revision:(NSData *)revisionLevel;
+- (instancetype)initWithDestination:(MIDIEntityRef)midiDestination manufacturer:(NSData*)manufacturer family:(NSData*)family model:(NSData*)modelNumber revision:(NSData*)revisionLevel;
@end
+#pragma mark MIDICIDiscoveredNode (deprecated)
+
+/*
+ @class MIDICIDiscoveredNode
+ @brief An object created during MIDI-CI discovery representing a MIDI destination with an
+ associated MIDI source that responds to capability inquiries.
+*/
+MIDICI1_1_DEPRECATED
+@interface MIDICIDiscoveredNode : NSObject <NSSecureCoding>
+@property (nonatomic, readonly) MIDIEntityRef destination;
+@property (nonatomic, readonly) MIDICIDeviceInfo* deviceInfo;
+@property (nonatomic, readonly) BOOL supportsProfiles;
+@property (nonatomic, readonly) BOOL supportsProperties;
+@property (nonatomic, readonly) NSNumber* maximumSysExSize;
+
+- (instancetype)init NS_UNAVAILABLE;
+@end
+
+#pragma mark MIDICIProfile
+
// =================================================================================================
/*!
- @class MIDICIProfile
- @abstract An NSObject representing Capability Inquiry profile. MIDI-CI profiles describe a mapping
+ @class MIDICIProfile
+ @abstract An NSObject representing Capability Inquiry profile. MIDI-CI profiles describe a mapping
of MIDI messages to specific sounds and synthesis behaviors, e.g. General MIDI, a drawbar organ,
etc. A MIDI-CI profile may be a standard registered profile or vendor-specific.
-
+
Standard Profile Vendor-Specific Profile
Profile ID Byte 1: 0x7E Standard Profile Manufacturer SysEx ID 1 Profile
Profile ID Byte 2: Profile Bank Manufacturer SysEx ID 2 Profile
@@ -173,110 +133,90 @@
@interface MIDICIProfile : NSObject <NSSecureCoding>
/// An NSString describing the profile.
-@property (nonatomic, readonly) NSString *name;
+@property (nonatomic, readonly) NSString* name;
/// The unique 5-byte profile identifier representing the profile.
-@property (nonatomic, readonly) NSData *profileID; // always 5 bytes
+@property (nonatomic, readonly) NSData* profileID; // always 5 bytes
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithData:(NSData *)data MIDICI1_1_AVAILABILITY;
-- (instancetype)initWithData:(NSData *)data name:(NSString *)inName;
+- (instancetype)initWithData:(NSData*)data MIDICI1_1;
+- (instancetype)initWithData:(NSData*)data name:(NSString*)inName;
@end
-// =================================================================================================
+#pragma mark MIDICIProfileState
-/*!
- @class MIDICIProfileState
- @brief Lists the enabled and disabled profiles for a MIDI channel or port on a device.
+/*
+ @class MIDICIProfileState
+ @brief A list of the enabled and/or disabled profiles for a MIDI channel or port on a device.
*/
MIDICI1_0_AVAILABILITY
@interface MIDICIProfileState : NSObject <NSSecureCoding>
@property (nonatomic, readonly) MIDIChannelNumber midiChannel;
-@property (nonatomic, readonly) NSArray<MIDICIProfile *> *enabledProfiles;
-@property (nonatomic, readonly) NSArray<MIDICIProfile *> *disabledProfiles;
+@property (nonatomic, readonly) NSArray<MIDICIProfile*>* enabledProfiles;
+@property (nonatomic, readonly) NSArray<MIDICIProfile*>* disabledProfiles;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithChannel:(MIDIChannelNumber)midiChannelNum enabledProfiles:(NSArray<MIDICIProfile *> *)enabled disabledProfiles:(NSArray<MIDICIProfile *> *)disabled MIDICI1_1_AVAILABILITY;
-- (instancetype)initWithEnabledProfiles:(NSArray<MIDICIProfile *> *)enabled disabledProfiles:(NSArray<MIDICIProfile *> *)disabled API_DEPRECATED_WITH_REPLACEMENT("initWithChannel:enabledProfiles:disabledProfiles", macos(10.14, API_TO_BE_DEPRECATED), ios(12.0, API_TO_BE_DEPRECATED));
+- (instancetype)initWithChannel:(MIDIChannelNumber)midiChannelNum enabledProfiles:(NSArray<MIDICIProfile*>*)enabled disabledProfiles:(NSArray<MIDICIProfile*>*)disabled API_DEPRECATED_WITH_REPLACEMENT("initWithEnabledProfiles:", macos(10.14, 15.0), ios(12.0, 18.0));
+- (instancetype)initWithEnabledProfiles:(NSArray<MIDICIProfile*>*)enabled disabledProfiles:(NSArray<MIDICIProfile*>*)disabled MIDICI1_1;
@end
-// =================================================================================================
-
-/*!
- @class MIDICIDiscoveredNode
- @brief An object created during MIDI-CI discovery representing a MIDI destination with an
- associated MIDI source that responds to capability inquiries.
+/*
+ @fn MIDICIProfileChangedBlock
+ @brief A block called when a device notifies that a profile has been enabled or disabled.
*/
-MIDICI1_1_AVAILABILITY
-@interface MIDICIDiscoveredNode : NSObject <NSSecureCoding>
-@property (nonatomic, readonly) MIDIEntityRef destination;
-@property (nonatomic, readonly) MIDICIDeviceInfo * deviceInfo;
-@property (nonatomic, readonly) BOOL supportsProfiles;
-@property (nonatomic, readonly) BOOL supportsProperties;
-@property (nonatomic, readonly) NSNumber * maximumSysExSize;
-
--(instancetype)init NS_UNAVAILABLE;
-@end
-
-// =================================================================================================
-
-/*!
- @fn MIDICIProfileChangedBlock
- @brief A block called when a device notifies that a profile has been enabled or disabled.
-*/
typedef void (^MIDICIProfileChangedBlock)(
- MIDICISession *session, MIDIChannelNumber channel, MIDICIProfile *profile, BOOL enabled) MIDICI1_1_AVAILABILITY;
+ MIDICISession* session, MIDIChannelNumber channel, MIDICIProfile* profile, BOOL enabled) MIDICI1_1_DEPRECATED;
-/*!
- @fn MIDICISessionDisconnectBlock
- @brief A block called when a MIDICISession has been disconnected. If called, the MIDICISession should be destroyed.
+/*
+ @fn MIDICISessionDisconnectBlock
+ @brief A block called when a MIDICISession has been disconnected. If called, the MIDICISession should be destroyed.
*/
typedef void (^MIDICISessionDisconnectBlock)(
- MIDICISession *session, NSError *error) MIDICI1_1_AVAILABILITY;
+ MIDICISession* session, NSError* error) MIDICI1_1_DEPRECATED;
-/*!
- @fn MIDICIProfileSpecificDataBlock
- @brief A block called when a MIDICISession or MIDICIResponder receives profile-specific data.
+/*
+ @fn MIDICIProfileSpecificDataBlock
+ @brief A block called when a MIDICISession or MIDICIResponder receives profile-specific data.
*/
typedef void (^MIDICIProfileSpecificDataBlock)(
- MIDICISession *session, MIDIChannelNumber channel, MIDICIProfile *profile, NSData *profileSpecificData) MIDICI1_1_AVAILABILITY;
+ MIDICISession* session, MIDIChannelNumber channel, MIDICIProfile* profile, NSData* profileSpecificData) MIDICI1_1_DEPRECATED;
-/*!
- @fn MIDICIDiscoveryResponseBlock
- @brief A block called when a MIDI-CI node discovery is complete.
+/*
+ @fn MIDICIDiscoveryResponseBlock
+ @brief A block called when a MIDI-CI node discovery is complete.
*/
typedef void (^MIDICIDiscoveryResponseBlock)(
- NSArray<MIDICIDiscoveredNode *> *discoveredNodes) MIDICI1_1_AVAILABILITY;
+ NSArray<MIDICIDiscoveredNode*>* discoveredNodes) MIDICI1_1_DEPRECATED;
-// =================================================================================================
+#pragma mark MIDICISession (deprecated)
-/*!
- @class MIDICISession
- @brief Object representating a MIDI Capability Inquiry session.
-
- A MIDI Capability Inquiry session is a bidirectional communication path between a MIDI process
- and a MIDI-CI node (i.e., paired MIDI source and destination) identified using MIDI-CI discovery.
- A MIDICISession can be used to manipulate MIDI-CI profiles and to discover the MIDI-CI property
- capability.
+/*
+ @class MIDICISession
+ @brief Object representating a MIDI Capability Inquiry session.
+
+ A MIDI Capability Inquiry session is a bidirectional communication path between a MIDI process
+ and a MIDI-CI node (i.e., paired MIDI source and destination) identified using MIDI-CI discovery.
+ A MIDICISession can be used to manipulate MIDI-CI profiles and to discover the MIDI-CI property
+ capability.
*/
-MIDICI1_0_AVAILABILITY
+MIDICI1_0_DEPRECATED
@interface MIDICISession : NSObject
-/*!
+/*
@brief Begin a MIDI-CI session with the provided discovered node.
-
+
dataReadyHandler will be called when properties of the session have become available.
Other methods of this class will not return valid/useful information before the dataReadyHandler
is called.
-
+
disconnectHandler will be called if the active MIDICISession is disconnected by the Responder
- or if initial MIDI-CI discovery was unsuccessful.
+ or if initial MIDI-CI discovery was unsuccessful.
*/
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithDiscoveredNode:(MIDICIDiscoveredNode *)discoveredNode dataReadyHandler:(void (^)(void))handler disconnectHandler:(MIDICISessionDisconnectBlock)disconnectHandler;
+- (instancetype)initWithDiscoveredNode:(MIDICIDiscoveredNode*)discoveredNode dataReadyHandler:(void (^)(void))handler disconnectHandler:(MIDICISessionDisconnectBlock)disconnectHandler;
-/// The MIDI destination with which the session is communicating.
+// The MIDI destination with which the session is communicating.
@property (nonatomic, readonly) MIDIEntityRef midiDestination;
// After CI session data is ready, indicates whether the entity supports the MIDI-CI profile capability.
@@ -285,112 +225,110 @@
// After CI session data is ready, indicates whether the entity supports the MIDI-CI property exchange capability.
@property (nonatomic, readonly) BOOL supportsPropertyCapability;
-/// Obtain the device's basic identification. Nil before data is ready or if the device does not
-/// support MIDI-CI.
-@property (nonatomic, readonly) MIDICIDeviceInfo *deviceInfo;
+// Obtain the device's basic identification. Nil before data is ready or if the device does not
+// support MIDI-CI.
+@property (nonatomic, readonly) MIDICIDeviceInfo* deviceInfo;
// The maximum MIDI system exclusive size reported by the device during discovery
-@property (nonatomic, readonly) NSNumber *maxSysExSize; // unsigned long
+@property (nonatomic, readonly) NSNumber* maxSysExSize; // unsigned long
// The maximum number of simultaneous property exchange requests, if supported
-@property (nonatomic, readonly) NSNumber *maxPropertyRequests; // int
+@property (nonatomic, readonly) NSNumber* maxPropertyRequests; // int
-/// Given a MIDI channel number, return the supported profiles. Note that the
-/// arrays will be empty if this property is queried before data is ready.
-- (MIDICIProfileState *)profileStateForChannel:(MIDIChannelNumber)channel;
+// Given a MIDI channel number, return the supported profiles. Note that the
+// arrays will be empty if this property is queried before data is ready.
+- (MIDICIProfileState*)profileStateForChannel:(MIDIChannelNumber)channel;
-/// Given a MIDI channel number, asynchronously request that the supplied profile be enabled.
-/// The result of this operation is sent to the MIDICIProfileChangedBlock.
-/// Returns YES if the request is valid.
-- (BOOL)enableProfile:(MIDICIProfile *)profile
+// Given a MIDI channel number, asynchronously request that the supplied profile be enabled.
+// The result of this operation is sent to the MIDICIProfileChangedBlock.
+// Returns YES if the request is valid.
+- (BOOL)enableProfile:(MIDICIProfile*)profile
onChannel:(MIDIChannelNumber)channel
- error:(NSError **)outError;
+ error:(NSError**)outError;
-/// Given a MIDI channel number, asynchronously request that the supplied profile be disabled.
-/// The result of this operation is sent to the MIDICIProfileChangedBlock.
-/// Returnes YES if the request is valid.
-- (BOOL)disableProfile:(MIDICIProfile *)profile
+// Given a MIDI channel number, asynchronously request that the supplied profile be disabled.
+// The result of this operation is sent to the MIDICIProfileChangedBlock.
+// Returnes YES if the request is valid.
+- (BOOL)disableProfile:(MIDICIProfile*)profile
onChannel:(MIDIChannelNumber)channel
- error:(NSError **)outError;
+ error:(NSError**)outError;
-/// Given a MIDI channel number, send profile specific data to the MIDICISession.
-/// Returns YES if the data was successfully sent.
-- (BOOL)sendProfile:(MIDICIProfile *)profile onChannel:(MIDIChannelNumber)channel profileData:(NSData *)profileSpecificData MIDICI1_1_AVAILABILITY;
+// Given a MIDI channel number, send profile specific data to the MIDICISession.
+// Returns YES if the data was successfully sent.
+- (BOOL)sendProfile:(MIDICIProfile*)profile onChannel:(MIDIChannelNumber)channel profileData:(NSData*)profileSpecificData MIDICI1_1;
-/// An optional block called when a device signals that a profile has been enabled or disabled.
+// An optional block called when a device signals that a profile has been enabled or disabled.
@property (nonatomic, copy, nullable) MIDICIProfileChangedBlock profileChangedCallback;
-/// An optional block called when a device sends profile-specific data to the session.
+// An optional block called when a device sends profile-specific data to the session.
@property (nonatomic, copy, nullable) MIDICIProfileSpecificDataBlock profileSpecificDataHandler;
-@end // MIDICISession
+@end
-// =================================================================================================
+#pragma mark MIDICIDiscoveryManager (deprecated)
-/*!
- @class MIDICIDiscoveryManager
- @brief Singleton object that performs system-wide MIDI Capability Inquiry discovery
-
- MIDICIDiscoveryManager is used to retrieve information about nodes in the MIDI subsystem
- that are MIDI-CI capable. Only MIDI destinations discovered via this API can be used to
- create MIDICISessions.
+/*
+ @class MIDICIDiscoveryManager
+ @brief Singleton object that performs system-wide MIDI Capability Inquiry discovery
+
+ MIDICIDiscoveryManager is used to retrieve information about nodes in the MIDI subsystem
+ that are MIDI-CI capable. Only MIDI destinations discovered via this API can be used to
+ create MIDICISessions.
*/
-MIDICI1_1_AVAILABILITY
+MIDICI1_1_DEPRECATED
@interface MIDICIDiscoveryManager : NSObject
-+ (MIDICIDiscoveryManager *)sharedInstance;
++ (MIDICIDiscoveryManager*)sharedInstance;
- (void)discoverWithHandler:(MIDICIDiscoveryResponseBlock)completedHandler;
@end
-// =================================================================================================
-
-/*!
- @protocol MIDICIProfileResponderDelegate
- @brief Protocol for an NSObject that constructs and issues responses for a MIDICIResponder.
- A MIDICIProfileResponderDelegate is required to construct a MIDICIResponder.
+/*
+ @protocol MIDICIProfileResponderDelegate
+ @brief Protocol for an NSObject that constructs and issues responses for a MIDICIResponder.
+ A MIDICIProfileResponderDelegate is required to construct a MIDICIResponder.
*/
-MIDICI1_1_AVAILABILITY
+MIDICI1_1_DEPRECATED
@protocol MIDICIProfileResponderDelegate <NSObject>
@required
// Allow a new MIDI-CI Initiator to create a session or reject the connection attempt
-- (BOOL)connectInitiator:(MIDICIInitiatiorMUID)initiatorMUID withDeviceInfo:(MIDICIDeviceInfo *)deviceInfo;
+- (BOOL)connectInitiator:(MIDICIInitiatiorMUID)initiatorMUID withDeviceInfo:(MIDICIDeviceInfo*)deviceInfo;
// Called when an initiator terminates its MIDI-CI connection
- (void)initiatorDisconnected:(MIDICIInitiatiorMUID)initiatorMUID;
@optional
// These methods must be implemented if the associated responder implements MIDI-CI profiles.
-- (BOOL)willSetProfile:(MIDICIProfile *)aProfile onChannel:(MIDIChannelNumber)channel enabled:(BOOL)shouldEnable;
-- (void)handleDataForProfile:(MIDICIProfile *)aProfile onChannel:(MIDIChannelNumber)channel data:(NSData *)inData;
-@end // MIDICIProfileResponderDelegate
+- (BOOL)willSetProfile:(MIDICIProfile*)aProfile onChannel:(MIDIChannelNumber)channel enabled:(BOOL)shouldEnable;
+- (void)handleDataForProfile:(MIDICIProfile*)aProfile onChannel:(MIDIChannelNumber)channel data:(NSData*)inData;
+@end
-// =================================================================================================
+#pragma mark MIDICIResponder (deprecated)
-/*!
- @class MIDICIResponder
- @brief Responds to MIDI-CI inquiries from an initiator on behalf of a MIDIClient and handles profile and property change
- operations for the Responder role.
+/*
+ @class MIDICIResponder
+ @brief Responds to MIDI-CI inquiries from an initiator on behalf of a MIDIClient and handles profile and property change
+ operations for the Responder role.
*/
-MIDICI1_1_AVAILABILITY
+MIDICI1_1_DEPRECATED
@interface MIDICIResponder : NSObject
-@property (nonatomic, readonly) NSArray<MIDICIInitiatiorMUID> *initiators;
-@property (nonatomic, readonly, retain) id<MIDICIProfileResponderDelegate>profileDelegate;
-@property (nonatomic, readonly) MIDICIDeviceInfo *deviceInfo;
+@property (nonatomic, readonly) NSArray<MIDICIInitiatiorMUID>* initiators;
+@property (nonatomic, readonly, retain) id<MIDICIProfileResponderDelegate> profileDelegate;
+@property (nonatomic, readonly) MIDICIDeviceInfo* deviceInfo;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithDeviceInfo:(MIDICIDeviceInfo *)deviceInfo profileDelegate:(id<MIDICIProfileResponderDelegate>)delegate profileStates:(MIDICIProfileStateList *)profileList supportProperties:(BOOL)propertiesSupported;
+- (instancetype)initWithDeviceInfo:(MIDICIDeviceInfo*)deviceInfo profileDelegate:(id<MIDICIProfileResponderDelegate>)delegate profileStates:(MIDICIProfileStateList*)profileList supportProperties:(BOOL)propertiesSupported;
// Spontaneously enable or disable a profile and notify all connected Initiators
-- (BOOL)notifyProfile:(MIDICIProfile *)aProfile onChannel:(MIDIChannelNumber)channel isEnabled:(BOOL)enabledState;
+- (BOOL)notifyProfile:(MIDICIProfile*)aProfile onChannel:(MIDIChannelNumber)channel isEnabled:(BOOL)enabledState;
// Send profile-specific data for a profile to all connected Initiators
-- (BOOL)sendProfile:(MIDICIProfile *)aProfile onChannel:(MIDIChannelNumber)channel profileData:(NSData *)profileSpecificData;
+- (BOOL)sendProfile:(MIDICIProfile*)aProfile onChannel:(MIDIChannelNumber)channel profileData:(NSData*)profileSpecificData;
// Begin receiving Initiator requests
- (BOOL)start;
// Stop receiving Initiator requests and disconnect all connected Initiators
- (void)stop;
-@end // MIDICIResponder
+@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h 2024-04-13 13:01:08
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h 2024-05-30 04:53:06
@@ -323,7 +323,7 @@
New for CoreMIDI 1.1.
*/
-extern const CFStringRef kMIDIDriverPropertyUsesSerial API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos);
+extern const CFStringRef kMIDIDriverPropertyUsesSerial API_AVAILABLE(macos(10.1)) MIDI_API_UNAVAILABLE_NON_MACOS;
#ifdef __cplusplus
@@ -551,7 +551,7 @@
@result An OSStatus result code.
*/
extern OSStatus MIDIDriverEnableMonitoring(MIDIDriverRef __nonnull driver, Boolean enabled)
- API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos);
+ API_AVAILABLE(macos(10.1)) MIDI_API_UNAVAILABLE_NON_MACOS;
#ifdef __cplusplus
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h 2024-04-13 14:22:30
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h 2024-05-30 04:27:45
@@ -29,25 +29,26 @@
// MIDI Universal Packet message type nibbles.
typedef CF_ENUM(unsigned int, MIDIMessageType) {
- kMIDIMessageTypeUtility = 0x0, // 1 word
- kMIDIMessageTypeSystem = 0x1, // 1 word
- kMIDIMessageTypeChannelVoice1 = 0x2, // 1 word - MIDI 1.0
- kMIDIMessageTypeSysEx = 0x3, // 2 words (Data, but primarily SysEx)
- kMIDIMessageTypeChannelVoice2 = 0x4, // 2 words - MIDI 2.0
- kMIDIMessageTypeData128 = 0x5, // 4 words
- kMIDIMessageTypeUnknownF = 0xF
-
- // Sizes of undefined message types:
- // 6: 1 word
- // 7: 1 word
- // 8: 2 words
- // 9: 2 words
- // A: 2 words
- // B: 3 words
- // C: 3 words
- // D: 4 words
- // E: 4 words
- // F: 4 words
+ kMIDIMessageTypeUtility = 0x0, // 1 word
+ kMIDIMessageTypeSystem = 0x1, // 1 word
+ kMIDIMessageTypeChannelVoice1 = 0x2, // 1 word - MIDI 1.0
+ kMIDIMessageTypeSysEx = 0x3, // 2 words (Data, but primarily SysEx)
+ kMIDIMessageTypeChannelVoice2 = 0x4, // 2 words - MIDI 2.0
+ kMIDIMessageTypeData128 = 0x5, // 4 words
+ kMIDIMessageTypeFlexData = 0xD, // 4 words
+ kMIDIMessageTypeUnknownF = 0xF, // Replaced by kMIDIMessageTypeStream
+ kMIDIMessageTypeStream = 0xF, // 4 words
+ // Sizes of undefined message types:
+ // 6: 1 word
+ // 7: 1 word
+ // 8: 2 words
+ // 9: 2 words
+ // A: 2 words
+ // B: 3 words
+ // C: 3 words
+ // E: 4 words
+ kMIDIMessageTypeInvalid = 0xFF, // Invalid / Unkown Type
+
};
// kMIDIMessageTypeChannelVoice1 / kMIDIMessageTypeChannelVoice2 status nibbles.
@@ -107,11 +108,29 @@
// kMIDIMessageTypeUtility status nibbles.
typedef CF_ENUM(unsigned int, MIDIUtilityStatus) {
- kMIDIUtilityStatusNOOP = 0x0,
- kMIDIUtilityStatusJitterReductionClock = 0x1,
- kMIDIUtilityStatusJitterReductionTimestamp = 0x2
+ kMIDIUtilityStatusNOOP = 0x0,
+ kMIDIUtilityStatusJitterReductionClock = 0x1,
+ kMIDIUtilityStatusJitterReductionTimestamp = 0x2,
+ kMIDIUtilityStatusDeltaClockstampTicksPerQuarterNote = 0x3,
+ kMIDIUtilityStatusTicksSinceLastEvent = 0x4
};
+// kUMPStreamMessageStatus status nibbles.
+typedef CF_ENUM(unsigned int, UMPStreamMessageStatus) {
+ kUMPStreamMessageStatusEndpointDiscovery = 0x00,
+ kUMPStreamMessageStatusEndpointInfoNotification = 0x01,
+ kUMPStreamMessageStatusDeviceIdentityNotification = 0x02,
+ kUMPStreamMessageStatusEndpointNameNotification = 0x03,
+ kUMPStreamMessageStatusProductInstanceIDNotification = 0x04,
+ kUMPStreamMessageStatusStreamConfigurationRequest = 0x05,
+ kUMPStreamMessageStatusStreamConfigurationNotification = 0x06,
+ kUMPStreamMessageStatusFunctionBlockDiscovery = 0x10,
+ kUMPStreamMessageStatusFunctionBlockInfoNotification = 0x11,
+ kUMPStreamMessageStatusFunctionBlockNameNotification = 0x12,
+ kUMPStreamMessageStatusStartOfClip = 0x20,
+ kUMPStreamMessageStatusEndOfClip = 0x21
+};
+
// MIDI 2.0 Note On/Off Message Attribute Types
typedef CF_ENUM(UInt8, MIDINoteAttribute) {
kMIDINoteAttributeNone = 0x0, // no attribute data
@@ -127,11 +146,78 @@
// MIDI 2.0 Per Note Management Options
typedef CF_OPTIONS(UInt8, MIDIPerNoteManagementOptions) {
- kMIDIPerNoteManagementReset = 0x1,
- kMIDIPerNoteManagementDetach = 0x2
+ kMIDIPerNoteManagementReset = 0x1,
+ kMIDIPerNoteManagementDetach = 0x2
};
-#if defined(__cplusplus) && __has_feature(cxx_constexpr)
+/// MIDI 1.0 speed information for Function Blocks
+typedef CF_ENUM(SInt32, MIDIUMPFunctionBlockMIDI1Info) {
+ kMIDIUMPFunctionBlockMIDI1InfoNotMIDI1 = 0,
+ kMIDIUMPFunctionBlockMIDI1InfoUnrestrictedBandwidth = 1,
+ kMIDIUMPFunctionBlockMIDI1InfoRestrictedBandwidth = 2
+};
+
+/// UI hint types for Function Blocks
+typedef CF_ENUM(SInt32, MIDIUMPFunctionBlockUIHint) {
+ kMIDIUMPFunctionBlockUIHintUnknown = 0,
+ kMIDIUMPFunctionBlockUIHintReceiver = 1,
+ kMIDIUMPFunctionBlockUIHintSender = 2,
+ kMIDIUMPFunctionBlockUIHintSenderReceiver = 3
+};
+
+/// Function Block direction types
+typedef CF_ENUM(SInt32, MIDIUMPFunctionBlockDirection) {
+ kMIDIUMPFunctionBlockDirectionUnknown = 0,
+ kMIDIUMPFunctionBlockDirectionInput = 1,
+ kMIDIUMPFunctionBlockDirectionOutput = 2,
+ kMIDIUMPFunctionBlockDirectionBidirectional = 3
+};
+
+/// Stream Message Format
+typedef CF_ENUM(UInt8, UMPStreamMessageFormat) {
+ kUMPStreamMessageFormatComplete = 0x00,
+ kUMPStreamMessageFormatStart = 0x01,
+ kUMPStreamMessageFormatContinuing = 0x02,
+ kUMPStreamMessageFormatEnd = 0x03
+};
+
+//==================================================================================================
+#pragma mark -
+#pragma mark MIDI 2 Messages
+/// MIDI unsigned integer types
+typedef UInt8 MIDIUInteger2; //! 2 bits usable; allowed values 0x0~0x3
+typedef UInt8 MIDIUInteger4; //! 4 bits usable; allowed values 0x0~0xF
+typedef UInt8 MIDIUInteger7; //! 7 bits usable; allowed values 0x0~0x7F
+typedef UInt16 MIDIUInteger14; //! 14 bits usable; allowed values 0x0~0x3FFF;
+typedef UInt32 MIDIUInteger28; //! 28 bits usable; allowed values 0x0~0xFFFFFFF;
+
+static const MIDIUInteger2 kMIDIUInteger2Max = 0x3;
+static const MIDIUInteger4 kMIDIUInteger4Max = 0xF;
+static const MIDIUInteger7 kMIDIUInteger7Max = 0x7F;
+static const MIDIUInteger14 kMIDIUInteger14Max = 0x3FFF;
+static const MIDIUInteger28 kMIDIUInteger28Max = 0xFFFFFFF;
+
+/// Type for all UMP Groups
+typedef MIDIUInteger4 MIDIUMPGroupNumber;
+
+/// MIDI Channel, 0~15 (channels 1 through 16, respectively).
+/// Per the MIDI-CI specification, this is always a single nibble, 0x0~0xF.
+typedef MIDIUInteger4 MIDIChannelNumber;
+
+/// Some MIDI-CI messages use a CI device ID, which is either a UMP group or a reserved 7-bit value
+typedef MIDIUInteger7 MIDICIDeviceID;
+
+/// Device ID value used to specify that a message is to/from a UMP group.
+static const MIDICIDeviceID kMIDIDeviceIDUMPGroup = 0x7e;
+
+/// Device ID used for to/from Function Block; also used when Function Blocks are not supported.
+static const MIDICIDeviceID kMIDIDeviceIDFunctionBlock = 0x7f;
+
+/// The unique MIDI-CI negotiation identifier (MUID) used for a MIDICIResponder connection.
+/// Per the MIDI-CI specification, this is a randomly assigned unsigned 28-bit integer.
+typedef MIDIUInteger28 MIDICIMUID;
+
+#if defined(__cplusplus) && __has_feature(cxx_constexpr) && __cplusplus >= 202002L
#define CM_CONSTEXPR constexpr
#else
#define CM_CONSTEXPR
@@ -199,10 +285,25 @@
return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusNoteOn, channel, noteNumber, velocity);
}
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDI1UPPolyPressure(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 pressure)
+{
+ return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusPolyPressure, channel, noteNumber, pressure);
+}
+
CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDI1UPControlChange(UInt8 group, UInt8 channel, UInt8 index, UInt8 data) {
return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusControlChange, channel, index, data);
}
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDI1UPProgramChange(UInt8 group, UInt8 channel, UInt8 program)
+{
+ return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusProgramChange, channel, program, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDI1UPChannelPressure(UInt8 group, UInt8 channel, UInt8 value)
+{
+ return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusChannelPressure, channel, value, 0);
+}
+
CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDI1UPPitchBend(UInt8 group, UInt8 channel, UInt8 lsb, UInt8 msb) {
return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusPitchBend, channel, lsb, msb);
}
@@ -221,7 +322,7 @@
static const UInt8 kMIDI1UPMaxSysexSize = 6;
CF_INLINE CM_CONSTEXPR MIDIMessage_64 MIDI1UPSysExArray(UInt8 group, UInt8 status, const Byte *begin, const Byte *end)
{
- int numberOfBytes = end <= begin ? 0 : end - begin;
+ long numberOfBytes = end <= begin ? 0 : end - begin;
if (numberOfBytes > kMIDI1UPMaxSysexSize) numberOfBytes = kMIDI1UPMaxSysexSize; // prevent overflow
return MIDI1UPSysEx(group, status, numberOfBytes,
numberOfBytes > 0 ? *begin : 0,
@@ -319,6 +420,168 @@
return MIDI2ChannelVoiceMessage(group, kMIDICVStatusPerNotePitchBend, channel, (UInt16)(noteNumber) << 8, value);
}
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2StreamMessage(UMPStreamMessageFormat format, UMPStreamMessageStatus status, UInt16 data1, UInt32 data2, UInt32 data3, UInt32 data4)
+{
+ const UInt32 word0 = (UInt32)(kMIDIMessageTypeStream) << 28u | (UInt32)(format & 0x03) << 26u | (UInt32)status << 16u | (UInt32)data1;
+ return (MIDIMessage_128){ word0, data2, data3, data4 };
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2StreamMessageFromData(UMPStreamMessageFormat format, UMPStreamMessageStatus status, const Byte* data, const size_t length)
+{
+ UInt32 words[3] = {};
+ UInt16 data16 = 0;
+
+ if (length > 0) {
+ data16 = (UInt16)(data[0]) << 8u;
+ }
+
+ if (length > 1) {
+ data16 |= (UInt16)(data[1]);
+
+ long remainingBytes = length - 2;
+ if (remainingBytes > 0) {
+ UInt8 byteIndex = 2;
+ for (UInt8 i = 0; i < 3; i++) {
+ words[i] = (byteIndex < length ? (UInt32)(data[byteIndex++]) << 24u : 0u);
+ words[i] |= (byteIndex < length ? (UInt32)(data[byteIndex++]) << 16u : 0u);
+ words[i] |= (byteIndex < length ? (UInt32)(data[byteIndex++]) << 8u : 0u);
+ words[i] |= (byteIndex < length ? (UInt32)(data[byteIndex++]) : 0u);
+ }
+ }
+ }
+ return MIDI2StreamMessage(format, status, data16, words[0], words[1], words[2]);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2EndpointDiscoveryMessage(UInt8 versionMajor, UInt8 versionMinor, bool endpointInfoRequest, bool deviceIdentityRequest, bool endpointNameRequest, bool productInstanceIDRequest, bool streamConfigurationRequest)
+{
+ const UInt16 data1 = (UInt16)versionMajor << 8u | (UInt16)versionMinor;
+ UInt32 data2 = (UInt32)(streamConfigurationRequest ? 1u : 0u) << 4u;
+ data2 |= (UInt32)(productInstanceIDRequest ? 1u : 0u) << 3u;
+ data2 |= (UInt32)(endpointNameRequest ? 1u : 0u) << 2u;
+ data2 |= (UInt32)(deviceIdentityRequest ? 1u : 0u) << 1u;
+ data2 |= (UInt32)(endpointInfoRequest ? 1u : 0u);
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusEndpointDiscovery, data1, data2, 0, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2EndpointInfoNotificationMessage(UInt8 versionMajor, UInt8 versionMinor, bool staticFunctionBlocks, UInt8 numberOfFunctionBlocks, bool m1, bool m2, bool receiveJRTimestamp, bool transmitJRTimestamp)
+{
+ const UInt16 data1 = (UInt16)versionMajor << 8u | (UInt16)versionMinor;
+ UInt32 data2 = (UInt32)(staticFunctionBlocks ? 1u : 0u) << 31u;
+ data2 |= (UInt32)(numberOfFunctionBlocks & 0x7F) << 24u;
+ data2 |= (UInt32)(m2 ? 1u : 0u) << 9u;
+ data2 |= (UInt32)(m1 ? 1u : 0u) << 8u;
+ data2 |= (UInt32)(receiveJRTimestamp ? 1u : 0u) << 1u;
+ data2 |= (UInt32)(transmitJRTimestamp ? 1u : 0u);
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusEndpointInfoNotification, data1, data2, 0, 0);
+}
+
+CF_INLINE MIDIMessage_128 MIDI2EndpointDeviceIdentityNotificationMessage(MIDIUInteger7 deviceManufacturer1, MIDIUInteger7 deviceManufacturer2, MIDIUInteger7 deviceManufacturer3, MIDIUInteger14 deviceFamily, MIDIUInteger14 deviceFamilyModel, MIDIUInteger28 revisionLevel)
+{
+ UInt8 buffer[14] = {};
+ buffer[3] = deviceManufacturer1 & 0x7F;
+ buffer[4] = deviceManufacturer2 & 0x7F;
+ buffer[5] = deviceManufacturer3 & 0x7F;
+
+ buffer[6] = (deviceFamily & 0x7f);
+ buffer[7] = ((deviceFamily >> 7) & 0x7F);
+
+ buffer[8] = (deviceFamilyModel & 0x7f);
+ buffer[9] = ((deviceFamilyModel >> 7) & 0x7F);
+
+ buffer[10] = revisionLevel & 0x7F;
+ buffer[11] = (revisionLevel >> 7) & 0x7F;
+ buffer[12] = (revisionLevel >> 14) & 0x7F;
+ buffer[13] = (revisionLevel >> 21) & 0x7F;
+
+ return MIDI2StreamMessageFromData(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusDeviceIdentityNotification, buffer, 14);
+}
+
+CF_INLINE MIDIMessage_128 MIDI2EndpointNameNotificationMessage(UMPStreamMessageFormat format, const char* data, const size_t length)
+{
+ return MIDI2StreamMessageFromData(format, kUMPStreamMessageStatusEndpointNameNotification, (const Byte*)data, length);
+}
+
+CF_INLINE MIDIMessage_128 MIDI2EndpointProductInstanceIDNotificationMessage(UMPStreamMessageFormat format, const char* data, const size_t length)
+{
+ return MIDI2StreamMessageFromData(format, kUMPStreamMessageStatusProductInstanceIDNotification, (const Byte*)data, length);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2StreamConfigurationRequestMessage(UInt8 protocol, bool receiveJRTimestamp, bool transmitJRTimestamp)
+{
+ const UInt16 data1 = (UInt16)protocol << 8u | (UInt16)(receiveJRTimestamp ? 1u : 0u) << 1u | (UInt16)(transmitJRTimestamp ? 1u : 0u);
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusStreamConfigurationRequest, data1, 0, 0, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2StreamConfigurationNotificationMessage(UInt8 protocol, bool receiveJRTimestamp, bool transmitJRTimestamp)
+{
+ const UInt16 data1 = (UInt16)protocol << 8u | (UInt16)(receiveJRTimestamp ? 1u : 0u) << 1u | (UInt16)(transmitJRTimestamp ? 1u : 0u);
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusStreamConfigurationNotification, data1, 0, 0, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2FunctionBlockDiscoveryMessage(UInt8 functionBlockNumber, bool infoRequest, bool nameRequest)
+{
+ const UInt16 data1 = (UInt16)functionBlockNumber << 8u | (UInt16)(nameRequest ? 1u : 0u) << 1u | (UInt16)(infoRequest ? 1u : 0u);
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusFunctionBlockDiscovery, data1, 0, 0, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2FunctionBlockInfoNotificationMessage(bool active, MIDIUInteger7 blockNumber, MIDIUMPFunctionBlockUIHint UIHint, MIDIUMPFunctionBlockMIDI1Info MIDI1, MIDIUMPFunctionBlockDirection direction, UInt8 firstGroup, UInt8 numberOfGroupsSpanned, UInt8 CIVersion, UInt8 maxSysex8Streams)
+{
+ const UInt16 data1 = (UInt16)(active ? 1u : 0u) << 15u | (UInt16)(blockNumber & 0x7F) << 8u | (UInt16)UIHint << 4u | (UInt16)MIDI1 << 2u | (UInt16)direction;
+ const UInt32 data2 = (UInt32)firstGroup << 24u | (UInt32)numberOfGroupsSpanned << 16u | (UInt32)CIVersion << 8u | (UInt32)maxSysex8Streams;
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusFunctionBlockInfoNotification, data1, data2, 0, 0);
+}
+
+CF_INLINE MIDIMessage_128 MIDI2FunctionBlockNameNotificationMessage(UMPStreamMessageFormat format, UInt8 blockNumber, const char* data, size_t length)
+{
+ Byte buffer[14] = {};
+ buffer[0] = blockNumber;
+ memcpy(buffer + 1, data, (length > 13) ? 13 : length);
+ return MIDI2StreamMessageFromData(format, kUMPStreamMessageStatusFunctionBlockNameNotification, buffer, 14);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2StartOfClipMessage(void)
+{
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusStartOfClip, 0, 0, 0, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2EndOfClipMessage(void)
+{
+ return MIDI2StreamMessage(kUMPStreamMessageFormatComplete, kUMPStreamMessageStatusEndOfClip, 0, 0, 0, 0);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDINoOpMessage(void)
+{
+ return 0x0000;
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDIJitterReductionClockMessage(UInt16 senderClockTime)
+{
+ return (UInt32)kMIDIUtilityStatusJitterReductionClock << 20u | (UInt32)senderClockTime;
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDIJitterReductionTimestampMessage(UInt16 senderClockTimestamp)
+{
+ return (UInt32)kMIDIUtilityStatusJitterReductionTimestamp << 20u | (UInt32)senderClockTimestamp;
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDIDeltaClockstampTicksPerQuarterNoteMessage(UInt16 ticksPerQuarterNote)
+{
+ return (UInt32)kMIDIUtilityStatusDeltaClockstampTicksPerQuarterNote << 20u | (UInt32)ticksPerQuarterNote;
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_32 MIDITicksSinceLastEventMessage(UInt32 ticksSinceLastEvent)
+{
+ return (UInt32)kMIDIUtilityStatusTicksSinceLastEvent << 20u | (UInt32)(ticksSinceLastEvent & 0x000FFFFF);
+}
+
+CF_INLINE CM_CONSTEXPR MIDIMessage_128 MIDI2FlexDataMessage(MIDIUInteger4 group, MIDIUInteger2 format, MIDIUInteger2 address, MIDIUInteger4 channel, UInt8 statusBank, UInt8 status, UInt32 data1, UInt32 data2, UInt32 data3)
+{
+ UInt32 word0 = (UInt32)kMIDIMessageTypeFlexData << 28u | (UInt32)(group & 0x0F) << 24u | (UInt32)(format & 0x03) << 22u | (UInt32)(address & 0x03) << 20u | (UInt32)(channel & 0x0F) << 16u;
+ word0 |= (UInt32)statusBank << 8u;
+ word0 |= (UInt32)status;
+ return (MIDIMessage_128){ word0, data1, data2, data3 };
+}
+
//==================================================================================================
#pragma mark -
#pragma mark UMP message helper functions for reading
@@ -472,7 +735,7 @@
struct {
UInt32 words[4]; //!< up to four 32 bit words
- } unknown; //!< active when type is kMIDIMessageTypeUnknownF
+ } unknown; //!< active when type is unkown
};
} MIDIUniversalMessage;
@@ -536,7 +799,7 @@
*/
extern void MIDIEventListForEachEvent(
const MIDIEventList* evtlist, MIDIEventVisitor visitor, void* visitorContext)
- API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
+ API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
#ifdef __cplusplus
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h 2024-04-13 14:22:29
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h 2024-05-30 05:03:14
@@ -74,6 +74,14 @@
#include <CoreFoundation/CoreFoundation.h>
#include <stddef.h>
+
+#define MIDI_API_UNAVAILABLE_NON_MACOS \
+ __OS_AVAILABILITY(bridgeos, unavailable) \
+ __OS_AVAILABILITY(ios, unavailable) \
+ __OS_AVAILABILITY(tvos, unavailable) \
+ __OS_AVAILABILITY(watchos, unavailable)
+
+
CF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
@@ -687,7 +695,8 @@
kMIDIMsgPropertyChanged = 4,
kMIDIMsgThruConnectionsChanged = 5,
kMIDIMsgSerialPortOwnerChanged = 6,
- kMIDIMsgIOError = 7
+ kMIDIMsgIOError = 7,
+ kMIDIMsgInternalStart API_UNAVAILABLE(macos) = 0x1000,
};
@@ -1000,7 +1009,7 @@
Added in CoreMIDI 1.1 (Mac OS X 10.1). DEPRECATED as of CoreMIDI 1.3. Use
kMIDIPropertyNameConfiguration instead.
*/
-extern const CFStringRef kMIDIPropertyFactoryPatchNameFile API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfiguration", macos(10.1, 10.2)) API_UNAVAILABLE(ios, tvos, watchos);
+extern const CFStringRef kMIDIPropertyFactoryPatchNameFile API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfiguration", macos(10.1, 10.2)) MIDI_API_UNAVAILABLE_NON_MACOS;
/*!
@@ -1013,7 +1022,7 @@
Added in CoreMIDI 1.1 (Mac OS X 10.1). DEPRECATED as of CoreMIDI 1.3. Use
kMIDIPropertyNameConfiguration instead.
*/
-extern const CFStringRef kMIDIPropertyUserPatchNameFile API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfiguration", macos(10.1, 10.2)) API_UNAVAILABLE(ios, tvos, watchos);
+extern const CFStringRef kMIDIPropertyUserPatchNameFile API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfiguration", macos(10.1, 10.2)) MIDI_API_UNAVAILABLE_NON_MACOS;
/*!
@constant kMIDIPropertyNameConfiguration
@@ -1354,6 +1363,16 @@
messages with no group (e.g., message type 0 and message type F).
*/
extern const CFStringRef kMIDIPropertyUMPCanTransmitGroupless API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+ constant kMIDIPropertyAssociatedEndpoint
+ @discussion
+ endpoint property, MIDIEndpointRef. If this property is present, the indicated endpoint should be
+ used for bidirectional communication purposes, (e.g. UMP Endpoint pairing or MIDI-CI devices).
+ When setting this property on an endpoint, it should also be set on the assocated endpoint to
+ create a bidirectional mapping.
+*/
+extern const CFStringRef kMIDIPropertyAssociatedEndpoint API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(tvos, watchos);
//==================================================================================================
#pragma mark Clients
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h 2024-04-05 22:13:33
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h 2024-05-30 04:53:06
@@ -78,7 +78,7 @@
@result An OSStatus result code.
*/
extern OSStatus
-MIDISetupCreate( MIDISetupRef *outSetup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+MIDISetupCreate( MIDISetupRef *outSetup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
@@ -96,7 +96,7 @@
@result An OSStatus result code.
*/
extern OSStatus
-MIDISetupDispose( MIDISetupRef setup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+MIDISetupDispose( MIDISetupRef setup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
/*!
@@ -120,7 +120,7 @@
@result An OSStatus result code.
*/
extern OSStatus
-MIDISetupInstall( MIDISetupRef setup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+MIDISetupInstall( MIDISetupRef setup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
@@ -141,7 +141,7 @@
@result An OSStatus result code.
*/
extern OSStatus
-MIDISetupGetCurrent( MIDISetupRef *outSetup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+MIDISetupGetCurrent( MIDISetupRef *outSetup ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
@@ -165,7 +165,7 @@
*/
extern OSStatus
MIDISetupToData( MIDISetupRef setup,
- CFDataRef __nullable * __nonnull outData ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+ CFDataRef __nullable * __nonnull outData ) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
/*!
@@ -188,7 +188,7 @@
*/
extern OSStatus
MIDISetupFromData( CFDataRef data,
- MIDISetupRef * outSetup) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+ MIDISetupRef * outSetup) API_DEPRECATED("No longer supported", macos(10.0, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
/*!
@@ -395,7 +395,7 @@
*/
extern OSStatus
MIDIGetSerialPortOwner( CFStringRef portName,
- CFStringRef __nullable * __nonnull outDriverName ) API_DEPRECATED("No longer supported", macos(10.1, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+ CFStringRef __nullable * __nonnull outDriverName ) API_DEPRECATED("No longer supported", macos(10.1, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
/*!
@@ -418,7 +418,7 @@
*/
extern OSStatus
MIDISetSerialPortOwner( CFStringRef portName,
- CFStringRef driverName ) API_DEPRECATED("No longer supported", macos(10.1, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+ CFStringRef driverName ) API_DEPRECATED("No longer supported", macos(10.1, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
/*!
@@ -440,7 +440,7 @@
@result An OSStatus result code.
*/
extern OSStatus
-MIDIGetSerialPortDrivers( CFArrayRef __nullable * __nonnull outDriverNames ) API_DEPRECATED("No longer supported", macos(10.1, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+MIDIGetSerialPortDrivers( CFArrayRef __nullable * __nonnull outDriverNames ) API_DEPRECATED("No longer supported", macos(10.1, 10.6)) MIDI_API_UNAVAILABLE_NON_MACOS;
// -----------------------------------------------------------------------------
/*!
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCI.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCI.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCI.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCI.h 2024-05-30 04:27:45
@@ -0,0 +1,243 @@
+/*
+ File: CoreMIDI/MIDIUMPCI.h
+
+ Contains: Constants, structures, and helper functions for Universal MIDI
+ Packet (UMP) and MIDI Capability Inquiry (MIDI-CI).
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+
+*/
+
+#ifndef CoreMIDI_MIDIUMPCI_h
+#define CoreMIDI_MIDIUMPCI_h
+
+#include <CoreFoundation/CFBase.h>
+#include <CoreMIDI/MIDIMessages.h>
+#include <CoreMIDI/MIDIServices.h>
+#import <stdint.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define MIDICI1_0 API_AVAILABLE(macos(10.14), ios(12.0)) API_UNAVAILABLE(watchos, tvos)
+#define MIDICI1_1 API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(watchos, tvos)
+#define MIDICI1_2 API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos)
+
+#define MIDICI1_0_AVAILABILITY API_AVAILABLE(macos(10.14), ios(12.0)) API_UNAVAILABLE(watchos, tvos)
+#define MIDICI1_1_AVAILABILITY API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(watchos, tvos)
+
+
+#define MIDICI1_0_DEPRECATED API_DEPRECATED("No longer supported for CoreMIDI", macos(10.14, 15.0), ios(12.0, 18.0)) API_UNAVAILABLE(watchos, tvos)
+#define MIDICI1_1_DEPRECATED API_DEPRECATED("No longer supported for CoreMIDI", macos(11.0, 15.0), ios(14.0, 18.0)) API_UNAVAILABLE(watchos, tvos)
+
+#define MIDIUMP1_1 API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(tvos, watchos)
+
+ typedef struct
+ {
+ Byte sysExIDByte[3]; // 1-byte SysEx IDs are padded with trailing zeroes
+ } MIDI2DeviceManufacturer;
+
+ typedef struct
+ {
+ Byte revisionLevel[4];
+ } MIDI2DeviceRevisionLevel;
+
+ /*!
+ @typedef MIDICICategoryBitmap
+
+ @discussion MIDI Capability category supported (bitmap: D6 D5 D4 D3 D2 D1 D0)
+ Bit Category Sub-ID Range Description
+ D0 0x00~0x0F Reserved - No Messages Defined Yet
+ D1 0x10~0x1F Protocol Negotiation (Deprecated)
+ D2 0x20~0x2F Profile Configuration Supported
+ D3 0x30~0x3F Property Exchange Supported
+ D4 0x40~0x4F Process Inquiry Supported
+ D5 0x50~0x5F Reserved - No Messages Defined Yet
+ D6 0x60~0x6F Reserved - No Messages Defined Yet
+
+ e.g., a MIDICIDevice supporting Profile Configuration and Property Exchange has
+ category 0xC.
+ */
+ typedef CF_OPTIONS(MIDIUInteger7, MIDICICategoryBitmap) {
+ kMIDICICategoryBitmapProtocolNegotiation = (1UL << 1),
+ kMIDICICategoryBitmapProfileConfigurationSupported = (1UL << 2),
+ kMIDICICategoryBitmapPropertyExchangeSupported = (1UL << 3),
+ kMIDICICategoryBitmapProcessInquirySupported = (1UL << 4),
+ };
+
+ /*!
+ @typedef MIDIUMPFunctionBlockID
+ @brief The device-unique Function Block ID.
+ */
+ typedef MIDIUInteger7 MIDIUMPFunctionBlockID;
+
+ typedef CF_ENUM(UInt8, MIDICIDeviceType) {
+ kMIDICIDeviceTypeUnknown = 0,
+ kMIDICIDeviceTypeLegacyMIDI1,
+ kMIDICIDeviceTypeVirtual,
+ kMIDICIDeviceTypeUSBMIDI
+ };
+
+
+//=============================================================================
+#pragma mark MIDI-CI Message Types
+
+ /*!
+ @enum MIDICIProfileMessageType
+ @brief MIDI-CI Profile message sub-ID values.
+ */
+ typedef CF_ENUM(MIDIUInteger7, MIDICIProfileMessageType) {
+ kMIDICIProfileMessageTypeProfileInquiry = 0x20,
+ kMIDICIProfileMessageTypeReplyToProfileInquiry = 0x21,
+ kMIDICIProfileMessageTypeSetProfileOn = 0x22,
+ kMIDICIProfileMessageTypeSetProfileOff = 0x23,
+ kMIDICIProfileMessageTypeProfileEnabledReport = 0x24,
+ kMIDICIProfileMessageTypeProfileDisabledReport = 0x25,
+ kMIDICIProfileMessageTypeProfileAdded = 0x26,
+ kMIDICIProfileMessageTypeProfileRemoved = 0x27,
+ kMIDICIProfileMessageTypeDetailsInquiry = 0x28,
+ kMIDICIProfileMessageTypeReplyToDetailsInquiry = 0x29,
+ kMIDICIProfileMessageTypeProfileSpecificData = 0x2F
+ };
+
+ /*!
+ @enum MIDICIPropertyExchangeMessageType
+ @brief MIDI-CI Property Exchange Message sub-ID values.
+ */
+ typedef CF_ENUM(MIDIUInteger7, MIDICIPropertyExchangeMessageType) {
+ kMIDICIPropertyExchangeMessageTypeInquiryPropertyExchangeCapabilities = 0x30,
+ kMIDICIPropertyExchangeMessageTypeReplyToPropertyExchangeCapabilities = 0x31,
+ kMIDICIPropertyExchangeMessageTypeInquiryHasPropertyData_Reserved = 0x32, // Deprecated
+ kMIDICIPropertyExchangeMessageTypeInquiryReplyToHasPropertyData_Reserved = 0x33, // Deprecated
+ kMIDICIPropertyExchangeMessageTypeInquiryGetPropertyData = 0x34,
+ kMIDICIPropertyExchangeMessageTypeReplyToGetProperty = 0x35,
+ kMIDICIPropertyExchangeMessageTypeInquirySetPropertyData = 0x36,
+ kMIDICIPropertyExchangeMessageTypeReplyToSetPropertyData = 0x37,
+ kMIDICIPropertyExchangeMessageTypeSubscription = 0x38,
+ kMIDICIPropertyExchangeMessageTypeReplyToSubscription = 0x39,
+ kMIDICIPropertyExchangeMessageTypeNotify = 0x3F
+ };
+
+ /*!
+ @enum MIDICIProcessInquiryMessageType
+ @brief MIDI-CI Process Inquiry sub-ID values.
+ */
+ typedef CF_ENUM(MIDIUInteger7, MIDICIProcessInquiryMessageType) {
+ kMIDICIProcessInquiryMessageTypeInquiryProcessInquiryCapabilities = 0x40,
+ kMIDICIProcessInquiryMessageTypeReplyToProcessInquiryCapabilities = 0x41,
+ kMIDICIProcessInquiryMessageTypeInquiryMIDIMessageReport = 0x42,
+ kMIDICIProcessInquiryMessageTypeReplyToMIDIMessageReport = 0x43,
+ kMIDICIProcessInquiryMessageTypeEndOfMIDIMessageReport = 0x44
+ };
+
+ /*!
+ @enum MIDICIManagementMessageType
+ @brief MIDI-CI Management sub-ID values.
+ */
+ typedef CF_ENUM(MIDIUInteger7, MIDICIManagementMessageType) {
+ kMIDICIManagementMessageTypeDiscovery = 0x70,
+ kMIDICIManagementMessageTypeReplyToDiscovery = 0x71,
+ kMIDICIManagementMessageTypeInquiryEndpointInformation = 0x72,
+ kMIDICIManagementMessageTypeReplyToEndpointInformation = 0x73,
+ kMIDICIManagementMessageTypeMIDICIACK = 0x7D,
+ kMIDICIManagementMessageTypeInvalidateMUID = 0x7E,
+ kMIDICIManagementMessageTypeMIDICINAK = 0x7F
+ };
+
+
+ /*!
+ @enum MIDICIProfileType
+ @brief MIDI-CI Profile variants.
+ */
+ typedef CF_ENUM(UInt8, MIDICIProfileType) {
+ kMIDICIProfileTypeSingleChannel = 1,
+ kMIDICIProfileTypeGroup = 2,
+ kMIDICIProfileTypeFunctionBlock = 3,
+ kMIDICIProfileTypeMultichannel = 4
+ };
+
+ /*!
+ @enum MIDIUMPCIObjectBackingType
+ @brief The underlying transport / backing device type variants.
+ */
+ typedef CF_ENUM(UInt8, MIDIUMPCIObjectBackingType) {
+ kMIDIUMPCIObjectBackingTypeUnknown = 0,
+ kMIDIUMPCIObjectBackingTypeVirtual,
+ kMIDIUMPCIObjectBackingTypeDriverDevice,
+ kMIDIUMPCIObjectBackingTypeUSBMIDI
+ };
+
+//=============================================================================
+#pragma mark MIDI-CI Profile Constants and Structures
+
+ /*!
+ @struct MIDICIProfileIDStandard
+ @brief A C-style struct containing a standard profile ID.
+ */
+ typedef struct
+ {
+ MIDIUInteger7 profileIDByte1;
+ MIDIUInteger7 profileBank;
+ MIDIUInteger7 profileNumber;
+ MIDIUInteger7 profileVersion;
+ MIDIUInteger7 profileLevel;
+ } MIDICIProfileIDStandard;
+
+ /*!
+ @struct MIDICIProfileIDManufacturerSpecific
+ @brief A C-style struct containing a Manufacturer Specific profile ID.
+
+ */
+ typedef struct
+ {
+ MIDIUInteger7 sysExID1;
+ MIDIUInteger7 sysExID2;
+ MIDIUInteger7 sysExID3;
+ MIDIUInteger7 info1;
+ MIDIUInteger7 info2;
+ } MIDICIProfileIDManufacturerSpecific;
+
+ /*!
+ @struct MIDICIProfileID
+ @brief A C-style struct containing the profile ID.
+
+ @discussion There are two general types of Profiles -- standard defined Profiles and
+ manufacturer-specific Profiles.
+ */
+ typedef union
+ {
+ MIDICIProfileIDStandard standard;
+ MIDICIProfileIDManufacturerSpecific manufacturerSpecific;
+ } MIDICIProfileID;
+
+//=============================================================================
+#pragma mark MIDI-CI Property Exchange Constants
+
+ /*!
+ @typedef MIDICIPropertyExchangeRequestID
+ @brief The request ID associated with a Property Exchange request.
+
+ @discussion As the respose context of a Property Exchange message is assumed to be known
+ by the initiator, the requestID of each request is included with the response such
+ that it can be correlated with the initial request.
+ */
+ typedef UInt8 MIDICIPropertyExchangeRequestID CF_TYPED_EXTENSIBLE_ENUM;
+
+ /*!
+ @constant kMIDICIPropertyExchangeBadRequestID
+ @brief Returned when MIDI-CI Property Messages were not dispatched due to an error.
+ */
+ static MIDICIPropertyExchangeRequestID kMIDICIPropertyExchangeBadRequestID = 0xFF;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // CoreMIDI_MIDIUMPCI_h
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCIProfile.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCIProfile.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCIProfile.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPCIProfile.h 2024-05-30 03:38:45
@@ -0,0 +1,161 @@
+/*
+ File: CoreMIDI/MIDIUMPCIProfile.h
+
+ Contains: API for MIDI Capability Inquiry (MIDI-CI) Profile Configuration.
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDIUMPCIProfile_h)
+#define MIDIUMPCIProfile_h
+
+/*!
+ @header MIDIUMPCIProfile.h
+
+ This is the header file for MIDI-CI Profile Configuration API.
+
+ API Overview
+ ------------
+ The MIDI server automatically discovers UMP Endpoints, Function Blocks, and performs MIDI-CI
+ Discovery. When a client process retrieves the process instance of the UMP and MIDI-CI (UMPCI)
+ manager, a copy of the system-wide MIDI 2.0 cache is created using objects that describe the MIDI 2.0
+ subsystem.
+
+ Any discovered MIDI-CI device with the Profile Configuration Capability will have its Profile configuration
+ cached as CI Profile Objects (MIDIUMPCIProfile). The objects can then be manipulated to perform
+ common Profile operations.
+
+ Implementation overview
+ -----------------------
+ To view the MIDI-CI devices discovered by the MIDI server, retrieve the local process instance of the
+ MIDI-CI device manager (MIDICIDeviceManager) and retrieve a copy of the discovered device Array.
+ Any CI devices with the Profile Capability may have its Profiles investigated in the 'ciProfiles' property.
+
+ Profiles are enabled or disabled, and a request to Set Profile On or Set Profile Off either using a mutable
+ CI device or via the MIDI server's MUID may issued via API. The result of a Set Profile On/Off request is
+ received on the local MIDI-CI device manager instance via a notification. In
+ environments where virtual MIDI endpoint creation is not allowed, notification is only posted when the
+ process is not suspended.
+
+ This API is not realtime-safe.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0, Universal
+ MIDI Packet, and MIDI Capability Inquiry.
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDICIDevice;
+@class MIDICIMutableDevice;
+
+#pragma mark MIDIUMPCIProfile
+
+@class MIDIUMPCIProfile;
+
+/*!
+ @class MIDIUMPCIProfile
+ @brief An object representing Capability Inquiry Profile on a MIDICIDevice.
+
+ @discussion MIDI-CI profiles describe a mapping of MIDI messages to specific sounds and synthesis
+ behaviors, e.g. General MIDI, a drawbar organ, etc. A MIDI-CI Profile may be a standard
+ registered Profile or vendor-specific.
+
+ A MIDI-CI Profile ID consists of 5 bytes.
+ ===============================================================
+ Standard Profile Vendor-Specific Profile
+ Profile ID Byte 1: 0x7E Standard Profile Manufacturer SysEx ID 1 Profile
+ Profile ID Byte 2: Profile Bank Manufacturer SysEx ID 2 Profile
+ Profile ID Byte 3: Profile Number Manufacturer SysEx ID 3 Profile
+ Profile ID Byte 4: Profile Version Manufacturer-specific Info
+ Profile ID Byte 5: Profile Level Manufacturer-specific Info
+
+ MIDI-CI Profiles have the following generalized types:
+
+ Profile Type Source Channels Channel Range
+ ============ ========== =========== ========================
+ Single-channel 0x00~0x0F 1 1 channel (1 to 16) of a Group
+ Group 0x7E 16 All channels of a Group
+ Function Block 0x7F 16 per Group All channels of a Function Block
+ Multi-channel 0x00~0x0F 2 or more Profile-specific
+
+ MIDIUMPCIProfile objects may only be registered to a single CI device, and any number
+ of MIDIUMPCIProfile objects containg the same profile ID may be registered to CI
+ devices in the MIDI 2.0 subsystem.
+*/
+
+MIDICI1_2
+@interface MIDIUMPCIProfile : NSObject
+
+/// @property name
+/// @brief The name of the MIDI-CI proifle.
+@property (nonatomic, readonly) NSString* name;
+
+/// @property profileID
+/// @brief C struct representation of MIDI-CI Profile ID.
+@property (nonatomic, readonly) MIDICIProfileID profileID;
+
+/// @property profileType
+/// @brief The type of MIDI-CI Profile, i.e., single-channel, multichannel, Group, or Function Block.
+@property (nonatomic, readonly) MIDICIProfileType profileType;
+
+/// @property groupOffset
+/// @brief For Group profiles defined on Function Blocks, the value to be added to the lowest
+/// Function Block UMP Group for messaging (e.g., a Group Profile defined on the second
+/// Group of a Function Block has a groupOffset of 1).
+@property (nonatomic, readonly) MIDIUMPGroupNumber groupOffset;
+
+/// @property firstChannel
+/// @brief The first channel number supported on the Profile.
+@property (nonatomic, readonly) MIDIChannelNumber firstChannel;
+
+/// @property enabledChannelCount
+/// @brief The number of channels currently enabled on the Profile. When the profile is disabled,
+/// this value is set to 0.
+@property (nonatomic, readonly) MIDIUInteger14 enabledChannelCount;
+
+/// @property totalChannelCount
+/// @brief The total number of channels supported by the Profile.
+@property (nonatomic, readonly) MIDIUInteger14 totalChannelCount;
+
+/// @property isEnabled
+/// @brief The enable state of the Profile.
+@property (nonatomic, readonly) BOOL isEnabled;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @method setProfileState:enabledChannelCount:error:
+ @brief Issue a Set Profile On or Set Profile Off request on this profile using the MIDI server's
+ MUID.
+
+ @param isEnabled YES if setting the Profile to on.
+ @param enabledChannelCount The requsted number of channels to be enabled when
+ the Profile is enabled. This field is only used when isOn
+ is set to YES and the profile can enable a variable number
+ of channels. Otherwise, it is ignored.
+ @param error The out-error used if an error occurred.
+
+ @discussion The result of this operation, if any, is received via the profile notification
+ posted by the MIDICIDeviceManager.
+ Returns YES if the request is valid and the request was dispatched.
+ */
+- (BOOL)setProfileState:(BOOL)isEnabled
+ enabledChannelCount:(MIDIUInteger14)enabledChannelCount
+ error:(NSError* _Nullable*)error;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpoint.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpoint.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpoint.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpoint.h 2024-05-30 03:38:45
@@ -0,0 +1,201 @@
+/*
+ File: CoreMIDI/MIDIUMPEndpoint.h
+
+ Contains: API for MIDI Universal MIDI Packet (UMP) endpoints
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDIUMPEndpoint_h)
+#define MIDIUMPEndpoint_h
+
+/*!
+ @header MIDIUMPEndpoint.h
+
+ This is the header file for Univeral MIDI Packet (UMP) endpoint system services.
+
+ API Overview
+ ------------
+ MIDI 2.0 is inherently bidirectional, and an endpoint that communicates using the Universal MIDI Packet
+ (UMP) format (a UMP Endpoint) must be capable of acting as a source of and destination for UMP data.
+ The MIDIUMPEndpoint class defines an explicit relationship between a UMP-native MIDI source and a
+ UMP-native MIDI destination and encapsulates its stream configuration.
+
+ A MIDIUMPEndpoint is a local cached object copied from the system-wide UMP Endpoint cache into the
+ client process instance of the UMP Endpoint manager (MIDIUMPEndpointManager). Any UMP Endpoint
+ may declare up to 32 Function Blocks, cached as MIDIUMPFunctionBlock objects registered to a
+ MIDIUMPEndpoint. These Function Blocks may also be used as MIDI-CI devices.
+
+ Implementation overview
+ -----------------------
+ To view the MIDIUMPEndpoint objects discovered by the MIDI server, retrieve the local process instance
+ of the UMP Endpoint manager (MIDIUMPEndpointManager) and retrieve a copy of the UMP Endpoint
+ Array. Any additional UMP Endpoint information and Function Blocks may be investigated in the discovered
+ Capabilities that are cached by the server can be viewed by investigating the CI device properties and by
+ using the associated API.
+
+ The singleton object MIDIUMPEndpointManager maintains a local copy of the UMP Endpoint cache and
+ may also be used to observe notifications which are posted in response to common UMP subsystem
+ cache updates.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0 and UMP.
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDIUMPFunctionBlock;
+@class MIDIUMPMutableFunctionBlock;
+@class MIDIUMPEndpoint;
+@class MIDIUMPMutableEndpoint;
+
+#pragma mark MIDI2DeviceInfo
+
+/*!
+ @class MIDI2DeviceInfo
+ @brief An NSObject containing basic information about a MIDI 2.0 device. Used by
+ MIDIUMPEndpointPair and MIDICIDevice.
+*/
+MIDIUMP1_1
+@interface MIDI2DeviceInfo : NSObject
+
+/// @property manufacturerID
+/// @brief The MIDI System Exclusive ID of the device manufacturer, up to 3-Bytes.
+/// @discussion One-byte SysEx IDs use only the least significant byte (e.g., Apple's System Exclusive ID, 0x11).
+@property (nonatomic, readonly) MIDI2DeviceManufacturer manufacturerID;
+
+/// @property family
+/// @brief The family of models to which the device belongs, up to 14 bits.
+@property (nonatomic, readonly) MIDIUInteger14 family;
+
+/// @property modelNumber
+/// @brief The specific model from the device manufacturer, up to 14 bits.
+@property (nonatomic, readonly) MIDIUInteger14 modelNumber;
+
+/// @property revisionLevel
+/// @brief The version number of a device model number.
+@property (nonatomic, readonly) MIDI2DeviceRevisionLevel revisionLevel;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @method initWithManufacturerID:family:modelNumber:revision:
+ @brief The initializer for constructing the MIDI2DeviceInfo object.
+
+ @param manufacturerID The 3-Byte manufacturer System Exclusive ID.
+ @param family The 14-bit device family.
+ @param modelNumber The 14-bit model number.
+ @param revisionLevel The 4-Byte revision level.
+
+ @discussion Initialization may fail if the provided values for family or modelNumber are
+ outside of their expected bit range. For example, if modelNumber is outside
+ of the range of a 14-bit number.
+ */
+- (instancetype _Nullable)initWithManufacturerID:(MIDI2DeviceManufacturer)manufacturerID
+ family:(MIDIUInteger14)family
+ modelNumber:(MIDIUInteger14)modelNumber
+ revisionLevel:(MIDI2DeviceRevisionLevel)revisionLevel;
+
+@end
+
+/*!
+ @enum MIDIUMPProtocolBitmap
+ @brief The UMP protocols that can be supported by a UMP endpoint.
+
+ @constant kMIDIUMPSupportedProtocolMIDI1
+ Support for MIDI 1.0 in Universal Packets, or MIDI-1UP.
+
+ @constant kMIDIUMPSupportedProtocolMIDI2
+ Support for MIDI 2.0 protocol.
+ */
+typedef CF_OPTIONS(MIDIUInteger4, MIDIUMPProtocolBitmap) {
+ kMIDIUMPSupportedProtocolMIDI1 = 1,
+ kMIDIUMPSupportedProtocolMIDI2 = 1 << 1
+};
+
+/*!
+ @class MIDIUMPEndpoint
+ @brief An object representating a UMP Endpoint.
+
+ @discussion MIDIUMPEndpoint encapsulates a MIDI source and MIDI destination as a
+ bidirectional MIDI 2.0 communication node along with any associated stream
+ configuration metadata.
+
+ It is not necessary to create a MIDIUMPEndpoint or other MIDI endpoint in order to
+ use UMP natively. Any standard MIDI endpoint created with a specified MIDIProtocolID
+ is assumed to use all 16 UMP groups for the same unspecified function and to neither
+ transmit nor receive jitter-reduction timestamps.
+*/
+MIDIUMP1_1
+@interface MIDIUMPEndpoint : NSObject
+
+/// @property name
+/// @brief The UTF-8 encoded name of the UMP endpoint.
+///
+/// @discussion The name shall not be any longer than 98 bytes of UTF-8 Text.
+@property (nonatomic, readonly) NSString* name;
+
+/// @property MIDIProtocol
+/// @brief The MIDI protocol currently used by the UMP endpoint.
+@property (nonatomic, readonly) MIDIProtocolID MIDIProtocol;
+
+/// @property supportedMIDIProtocols
+/// @brief All protocols the UMP endpoint is capable of using for communication.
+@property (nonatomic, readonly) MIDIUMPProtocolBitmap supportedMIDIProtocols;
+
+/// @property MIDIDestination
+/// @brief The MIDI destination for the UMP endpoint.
+@property (nonatomic, readonly) MIDIEndpointRef MIDIDestination;
+
+/// @property MIDISource
+/// @brief The MIDI source for the UMP endpoint.
+@property (nonatomic, readonly) MIDIEndpointRef MIDISource;
+
+/// @property deviceInfo
+/// @brief The MIDI 2.0 Device identity information associated with the device.
+@property (nonatomic, readonly) MIDI2DeviceInfo* deviceInfo;
+
+/// @property productInstanceID
+/// @brief Serial number (or similar value) uniquely identifying this manufacturer/family/model,
+/// up to 42 bytes of ASCII Text in the ordinal range 32-126.
+@property (nonatomic, readonly) NSString* productInstanceID;
+
+/// @property hasStaticFunctionBlocks
+/// @brief Indicates if the Function Block state will never change once discovered.
+@property (nonatomic, readonly) BOOL hasStaticFunctionBlocks;
+
+/// @property hasJRTSReceiveCapability
+/// @brief Jitter-reduction timestamp receive capability.
+@property (nonatomic, readonly) BOOL hasJRTSReceiveCapability;
+
+/// @property hasJRTSTransmitCapability
+/// @brief Jitter-reduction timestamp transmit capability
+@property (nonatomic, readonly) BOOL hasJRTSTransmitCapability;
+
+/// @property endpointType
+/// @brief Indicates the type of UMP Endpoint, if known.
+@property (nonatomic, readonly) MIDIUMPCIObjectBackingType endpointType;
+
+/// @property functionBlocks
+/// @brief The Function Blocks associated with the UMP endpoint, if any.
+@property (nonatomic, copy) NSArray<MIDIUMPFunctionBlock*>* functionBlocks;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpointManager.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpointManager.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpointManager.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPEndpointManager.h 2024-05-30 05:07:40
@@ -0,0 +1,146 @@
+/*
+ File: CoreMIDI/MIDIUMPEndpointManager.h
+
+ Contains: API for MIDI Universal MIDI Packet (UMP) Endpoint and MIDI
+ Capability Inquiry (MIDI-CI) Device Manager
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDIUMPEndpointManager_h)
+#define MIDIUMPEndpointManager_h
+
+/*!
+ @header MIDIUMPEndpointManager.h
+
+ This is the header file for UMP Endpoint and MIDI-CI device manager (UMPCI manager) system
+ services.
+
+ API Overview
+ ------------
+ The singleton object MIDIUMPEndpointManager maintains a local copy of the system-wide MIDI 2.0 UMP
+ Endpoint cache. Various notifications can be observed from the UMPCI manager object when
+ changes to the cache occur. (Note that in environments where virtual MIDI endpoint creation is not
+ allowed (for example, on iOS, if your app doesn't list 'audio' in UIBackgroundModes), notifications will only
+ be posted when the client process is not suspended.)
+
+ Implementation overview
+ -----------------------
+ To investigate the local copy of the UMPCI cache, retrieve the local instance of the UMPCI manager
+ object and examine the manager's properties. Function Blocks with MIDI-CI support, or MIDI-CI devices,
+ are listed separately for convenience.
+
+ To investigate the local copy of the MIDI-CI Device cache, retrieve the local instance of the UMPCI manager
+ object and examine the manager's properties.
+
+ This API is not realtime-safe. The local cache is updated on the client process main thread and all interaction with
+ the manager should be done on the main thread.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0 and UMP.
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDIUMPFunctionBlock;
+@class MIDICIDevice;
+@class MIDIUMPEndpoint;
+
+#pragma mark MIDIUMPEndpointManager Notifications
+
+/*!
+ @constant MIDIUMPEndpointWasAddedNotification
+ @brief A notification posted when a MIDI UMP Endpoint has been added to the subsystem.
+
+ @discussion The MIDIUMPEndpoint sent in userInfo is the endpoint which was recently discovered.
+*/
+OS_EXPORT NSNotificationName const MIDIUMPEndpointWasAddedNotification MIDIUMP1_1;
+
+/*!
+ @constant MIDIUMPEndpointWasRemovedNotification
+ @brief A notification posted when a MIDI UMP Endpoint has been removed from the subsystem.
+
+ @discussion Any MIDIUMPEndpoint sent with this notification is no longer available to the system. Any
+ attempt to perform I/O with its source or destination may fail, as the MIDIEndpointRef
+ associated with the UMP endpoint may no longer be valid. If this notification is posted,
+ any resources related to communication with this UMP endpoint may be safely
+ disposed.
+*/
+OS_EXPORT NSNotificationName const MIDIUMPEndpointWasRemovedNotification MIDIUMP1_1;
+
+/*!
+ @constant MIDIUMPEndpointUpdatedNotification
+ @brief A notification posted when an UMP endpoint updates its stream configuration or changes the
+ state of one of its Function Blocks.
+
+ @discussion If this notification is posted, an Endpoint Info Notification was sent from the UMP endpoint in userInfo.
+*/
+OS_EXPORT NSNotificationName const MIDIUMPEndpointUpdatedNotification MIDIUMP1_1;
+
+/*!
+ @constant MIDIUMPFunctionBlockUpdatedNotification
+ @brief A notification posted when a Function Block is updated.
+
+ @discussion If this notification is posted, the supplied Function Block in userInfo has had a change to its
+ enabled state, Group configuration, UI hint, MIDI 1.0 status, etc..
+*/
+OS_EXPORT NSNotificationName const MIDIUMPFunctionBlockUpdatedNotification MIDIUMP1_1;
+
+#pragma mark Keys for NSNotification userInfo dictionaries
+
+/*!
+ @constant MIDIUMPEndpointObjectKey
+ @brief Value is a MIDIUMPEndpoint
+*/
+OS_EXPORT NSString* const MIDIUMPEndpointObjectKey MIDIUMP1_1;
+
+/*!
+ @constant MIDIUMPFunctionBlockObjectKey
+ @brief Value is a MIDIUMPFunctionBlock
+*/
+OS_EXPORT NSString* const MIDIUMPFunctionBlockObjectKey MIDIUMP1_1;
+
+#pragma mark MIDIUMPEndpointManager
+
+/*!
+ @class MIDIUMPEndpointManager
+ @brief A singleton object that performs system-wide UMP Endpoint bookkeeping.
+
+ @discussion MIDIUMPEndpointManager is used to retrieve information about UMP Endpoint
+ pairs detected by or explicitly declared to the MIDI UMP subsystem.
+*/
+MIDIUMP1_1
+@interface MIDIUMPEndpointManager : NSObject
+
+/*!
+ @property sharedInstance
+ @brief Retrieve the shared UMP Endpoint manager for the client process.
+
+ @discussion After first access to this property, the client process may begin observing notifications
+ which are posted when the system-wide cache changes.
+ */
+@property (class, nonatomic, readonly) MIDIUMPEndpointManager* sharedInstance;
+
+/*!
+ @property UMPEndpoints
+ @brief A list of UMP endpoints discovered using UMP endpoint discovery.
+ */
+@property (nonatomic, readonly, copy) NSArray<MIDIUMPEndpoint*>* UMPEndpoints;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPFunctionBlock.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPFunctionBlock.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPFunctionBlock.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPFunctionBlock.h 2024-05-30 04:27:45
@@ -0,0 +1,152 @@
+/*
+ File: CoreMIDI/MIDIUMPFunctionBlock.h
+
+ Contains: API for MIDI 2.0 Function Blocks.
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDIUMPFunctionBlock_h)
+#define MIDIUMPFunctionBlock_h
+
+/*!
+ @header MIDIUMPFunctionBlock.h
+
+ This is the header file for MIDI 2.0 Function Block API support, including MIDI Capability
+ Inquiry (MIDI-CI).
+
+ API Overview
+ ------------
+ The MIDI server automatically discovers UMP Endpoints, Function Blocks, and performs MIDI-CI
+ Discovery. When a client process retrieves the process instance of the UMP and MIDI-CI (UMPCI)
+ manager, a copy of the system-wide MIDI 2.0 cache is created using objects that describe the MIDI 2.0
+ subsystem.
+
+ A UMP Endpoint (MIDIUMPEndpoint) may declare up to 32 Function Blocks, represented as
+ MIDIUMPFunctionBlock objects in the local copy of the system-wide cache. If the Function Block
+ properties indicate that the Function Block supports MIDI-CI, any MIDI-CI-related Function Block
+ properties are also populated with the results of MIDI-CI Discovery.
+
+ MIDIUMPMutableFunctionBlock is the client-created counterpart to MIDIUMPFunctionBlock. It is used
+ in the following generalized steps:
+ 1. Initialize a new mutable Function Block object, indicating whether there is MIDI-CI support.
+ MIDI-CI can only be supported on bidirectional Function Blocks.
+ 2. If the Function Block supports MIDI-CI, add any additional Capbilities and configure the
+ appropriate message callbacks.
+ 3. Associate the mutable Function Block object with a mutable UMP Endpoint object
+ (MIDIUMPMutableEndpoint).
+ 4. Enable the mutable UMP Endpoint object so that the Function Block and its MIDI-CI
+ configuration (if any) become part of the MIDI 2.0 system-wide cache.
+ 5. Active client processes with a UMPCI Manager instance receive an updated copy of the
+ system-wide cache containing an immutable object copy of the mutable Function Block
+ object associated with an immutable object copy of the UMP Endpoint object.
+
+ Mutable Function Block objects may only be created in environments where virtual MIDI endpoint creation
+ is allowed (for example, on iOS, if your app doesn't list 'audio' in UIBackgroundModes).
+
+ Implementation overview
+ -----------------------
+ To view the UMP Endpoints and Function Blocks discovered by the MIDI server, retrieve the local process
+ instance of the UMPCI manager and view the discovered UMP Endpoints and their associated Function
+ Blocks. The UMPCI manager maintains a separate list of Function Blocks that support MIDI-CI.
+
+ If a Function Block supports MIDI-CI, an instance method can be used to retrieve the MIDICIDevice view of
+ the Function Block. This linked MIDICIDevice instance is also part of (and discoverable via) the MIDI-CI
+ device manager's cache.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0, Universal
+ MIDI Packet and MIDI Capability Inquiry..
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+#import <CoreMIDI/MIDIUMPEndpoint.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+#define MIDIUMP1_1 API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(tvos, watchos)
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDICIDevice;
+
+#pragma mark MIDIUMPFunctionBlock
+
+/*!
+ @class MIDIUMPFunctionBlock
+ @brief An object representing a Function Block.
+
+ @discussion A Function Block encapsulates one or more UMP groups with a single function, allowing
+ agents communicating with that UMP Endpoint to route and process UMP traffic
+ properly. Unless the owning MIDIUMPEndpoint has a static Function Block configuration,
+ any Function Block metadata may change in response to a configuration change in the
+ owning UMP endpoint.
+*/
+MIDIUMP1_1
+@interface MIDIUMPFunctionBlock : NSObject
+
+/// @property name
+/// @brief A string containing the Function Block's name.
+@property (nonatomic, readonly) NSString* name;
+
+/// @property functionBlockID
+/// @brief The device-unique ID for this Function Block.
+@property (nonatomic, readonly) MIDIUMPFunctionBlockID functionBlockID;
+
+/// @property direction
+/// @brief The direction of the Function Block: input, output, or bidirectional.
+@property (nonatomic, readonly) MIDIUMPFunctionBlockDirection direction;
+
+/// @property firstGroup
+/// @brief The first Group spanned by this Function Block.
+@property (nonatomic, readonly) MIDIUMPGroupNumber firstGroup;
+
+/// @property totalGroupsSpanned
+/// @brief The total number of groups spanned by this Function Block.
+@property (nonatomic, readonly) MIDIUInteger7 totalGroupsSpanned;
+
+/// @property maxSysEx8Streams
+/// @brief The maximum number of simultaneous Sysex8 streams.
+@property (nonatomic, readonly) UInt8 maxSysEx8Streams;
+
+/// @property MIDI1Info
+/// @brief MIDI 1.0 speed information.
+@property (nonatomic, readonly) MIDIUMPFunctionBlockMIDI1Info MIDI1Info;
+
+/// @property UIHint
+/// @brief A hint for UI about the primary usage of this Function Block.
+@property (nonatomic, readonly) MIDIUMPFunctionBlockUIHint UIHint;
+
+/// @property UMPEndpoint
+/// @brief The UMP Endpoint to which this Function Block is registered.
+///
+/// @discussion If the function block does not belong to an endpoint this property will be nil.
+@property (nonatomic, readonly, weak, nullable) MIDIUMPEndpoint* UMPEndpoint;
+
+/// @property MIDICIDevice
+/// @brief Retrieve the MIDICIDevice class interface if the Function Block supports MIDI-CI.
+///
+/// @discussion If a Function Block was created as a MIDICIDevice object, this property will
+/// provide an in-place MIDICIDevice interface that may be used with MIDI-CI API. If the
+/// device was not created as a MIDICIDevice, this method returns nil.
+@property (nonatomic, readonly, weak, nullable) MIDICIDevice* midiCIDevice;
+
+/// @property isEnabled
+/// @brief The enable state of this Function Block.
+@property (nonatomic, readonly) BOOL isEnabled;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableEndpoint.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableEndpoint.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableEndpoint.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableEndpoint.h 2024-05-30 05:07:40
@@ -0,0 +1,167 @@
+/*
+ File: CoreMIDI/MIDIUMPMutableEndpoint.h
+
+ Contains: API for MIDI Universal MIDI Packet (UMP) endpoints
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDIUMPMutableEndpoint_h)
+#define MIDIUMPMutableEndpoint_h
+
+/*!
+ @header MIDIUMPMutableEndpoint.h
+
+ This is the header file for Univeral MIDI Packet (UMP) endpoint system services.
+
+ API Overview
+ ------------
+ MIDI 2.0 is inherently bidirectional, and an endpoint that communicates using the Universal MIDI Packet
+ (UMP) format (a UMP Endpoint) must be capable of acting as a source of and destination for UMP data.
+ The MIDIUMPMutableEndpoint class defines an explicit relationship between a UMP-capable source and
+ UMP-capable destination and encapsulates its stream configuration.
+
+ A MIDIUMPEndpoint is a local cached object copied from the system-wide UMP Endpoint cache into the
+ client process instance of MIDIUMPEndpointManager. Any UMP Endpoint may declare up to 32
+ Function Blocks, cached as MIDIUMPFunctionBlock objects associated with a MIDIUMPEndpoint. These
+ Function Blocks may also be used as MIDI-CI devices.
+
+ Implementation overview
+ -----------------------
+ A MIDIUMPEndpoint may have zero or more MIDIUMPFunctionBlock objects that parcel the UMP
+ datastream into collections of one or more UMP Groups performing a singular device function. In some
+ cases, Function Block configurations can change spontaneously, and the UMP groups spanned by
+ the Function Block may also change. Updates to the Function Block state are received from the
+ MIDIUMPEndpoint source, which are captured by the UMP subsystem and subsequently reflected in
+ the cache and in callbacks registered by interested client processes.
+
+ If virtual destination creation is allowed, a client process may also create mutable UMP Endpoint and
+ Function block objects. MIDIUMPMutableEndpoint objects are instantiated in an inactive state, allowing
+ the owning client process to create or update the Function Block configuration on the
+ MIDIUMPMutableEndpoint. Once enabled, the MIDIUMPMutableEndpoint and its Function Block
+ configuration (if any) will be added to the system-wide UMP Endpoint cache.
+
+ The singleton object MIDIUMPEndpointManager maintains a local copy of the UMP Endpoint cache and
+ may also be used to observe notifications which are posted in response common UMP subsystem
+ cache updates.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0 and UMP.
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+#import <CoreMIDI/MIDIUMPEndpoint.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MIDIUMPMutableFunctionBlock;
+
+#pragma mark MIDIUMPMutableEndpoint
+
+/*!
+ @class MIDIUMPMutableEndpoint
+ @brief A mutable MIDIUMPEndpoint object.
+
+ @discussion It is not necessary to create a MIDIUMPEndpoint or other MIDI endpoint in order to
+ use UMP natively. Any standard MIDI endpoint created with a specified MIDIProtocolID
+ is assumed to use all 16 UMP groups for the same unspecified function and to neither
+ transmit nor receive jitter-reduction timestamps.
+
+ This API is not realtime-safe, all interaction with the mutable endpoint should be done on the
+ main thread.
+*/
+MIDIUMP1_1
+@interface MIDIUMPMutableEndpoint : MIDIUMPEndpoint
+
+/// @property mutableFunctionBlocks
+/// @brief The Function Blocks associated with the UMP endpoint, if any.
+@property (nonatomic, copy) NSArray<MIDIUMPMutableFunctionBlock*>* mutableFunctionBlocks;
+
+/// @property isEnabled
+/// @brief The enable state of the endpoint.
+@property (nonatomic, readonly) BOOL isEnabled;
+
+/*!
+ @method initWithName:deviceInfo:productInstanceID:MIDIProtocol:destinationCallback
+ @brief Initializer for creating a new MIDIUMPEndpoint.
+
+ @param name The UMP endpoint name.
+ @param deviceInfo The MIDI 2 device ID info for the UMP endpoint.
+ @param productInstanceID The product instance ID, up to 42 characters.
+ @param MIDIProtocol The MIDI protocol.
+ @param destinationCallback The receive callback used to create the UMP endpoint's MIDI
+ destination associated, which can be used to observe or process
+ incoming MIDI traffic.
+
+ @discussion This operation will fail if the device ID information is malformed or if virtual MIDI endpoint creation
+ is not allowed (for example, on iOS, if your app doesn't list 'audio' in UIBackgroundModes).
+ */
+- (instancetype _Nullable)initWithName:(NSString*)name
+ deviceInfo:(MIDI2DeviceInfo*)deviceInfo
+ productInstanceID:(NSString*)productInstanceID
+ MIDIProtocol:(MIDIProtocolID)MIDIProtocol
+ destinationCallback:(MIDIReceiveBlock)destinationCallback;
+
+/*!
+ @method setName:error:
+ @brief Set the endpoints name.
+
+ @param name A string representing the name of the endpoint.
+ @param error The out-error used if an error occurs.
+
+ @return YES for success. NO in the event of a failure, in which case the error is returned in error.
+
+ @discussion This operation will fail if the name could not be set.
+ */
+- (BOOL)setName:(nonnull NSString*)name
+ error:(NSError* _Nullable*)error;
+
+/*!
+ @method registerFunctionBlocks:markAsStatic:error:
+ @brief Register or replace Function Blocks for a disabled client-created MIDIUMPEndpoint.
+
+ @param functionBlocks A list of client-created Function Blocks to register.
+ @param markAsStatic Whether the Function Block configuration may be updated.
+ @param error The out-error used if an error occurs.
+
+ @return YES for success. NO in the event of a failure, in which case the error is returned in error.
+
+ @discussion This operation will fail if the array contains any disabled Function Blocks but the
+ MIDIUMPEndpoint Function Block configuration is static.
+ Returns YES if the Function Block configuration was set successfully.
+ */
+- (BOOL)registerFunctionBlocks:(nonnull NSArray<MIDIUMPMutableFunctionBlock*>*)functionBlocks
+ markAsStatic:(BOOL)markAsStatic
+ error:(NSError* _Nullable*)error;
+
+/*!
+ @method setEnabled:error:
+ @brief Enable a mutable UMP endpoint in the system-wide UMP endpoint cache.
+
+ @param isEnabled The enable state of the UMP endpoint.
+ @param error The out-error used if an error occurred.
+
+ @return YES for success. NO in the event of a failure, in which case the error is returned in error.
+
+ @discussion A MIDIUMPMutableEndpoint must be cache enabled before it is visible via API.
+ Note that Function Blocks may only be registered to uncached MIDIUMPMutableEndpoint
+ objects.
+ */
+- (BOOL)setEnabled:(BOOL)isEnabled
+ error:(NSError* _Nullable*)error;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableFunctionBlock.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableFunctionBlock.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableFunctionBlock.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIUMPMutableFunctionBlock.h 2024-05-30 05:07:40
@@ -0,0 +1,179 @@
+/*
+ File: CoreMIDI/MIDIUMPMutableFunctionBlock.h
+
+ Contains: API for MIDI 2.0 Function Blocks.
+
+ Copyright: (c) 2024 by Apple Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://feedbackassistant.apple.com/
+ */
+
+#if !defined(MIDIUMPMutableFunctionBlock_h)
+#define MIDIUMPMutableFunctionBlock_h
+
+/*!
+ @header MIDIUMPMutableFunctionBlock.h
+
+ This is the header file for MIDI 2.0 Function Block API support, including MIDI Capability
+ Inquiry (MIDI-CI).
+
+ API Overview
+ ------------
+ The MIDI server automatically discovers UMP Endpoints, Function Blocks, and performs MIDI-CI
+ Discovery. When a client process retrieves the process instance of the UMP and MIDI-CI (UMPCI)
+ manager, a copy of the system-wide MIDI 2.0 cache is created using objects that describe the MIDI 2.0
+ subsystem.
+
+ A UMP Endpoint (MIDIUMPEndpoint) may declare up to 32 Function Blocks, represented as
+ MIDIUMPFunctionBlock objects in the local copy of the system-wide cache. If the Function Block
+ properties indicate that the Function Block supports MIDI-CI, any MIDI-CI-related Function Block
+ properties are also populated with the results of MIDI-CI Discovery.
+
+ MIDIUMPMutableFunctionBlock is the client-created counterpart to MIDIUMPFunctionBlock. It is used
+ in the following generalized steps:
+ 1. Initialize a new mutable Function Block object, indicating whether there is MIDI-CI support.
+ MIDI-CI can only be supported on bidirectional Function Blocks.
+ 2. If the Function Block supports MIDI-CI, add any additional Capbilities and configure the
+ appropriate message callbacks.
+ 3. Associate the mutable Function Block object with a mutable UMP Endpoint object
+ (MIDIUMPMutableEndpoint).
+ 4. Enable the mutable UMP Endpoint object so that the Function Block and its MIDI-CI
+ configuration (if any) become part of the MIDI 2.0 system-wide cache.
+ 5. Active client processes with a UMPCI Manager instance receive an updated copy of the
+ system-wide cache containing an immutable object copy of the mutable Function Block
+ object associated with an immutable object copy of the UMP Endpoint object.
+
+ Mutable Function Block objects may only be created in environments where virtual MIDI endpoint creation
+ is allowed (for example, on iOS, if your app doesn't list 'audio' in UIBackgroundModes).
+
+ Implementation overview
+ -----------------------
+ To view the UMP Endpoints and Function Blocks discovered by the MIDI server, retrieve the local process
+ instance of the UMPCI manager and view the discovered UMP Endpoints and their associated Function
+ Blocks. The UMPCI manager maintains a separate list of Function Blocks that support MIDI-CI.
+
+ If a Function Block supports MIDI-CI, an instance method can be used to retrieve the MIDICIDevice view of
+ the Function Block. This linked MIDICIDevice instance is also part of (and discoverable via) the MIDI-CI
+ device manager's cache.
+
+ Please visit http://www.midi.org/specifications for more information on MIDI 2.0, Universal
+ MIDI Packet and MIDI Capability Inquiry..
+*/
+
+#import <CoreMIDI/MIDIUMPCI.h>
+#import <CoreMIDI/MIDIUMPFunctionBlock.h>
+
+// This API requires the modern Objective-C runtime.
+#if defined(__OBJC2__)
+#import <Foundation/Foundation.h>
+#import <stdint.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark MIDIUMPMutableFunctionBlock
+
+/*!
+ @class MIDIUMPMutableFunctionBlock
+ @brief A mutable Function Block object created by the client process.
+
+ @discussion A Function Block created with this API may be used in the Function Block configuration
+ of a client-created MIDIUMPMutableEndpoint.
+
+ This API is not realtime-safe, all interaction with the function block should be done on the
+ main thread.
+*/
+MIDIUMP1_1
+@interface MIDIUMPMutableFunctionBlock : MIDIUMPFunctionBlock
+
+/// @property UMPEndpoint
+/// @brief The UMP Endpoint to which this Function Block is registered.
+@property (nonatomic, readonly, weak, nullable) MIDIUMPMutableEndpoint* UMPEndpoint;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/*!
+ @method initWithName:direction:firstGroup:totalGroupsSpanned:maxSysEx8Streams:MIDI1Info:UIHint:isEnabled:
+ @brief The initializer for constructing a Function Block.
+
+ @param name The Function Block name.
+ @param direction The directionality of the Function Block.
+ @param firstGroup The first UMP Group supported by the Function Block.
+ @param totalGroupsSpanned The number of UMP groups spanned by the Function Block.
+ @param maxSysEx8Streams The maximum number of simultaneous Sysex8 streams.
+ @param MIDI1Info The MIDI 1.0 speed information for the Function Block.
+ @param UIHint A UI hint for the Function Block.
+ @param isEnabled The enable state of the Function Block.
+
+ @discussion This operation will fail if virtual MIDI endpoint creation is not allowed
+ (for example, on iOS, if your app doesn't list 'audio' in UIBackgroundModes).
+ */
+- (instancetype _Nullable)initWithName:(NSString*)name
+ direction:(MIDIUMPFunctionBlockDirection)direction
+ firstGroup:(MIDIUMPGroupNumber)firstGroup
+ totalGroupsSpanned:(MIDIUInteger7)totalGroupsSpanned
+ maxSysEx8Streams:(MIDIUInteger7)maxSysEx8Streams
+ MIDI1Info:(MIDIUMPFunctionBlockMIDI1Info)MIDI1Info
+ UIHint:(MIDIUMPFunctionBlockUIHint)UIHint
+ isEnabled:(BOOL)isEnabled;
+
+/*!
+ @method setEnabled:error:
+ @brief Set whether this Function Block is enabled or disabled.
+
+ @param isEnabled The new state of the Function Block.
+ @param error The out-error used if an error occurred.
+
+ @return YES for success. NO in the event of a failure, in which case the error is returned in error.
+
+ @discussion If a Function Block is registered to UMP Endpoint as part of a static configuration,
+ the state must always be enabled and may not change. If registered to a UMP Endpoint,
+ changes to the Function Block state are propagated to the system-wide cache.
+ */
+- (BOOL)setEnabled:(BOOL)isEnabled
+ error:(NSError* _Nullable*)error;
+
+/*!
+ @method setName:error:
+ @brief Set the function block name.
+
+ @param name A string representing the name of the function block.
+ @param error The out-error used if an error occurs.
+
+ @return YES for success. NO in the event of a failure, in which case the error is returned in error.
+
+ @discussion The Function Block name string. Updating the name of a Function Block will cause the
+ updated name to be propagated to all local copies of the system-wide cache.
+ */
+- (BOOL)setName:(nonnull NSString*)name
+ error:(NSError* _Nullable*)error;
+
+/*!
+ @method reconfigure:MIDI1Info:UIHint:error
+ @brief Reconfigure a Function Block.
+
+ @param newGroup The new first Group to use for the Function Block..
+ @param direction The direction of the Function Block: input, output, or bidirectional.
+ @param MIDI1Info MIDI 1.0 speed information.
+ @param UIHint A hint for UI about the primary usage of this Function Block.
+
+ @discussion If a mutable Function Block has not been registered to a CI device or was registered in
+ a non-static Function Block configuration, the first Group can be changed if the final
+ Group spanned by the Function Block is valid after the Function Block has been
+ relocated.
+ Returns YES if the first Group of the Function Block was changed.
+ */
+- (BOOL)reconfigureWithFirstGroup:(MIDIUMPGroupNumber)newGroup
+ direction:(MIDIUMPFunctionBlockDirection)direction
+ MIDI1Info:(MIDIUMPFunctionBlockMIDI1Info)MIDI1Info
+ UIHint:(MIDIUMPFunctionBlockUIHint)UIHint
+ error:(NSError* _Nullable*)error;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+#endif
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status