Skip to content

CoreMIDI tvOS xcode13.0 beta3

Rachel Kang edited this page Jul 30, 2021 · 3 revisions

#CoreMIDI.framework

diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h	2021-07-05 06:18:05.000000000 -0400
@@ -0,0 +1,32 @@
+/*
+ 	File:   	CoreMIDI/CoreMIDI.h
+ 
+ 	Contains:   Umbrella header for the CoreMIDI framework.
+ 
+ 	Copyright:  (c) 2000-2020 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_h__
+#define __CoreMIDI_h__
+
+#include <CoreMIDI/MIDIServices.h>
+#include <CoreMIDI/MIDISetup.h>
+#include <CoreMIDI/MIDIThruConnection.h>
+#include <CoreMIDI/MIDIDriver.h>
+#include <CoreMIDI/MIDIMessages.h>
+
+#if __OBJC__
+#import <CoreMIDI/MIDINetworkSession.h>
+#endif
+
+#if __OBJC2__
+#import <CoreMIDI/MIDICapabilityInquiry.h>
+#endif
+
+#endif
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDICapabilityInquiry.h	2021-07-13 00:34:09.000000000 -0400
@@ -0,0 +1,398 @@
+/*
+ File:       CoreMIDI/MIDICapabilityInquiry.h
+ 
+ Contains:   API for MIDI Capability Inquiry (MIDI-CI)
+ 
+ Copyright:  (c) 2018-2020 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
+
+    This is the header file for 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.
+*/
+
+
+#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
+};
+typedef struct MIDICIDeviceIdentification MIDICIDeviceIdentification;
+
+#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;
+
+//! An array of MIDICIProfileState objects that describes the profile
+//! configuration for all channels for a reachable MIDI-CI node.
+typedef NSArray<MIDICIProfileState *> MIDICIProfileStateList;
+
+// =================================================================================================
+
+/*!
+ 	@class		MIDICIDeviceInfo
+ 	@brief  	An NSObject containing basic information about a MIDI-CI-capable node.
+*/
+MIDICI1_1_AVAILABILITY
+@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 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 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.
+@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;
+@end
+
+// =================================================================================================
+
+/*!
+ 	@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
+				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
+*/
+MIDICI1_0_AVAILABILITY
+@interface MIDICIProfile : NSObject <NSSecureCoding>
+
+/// An NSString describing the profile.
+@property (nonatomic, readonly) NSString *name;
+
+/// The unique 5-byte profile identifier representing the profile.
+@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;
+@end
+
+// =================================================================================================
+
+/*!
+ 	@class	MIDICIProfileState
+ 	@brief  Lists the enabled and 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;
+
+- (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));
+@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.
+*/
+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;
+
+/*!
+     @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;
+
+/*!
+     @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;
+
+/*!
+     @fn     MIDICIDiscoveryResponseBlock
+     @brief  A block called when a MIDI-CI node discovery is complete.
+*/
+typedef void (^MIDICIDiscoveryResponseBlock)(
+                NSArray<MIDICIDiscoveredNode *> *discoveredNodes) MIDICI1_1_AVAILABILITY;
+
+// =================================================================================================
+
+/*!
+     @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
+@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.
+*/
+- (instancetype)init NS_UNAVAILABLE;
+
+- (instancetype)initWithDiscoveredNode:(MIDICIDiscoveredNode *)discoveredNode dataReadyHandler:(void (^)(void))handler disconnectHandler:(MIDICISessionDisconnectBlock)disconnectHandler;
+
+/// 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.
+@property (nonatomic, readonly) BOOL supportsProfileCapability;
+
+// 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;
+
+// The maximum MIDI system exclusive size reported by the device during discovery
+@property (nonatomic, readonly) NSNumber *maxSysExSize; // unsigned long
+
+// The maximum number of simultaneous property exchange requests, if supported
+@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, 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;
+
+/// 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;
+
+/// 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;
+
+/// 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.
+@property (nonatomic, copy, nullable) MIDICIProfileSpecificDataBlock profileSpecificDataHandler;
+
+@end // MIDICISession
+
+// =================================================================================================
+
+/*!
+     @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
+@interface MIDICIDiscoveryManager : NSObject
++ (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.
+*/
+MIDICI1_1_AVAILABILITY
+@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;
+// 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
+
+// =================================================================================================
+
+/*!
+     @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
+@interface MIDICIResponder : NSObject
+@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;
+
+// Spontaneously enable or disable a profile and notify all connected Initiators
+- (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;
+
+// Begin receiving Initiator requests
+- (BOOL)start;
+// Stop receiving Initiator requests and disconnect all connected Initiators
+- (void)stop;
+
+@end // MIDICIResponder
+
+NS_ASSUME_NONNULL_END
+
+#endif /* if defined(__OBJC2__) */
+#endif /* MIDICapabilityInquiry_h */
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIDriver.h	2021-07-13 00:40:02.000000000 -0400
@@ -0,0 +1,563 @@
+/*
+     File:       CoreMIDI/MIDIDriver.h
+ 
+     Contains:   MIDI Services driver interfaces
+ 
+ 	Copyright:  (c) 2000-2015 by Apple Inc., all rights reserved.
+ 
+     Bugs?:      For bug reports, consult the following page on
+                 the World Wide Web:
+ 
+                     http://feedbackassistant.apple.com/
+*/
+
+#ifndef __MIDIDriver_h__
+#define __MIDIDriver_h__
+
+#include <CoreMIDI/MIDIServices.h>
+#if COREFOUNDATION_CFPLUGINCOM_SEPARATE
+#include <CoreFoundation/CFPlugInCOM.h>
+#endif
+
+CF_ASSUME_NONNULL_BEGIN
+
+/*!
+	@header MIDIDriver.h
+	
+	This is the header file for Mac OS X's MIDI driver interface.
+	
+
+	MIDI drivers are CFPlugIns, installed into the following places:
+
+	```
+    /System/Library/Extensions      -- not recommended for non-Apple drivers, but
+                                    necessary for compatibility with CoreMIDI 1.0
+    
+    /Library/Audio/MIDI Drivers     -- starting with CoreMIDI 1.1
+    
+    ~/Library/Audio/MIDI Drivers    -- starting with CoreMIDI 1.1
+	```
+
+	Refer to the CFPlugIn documentation for more information about plug-ins.
+	
+
+	A driver's bundle settings should include settings resembling the following:
+
+	```
+    Bundle settings:
+        CFBundleIdentifier              String          com.mycompany.midi.driver.mydevice
+            (note that this will be the driver's persistent ID in MIDISetup's)
+        CFPlugInDynamicRegistration     String          NO
+        CFPlugInFactories               Dictionary      1 key/value pair
+            [your new factory UUID]     String          [your factory function name]
+        CFPlugInTypes                   Dictionary      1 key/value pair
+            ECDE9574-0FE4-11D4-BB1A-0050E4CEA526        Array       1 object
+                (this is kMIDIDriverTypeID)
+                0                       String          [your new factory UUID]
+    Build settings:
+        WRAPPER_EXTENSION               plugin
+	```
+	
+
+	Drivers have access to most of the CoreMIDI API.  Starting in Mac OS X 10.6, drivers should link
+	with CoreMIDI.framework. In previous versions of Mac OS X, drivers should link with
+	CoreMIDIServer.framework, not CoreMIDI.framework.
+	
+	On Mac OS X versions prior to 10.6, MIDI driver plugins linked against the CoreMIDIServer
+	framework in order to access the CoreMIDI API. Drivers which are to run on earlier OS versions
+	should be built 32-bit fat (ppc and i386) and link against CoreMIDIServer. Drivers which are to
+	run on Mac OS X 10.6 and later should be built for x86_64 and link against the CoreMIDI
+	framework. Drivers which are to run on all versions of Mac OS X should be build 3-way fat (ppc,
+	i386, and x86_64), with the ppc and i386 slices linking against CoreMIDIServer, and the x86_64
+	slice linking against CoreMIDI.
+
+	Unlike applications, drivers communicate with the server directly, not through Mach messaging.
+	This necessitates some limitations on the contexts from which a driver may call the server.
+	
+	The MIDI I/O functions MIDISend and MIDIReceived may be called from any thread.
+	
+	All other CoreMIDI functions must only be called from the server's main thread, which is the
+	thread on which the driver is created and from which all calls to the driver other than Send()
+	are made.
+*/
+
+typedef struct MIDIDriverInterface		MIDIDriverInterface;
+
+/*!
+	@typedef		MIDIDriverRef
+	
+	@discussion		Points to a pointer to a MIDIDriverInterface, a CFPlugIn structure (defined in
+					MIDIDriver.h) containing function pointers for the driver's methods.  Only the
+					MIDIServer may call a driver's methods.
+*/
+typedef MIDIDriverInterface * __nonnull * MIDIDriverRef;
+
+/*!
+	@typedef		MIDIDeviceListRef
+	
+	@discussion		A MIDIDeviceListRef is a list of MIDIDeviceRef's.  The devices are not owned by
+					the list (i.e., disposing the list does not dispose the devices it references).
+*/
+typedef MIDIObjectRef MIDIDeviceListRef;
+
+/*!
+	@struct		MIDIDriverInterface
+	
+	@abstract		The COM-style interface to a MIDI driver.
+	
+	@discussion
+		This is the function table interface to a MIDI driver.  Version 1 and 2 drivers use
+		this same table of function pointers (except as noted).
+
+		Drivers which support multiple version interfaces can tell which version
+		of the server is running by checking to see whether kMIDIDriverInterface2ID
+        or kMIDIDriverInterfaceID is passed to the factory function. If the version 1 interface is
+        requested, the driver should behave as if it is a version 1 driver.
+*/
+struct MIDIDriverInterface
+{
+	IUNKNOWN_C_GUTS;
+
+	/*!
+		@fn FindDevices
+		@discussion
+			This is only called for version 1 drivers.  The server is requesting that the driver
+			detect the devices which are present.  For each device present, the driver should
+			create a MIDIDeviceRef with entities, using MIDIDeviceCreate and
+			MIDIDeviceAddEntity, and add the device to the supplied MIDIDeviceListRef, using
+			MIDIDeviceListAddDevice.
+
+			The driver should not retain any references to the created devices and entities.
+	*/
+	OSStatus	(*FindDevices)(MIDIDriverRef __nonnull self, MIDIDeviceListRef devList);
+
+	/*!
+		@fn Start
+		@discussion
+			The server is telling the driver to begin MIDI I/O.
+
+			The provided device list contains the devices which were previously located by
+			FindDevices (in the case of a version 1 driver), or the devices which are owned by
+			this driver and are currently in the current MIDISetup (for version 2 drivers).
+
+			The provided devices may or may not still be present.  A version 1 driver should
+			attempt to use as many of the devices as are actually present.
+
+			A version 2 driver may make calls such as MIDISetupAddDevice, MIDIDeviceAddEntity,
+			MIDIDeviceRemoveEntity to dynamically modify the system's current state. For devices
+			in the provided device list which are not present, the driver should set their
+			kMIDIPropertyOffline property to 1.  A version 2 driver may also set up
+			notifications when the IORegistry changes, to detect connection and disconnection of
+			devices it wishes to control.  At these times also, the driver may change the
+			devices' kMIDIPropertyOffline, and dynamically modify the system's current state to
+			reflect the devices which are present.  When passing a CFRunLoopRef to IOKit for
+			notification purposes, the driver must use the server's main runloop, which is
+			obtained with CFRunLoopGetCurrent().
+
+			The driver will probably want to iterate through the destination endpoints and
+			assign their driver refCons, so as to identify multiple destinations when Send() is
+			called.
+
+			The provided device list remains owned by the system and can be assumed to contain
+			only devices owned by this driver.  The driver may retain references to the devices
+			in this list and any it creates while running.
+	*/
+	OSStatus	(*Start)(MIDIDriverRef __nonnull self, MIDIDeviceListRef devList);
+
+	/*!
+		@fn Stop
+		@discussion
+			The server is telling the driver to terminate MIDI I/O.  All I/O operations that
+			were begun in Start, or as a result of a subsequent IOKit notification, should be
+			terminated.
+	*/
+	OSStatus	(*Stop)(MIDIDriverRef __nonnull self);
+	
+	/*!
+		@fn Configure
+		@discussion
+			not currently used
+	*/
+	OSStatus	(*Configure)(MIDIDriverRef __nonnull self, MIDIDeviceRef device);
+
+	/*!
+		@fn Send
+		@discussion
+			Send a MIDIPacketList to the destination endpoint whose refCons are being passed as
+			arguments.
+	*/
+	OSStatus	(*Send)(MIDIDriverRef __nonnull self, const MIDIPacketList *pktlist, void *destRefCon1, void *destRefCon2);
+	
+	/*!
+		@fn EnableSource
+		@discussion
+			A client has opened or closed a connection, and now the server is telling the driver
+			that input from a particular source either does or does not have any listeners in
+			the system.  The driver may use this information to decide whether to pass messages
+			from the source to the server, and it may even be able to tell the source hardware
+			not to generate incoming MIDI I/O for that source.
+	*/
+	OSStatus	(*EnableSource)(MIDIDriverRef __nonnull self, MIDIEndpointRef src, Boolean enabled);
+	
+	/*!
+		@fn Flush
+		@discussion
+			Only for version 2 drivers (new for CoreMIDI 1.1).
+
+			Drivers which support schedule-ahead, when receiving this message, should unschedule
+			all pending output to the specified destination.  If the destination is null/0, the
+			driver should unschedule all pending output to all destinations.
+	*/
+	OSStatus	(*Flush)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest, void * __nullable destRefCon1, void * __nullable destRefCon2);
+
+	/*!
+		@fn Monitor
+		@discussion
+			Only for version 2 drivers (new for CoreMIDI 1.1).
+
+			Some specialized drivers (e.g. a MIDI monitor display) may wish to intercept and
+			look at all outgoing MIDI messages.  After a driver calls
+			MIDIDriverEnableMonitoring(true) on itself, this function is called with the
+			outgoing MIDI packets for all destinations in the system.  The Monitor function
+			cannot rely on the MIDI events arriving in order, due to MIDIServer's schedule-ahead
+			facilities.
+	*/
+	OSStatus	(*Monitor)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest, const MIDIPacketList *pktlist);
+    
+	/*!
+		@fn SendPackets
+		@discussion
+	 		Only for provisional drivers.
+	 
+			Send a MIDIEventList to the destination endpoint whose refCons are being passed as
+			arguments.
+	*/
+	OSStatus	(*SendPackets)(MIDIDriverRef __nonnull self, const MIDIEventList *pktlist, void *destRefCon1, void *destRefCon2);
+    
+    /*!
+		@fn MonitorEvents
+		@discussion
+			Only for provisional drivers.
+
+			Same as Monitor but uses MIDEventList, whose protocol may vary from MIDI 1.0.
+	*/
+	OSStatus	(*MonitorEvents)(MIDIDriverRef __nonnull self, MIDIEndpointRef dest, const MIDIEventList *pktlist);
+
+};
+
+
+//  -----------------------------------------------------------------------------
+/*!
+	@define			kMIDIDriverTypeID
+	
+	@abstract		The UUID for MIDI driver plugins.
+	
+	@discussion		kMIDIDriverTypeID should be entered into your driver's bundle settings
+					as follows:
+					
+<pre>
+CFPlugInTypes                   Dictionary      1 key/value pair
+	ECDE9574-0FE4-11D4-BB1A-0050E4CEA526        Array       1 object
+		(this is kMIDIDriverTypeID)
+		0                       String          [your new factory UUID]
+</pre>
+*/
+#define kMIDIDriverTypeID \
+	CFUUIDGetConstantUUIDWithBytes(NULL, 0xEC, 0xDE, 0x95, 0x74, 0x0F, 0xE4, 0x11, 0xD4, 0xBB, 0x1A, 0x00, 0x50, 0xE4, 0xCE, 0xA5, 0x26)
+/* ECDE9574-0FE4-11D4-BB1A-0050E4CEA526 */
+
+
+/*!
+	@define			kMIDIDriverInterfaceID
+	
+	@abstract		The UUID for version 1 of the MIDI driver interface.
+	
+	@discussion		See the description of the MIDIDriverInterface structure for
+					information about different versions of the MIDI driver interface.
+*/
+#define kMIDIDriverInterfaceID \
+	CFUUIDGetConstantUUIDWithBytes(NULL, 0x49, 0xDF, 0xCA, 0x9E, 0x0F, 0xE5, 0x11, 0xD4, 0x95, 0x0D, 0x00, 0x50, 0xE4, 0xCE, 0xA5, 0x26)
+/* 49DFCA9E-0FE5-11D4-950D-0050E4CEA526 */
+
+/*!
+	@define			kMIDIDriverInterface2ID
+	
+	@abstract		The UUID for version 2 of the MIDI driver interface.
+	
+	@discussion		See the description of the MIDIDriverInterface structure for
+					information about different versions of the MIDI driver interface.
+					
+					The version 2 driver interface is available beginning with CoreMIDI 1.1.
+*/
+#define kMIDIDriverInterface2ID \
+	CFUUIDGetConstantUUIDWithBytes(NULL, 0x43, 0xC9, 0x8C, 0x3C, 0x30, 0x6C, 0x11, 0xD5, 0xAF, 0x73, 0x00, 0x30, 0x65, 0xA8, 0x30, 0x1E)
+/* 43C98C3C-306C-11D5-AF73-003065A8301E */
+
+/*!
+	@define			kMIDIDriverInterface3ID
+ 
+	@abstract		The UUID for version 3 of the MIDI driver interface.
+ 
+	@discussion		This UUID uses UniversalMIDIPacket I/O functions.
+					See the description of the MIDIDriverInterface structure for
+					information about different versions of the MIDI driver interface.
+ 
+					This provisional driver interface is provided for the purpose of
+                    prototyping MIDI 2.0 driver support. This driver interface will be replaced
+                    in the future when transport specifications are defined.
+*/
+#define kMIDIDriverInterface3ID \
+	CFUUIDGetConstantUUIDWithBytes(NULL, 0x2F, 0xD9, 0x4D, 0x0F, 0x8C, 0x2A, 0x48, 0x2A, 0x8A, 0xD8, 0x7D, 0x9E, 0xA3, 0x81, 0xC9, 0xC1)
+/* 2FD94D0F-8C2A-482A-8AD8-7D9EA381C9C1 */
+
+/*!
+	@constant		kMIDIDriverPropertyUsesSerial
+	
+	@discussion		This constant, "MIDIDriverUsesSerial", when defined to "YES" in a driver's
+					bundle, tells MIDIServer that the driver uses serial ports and is eligible to
+					have serial ports assigned to it.
+					
+					When a serial driver's Start() method is called, it should use
+					MIDIGetSerialPortOwner to discover which serial ports it has
+					been assigned to use, and only use those ports.
+					
+					New for CoreMIDI 1.1.
+*/
+extern const CFStringRef kMIDIDriverPropertyUsesSerial		API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos);
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ___________________________________________________________________________________________
+//	MIDIDevice
+// ___________________________________________________________________________________________
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceCreate
+
+	@discussion		Drivers call this function to create new MIDIDevice objects
+					corresponding to the hardware that is present.
+					
+					Non-drivers may call this function as of CoreMIDI 1.1, to
+					create external devices.
+	
+	@param			owner
+						The driver creating the device.  NULL if a non-driver.
+	@param			name
+						The name of the new device.
+	@param			manufacturer
+						The name of the device's manufacturer.
+	@param			model
+						The device's model name.
+	@param			outDevice
+						On successful return, points to the newly-created device.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		MIDIDeviceCreate(MIDIDriverRef __nullable owner,
+							CFStringRef name, CFStringRef manufacturer,
+							CFStringRef model, MIDIDeviceRef *outDevice)
+																API_AVAILABLE(macos(10.0), ios(4.2))  API_UNAVAILABLE(tvos, watchos);
+
+
+/*!
+	@function		MIDIDeviceDispose
+
+	@discussion		Drivers may call this function to dispose MIDIDevice objects
+					which have not yet been added to the system via MIDISetupAddDevice.
+					Once a device has been added to the system with MIDISetupAddDevice,
+					the driver must not use this call to destroy it; it must
+					use MIDISetupRemoveDevice to do so.
+					
+					Non-drivers do not have access to this function; they must call
+					MIDISetupAddDevice and MIDISetupRemoveDevice.
+	
+	@param			device
+						The device to be disposed.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		MIDIDeviceDispose(MIDIDeviceRef device)		API_AVAILABLE(macos(10.3), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+// ___________________________________________________________________________________________
+//	MIDIDeviceList
+// ___________________________________________________________________________________________
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceListGetNumberOfDevices
+
+	@discussion		Returns the number of devices in a device list.
+	
+	@param			devList
+						The device list.
+	@result			The number of devices in the list, or 0 if an error occurred.
+*/
+extern ItemCount		MIDIDeviceListGetNumberOfDevices(MIDIDeviceListRef devList)
+																API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceListGetDevice
+
+	@discussion		Return one of the devices in a device list.
+	
+	@param			devList
+						The device list.
+	@param			index0
+						The index (0...MIDIDeviceListGetNumberOfDevices()-1) of the device
+						to return.
+	@result			A reference to a device, or NULL if an error occurred.
+*/
+extern MIDIDeviceRef	MIDIDeviceListGetDevice(MIDIDeviceListRef devList, ItemCount index0)
+																API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceListAddDevice
+
+	@discussion		Add a device to a device list.
+	
+	@param			devList
+						The device list.
+	@param			dev
+						The device to add to the list.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		MIDIDeviceListAddDevice(MIDIDeviceListRef devList, MIDIDeviceRef dev)
+																API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceListDispose
+
+	@discussion		Dispose a device list, but not the contained devices.
+	
+	@param			devList
+						The device list to be disposed.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		MIDIDeviceListDispose(MIDIDeviceListRef devList)
+																API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+
+// ___________________________________________________________________________________________
+//	MIDIEndpoint
+// ___________________________________________________________________________________________
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIEndpointSetRefCons
+
+	@discussion		Drivers need an efficient way to translate from a MIDIEndpoint (source or
+					destination) to their own internal data structures corresponding to
+					that endpoint.  This function provides a way for the driver to
+					assign its own refCons to endpoints.
+					
+					These refCons are passed back to the driver in its Send() and Flush()
+					methods.
+					
+					RefCons are not persistent (i.e. they are not saved as part of a
+					MIDISetup).  They need to be re-initialized in each call to Start().
+					
+					A typical use is to use one refCon to refer to a device, and a second
+					to refer to a port on the device.
+	
+	@param			endpt
+						The endpoint whose refCons are to be set
+	@param			ref1
+						The first refCon.
+	@param			ref2
+						The second refCon.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		MIDIEndpointSetRefCons(MIDIEndpointRef endpt,
+					void * __nullable ref1, void * __nullable ref2)					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIEndpointGetRefCons
+
+	@discussion		Obtain the refCons assigned to the endpoints
+	
+	@param			endpt
+						The endpoint whose refCons are to be return
+	@param			ref1
+						On exit, the first refCon.
+	@param			ref2
+						On exit, the second refCon.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		MIDIEndpointGetRefCons(MIDIEndpointRef endpt,
+					void * __nonnull * __nullable ref1, void * __nonnull * __nullable ref2)
+																					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+// ___________________________________________________________________________________________
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIGetDriverIORunLoop
+
+	@discussion		Drivers typically need to receive asynchronous I/O completion callbacks
+					on a high-priority thread.  To save drivers from the trouble of
+					creating their own threads for this purpose, and to make efficient
+					use of system resources, the MIDIServer provides a thread which
+					drivers may use.
+					
+					Drivers should do as little work as possible in this thread; typically,
+					just dequeueing and encoding output packets, and decoding input packets
+					into MIDIPacketLists to be passed to MIDIReceived.
+	
+					This is a realtime-priority thread and shouldn't be used for anything other
+					than I/O.  For lower-priority tasks, drivers can use the runloop which
+					was current when they were constructed.
+
+	@result			The CFRunLoopRef of the server's driver I/O thread.
+*/
+extern CFRunLoopRef	MIDIGetDriverIORunLoop(void)			API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIGetDriverDeviceList
+
+	@discussion		Returns the list of devices which are in the current MIDISetup
+					and which were created/owned by the specified driver.
+	
+					The returned device list should be disposed (using MIDIDeviceListDispose)
+					by the caller.
+					
+	@param			driver
+						The driver whose devices are to be returned.
+
+	@result			The requested device list.
+*/
+extern MIDIDeviceListRef	MIDIGetDriverDeviceList(MIDIDriverRef __nonnull driver)
+															API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDriverEnableMonitoring
+
+	@discussion		A driver may make this call to have MIDIServer pass it every outgoing MIDI
+					packet, to all destinations in the system (not just those controlled by
+					itself).
+					
+	@param			driver
+						The driver whose Monitor function is to be enabled.
+	@param			enabled
+						true to enable monitoring, false to disable it.
+
+	@result			An OSStatus result code.
+*/
+extern OSStatus			MIDIDriverEnableMonitoring(MIDIDriverRef __nonnull driver, Boolean enabled)
+															API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+CF_ASSUME_NONNULL_END
+
+#endif // __MIDIDriver_h__
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIMessages.h	2021-07-13 00:36:41.000000000 -0400
@@ -0,0 +1,536 @@
+/*
+ 	File:   	CoreMIDI/MIDIMessages.h
+ 
+ 	Contains:   Constants, structures, and helper functions for Universal MIDI Packet and MIDI 2.0 messages.
+ 
+ 	Copyright:  (c) 2018-2020 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_MIDIMessage_h
+#define CoreMIDI_MIDIMessage_h
+
+#include <CoreFoundation/CFBase.h>
+#include <CoreMIDI/MIDIServices.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+//==================================================================================================
+#pragma mark -
+#pragma mark MIDI message constants
+
+// 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
+};
+
+// kMIDIMessageTypeChannelVoice1 / kMIDIMessageTypeChannelVoice2 status nibbles.
+typedef CF_ENUM(unsigned int, MIDICVStatus) {
+	// MIDI 1.0
+	kMIDICVStatusNoteOff			=	0x8,
+	kMIDICVStatusNoteOn				=	0x9,
+	kMIDICVStatusPolyPressure		=	0xA,
+	kMIDICVStatusControlChange		=	0xB,
+	kMIDICVStatusProgramChange		=	0xC,
+	kMIDICVStatusChannelPressure	=	0xD,
+	kMIDICVStatusPitchBend			=	0xE,
+
+	// MIDI 2.0
+	kMIDICVStatusRegisteredPNC			= 	0x0, // Per-Note Controller
+	kMIDICVStatusAssignablePNC			=	0x1,
+	kMIDICVStatusRegisteredControl		=	0x2, // Registered Parameter Number (RPN)
+	kMIDICVStatusAssignableControl		=	0x3, // Non-Registered Parameter Number (NRPN)
+	kMIDICVStatusRelRegisteredControl	= 	0x4, // Relative
+	kMIDICVStatusRelAssignableControl	=	0x5, // Relative
+	kMIDICVStatusPerNotePitchBend		=	0x6,
+	kMIDICVStatusPerNoteMgmt			=	0xF
+};
+
+// kMIDIMessageTypeSystem status bytes.
+typedef CF_ENUM(unsigned int, MIDISystemStatus) {
+	// MIDI 1.0 only
+	kMIDIStatusStartOfExclusive		= 0xF0,
+	kMIDIStatusEndOfExclusive		= 0xF7,
+	
+	// MIDI 1.0 and 2.0
+	kMIDIStatusMTC					= 0xF1,
+	kMIDIStatusSongPosPointer		= 0xF2,
+	kMIDIStatusSongSelect			= 0xF3,
+	kMIDIStatusTuneRequest			= 0xF6,
+	
+	kMIDIStatusTimingClock			= 0xF8,
+	kMIDIStatusStart				= 0xFA,
+	kMIDIStatusContinue				= 0xFB,
+	kMIDIStatusStop					= 0xFC,
+	kMIDIStatusActiveSending		= 0xFE,
+	kMIDIStatusActiveSensing		= kMIDIStatusActiveSending,
+	kMIDIStatusSystemReset			= 0xFF
+};
+
+// kMIDIMessageTypeSysEx / kMIDIMessageTypeData128 status nibbles.
+typedef CF_ENUM(unsigned int, MIDISysExStatus) {
+	kMIDISysExStatusComplete        = 0x0,
+	kMIDISysExStatusStart           = 0x1,
+	kMIDISysExStatusContinue        = 0x2,
+	kMIDISysExStatusEnd             = 0x3,
+
+	// MIDI 2.0
+	kMIDISysExMixedDataSetHeader	= 0x8,
+	kMIDISysExMixedDataSetPayload	= 0x9
+};
+
+// kMIDIMessageTypeUtility status nibbles.
+typedef CF_ENUM(unsigned int, MIDIUtilityStatus) {
+	kMIDIUtilityStatusNOOP						= 0x0,
+	kMIDIUtilityStatusJitterReductionClock		= 0x1,
+	kMIDIUtilityStatusJitterReductionTimestamp	= 0x2
+};
+
+// MIDI 2.0 Note On/Off Message Attribute Types
+typedef CF_ENUM(UInt8, MIDINoteAttributeType) {
+	kMIDINoteAttributeNone					= 0x0,	// no attribute data
+	kMIDINoteAttributeManufacturerSpecific	= 0x1,	// Manufacturer-specific = unknown
+	kMIDINoteAttributeProfileSpecific		= 0x2,	// MIDI-CI profile-specific data
+	kMIDINoteAttributePitch					= 0x3	// Pitch 7.9
+};
+
+// MIDI 2.0 Program Change Options
+typedef CF_OPTIONS(UInt8, MIDIProgramChangeOptions) {
+    kMIDIProgramChangeBankValid = 0x1
+};
+
+// MIDI 2.0 Per Note Management Options
+typedef CF_OPTIONS(UInt8, MIDIPerNoteManagementOptions) {
+    kMIDIPerNoteManagementReset = 0x1,
+    kMIDIPerNoteManagementDetach = 0x2
+};
+
+
+
+//==================================================================================================
+#pragma mark -
+#pragma mark Universal MIDI Packet structs
+
+#pragma pack(push, 4)
+
+typedef UInt32 MIDIMessage_32;
+
+typedef struct MIDIMessage_64 {
+	UInt32 word0;
+	UInt32 word1;
+} MIDIMessage_64;
+
+typedef struct MIDIMessage_96 {
+	UInt32 word0;
+	UInt32 word1;
+	UInt32 word2;
+} MIDIMessage_96;
+
+typedef struct MIDIMessage_128 {
+	UInt32 word0;
+	UInt32 word1;
+	UInt32 word2;
+	UInt32 word3;
+} MIDIMessage_128;
+
+#pragma pack(pop)
+
+//==================================================================================================
+#pragma mark -
+#pragma mark Univerval MIDI Packet message helper functions
+
+CF_INLINE MIDIMessageType MIDIMessageTypeForUPWord(const UInt32 word) { return (MIDIMessageType)(word >> 28 & 0x7F); }
+
+/*
+	MIDI 1.0 Universal MIDI Packet (MIDI-1UP) Channel Voice Message generalized structure
+	
+	Word0: [aaaa][bbbb][cccc][dddd][0eeeeeee][0fffffff]
+	
+	a: Universal MIDI Packet Message Type (0x2 for all voice messages)
+	b: Channel group number
+	c: MIDI status
+	d: MIDI channel
+	e: MIDI note number
+	f: Velocity
+	
+	The following set of functions will correctly construct voice channel messages as MIDI-1UP.
+*/
+
+CF_INLINE MIDIMessage_32 MIDI1UPChannelVoiceMessage(UInt8 group, UInt8 status, UInt8 channel, UInt8 data1, UInt8 data2) {
+    return (MIDIMessage_32)( (UInt32)((kMIDIMessageTypeChannelVoice1 << 4) | (group & 0xF)) << 24 | (UInt32)(status << 4 | (channel & 0xF)) << 16 | (UInt32)(data1 & 0x7F) << 8 | (UInt32)(data2 & 0x7F));
+}
+
+CF_INLINE MIDIMessage_32 MIDI1UPNoteOff(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 velocity) {
+    return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusNoteOff, channel, noteNumber, velocity);
+}
+
+CF_INLINE MIDIMessage_32 MIDI1UPNoteOn(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 velocity) {
+    return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusNoteOn, channel, noteNumber, velocity);
+}
+
+CF_INLINE MIDIMessage_32 MIDI1UPControlChange(UInt8 group, UInt8 channel, UInt8 index, UInt8 data) {
+    return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusControlChange, channel, index, data);
+}
+
+CF_INLINE MIDIMessage_32 MIDI1UPPitchBend(UInt8 group, UInt8 channel, UInt8 lsb, UInt8 msb) {
+    return MIDI1UPChannelVoiceMessage(group, kMIDICVStatusPitchBend, channel, lsb, msb);
+}
+
+CF_INLINE MIDIMessage_32 MIDI1UPSystemCommon(UInt8 group, UInt8 status, UInt8 byte1, UInt8 byte2) {
+    return (MIDIMessage_32)((UInt32)((kMIDIMessageTypeSystem << 4) | (group & 0xF)) << 24 | (UInt32)(status) << 16 | (UInt32)(byte1 & 0x7F) << 8 | (UInt32)(byte2 & 0x7F));
+}
+
+CF_INLINE MIDIMessage_64 MIDI1UPSysEx(UInt8 group, UInt8 status, UInt8 bytesUsed, UInt8 byte1, UInt8 byte2, UInt8 byte3, UInt8 byte4, UInt8 byte5, UInt8 byte6) {
+    MIDIMessage_64 sysExOut = {};
+    sysExOut.word0 = (UInt32)((kMIDIMessageTypeSysEx << 4) | (group & 0xF)) << 24 | (UInt32)((status << 4) | (bytesUsed)) << 16 | (UInt32)(byte1 & 0x7F) << 8 | (UInt32)(byte2 & 0x7F);
+    sysExOut.word1 = (UInt32)(byte3 & 0x7F) << 24 | (UInt32)(byte4 & 0x7F) << 16 | (UInt32)(byte5 & 0x7F) << 8 | (UInt32)(byte6 & 0x7F);
+    return sysExOut;
+}
+
+CF_INLINE MIDIMessage_64 MIDI1UPSysExArray(UInt8 group, UInt8 status, const Byte *begin, const Byte *end)
+{
+    Byte arrayCopy[6] = {};
+    int numberOfBytes = end <= begin ? 0 : end - begin;
+    for (int i = 0; i < numberOfBytes; ++i)
+        arrayCopy[i] = *(begin + i);
+    return MIDI1UPSysEx(group, status, numberOfBytes, arrayCopy[0], arrayCopy[1], arrayCopy[2], arrayCopy[3], arrayCopy[4], arrayCopy[5]);
+}
+
+//==================================================================================================
+#pragma mark -
+#pragma mark MIDI 2.0 Message helper functions
+
+/*
+	MIDI 2.0 Channel Voice Message generalized structure
+	
+	Word0: [aaaa][bbbb][cccc][dddd][eeeeeeeeeeeeeeee]
+	Word1: [nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn]
+	
+	a: Message Type (type 1 for all voice messages)
+	b: Channel group number
+	c: MIDI status
+	d: MIDI channel
+	e: "Index" -- the contents of this field vary based on message type
+	n: Data payload
+	
+	The following set of functions will correctly construct voice channel messages as two 32-bit words.
+*/
+
+CF_INLINE MIDIMessage_64 MIDI2ChannelVoiceMessage(UInt8 group, UInt8 status, UInt8 channel, UInt16 index, UInt32 value) {
+	return (MIDIMessage_64){ (UInt32)((group & 0xF) | 0x40) << 24 | (UInt32)((channel & 0xF) | (UInt8)(status) << 4) << 16 | (UInt32)(index), value};
+}
+
+CF_INLINE MIDIMessage_64 MIDI2NoteOn(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 attributeType, UInt16 attributeData, UInt16 velocity) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusNoteOn, channel, (UInt16)(noteNumber) << 8 | (UInt16)(attributeType), (UInt32)(velocity) << 16 | (UInt32)(attributeData));
+}
+
+CF_INLINE MIDIMessage_64 MIDI2NoteOff(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 attributeType, UInt16 attributeData, UInt16 velocity) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusNoteOff, channel, (UInt16)(noteNumber) << 8 | (UInt16)(attributeType), (UInt32)(velocity) << 16 | (UInt32)(attributeData));
+}
+
+CF_INLINE MIDIMessage_64 MIDI2PolyPressure(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusPolyPressure, channel, (UInt16)(noteNumber) << 8, value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2RegisteredPNC(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusRegisteredPNC, channel, (UInt16)(noteNumber) << 8 | (UInt16)(index), value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2AssignablePNC(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusAssignablePNC, channel, (UInt16)(noteNumber) << 8 | (UInt16)(index), value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2PerNoteManagment(UInt8 group, UInt8 channel, UInt8 noteNumber, bool detachPNCs, bool resetPNCsToDefault) {
+	UInt16 option_flags = (UInt16)(detachPNCs ? 1 : 0) << 1 | (UInt16)(resetPNCsToDefault ? 1: 0);
+    return MIDI2ChannelVoiceMessage(group, kMIDICVStatusPerNoteMgmt, channel, (UInt16)(noteNumber) << 8 | option_flags, 0);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2ControlChange(UInt8 group, UInt8 channel, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusControlChange, channel, (UInt16)(index) << 8, value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2RegisteredControl(UInt8 group, UInt8 channel, UInt8 bank, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusRegisteredControl, channel, (UInt16)(bank) << 8 | (UInt16)(index), value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2AssignableControl(UInt8 group, UInt8 channel, UInt8 bank, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusAssignableControl, channel, (UInt16)(bank) << 8 | (UInt16)(index), value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2RelRegisteredControl(UInt8 group, UInt8 channel, UInt8 bank, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusRelRegisteredControl, channel, (UInt16)(bank) << 8 | (UInt16)(index), value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2RelAssignableControl(UInt8 group, UInt8 channel, UInt8 bank, UInt8 index, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusRelAssignableControl, channel, (UInt16)(bank) << 8 | (UInt16)(index), value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2ProgramChange(UInt8 group, UInt8 channel, bool bankIsValid, UInt8 program, UInt8 bank_msb, UInt8 bank_lsb) {
+	UInt16 option_flags = (UInt16)(bankIsValid ? 1 : 0);
+	UInt32 value = ((UInt32)(program) << 24) | ((UInt32)(bank_msb) << 8) | ((UInt32)(bank_lsb));
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusProgramChange, channel, option_flags, value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2ChannelPressure(UInt8 group, UInt8 channel, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusChannelPressure, channel, 0, value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2PitchBend(UInt8 group, UInt8 channel, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusPitchBend, channel, 0, value);
+}
+
+CF_INLINE MIDIMessage_64 MIDI2PerNotePitchBend(UInt8 group, UInt8 channel, UInt8 noteNumber, UInt32 value) {
+	return MIDI2ChannelVoiceMessage(group, kMIDICVStatusPerNotePitchBend, channel, (UInt16)(noteNumber) << 8, value);
+}
+
+//==================================================================================================
+#pragma mark -
+#pragma mark UMP message helper functions for reading
+
+/*!
+    @struct    MIDIUniversalMessage
+    @abstract  A representation of all possible messages stored in a Universal MIDI packet.
+*/
+typedef struct MIDIUniversalMessage {
+	MIDIMessageType  type;    //!< determines which variant in the union is active
+	UInt8            group;   //!< 4 bit MIDI group
+	UInt8            reserved[3];
+
+	union {
+		struct {
+			MIDIUtilityStatus status;  //!< determines which variant is active
+			union {
+				UInt16 jitterReductionClock;      //!< active when status is kMIDIUtilityStatusJitterReductionClock
+				UInt16 jitterReductionTimestamp;  //!< active when status is kMIDIUtilityStatusJitterReductionTimestamp
+			};
+		} utility;   //!< active when type is kMIDIMessageTypeUtility
+
+		struct {
+			MIDISystemStatus status;  //!< determines which variant is active
+			union {
+				UInt8  timeCode;             //!< active when status is kMIDIStatusMTC
+				UInt16 songPositionPointer;  //!< active when status is kMIDIStatusSongPosPointer
+				UInt8  songSelect;           //!< active when status is kMIDIStatusSongSelect
+			};
+		} system;   //!< active when type is kMIDIMessageTypeSystem
+
+		struct {
+			MIDICVStatus  status;   //!< determines which variant is active
+			UInt8         channel;  //!< MIDI channel 0-15
+			UInt8         reserved[3];
+			union {
+				struct {
+					UInt8 number;    //!< 7 bit note number
+					UInt8 velocity;  //!< 7 bit note velocity
+				} note;   //!< active when status is kMIDICVStatusNoteOff or kMIDICVStatusNoteOn
+
+				struct
+				{
+					UInt8 noteNumber;  //!< 7 bit note number
+					UInt8 pressure;    //!< 7 bit poly pressure data
+				} polyPressure;   //!< active when status is kMIDICVStatusPolyPressure
+
+				struct {
+					UInt8 index;  //!< 7 bit index of control parameter
+					UInt8 data;   //!< 7 bit value for control parameter
+				} controlChange;  //!< active when status is kMIDICVStatusControlChange
+
+				UInt8  program;          //!< 7 bit program nr, active when status is kMIDICVStatusProgramChange
+				UInt8  channelPressure;  //!< 7 bit channel pressure, active when status is kMIDICVStatusChannelPressure
+				UInt16 pitchBend;        //!< 7 bit pitch bend active when status is kMIDICVStatusPitchBend
+			};
+		} channelVoice1;   //!< active when type is kMIDIMessageTypeChannelVoice1
+
+		struct {
+			MIDISysExStatus status;
+			UInt8           channel;  //!< MIDI channel 0-15
+			UInt8           data[6];  //!< SysEx data, 7 bit values
+			UInt8           reserved;
+		} sysEx;   //!< active when type is kMIDIMessageTypeSysEx
+
+		struct {
+			MIDICVStatus  status;   //!< determines which variant is active
+			UInt8         channel;  //!< MIDI channel
+			UInt8         reserved[3];
+			union {
+				struct {
+					UInt8                 number;         //!< 7 bit note number
+					MIDINoteAttributeType attributeType;  //!< attribute type
+					UInt16                velocity;       //!< note velocity
+					UInt16                attribute;      //!< attribute data
+				} note;    //!< active when status is kMIDICVStatusNoteOff or kMIDICVStatusNoteOn
+
+				struct
+				{
+					UInt8  noteNumber;  //!< 7 bit note number
+					UInt8  reserved;
+					UInt32 pressure;    //!< pressure value
+				} polyPressure;         //!< active when status is kMIDICVStatusPolyPressure
+
+				struct {
+					UInt8  index;     //!< 7 bit controller number
+					UInt8  reserved;
+					UInt32 data;      //!< controller value
+				} controlChange;      //!< active when status is kMIDICVStatusControlChange
+
+				struct {
+					MIDIProgramChangeOptions options;
+					UInt8   program;     //!< 7 bit program number
+					UInt8   reserved[2];
+					UInt16  bank;        //!< 14 bit bank
+				} programChange;         //!< active when status is kMIDICVStatusProgramChange
+
+				struct {
+					UInt32 data;         //!< channel pressure data
+					UInt8  reserved[2];
+				} channelPressure;       //!< active when status is kMIDICVStatusChannelPressure
+
+				struct {
+					UInt32 data;         //!< pitch bend data
+					UInt8  reserved[2];
+				} pitchBend;             //!< active when status is kMIDICVStatusPitchBend
+
+				struct {
+					UInt8  noteNumber;   //!< 7 bit note number
+					UInt8  index;        //!< 7 bit controller number
+					UInt32 data;         //!< controller data
+				} perNoteController;     //!< active when status is kMIDICVStatusRegisteredPNC or kMIDICVStatusAssignablePNC
+
+				struct {
+					UInt8  bank;    //!< 7 bit bank
+					UInt8  index;   //!< 7 bit controller number
+					UInt32 data;    //!< controller data
+				} controller;       //!< active when status is any of kMIDICVStatusRegisteredControl, kMIDICVStatusAssignableControl, kMIDICVStatusRelRegisteredControl, or kMIDICVStatusRelAssignableControl
+
+				struct {
+					UInt8  noteNumber;   //!< 7 bit note number
+					UInt8  reserved;
+					UInt32 bend;         //!< per note pitch bend value
+				} perNotePitchBend;      //!< active when status is kMIDICVStatusPerNotePitchBend
+
+				struct {
+					UInt8 note;         //!< 7 bit note number
+					MIDIPerNoteManagementOptions options;
+					UInt8 reserved[4];
+				} perNoteManagement;    //!< active when status is kMIDICVStatusPerNoteMgmt
+			};
+		} channelVoice2;  //!< active when type is kMIDIMessageTypeChannelVoice2
+
+		struct {
+			MIDISysExStatus status;    //!< determines which variant is active
+			union {
+				struct {
+					UInt8 byteCount;   //!< byte count of data including stream ID (1-14 bytes)
+					UInt8 streamID;
+					UInt8 data[13];
+					UInt8 reserved;
+				} sysex8;   //!< active when status any of kMIDISysExStatusComplete, kMIDISysExStatusStart, kMIDISysExStatusContinue, or kMIDISysExStatusEnd
+
+				struct {
+					UInt8 mdsID;      //!< mixed data set ID
+					UInt8 data[14];
+					UInt8 reserved;
+				} mixedDataSet;   //!< active when status is kMIDISysExMixedDataSetHeader or kMIDISysExMixedDataSetPayload
+			};
+		} data128;   //!< active when type is kMIDIMessageTypeData128
+
+		struct {
+			UInt32 words[4];  //!< up to four 32 bit words
+		} unknown;            //!< active when type is kMIDIMessageTypeUnknownF
+	};
+} MIDIUniversalMessage;
+
+
+/*!
+	@typedef	MIDIEventVisitor
+
+	@abstract	A callback function which receives a single MIDIUniversalMessage.
+
+	@discussion
+		This callback function is called by MIDIEventListForEachEvent on every UMP
+		that has been parsed from a MIDIEventList. From the provided `MIDIUniversalMessage`
+		the MIDI information can be accessed, e.g.:
+		```
+		void myMIDIMessageVisitor(void* context, MIDITimeStamp timeStamp, MIDIUniversalMessage message) {
+			switch (message.type) {
+			case kMIDIMessageTypeSystem:
+				...
+			case kMIDIMessageTypeChannelVoice2:
+				switch (message.channelVoice2.status) {
+				case kMIDICVStatusNoteOff:
+					// access message.channelVoice2.note.number, etc.
+					...
+				case kMIDICVStatusNoteOn:
+					...
+				case kMIDICVStatusPerNotePitchBend:
+					...
+				}
+			}
+		}
+		```
+
+	@param		context
+		A context provided by the client via call to MIDIEventListForEachEvent.
+
+	@param		timeStamp
+		The timestamp of the current UMP.
+
+	@param		message
+		A filled MIDIUniversalMessage struct that has been parsed from a single UMP.
+*/
+typedef void (*MIDIEventVisitor)(void* context, MIDITimeStamp timeStamp, MIDIUniversalMessage message);
+
+/*!
+	@typedef		MIDIEventListForEachEvent
+	@abstract		Parses UMPs from a MIDIEventList.
+	@discussion
+		MIDIEventListForEachEvent iterates over all UMPs in the provided MIDIEventList.
+		It parses each UMP and fills a MIDIUniversalMessage struct. It calls the provided
+		visitor on each of these UMPs. In case of an unknown UMP the raw UMP words will be provided.
+
+	@param			evtlist
+						The MIDIEventList which is to be parsed.
+
+	@param			visitor
+						The visitor that is called on each UMP in evtlist.
+
+	@param			visitorContext
+						A context for the visitor that is passed to it when being called.
+
+*/
+extern void MIDIEventListForEachEvent(
+	const MIDIEventList* evtlist, MIDIEventVisitor visitor, void* visitorContext)
+									API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // CoreMIDI_MIDIMessage_h
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDINetworkSession.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDINetworkSession.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDINetworkSession.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDINetworkSession.h	2021-07-10 09:47:45.000000000 -0400
@@ -0,0 +1,129 @@
+/*
+    File:       CoreMIDI/MIDINetworkSession.h
+ 
+    Contains:   Routines for MIDI networking
+ 
+ 	Copyright:  (c) 2010 by Apple Inc., all rights reserved.
+ 
+    Bugs?:      For bug reports, consult the following page on
+                the World Wide Web:
+ 
+                    http://feedbackassistant.apple.com/
+ 
+*/
+
+#ifndef __MIDINetworkSession_h__
+#define __MIDINetworkSession_h__
+
+#if defined(__OBJC__)
+#import <CoreMIDI/MIDIServices.h>
+#import <Foundation/Foundation.h>
+
+#define MIDINETWORKSESSION_AVAILABLE API_AVAILABLE(macos(10.15), ios(4.2)) API_UNAVAILABLE(watchos, tvos)
+
+NS_ASSUME_NONNULL_BEGIN
+
+/* This is the Bonjour service type. */
+OS_EXPORT NSString *const MIDINetworkBonjourServiceType MIDINETWORKSESSION_AVAILABLE;
+
+/*
+	These are NSNotifications posted by MIDINetworkSession objects. 
+
+	MIDINetworkNotificationContactsDidChange signifies that the list of contacts changed.
+	MIDINetworkNotificationSessionDidChange signifies that other aspects of the session changed,
+	such as the connection list, connection policy, etc.
+*/
+OS_EXPORT NSString *const MIDINetworkNotificationContactsDidChange MIDINETWORKSESSION_AVAILABLE;
+OS_EXPORT NSString *const MIDINetworkNotificationSessionDidChange MIDINETWORKSESSION_AVAILABLE;
+
+
+/* __________________________________________________________________________________________________
+	These are the values of connectionPolicy
+*/
+typedef NS_ENUM(NSUInteger, MIDINetworkConnectionPolicy) {
+	MIDINetworkConnectionPolicy_NoOne				= 0,
+	MIDINetworkConnectionPolicy_HostsInContactList	= 1,
+	MIDINetworkConnectionPolicy_Anyone				= 2
+};
+
+/* __________________________________________________________________________________________________
+	MIDINetworkHost
+	
+	Represents a network address.
+	name: the user's tag for this object.
+	Representations are either:
+	-	address (IP address or hostname) and UDP port
+	-	netServiceName and netServiceDomain
+*/
+OS_EXPORT MIDINETWORKSESSION_AVAILABLE
+@interface MIDINetworkHost : NSObject {
+@private
+    void *_imp;
+}
++ (instancetype)hostWithName: (NSString *)name address: (NSString *)address port: (NSUInteger)port;
++ (instancetype)hostWithName: (NSString *)name netService: (NSNetService *)netService;
++ (instancetype)hostWithName: (NSString *)name netServiceName: (NSString *)netServiceName netServiceDomain: (NSString *)netServiceDomain;
+- (BOOL)hasSameAddressAs: (MIDINetworkHost *)other;
+
+@property(nonatomic,readonly) NSString *name;				/* user's tag */
+@property(nonatomic,readonly) NSString *address;			/* IP address or hostname */
+@property(nonatomic,readonly) NSUInteger port;						/* UDP port */
+@property(nonatomic,readonly,nullable) NSString *netServiceName;	/* NSNetService name */
+@property(nonatomic,readonly,nullable) NSString *netServiceDomain;	/* NSNetService domain */
+@end
+
+/*__________________________________________________________________________________________________
+	MIDINetworkConnection
+
+	Add a connection to a session to connect to the remote host; remove it to disconnect.
+*/
+OS_EXPORT MIDINETWORKSESSION_AVAILABLE
+@interface MIDINetworkConnection : NSObject {
+@private
+    void *_imp;
+}
++ (instancetype)connectionWithHost: (MIDINetworkHost *)host;
+@property(nonatomic,readonly) MIDINetworkHost *host;
+@end
+
+/* __________________________________________________________________________________________________
+	MIDINetworkSession
+	
+	A network session represents one CoreMIDI entity (source/destination pair). One session can
+	have any number of connections. Output is broadcast to all connections; input from multiple
+	connections is merged.
+*/
+OS_EXPORT MIDINETWORKSESSION_AVAILABLE
+@interface MIDINetworkSession : NSObject {
+@private
+    void *_imp;
+}
+
++ (MIDINetworkSession *)defaultSession; /* returns the singleton. */
+
+/* Basic attributes of a session */
+@property(nonatomic,getter=isEnabled) BOOL enabled;			/* disabled sessions do not appear on the network and cannot initiate or receive connections. default is NO (disabled). */
+@property(nonatomic,readonly) NSUInteger networkPort;		/* UDP port */
+@property(nonatomic,readonly) NSString *networkName;		/* name by which this session is advertised via Bonjour */
+@property(nonatomic,readonly) NSString *localName;			/* name of this session's CoreMIDI entity (inherited by its endpoints) */
+@property(nonatomic) MIDINetworkConnectionPolicy connectionPolicy;	/* who can connect to this session? see constants above. */
+
+/*	The driver maintains a directory of MIDINetworkHosts, "contacts," for user convenience in initiating 
+	connections, and for controlling incoming connection requests. */
+- (NSSet<MIDINetworkHost *> *)contacts;
+- (BOOL)addContact: (MIDINetworkHost *)contact;
+- (BOOL)removeContact: (MIDINetworkHost *)contact;
+
+- (NSSet<MIDINetworkConnection *> *)connections;
+- (BOOL)addConnection: (MIDINetworkConnection *)connection;
+- (BOOL)removeConnection: (MIDINetworkConnection *)connection;
+
+- (MIDIEndpointRef)sourceEndpoint;
+- (MIDIEndpointRef)destinationEndpoint;
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif // defined(__OBJC__)
+
+#endif /* __MIDINetworkSession_h__ */
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h	2021-06-17 03:43:51.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h	2021-07-13 00:34:10.000000000 -0400
@@ -362,7 +362,7 @@
 						identifies the source of the data.
 */
 typedef void
-(*MIDIReadProc)(const MIDIPacketList *pktlist, void * __nullable readProcRefCon, void * __nullable srcConnRefCon);
+(*MIDIReadProc)(const MIDIPacketList *pktlist, void * __nullable readProcRefCon, void * __nullable srcConnRefCon) API_DEPRECATED("use MIDIReceiveBlock and MIDIEventLists", macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@typedef		MIDIReadBlock
@@ -382,7 +382,7 @@
 						identifies the source of the data.
 */
 typedef void
-(^MIDIReadBlock)(const MIDIPacketList *pktlist, void * __nullable srcConnRefCon);
+(^MIDIReadBlock)(const MIDIPacketList *pktlist, void * __nullable srcConnRefCon) API_DEPRECATED("use MIDIReceiveBlock and MIDIEventLists", macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@typedef		MIDICompletionProc
@@ -708,7 +708,7 @@
 		A setup editor may allow the user to set the names of both driver-owned and external
 		devices.
 */
-extern const CFStringRef	kMIDIPropertyName					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyName					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyManufacturer
@@ -721,7 +721,7 @@
 
 		Creators of virtual endpoints may set this property on their endpoints.
 */
-extern const CFStringRef	kMIDIPropertyManufacturer			API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyManufacturer			API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyModel
@@ -734,7 +734,7 @@
 
 		Creators of virtual endpoints may set this property on their endpoints.
 */
-extern const CFStringRef	kMIDIPropertyModel					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyModel					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyUniqueID
@@ -745,7 +745,7 @@
 		this property on their endpoints, though doing so may fail if the chosen ID is not
 		unique.
 */
-extern const CFStringRef	kMIDIPropertyUniqueID				API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyUniqueID				API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyDeviceID
@@ -758,7 +758,7 @@
 
 		Setup editors may allow the user to set this property on external devices.
 */
-extern const CFStringRef	kMIDIPropertyDeviceID				API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyDeviceID				API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceiveChannels
@@ -774,7 +774,7 @@
 
 		Virtual destination may set this property on their endpoints.
 */
-extern const CFStringRef	kMIDIPropertyReceiveChannels		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceiveChannels		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitChannels
@@ -784,7 +784,7 @@
 		The value is a bitmap of channels on which the object transmits: 1=ch 1, 2=ch 2, 4=ch 3
 		... 0x8000=ch 16.
 */
-extern const CFStringRef	kMIDIPropertyTransmitChannels		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitChannels		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyMaxSysExSpeed
@@ -795,7 +795,7 @@
 		The value is the maximum rate, in bytes/second, at which sysex messages may
 		be sent reliably to this object. (The default value is 3125, as with MIDI 1.0)
 */
-extern const CFStringRef	kMIDIPropertyMaxSysExSpeed			API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyMaxSysExSpeed			API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -817,7 +817,7 @@
 		time, it receives timestamped messages as soon as they are sent, and must do its own
 		internal scheduling of received events.
 */
-extern const CFStringRef	kMIDIPropertyAdvanceScheduleTimeMuSec	API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyAdvanceScheduleTimeMuSec	API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyIsEmbeddedEntity
@@ -826,7 +826,7 @@
 
 		0 if there are external MIDI connectors, 1 if not.
 */
-extern const CFStringRef	kMIDIPropertyIsEmbeddedEntity			API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyIsEmbeddedEntity			API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -837,7 +837,7 @@
 		1 if the endpoint broadcasts messages to all of the other endpoints in the device, 0 if
 		not.  Set by the owning driver; should not be touched by other clients.
 */
-extern const CFStringRef	kMIDIPropertyIsBroadcast				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyIsBroadcast				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertySingleRealtimeEntity
@@ -852,7 +852,7 @@
 		entity on which incoming realtime messages from the device will appear to have
 		originated from.
 */
-extern const CFStringRef	kMIDIPropertySingleRealtimeEntity		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertySingleRealtimeEntity		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyConnectionUniqueID
@@ -873,7 +873,7 @@
 		signifies a MIDI Thru connection to another external device/entity/endpoint (again,
 		it is strongly recommended that it be an endpoint).
 */
-extern const CFStringRef	kMIDIPropertyConnectionUniqueID			API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyConnectionUniqueID			API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -885,7 +885,7 @@
 		the device; should not be touched by other clients. Property is inherited from the
 		device by its entities and endpoints.
 */
-extern const CFStringRef	kMIDIPropertyOffline					API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyOffline					API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyPrivate
@@ -896,7 +896,7 @@
 		but they will still appear in the API; only affects whether the owned endpoints are
 		hidden.
 */
-extern const CFStringRef	kMIDIPropertyPrivate					API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyPrivate					API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyDriverOwner
@@ -907,7 +907,7 @@
 		not be touched by other clients. Property is inherited from the device by its entities
 		and endpoints.
 */
-extern const CFStringRef	kMIDIPropertyDriverOwner				API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyDriverOwner				API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyFactoryPatchNameFile
@@ -919,7 +919,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);
+extern const CFStringRef	kMIDIPropertyFactoryPatchNameFile		API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfiguration", macos(10.1, 10.2)) API_UNAVAILABLE(ios, tvos, watchos);
 
 
 /*!
@@ -932,7 +932,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);
+extern const CFStringRef	kMIDIPropertyUserPatchNameFile			API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfiguration", macos(10.1, 10.2)) API_UNAVAILABLE(ios, tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyNameConfiguration
@@ -969,7 +969,7 @@
 		other than the ones they are interested in changing and to properly structure the
 		dictionary.
 */
-extern const CFStringRef	kMIDIPropertyNameConfiguration			API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfigurationDictionary", macos(10.2, 10.15), ios(4.2, 13.0), tvos(12.0, 13.0));
+extern const CFStringRef	kMIDIPropertyNameConfiguration			API_DEPRECATED_WITH_REPLACEMENT("kMIDIPropertyNameConfigurationDictionary", macos(10.2, 10.15), ios(4.2, 13.0)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
     @constant        kMIDIPropertyNameConfigurationDictionary
@@ -1001,7 +1001,7 @@
         other than the ones they are interested in changing and to properly structure the
         dictionary.
 */
-extern const CFStringRef    kMIDIPropertyNameConfigurationDictionary            API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0));
+extern const CFStringRef    kMIDIPropertyNameConfigurationDictionary            API_AVAILABLE(macos(10.15), ios(13.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyImage
@@ -1015,7 +1015,7 @@
 
 		A studio setup editor should allow the user to choose icons for external devices.
 */
-extern const CFStringRef	kMIDIPropertyImage						API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyImage						API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyDriverVersion
@@ -1024,7 +1024,7 @@
 		driver (only for driver- owned devices).  Drivers need not set this property;
 		applications should not write to it.
 */
-extern const CFStringRef	kMIDIPropertyDriverVersion				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyDriverVersion				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertySupportsGeneralMIDI
@@ -1032,7 +1032,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity implements
 		the General MIDI specification.
 */
-extern const CFStringRef	kMIDIPropertySupportsGeneralMIDI		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertySupportsGeneralMIDI		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertySupportsMMC
@@ -1040,7 +1040,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity implements
 		the MIDI Machine Control portion of the MIDI specification.
 */
-extern const CFStringRef	kMIDIPropertySupportsMMC				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertySupportsMMC				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyCanRoute
@@ -1049,7 +1049,7 @@
 		MIDI messages to or from other external MIDI devices (as with MIDI patch bays). This
 		should NOT be set on devices which are controlled by drivers.
 */
-extern const CFStringRef	kMIDIPropertyCanRoute					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyCanRoute					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceivesClock
@@ -1057,7 +1057,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity  responds
 		to MIDI beat clock messages.
 */
-extern const CFStringRef	kMIDIPropertyReceivesClock				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceivesClock				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceivesMTC
@@ -1065,7 +1065,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity responds
 		to MIDI Time Code messages.
 */
-extern const CFStringRef	kMIDIPropertyReceivesMTC				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceivesMTC				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceivesNotes
@@ -1073,7 +1073,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity responds
 		to MIDI Note On messages.
 */
-extern const CFStringRef	kMIDIPropertyReceivesNotes				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceivesNotes				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceivesProgramChanges
@@ -1081,7 +1081,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity responds
 		to MIDI program change messages.
 */
-extern const CFStringRef	kMIDIPropertyReceivesProgramChanges		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceivesProgramChanges		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceivesBankSelectMSB
@@ -1089,7 +1089,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity responds
 		to MIDI bank select MSB messages (control 0).
 */
-extern const CFStringRef	kMIDIPropertyReceivesBankSelectMSB		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceivesBankSelectMSB		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyReceivesBankSelectLSB
@@ -1097,7 +1097,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity responds
 		to MIDI bank select LSB messages (control 32).
 */
-extern const CFStringRef	kMIDIPropertyReceivesBankSelectLSB		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyReceivesBankSelectLSB		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitsClock
@@ -1105,7 +1105,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity transmits
 		MIDI beat clock messages.
 */
-extern const CFStringRef	kMIDIPropertyTransmitsClock				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitsClock				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitsMTC
@@ -1113,7 +1113,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity transmits
 		MIDI Time Code messages.
 */
-extern const CFStringRef	kMIDIPropertyTransmitsMTC				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitsMTC				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitsNotes
@@ -1121,7 +1121,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity transmits
 		MIDI note messages.
 */
-extern const CFStringRef	kMIDIPropertyTransmitsNotes				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitsNotes				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitsProgramChanges
@@ -1129,7 +1129,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity transmits
 		MIDI program change messages.
 */
-extern const CFStringRef	kMIDIPropertyTransmitsProgramChanges	API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitsProgramChanges	API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitsBankSelectMSB
@@ -1137,7 +1137,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity transmits
 		MIDI bank select MSB messages (control 0).
 */
-extern const CFStringRef	kMIDIPropertyTransmitsBankSelectMSB		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitsBankSelectMSB		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyTransmitsBankSelectLSB
@@ -1145,7 +1145,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity transmits
 		MIDI bank select LSB messages (control 32).
 */
-extern const CFStringRef	kMIDIPropertyTransmitsBankSelectLSB		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyTransmitsBankSelectLSB		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyPanDisruptsStereo
@@ -1154,7 +1154,7 @@
 		10), when sent to the device or entity, cause undesirable effects when playing stereo
 		sounds (e.g. converting the signal to mono).
 */
-extern const CFStringRef	kMIDIPropertyPanDisruptsStereo			API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyPanDisruptsStereo			API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyIsSampler
@@ -1162,7 +1162,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity plays
 		audio samples in response to MIDI note messages.
 */
-extern const CFStringRef	kMIDIPropertyIsSampler					API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyIsSampler					API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyIsDrumMachine
@@ -1170,7 +1170,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity's sound
 		presets tend to be collections of non-transposable samples (e.g. drum kits).
 */
-extern const CFStringRef	kMIDIPropertyIsDrumMachine				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyIsDrumMachine				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyIsMixer
@@ -1178,7 +1178,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity mixes
 		external audio signals, controlled by MIDI messages.
 */
-extern const CFStringRef	kMIDIPropertyIsMixer					API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyIsMixer					API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyIsEffectUnit
@@ -1186,7 +1186,7 @@
 		device/entity property, integer (0/1). Indicates whether the device or entity is
 		primarily a MIDI-controlled audio effect unit (i.e. does not generate sound on its own).
 */
-extern const CFStringRef	kMIDIPropertyIsEffectUnit				API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyIsEffectUnit				API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyMaxReceiveChannels
@@ -1197,7 +1197,7 @@
 		(fully multitimbral devices). Other values are possible, for example devices which are
 		multi-timbral but have fewer than 16 "parts".
 */
-extern const CFStringRef	kMIDIPropertyMaxReceiveChannels			API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyMaxReceiveChannels			API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyMaxTransmitChannels
@@ -1206,7 +1206,7 @@
 		which a device may simultaneously transmit MIDI Channel Messages. Common values are 0, 1
 		and 16.
 */
-extern const CFStringRef	kMIDIPropertyMaxTransmitChannels		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyMaxTransmitChannels		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyDriverDeviceEditorApp
@@ -1215,7 +1215,7 @@
 		configure this driver-owned devices. Drivers may set this property on their owned
 		devices. Applications must not write to it.
 */
-extern const CFStringRef	kMIDIPropertyDriverDeviceEditorApp		API_AVAILABLE(macos(10.3), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyDriverDeviceEditorApp		API_AVAILABLE(macos(10.3), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertySupportsShowControl
@@ -1223,7 +1223,7 @@
 		device/entity property, integer (0/1). Indicates whether the device implements the MIDI
 		Show Control specification.
 */
-extern const CFStringRef	kMIDIPropertySupportsShowControl		API_AVAILABLE(macos(10.4), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertySupportsShowControl		API_AVAILABLE(macos(10.4), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@constant		kMIDIPropertyDisplayName
@@ -1235,7 +1235,7 @@
 
 		For objects other than endpoints, the display name is the same as the name.
 */
-extern const CFStringRef	kMIDIPropertyDisplayName				API_AVAILABLE(macos(10.4), ios(4.2), tvos(12.0));
+extern const CFStringRef	kMIDIPropertyDisplayName				API_AVAILABLE(macos(10.4), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	constant		kMIDIPropertyProtocolID
@@ -1246,7 +1246,7 @@
 		negotiation, by setting this property on the endpoint. Clients can observe changes to
 		this property.
 */
-extern const CFStringRef	kMIDIPropertyProtocolID					API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+extern const CFStringRef	kMIDIPropertyProtocolID					API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 //==================================================================================================
 #pragma mark	Clients
@@ -1276,7 +1276,7 @@
 MIDIClientCreate(	CFStringRef					name,
 					MIDINotifyProc __nullable	notifyProc,
 					void * __nullable			notifyRefCon,
-					MIDIClientRef *				outClient )				API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+					MIDIClientRef *				outClient )				API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIClientCreateWithBlock
@@ -1300,7 +1300,7 @@
 MIDIClientCreateWithBlock(
 					CFStringRef					name,
 					MIDIClientRef *				outClient,
-					MIDINotifyBlock __nullable	notifyBlock )			API_AVAILABLE(macos(10.11), ios(9.0), tvos(12.0));
+					MIDINotifyBlock __nullable	notifyBlock )			API_AVAILABLE(macos(10.11), ios(9.0)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1321,7 +1321,7 @@
 		disposing all of an application's MIDIClients is strongly discouraged.
 */
 extern OSStatus
-MIDIClientDispose(	MIDIClientRef client )					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIClientDispose(	MIDIClientRef client )					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 //==================================================================================================
 #pragma mark	Ports
@@ -1358,7 +1358,7 @@
 								CFStringRef		portName,
 								MIDIProtocolID	protocol,
 								MIDIPortRef *	outPort,
-								MIDIReceiveBlock receiveBlock )	API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+								MIDIReceiveBlock receiveBlock )	API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIInputPortCreate
@@ -1393,7 +1393,7 @@
 						void * __nullable	refCon,
 						MIDIPortRef * 		outPort )
 				API_DEPRECATED_WITH_REPLACEMENT("MIDIInputPortCreateWithProtocol",
-												macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+												macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIInputPortCreateWithBlock
@@ -1425,7 +1425,7 @@
 								MIDIPortRef *	outPort,
 								MIDIReadBlock	readBlock )
 					API_DEPRECATED_WITH_REPLACEMENT("MIDIInputPortCreateWithProtocol",
-													macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+													macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIOutputPortCreate
@@ -1453,7 +1453,7 @@
 extern OSStatus
 MIDIOutputPortCreate(	MIDIClientRef	client,
 						CFStringRef		portName,
-						MIDIPortRef *	outPort )			API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+						MIDIPortRef *	outPort )			API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIPortDispose
@@ -1470,7 +1470,7 @@
 		client's ports are automatically disposed at that time.
 */
 extern OSStatus
-MIDIPortDispose(	MIDIPortRef port )						API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIPortDispose(	MIDIPortRef port )						API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1491,7 +1491,7 @@
 extern OSStatus
 MIDIPortConnectSource(	MIDIPortRef		port,
 						MIDIEndpointRef	source,
-						void * __nullable			connRefCon )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+						void * __nullable			connRefCon )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1509,7 +1509,7 @@
 */
 extern OSStatus
 MIDIPortDisconnectSource(	MIDIPortRef		port,
-							MIDIEndpointRef	source )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+							MIDIEndpointRef	source )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 //==================================================================================================
@@ -1524,7 +1524,7 @@
 					occurred.
 */
 extern ItemCount
-MIDIGetNumberOfDevices(void)								API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIGetNumberOfDevices(void)								API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1554,7 +1554,7 @@
 		entities to locate endpoints.
 */
 extern MIDIDeviceRef
-MIDIGetDevice(	ItemCount deviceIndex0 )					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIGetDevice(	ItemCount deviceIndex0 )					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIDeviceGetNumberOfEntities
@@ -1568,7 +1568,7 @@
 					error occurred.
 */
 extern ItemCount
-MIDIDeviceGetNumberOfEntities(	MIDIDeviceRef device )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIDeviceGetNumberOfEntities(	MIDIDeviceRef device )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIDeviceGetEntity
@@ -1585,7 +1585,7 @@
 */
 extern MIDIEntityRef
 MIDIDeviceGetEntity(	MIDIDeviceRef	device,
-						ItemCount		entityIndex0 )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+						ItemCount		entityIndex0 )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 //==================================================================================================
 #pragma mark	Entities
@@ -1602,7 +1602,7 @@
 					error occurred.
 */
 extern ItemCount
-MIDIEntityGetNumberOfSources(	MIDIEntityRef entity )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIEntityGetNumberOfSources(	MIDIEntityRef entity )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIEntityGetSource
@@ -1619,7 +1619,7 @@
 */
 extern MIDIEndpointRef
 MIDIEntityGetSource(	MIDIEntityRef entity,
-						ItemCount sourceIndex0 )			API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+						ItemCount sourceIndex0 )			API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIEntityGetNumberOfDestinations
@@ -1633,7 +1633,7 @@
 					if an error occurred.
 */
 extern ItemCount
-MIDIEntityGetNumberOfDestinations(	MIDIEntityRef entity )	API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIEntityGetNumberOfDestinations(	MIDIEntityRef entity )	API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIEntityGetDestination
@@ -1650,7 +1650,7 @@
 */
 extern MIDIEndpointRef
 MIDIEntityGetDestination(	MIDIEntityRef	entity,
-							ItemCount		destIndex0 )	API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+							ItemCount		destIndex0 )	API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIEntityGetDevice
@@ -1664,7 +1664,7 @@
 */
 extern OSStatus
 MIDIEntityGetDevice(		MIDIEntityRef		inEntity,
-							MIDIDeviceRef * __nullable		outDevice)	API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+							MIDIDeviceRef * __nullable		outDevice)	API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 //==================================================================================================
 #pragma mark	Endpoints
@@ -1678,7 +1678,7 @@
 					occurred.
 */
 extern ItemCount
-MIDIGetNumberOfSources(void)								API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIGetNumberOfSources(void)								API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1692,7 +1692,7 @@
 	@result			A reference to a source, or NULL if an error occurred.
 */
 extern MIDIEndpointRef
-MIDIGetSource(	ItemCount sourceIndex0 )					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIGetSource(	ItemCount sourceIndex0 )					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1704,7 +1704,7 @@
 					occurred.
 */
 extern ItemCount
-MIDIGetNumberOfDestinations(void)							API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIGetNumberOfDestinations(void)							API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 /*!
@@ -1718,7 +1718,7 @@
 	@result			A reference to a destination, or NULL if an error occurred.
 */
 extern MIDIEndpointRef
-MIDIGetDestination(	ItemCount destIndex0 )					API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIGetDestination(	ItemCount destIndex0 )					API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIEndpointGetEntity
@@ -1735,7 +1735,7 @@
 */
 extern OSStatus
 MIDIEndpointGetEntity(		MIDIEndpointRef		inEndpoint,
-							MIDIEntityRef * __nullable		outEntity)	API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+							MIDIEntityRef * __nullable		outEntity)	API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIDestinationCreateWithProtocol
@@ -1777,7 +1777,7 @@
 									CFStringRef  		name,
 									MIDIProtocolID		protocol,
 									MIDIEndpointRef *	outDest,
-									MIDIReceiveBlock	readBlock ) API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+									MIDIReceiveBlock	readBlock ) API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIDestinationCreate
@@ -1820,7 +1820,7 @@
 						void * __nullable	refCon,
 						MIDIEndpointRef *	outDest )
 				API_DEPRECATED_WITH_REPLACEMENT("MIDIDestinationCreateWithProtocol",
-												macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+												macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIDestinationCreateWithBlock
@@ -1860,7 +1860,7 @@
 								MIDIEndpointRef * 	outDest,
 								MIDIReadBlock 		readBlock )
 					API_DEPRECATED_WITH_REPLACEMENT("MIDIDestinationCreateWithProtocol",
-													macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+													macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDISourceCreateWithProtocol
@@ -1897,7 +1897,7 @@
 MIDISourceCreateWithProtocol(	MIDIClientRef 		client,
 								CFStringRef  		name,
 								MIDIProtocolID		protocol,
-								MIDIEndpointRef * 	outSrc ) API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+								MIDIEndpointRef * 	outSrc ) API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDISourceCreate
@@ -1930,7 +1930,7 @@
 					CFStringRef  		name,
 					MIDIEndpointRef * 	outSrc )
 			API_DEPRECATED_WITH_REPLACEMENT("MIDISourceCreateWithProtocol",
-											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIEndpointDispose
@@ -1943,7 +1943,7 @@
 	@result			An OSStatus result code.
 */
 extern OSStatus
-MIDIEndpointDispose(	MIDIEndpointRef endpt )				API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDIEndpointDispose(	MIDIEndpointRef endpt )				API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 //==================================================================================================
@@ -1963,7 +1963,7 @@
 		adds them.
 */
 extern ItemCount
-MIDIGetNumberOfExternalDevices(void)						API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+MIDIGetNumberOfExternalDevices(void)						API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIGetExternalDevice
@@ -1979,7 +1979,7 @@
 		Use this to enumerate the external devices in the system.
 */
 extern MIDIDeviceRef
-MIDIGetExternalDevice(	ItemCount deviceIndex0 )			API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+MIDIGetExternalDevice(	ItemCount deviceIndex0 )			API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 //==================================================================================================
 #pragma mark	Objects and Properties
@@ -2003,7 +2003,7 @@
 extern OSStatus
 MIDIObjectGetIntegerProperty(	MIDIObjectRef	obj,
 								CFStringRef		propertyID,
-								SInt32 *		outValue )	API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+								SInt32 *		outValue )	API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectSetIntegerProperty
@@ -2024,7 +2024,7 @@
 extern OSStatus
 MIDIObjectSetIntegerProperty(	MIDIObjectRef	obj,
 								CFStringRef		propertyID,
-								SInt32			value )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+								SInt32			value )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectGetStringProperty
@@ -2045,7 +2045,7 @@
 extern OSStatus
 MIDIObjectGetStringProperty(	MIDIObjectRef			obj,
 								CFStringRef				propertyID,
-								CFStringRef __nullable * __nonnull str )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+								CFStringRef __nullable * __nonnull str )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectSetStringProperty
@@ -2066,7 +2066,7 @@
 extern OSStatus
 MIDIObjectSetStringProperty(	MIDIObjectRef	obj,
 								CFStringRef		propertyID,
-								CFStringRef		str )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+								CFStringRef		str )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectGetDataProperty
@@ -2088,7 +2088,7 @@
 extern OSStatus
 MIDIObjectGetDataProperty(		MIDIObjectRef			obj,
 								CFStringRef				propertyID,
-								CFDataRef __nullable * __nonnull outData )	API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+								CFDataRef __nullable * __nonnull outData )	API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectSetDataProperty
@@ -2109,7 +2109,7 @@
 extern OSStatus
 MIDIObjectSetDataProperty(		MIDIObjectRef	obj,
 								CFStringRef		propertyID,
-								CFDataRef		data )		API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+								CFDataRef		data )		API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectGetDictionaryProperty
@@ -2131,7 +2131,7 @@
 MIDIObjectGetDictionaryProperty(	MIDIObjectRef					obj,
 									CFStringRef						propertyID,
 									CFDictionaryRef __nullable * __nonnull outDict )
-															API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+															API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectSetDictionaryProperty
@@ -2152,7 +2152,7 @@
 extern OSStatus
 MIDIObjectSetDictionaryProperty(MIDIObjectRef	obj,
 								CFStringRef		propertyID,
-								CFDictionaryRef dict )		API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+								CFDictionaryRef dict )		API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectGetProperties
@@ -2178,7 +2178,7 @@
 extern OSStatus
 MIDIObjectGetProperties(		MIDIObjectRef 		obj,
 								CFPropertyListRef __nullable * __nonnull outProperties,
-								Boolean				deep )	API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+								Boolean				deep )	API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectRemoveProperty
@@ -2194,7 +2194,7 @@
 extern OSStatus
 MIDIObjectRemoveProperty(		MIDIObjectRef 		obj,
 								CFStringRef			propertyID )
-															API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+															API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIObjectFindByUniqueID
@@ -2220,7 +2220,7 @@
 MIDIObjectFindByUniqueID(	MIDIUniqueID 		inUniqueID,
 							MIDIObjectRef * __nullable outObject,
 							MIDIObjectType * __nullable outObjectType)
-															API_AVAILABLE(macos(10.2), ios(4.2), tvos(12.0));
+															API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 //==================================================================================================
 #pragma mark	MIDI I/O
@@ -2245,7 +2245,7 @@
 extern OSStatus
 MIDISendEventList(	MIDIPortRef 				port,
 					MIDIEndpointRef 			dest,
-					const MIDIEventList *		evtlist )	API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+					const MIDIEventList *		evtlist )	API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDISend
@@ -2269,7 +2269,7 @@
 			MIDIEndpointRef 		dest,
 			const MIDIPacketList *	pktlist )
 	API_DEPRECATED_WITH_REPLACEMENT("MIDISendEventList",
-									macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+									macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
     
 /*!
 	@function		MIDISendSysex
@@ -2284,7 +2284,7 @@
 		request->data must point to a single MIDI system-exclusive message, or portion thereof.
 */
 extern OSStatus
-MIDISendSysex(	MIDISysexSendRequest *request )				API_AVAILABLE(macos(10.0), ios(4.2), tvos(12.0));
+MIDISendSysex(	MIDISysexSendRequest *request )				API_AVAILABLE(macos(10.0), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIReceivedEventList
@@ -2309,7 +2309,7 @@
 */
 extern OSStatus
 MIDIReceivedEventList(	MIDIEndpointRef			src,
-						const MIDIEventList *	evtlist )	API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+						const MIDIEventList *	evtlist )	API_AVAILABLE(macos(11.0), ios(14.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIReceived
@@ -2336,7 +2336,7 @@
 MIDIReceived(	MIDIEndpointRef			src,
 				const MIDIPacketList * 	pktlist )
 		API_DEPRECATED_WITH_REPLACEMENT("MIDIReceivedEventList",
-										macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+										macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIFlushOutput
@@ -2353,7 +2353,7 @@
 		scheduled for future delivery.
 */
 extern OSStatus
-MIDIFlushOutput(	MIDIEndpointRef		dest )				API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+MIDIFlushOutput(	MIDIEndpointRef		dest )				API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
 	@function		MIDIRestart
@@ -2366,7 +2366,7 @@
 	@result			An OSStatus result code.
 */
 extern OSStatus
-MIDIRestart(void)											API_AVAILABLE(macos(10.1), ios(4.2), tvos(12.0));
+MIDIRestart(void)											API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
 
 
 
@@ -2404,7 +2404,7 @@
 */
 extern MIDIEventPacket *
 MIDIEventListInit(	MIDIEventList *evtlist,
-					MIDIProtocolID protocol)			API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+					MIDIProtocolID protocol)			API_AVAILABLE(macos(11.0), ios(14.0), tvos(15.0), watchos(8.0));
 
 /*!
 	@function		MIDIEventListAdd
@@ -2442,7 +2442,7 @@
 					MIDIEventPacket *	curPacket,
 					MIDITimeStamp		time,
 					ByteCount			wordCount,
-					const UInt32 *		words)			API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+					const UInt32 *		words)			API_AVAILABLE(macos(11.0), ios(14.0), tvos(15.0), watchos(8.0));
 
 //==================================================================================================
 #pragma mark Packet Lists (Deprecated in favor of Event Lists)
@@ -2490,7 +2490,7 @@
 extern MIDIPacket *
 MIDIPacketListInit(	MIDIPacketList *pktlist )
 			API_DEPRECATED_WITH_REPLACEMENT("MIDIEventListInit",
-											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 /*!
 	@function		MIDIPacketListAdd
@@ -2528,7 +2528,7 @@
 					ByteCount			nData,
 					const Byte *		data)
 			API_DEPRECATED_WITH_REPLACEMENT("MIDIEventListAdd",
-											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED), tvos(12.0, API_TO_BE_DEPRECATED));
+											macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
 
 
 #ifdef __cplusplus
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDISetup.h	2021-07-13 00:38:06.000000000 -0400
@@ -0,0 +1,478 @@
+/*
+ 	File:   	CoreMIDI/MIDISetup.h
+ 
+ 	Contains:   Specialized configuration-editing routines for CoreMIDI.
+ 
+ 	Copyright:  (c) 2000-2015 by Apple Inc., all rights reserved.
+ 
+ 	Bugs?:  	For bug reports, consult the following page on
+ 				the World Wide Web:
+ 
+ 					http://feedbackassistant.apple.com/
+ 
+*/
+
+#ifndef __MIDISetup_h__
+#define __MIDISetup_h__
+
+#ifndef __MIDIServices_h__
+#include <CoreMIDI/MIDIServices.h>
+#endif
+
+
+//  -----------------------------------------------------------------------------
+/*!
+	@header MIDISetup.h
+
+	This header defines functions that manipulate and customize the global
+	state of the MIDI system.  These functions are generally only needed by 
+	applications which wish to allow the user some flexibility in how
+	the MIDI system's state is presented, and by MIDI drivers, which may
+	dynamically modify the system state as hardware is connected and 
+	disconnected.
+*/
+
+CF_ASSUME_NONNULL_BEGIN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//  -----------------------------------------------------------------------------
+/*!
+	@typedef		MIDISetupRef
+	
+	@discussion		Derives from MIDIObjectRef, does not have an owner object.
+
+					This represents the global state of the MIDI system,
+					containing lists of the MIDI devices and serial port
+					owners.
+					
+					Generally, only MIDI drivers and specialized configuration
+					editors will need to manipulate MIDISetup objects, not the
+					average MIDI client application.  As of CoreMIDI 1.1, the
+					MIDIServer maintains a single global MIDISetupRef, stored
+					persistently in a preference file.
+*/
+typedef MIDIObjectRef MIDISetupRef;
+
+// ______________________________________________________________________________
+//	MIDISetup
+// ______________________________________________________________________________
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupCreate
+
+	@abstract 		Interrogates drivers, to discover what hardware is present.
+	
+					As of CoreMIDI 1.1, it is usually not necessary to call
+					this function, as CoreMIDI manages a single persistent
+					MIDISetup itself.
+
+	@param			outSetup
+						On successful return, points to a newly-created MIDISetup
+						object.  The caller is responsible for disposing it,
+						or transferring ownership of the object back to the
+						system, with MIDISetupInstall.
+	@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);
+
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupDispose
+
+	@abstract 		Dispose a MIDISetup object.
+
+					As of CoreMIDI 1.1, it is usually not necessary to call
+					this function, as CoreMIDI manages a single persistent
+					MIDISetup itself.
+	
+	@param			setup
+						The MIDISetup to be disposed.
+	@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);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupInstall
+
+	@abstract 		Install a MIDISetup as the system's current state.
+
+					A client can create a MIDISetup object using
+					MIDISetupCreate, or MIDISetupFromData.  This function will
+					install this state as the current state of the system,
+					possibly changing the devices visible to clients.
+
+					As of CoreMIDI 1.1, it is usually not necessary to call
+					this function, as CoreMIDI manages a single persistent
+					MIDISetup itself.
+
+	@param			setup
+						The MIDISetup object to install.  Ownership of this
+						object is transferred from the client to the system; the
+						client must <b>not</b> dispose of this MIDISetup.
+	@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);
+
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupGetCurrent
+
+	@abstract 		Return the system's current MIDISetup.
+	
+					As of CoreMIDI 1.1, it is usually not necessary to call
+					this function, as CoreMIDI manages a single persistent
+					MIDISetup itself.
+	
+	@param			outSetup
+						On successful return, points to the system's most
+						recently installed MIDISetup.  The system retains
+						ownership of the object; the client must <b>not</b>
+						dispose of this MIDISetup.
+	@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);
+
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupToData
+
+	@abstract 		Create an XML representation of a MIDISetup object.
+	
+					As of CoreMIDI 1.1, it is usually not necessary to call
+					this function, as CoreMIDI manages a single persistent
+					MIDISetup itself.
+	
+	@param			setup
+						The MIDISetup object whose XML representation is to be
+						returned.
+	@param			outData
+						On successful return, points to a newly-created CFDataRef
+						containing the XML text.  The client is responsible for
+						releasing this CFData object when done with it.
+	@result			An OSStatus result code.
+*/
+extern OSStatus
+MIDISetupToData(	MIDISetupRef	setup,
+					CFDataRef __nullable * __nonnull outData )	API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupFromData
+
+	@abstract 		Create a MIDISetup object from an XML stream.
+	
+					As of CoreMIDI 1.1, it is usually not necessary to call
+					this function, as CoreMIDI manages a single persistent
+					MIDISetup itself.
+	
+	@param			data
+						The XML text from which a MIDISetup object is to be built.
+	@param			outSetup
+						On successful return, points to a newly-created MIDISetup
+						object.  The caller is responsible for disposing it, or
+						transferring ownership of the object back to the system,
+						with MIDISetupInstall.
+	@result			An OSStatus result code.
+*/
+extern OSStatus
+MIDISetupFromData(	CFDataRef 		data, 
+					MIDISetupRef *	outSetup)					API_DEPRECATED("No longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceNewEntity
+
+	@discussion		Drivers call this function to specify one of the entities that
+					comprise a device.
+					
+					Non-drivers may call this function as of macOS 10.16 & iOS 14 to
+					add entities to external devices.
+	
+	@param			device
+						The device to which an entity is to be added.
+	@param			name
+						The name of the new entity.
+	@param			protocol
+						The MIDI protocol variant used by the sources and
+						destinations that comprise this entity.
+	@param			embedded
+						True if this entity is inside the device, false if the
+						entity simply consists of external connectors to which
+						other devices can be attached.
+	@param			numSourceEndpoints
+						The number of source endpoints the entity has.
+	@param			numDestinationEndpoints
+						The number of destination endpoints the entity has.
+	@param			newEntity
+						On successful return, points to the newly-created entity.
+	@result			An OSStatus result code.
+*/
+extern OSStatus
+MIDIDeviceNewEntity(MIDIDeviceRef device, CFStringRef name, MIDIProtocolID protocol,
+					Boolean embedded, ItemCount numSourceEndpoints,
+					ItemCount numDestinationEndpoints, MIDIEntityRef *newEntity)
+															API_AVAILABLE(macos(11.0), ios(14.0)) __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceAddEntity
+
+	@discussion		Drivers call this function to specify one of the entities that 
+					comprise a device.
+					
+					Non-drivers may call this function as of CoreMIDI 1.1 to
+					add entities to external devices.
+	
+	@param			device
+						The device to which an entity is to be added.
+	@param			name
+						The name of the new entity.
+	@param			embedded
+						True if this entity is inside the device, false if the
+						entity simply consists of external connectors to which
+						other devices can be attached.
+	@param			numSourceEndpoints
+						The number of source endpoints the entity has.
+	@param			numDestinationEndpoints
+						The number of destination endpoints the entity has.
+	@param			newEntity
+						On successful return, points to the newly-created entity.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		
+MIDIDeviceAddEntity(MIDIDeviceRef device, CFStringRef name, 
+					Boolean embedded, ItemCount numSourceEndpoints,
+					ItemCount numDestinationEndpoints, MIDIEntityRef *newEntity)
+				API_DEPRECATED_WITH_REPLACEMENT("MIDIDeviceNewEntity", macos(10.0, API_TO_BE_DEPRECATED), ios(4.2, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIDeviceRemoveEntity
+
+	@discussion		Drivers may call this function to remove one of a device's
+					entities.
+					
+					New for CoreMIDI 1.1.
+	
+	@param			device
+						The device from which an entity is to be removed.
+	@param			entity
+						The entity to be removed.
+	@result			An OSStatus result code.
+*/
+extern OSStatus
+MIDIDeviceRemoveEntity(MIDIDeviceRef device, MIDIEntityRef entity)
+																API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIEntityAddOrRemoveEndpoints
+
+	@discussion		Drivers and configuration editors may call this function to add to 
+					or remove an entity's endpoints.
+					
+					New for CoreMIDI 1.3.
+
+					The MIDIProtocolID of new endpoints is initially the same as that of
+					the entity.
+	
+	@param			entity
+						The entity whose endpoints are to be manipulated.
+	@param			numSourceEndpoints
+						The desired new number of source endpoints.
+	@param			numDestinationEndpoints
+						The desired new number of destination endpoints.
+	@result			An OSStatus result code.
+*/
+extern OSStatus
+MIDIEntityAddOrRemoveEndpoints(MIDIEntityRef entity, ItemCount numSourceEndpoints,
+					ItemCount numDestinationEndpoints)			API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupAddDevice
+
+	@abstract 		Adds a driver-owner MIDI device to the current MIDISetup
+	
+	@discussion		Only MIDI drivers may make this call; it is in this header
+					file only for consistency with MIDISetupRemoveDevice.
+	
+					New for CoreMIDI 1.1.
+	
+	@param			device
+						The device to be added.
+*/
+extern OSStatus
+MIDISetupAddDevice(		MIDIDeviceRef device )					API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupRemoveDevice
+
+	@abstract 		Removes a driver-owned MIDI device from the current MIDISetup
+	
+	@discussion		Generally this should only be called from a studio configuration
+					editor, to remove a device which is offline and which the user
+					has specified as being permanently missing.
+					
+					Instead of removing devices from the setup, drivers should
+					set the device's kMIDIPropertyOffline to 1 so that if the
+					device reappears later, none of its properties are lost.
+	
+					New for CoreMIDI 1.1.
+	
+	@param			device
+						The device to be added.
+*/
+extern OSStatus
+MIDISetupRemoveDevice(	MIDIDeviceRef device )				API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupAddExternalDevice
+
+	@abstract 		Adds an external MIDI device to the current MIDISetup
+	
+	@discussion		Useful for a studio configuration editor.  New for CoreMIDI 1.1.
+	
+	@param			device
+						The device to be added.
+*/
+extern OSStatus
+MIDISetupAddExternalDevice(	MIDIDeviceRef device )			API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetupRemoveExternalDevice
+
+	@abstract 		Removes an external MIDI device from the current MIDISetup
+	
+	@discussion		Useful for a studio configuration editor.  New for CoreMIDI 1.1.
+	
+	@param			device
+						The device to be removed.
+*/
+extern OSStatus
+MIDISetupRemoveExternalDevice( MIDIDeviceRef device )		API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIGetSerialPortOwner
+
+	@abstract 		Returns the MIDI driver that owns a serial port.
+	
+	@discussion		The current MIDISetup tracks ownership of serial ports
+					to one of the MIDI drivers installed in the system.
+	
+					Serial ports can be enumerated using IOServiceMatching(
+					kIOSerialBSDServiceValue).  The port's unique name is
+					the IOService's kIOTTYDeviceKey property. 
+
+					New for CoreMIDI 1.1.
+					
+					A previous version of this documentation specified an incorrect
+					key for obtaining the port's unique name (IOTTYBaseName).
+	
+	@param			portName
+						The name of a serial port.
+	@param			outDriverName
+						On exit, the name of the driver owning the port,
+						or NULL if no driver owns it.
+
+	@result			An OSStatus result code.	
+*/
+extern OSStatus
+MIDIGetSerialPortOwner(	CFStringRef			portName, 
+						CFStringRef __nullable * __nonnull outDriverName )	API_DEPRECATED("No longer supported", macos(10.1, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDISetSerialPortOwner
+
+	@abstract 		Specifies the MIDI driver that owns a serial port.
+	
+	@discussion		Use this to assign ownership of a serial port
+					to one of the MIDI drivers installed in the system.
+	
+					New for CoreMIDI 1.1.
+	
+	@param			portName
+						The name of a serial port.
+	@param			driverName
+						The name of the driver that owns the serial port,
+						or NULL to specify that no driver owns it.
+
+	@result			An OSStatus result code.	
+*/
+extern OSStatus
+MIDISetSerialPortOwner(	CFStringRef			portName, 
+						CFStringRef			driverName )	API_DEPRECATED("No longer supported", macos(10.1, 10.6)) API_UNAVAILABLE(ios, tvos, watchos);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIGetSerialPortDrivers
+
+	@abstract 		Returns a list of installed MIDI drivers for serial port
+					MIDI devices.
+	
+	@discussion		Use this to determine which of the installed MIDI drivers
+					are for devices which may attach to serial ports.
+	
+					New for CoreMIDI 1.1.
+	
+	@param			outDriverNames
+						On exit, a CFArrayRef containing a list of CFStringRef's
+						which are the names of the serial port MIDI drivers.
+						The array should be released by the caller.
+
+	@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);
+
+//  -----------------------------------------------------------------------------
+/*!
+	@function		MIDIExternalDeviceCreate
+
+	@abstract		Create a new external MIDI device.
+
+	@discussion		Non-drivers may call this function as of CoreMIDI 1.1, to
+					create external devices.
+
+					The new device is not added to the current MIDISetupRef;
+					to do this, use MIDISetupAddExternalDevice.
+	
+	@param			name
+						The name of the new device.
+	@param			manufacturer
+						The name of the device's manufacturer.
+	@param			model
+						The device's model name.
+	@param			outDevice
+						On successful return, points to the newly-created device.
+	@result			An OSStatus result code.
+*/
+extern OSStatus		
+MIDIExternalDeviceCreate(CFStringRef name, CFStringRef manufacturer, 
+							CFStringRef model, MIDIDeviceRef *outDevice)
+															API_AVAILABLE(macos(10.1), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+#ifdef __cplusplus
+}
+#endif
+
+CF_ASSUME_NONNULL_END
+
+#endif /* __MIDISetup_h__ */
diff -ruN /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIThruConnection.h /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIThruConnection.h
--- /Applications/Xcode_13.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIThruConnection.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIThruConnection.h	2021-07-13 00:38:06.000000000 -0400
@@ -0,0 +1,378 @@
+/*
+    File:       CoreMIDI/MIDIThruConnection.h
+ 
+    Contains:   Routines for creating MIDI play-through connections.
+ 
+    Copyright:  (c) 2000-2015 by Apple Inc., all rights reserved.
+ 
+    Bugs?:      For bug reports, consult the following page on
+                the World Wide Web:
+ 
+                    http://feedbackassistant.apple.com/
+ 
+*/
+
+#ifndef __MIDIThruConnection_h__
+#define __MIDIThruConnection_h__
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreMIDI/MIDIServices.h>
+
+CF_ASSUME_NONNULL_BEGIN
+
+//  -----------------------------------------------------------------------------
+/*!
+    @header MIDIThruConnection.h
+
+    This header defines functions to create MIDI play-through connections
+    between the MIDI sources and destinations.  These connections may be
+    persistent or transitory, owned by a client.
+    
+    By using connections instead of doing MIDI Thru operations themselves,
+    the overhead of moving MIDI messages between the server and the client
+    for thru-ing is reduced.
+    
+    The aim of these functions is to permit as flexible a set of transformations 
+    as possible while keeping the API and data structures relatively simple.    
+*/
+//  -----------------------------------------------------------------------------
+
+/// An opaque reference to a play-through connection.
+typedef MIDIObjectRef MIDIThruConnectionRef;
+
+/*!
+    @struct         MIDIValueMap
+    
+    @abstract       A custom mapping function to transform MIDI 7-bit values,
+                    as contained in note numbers, velocities, control values,
+                    etc.  y = value[x], where x is the input MIDI value, y the
+                    output.
+*/
+struct MIDIValueMap {
+    UInt8           value[128];
+};
+typedef struct MIDIValueMap MIDIValueMap;
+
+/*!
+    @enum           MIDITransformType
+    
+    @abstract       Values specifying a type of MIDI transformation, as found in the transform member of MIDITransform.
+    
+    @constant   kMIDITransform_None
+        no transformation (param unused)
+    @constant   kMIDITransform_FilterOut
+        filter out the specified event type (param unused)
+    @constant   kMIDITransform_MapControl
+        transform one control number to another; param is destination control number
+    @constant   kMIDITransform_Add
+        add param to values
+    @constant   kMIDITransform_Scale
+        multiple value by the fixed point number in param, which is in fixed point: bbbb.bbbb bbbb bbbb
+    @constant   kMIDITransform_MinValue
+        the value's minimum value is param
+    @constant   kMIDITransform_MaxValue
+        the value's maximum value is param
+    @constant   kMIDITransform_MapValue
+        transform the value using a map; param is the index of the map in the connection's array of maps.
+*/
+typedef CF_ENUM(UInt16, MIDITransformType) {
+    kMIDITransform_None = 0,
+    kMIDITransform_FilterOut = 1,
+    kMIDITransform_MapControl = 2,
+    kMIDITransform_Add = 8,
+    kMIDITransform_Scale = 9,
+    kMIDITransform_MinValue = 10,
+    kMIDITransform_MaxValue = 11,
+    kMIDITransform_MapValue = 12
+};
+
+enum {
+    kMIDIThruConnection_MaxEndpoints = 8
+};
+
+/*!
+    @enum       MIDITransformControlType
+    
+    @abstract   Specifies how control numbers are interpreted.
+
+    @constant   kMIDIControlType_7Bit
+        control numbers may be 0-127
+    @constant   kMIDIControlType_14Bit
+        control numbers may be 0-31
+    @constant   kMIDIControlType_7BitRPN
+        control numbers may be 0-16383
+    @constant   kMIDIControlType_14BitRPN
+    @constant   kMIDIControlType_7BitNRPN
+    @constant   kMIDIControlType_14BitNRPN
+*/
+typedef CF_ENUM(UInt8, MIDITransformControlType) {
+    kMIDIControlType_7Bit = 0,
+    kMIDIControlType_14Bit = 1,
+    kMIDIControlType_7BitRPN = 2,
+    kMIDIControlType_14BitRPN = 3,
+    kMIDIControlType_7BitNRPN = 4,
+    kMIDIControlType_14BitNRPN = 5
+};
+
+/*!
+    @struct     MIDITransform
+    @abstract   Describes how a single type of MIDI event is transformed.
+
+	This structure controls the transformation of various MIDI events other than control changes.
+
+    @field      transform   The type of transformation to be applied to the event values.
+    @field      param       An argument to the transformation method (see description of MIDITransformType).
+*/
+struct MIDITransform {
+    MIDITransformType   transform;
+    SInt16              param;
+};
+typedef struct MIDITransform MIDITransform;
+
+/*!
+    @struct     MIDIControlTransform
+    @abstract   Describes a transformation of MIDI control change events.
+
+	A single MIDIThruConnectionParams may describe any number of transformations to control
+	events. It is important that multiple transformations are ordered correctly: filter out,
+	remap, then alter values.
+	
+	All transformations are done internally using 14-bit values, so for example, when doing
+	an add/min/max transform on a 7-bit control value, the parameter must be a 14-bit value.
+	For example, to add 10 to a control value, param must be (10 << 7) = 1280.
+
+	As per the MIDI specification, a number of controls are interpreted specially:
+
+	Control | Function
+	--------|---------
+	32-63   | the LSBs of 0-31
+	6/38    | data entry
+	96, 97  | data increment, decrement
+	98-101  | NRPN/RPN
+
+    @field  controlType         The type of control specified by controlNumber
+    @field  remappedControlType If transform is kMIDITransform_MapControl, the output control type
+    @field  controlNumber       The control number to be affected.
+    @field  transform           The type of transformation to be applied to the event values.
+    @field  param               An argument to the transformation method (see description of MIDITransformType).
+*/
+struct MIDIControlTransform {
+    MIDITransformControlType    controlType;
+    MIDITransformControlType    remappedControlType;
+    UInt16                      controlNumber;
+    MIDITransformType           transform;
+    SInt16                      param;
+};
+typedef struct MIDIControlTransform MIDIControlTransform;
+
+/*!
+    @struct     MIDIThruConnectionEndpoint
+    @abstract   Describes a source or destination in a MIDIThruConnection.
+
+	When creating one of these, you can leave uniqueID 0 if the endpoint exists and you are passing
+	its MIDIEndpointRef.
+	
+	When obtaining one of these from CoreMIDI, endpointRef may be NULL if it doesn't exist, but the
+	uniqueID will always be non-zero.
+
+    @field  endpointRef     The endpoint specified as a MIDIEndpointRef.
+    @field  uniqueID        The endpoint specified by its uniqueID.
+*/
+struct MIDIThruConnectionEndpoint {
+    MIDIEndpointRef         endpointRef;
+    MIDIUniqueID            uniqueID;
+};
+typedef struct MIDIThruConnectionEndpoint MIDIThruConnectionEndpoint;
+
+/*!
+    @struct     MIDIThruConnectionParams
+    @abstract   Describes a set of MIDI routings and transformations.
+
+	The remainder of the structure is variably-sized. It contains numControlTransform instances of
+	MIDIControlTransform, followed by numMaps instances of MIDIValueMap.
+
+    @field      version     Version of this structure; must be 0.
+    @field      numSources  The number of valid sources in the following array.
+    @field      sources     All MIDI generated by these sources is routed into this connection for processing
+                            and distribution to destinations.
+    @field      numDestinations The number of valid destinations in the following array.
+    @field      destinations    All MIDI output from the connection is routed to these destinations.
+    @field      channelMap      Maps each of the source 16 MIDI channels to channel 0-15 (1-16) or 0xFF when
+                                MIDI from a channel is to be filtered out.
+    @field      lowVelocity     Note events with a velocity less than this value are filtered out.
+    @field      highVelocity    Note events with a velocity greater than this, if it is not 0, are filtered out.
+    @field      lowNote         See highNote.
+    @field      highNote        If highNote >= lowNote, then notes outside this range are filtered out.
+                                If lowNote > highNote, then notes <i>inside</i> this range are filtered out.
+                                This applies to note and polyphonic key pressure events.
+                                These fields are ignored if a there is a MIDIValueMap applying to noteNumber.
+    @field      noteNumber      Specifies how MIDI note numbers are transformed.
+    @field      velocity        Specifies how MIDI note velocities are transformed.
+    @field      keyPressure     Specifies how MIDI polyphonic key pressure events are transformed.
+    @field      channelPressure Specifies how MIDI monophonic (channel) pressure events are transformed.
+    @field      programChange   Specifies how MIDI program change events are transformed.
+    @field      pitchBend       Specifies how MIDI pitch bend events are transformed.
+    @field      filterOutSysEx  If 1, specifies that system-exclusive messages are to be filtered out.
+    @field      filterOutMTC    If 1, specifies that MIDI Time Code messages are to be filtered out.
+    @field      filterOutBeatClock  If 1, specifies the MIDI clock, play, stop, and resume messages are to
+                                be filtered out.
+    @field      filterOutTuneRequest    If 1, specifies that MIDI Tune Request messages are to be filtered out.
+    @field      reserved2       Must be 0.
+    @field      filterOutAllControls    If 1, specifies that all MIDI continuous control messages are to be filtered out.
+    @field      numControlTransforms    The number of control transformations in the variable-length portion of the struct.
+    @field      numMaps                 The number of MIDIValueMaps in the variable-length portion of the struct.
+    @field      reserved3       Must be 0.
+*/
+struct MIDIThruConnectionParams {
+    UInt32                      version;
+    UInt32                      numSources;
+    MIDIThruConnectionEndpoint  sources[kMIDIThruConnection_MaxEndpoints];
+    UInt32                      numDestinations;
+    MIDIThruConnectionEndpoint  destinations[kMIDIThruConnection_MaxEndpoints];
+    
+    UInt8                   channelMap[16];
+    UInt8                   lowVelocity, highVelocity;
+    UInt8                   lowNote, highNote;
+    MIDITransform           noteNumber;
+    MIDITransform           velocity;
+    MIDITransform           keyPressure;
+    MIDITransform           channelPressure;
+    MIDITransform           programChange;
+    MIDITransform           pitchBend;
+    
+    UInt8                   filterOutSysEx;
+    UInt8                   filterOutMTC;
+    UInt8                   filterOutBeatClock;
+    UInt8                   filterOutTuneRequest;
+    UInt8                   reserved2[3];
+    UInt8                   filterOutAllControls;
+    
+    UInt16                  numControlTransforms;
+    UInt16                  numMaps;
+    UInt16                  reserved3[4];
+
+    // remainder of structure is variable-length:
+    //      MIDIControlTransform    controls[];
+    //      MIDIValueMap            maps[];
+};
+typedef struct MIDIThruConnectionParams MIDIThruConnectionParams;
+
+#ifdef CF_INLINE
+/*!
+    @defined    MIDIThruConnectionParamsSize
+    @abstract   Returns the size of a MIDIThruConnectionParams.
+
+	Accounts for the variable-length elements in the structure and returns its true
+	size in bytes.
+*/
+CF_INLINE size_t MIDIThruConnectionParamsSize(const MIDIThruConnectionParams *ptr)
+{
+    return sizeof(MIDIThruConnectionParams) + ptr->numControlTransforms * sizeof(MIDIControlTransform)
+	    + ptr->numMaps * sizeof(MIDIValueMap);
+}
+#else
+#define MIDIThruConnectionParamsSize(ptr) \
+    (sizeof(MIDIThruConnectionParams) + (ptr)->numControlTransforms * sizeof(MIDIControlTransform) \
+    + (ptr)->numMaps * sizeof(MIDIValueMap))
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+    @function   MIDIThruConnectionParamsInitialize
+    @abstract   Fills a MIDIThruConnectionParams with default values.
+    @param      inConnectionParams  The struct to be initialized.
+
+	This convenience function fills the connection structure with default values: no endpoints,
+	no transformations (mostly zeroes except for the channel map). Then, just filling in the
+	source and adding one destination will create a simple, unmodified thru connection.
+*/
+extern void
+MIDIThruConnectionParamsInitialize(
+                            MIDIThruConnectionParams *      inConnectionParams )
+                                                                API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+    @function   MIDIThruConnectionCreate
+    @abstract   Creates a thru connection.
+    @param      inPersistentOwnerID
+                    If null, then the connection is marked as owned by the client
+                    and will be automatically disposed with the client.  if it is non-null, then it
+                    should be a unique identifier, e.g. "com.mycompany.MyCoolProgram".
+    @param      inConnectionParams
+                    A MIDIThruConnectionParams contained in a CFDataRef.
+    @param      outConnection
+                    On successful return, a reference to the newly-created connection.
+    @result     An OSStatus result code.
+*/
+extern OSStatus
+MIDIThruConnectionCreate(   CFStringRef __nullable          inPersistentOwnerID,
+                            CFDataRef                       inConnectionParams,
+                            MIDIThruConnectionRef *         outConnection )
+                                                                API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+    @function   MIDIThruConnectionDispose
+    @abstract   Disposes a thru connection.
+    @param      connection
+                    The connection to be disposed
+    @result     An OSStatus result code.
+*/
+extern OSStatus
+MIDIThruConnectionDispose(  MIDIThruConnectionRef           connection )
+                                                                API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+    @function   MIDIThruConnectionGetParams
+    @abstract   Obtains a thru connection's MIDIThruConnectionParams.
+    @param      connection
+                    The connection to be disposed.
+    @param      outConnectionParams
+                    On successful return, the connection's MIDIThruConnectionParams in a CFDataRef
+    @result     An OSStatus result code.
+
+	The returned CFDataRef contains a MIDIThruConnectionParams structure. The caller is responsible
+	for releasing it.
+*/
+extern OSStatus
+MIDIThruConnectionGetParams(MIDIThruConnectionRef           connection,
+                            CFDataRef __nonnull * __nonnull outConnectionParams )
+                                                                API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+    @function   MIDIThruConnectionSetParams
+    @abstract   Alters a thru connection's MIDIThruConnectionParams.
+    @param      connection
+                    The connection to be modified.
+    @param      inConnectionParams
+                    The connection's new MIDIThruConnectionParams in a CFDataRef
+    @result     An OSStatus result code.
+*/
+extern OSStatus
+MIDIThruConnectionSetParams(MIDIThruConnectionRef           connection,
+                            CFDataRef                       inConnectionParams )
+                                                                API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+    @function   MIDIThruConnectionFind
+    @abstract   Returns all of the persistent thru connections created by a client.
+    @param      inPersistentOwnerID
+                    The ID of the owner whose connections are to be returned.
+    @param      outConnectionList
+                    On successful return, a CFDataRef containing an array of MIDIThruConnectionRef's.
+    @result     An OSStatus result code.
+*/
+extern OSStatus
+MIDIThruConnectionFind(     CFStringRef                     inPersistentOwnerID,
+                            CFDataRef __nonnull * __nonnull outConnectionList )
+                                                                API_AVAILABLE(macos(10.2), ios(4.2)) API_UNAVAILABLE(tvos, watchos);
+
+#ifdef __cplusplus
+}
+#endif
+
+CF_ASSUME_NONNULL_END
+
+#endif /* __MIDIThruConnection_h__ */
Clone this wiki locally