ABMIDIReceiverPort Class Reference

ABMIDIReceiverPort receives MIDI messages. More...

#import <ABMIDIReceiverPort.h>

Inherits ABMIDIPort.

Instance Methods

(instancetype _Nullable) - initWithName:title:receiverBlock:
 Initialize.
 
(instancetype _Nullable) - initWithName:title:instanceConnectedBlock:instanceDisconnectedBlock:
 Initializes the MIDI Port as an multi instance port.
 

Properties

NSArray *_Nonnull sources
 Currently-connected sources.
 
ABMIDIReceiverPortMIDIReceiverBlock
_Nullable 
MIDIReceiverBlock
 The block which is called when MIDI is received for the port.
 
ABMIDIReceiverPortMIDIFlushEventBlock
_Nullable 
MIDIFlushEventBlock
 The block which is called when a MIDI flush event occurs.
 
NSString *_Nullable sourcesTitle
 A title representing the sources connected to the port.
 
UIImage *_Nullable sourcesIcon
 An icon representing the sources connected to the port.
 
- Properties inherited from ABMIDIPort
BOOL allowsMultipleInstances
 Whether this port allows multiple instance.
 
NSArray *_Nonnull destinations
 Currently-connected destinations.
 
BOOL connected
 Whether the port is connected.
 
ByteCount outPacketListMaxSize
 This is the buffer size reserved for output MIDI Packet lists.
 
- Properties inherited from ABPort
ABPeerpeer
 The peer this port is on.
 
NSString * name
 The internal port name.
 
NSString * title
 The title of the port, for display to the user.
 
UIImage * icon
 The port icon (a 64x64 image)
 
ABPortType type
 The type of the port.
 
uint8_t attributes
 The attributes of this port.
 
id context
 Use this property to associate some user defined context with the port.
 
uint32_t uniqueIdentifier
 An port identifier that is unique for the peer itself but also for other peers.
 
BOOL connected
 Whether the port is connected.
 
NSString * sourcesTitle
 A title representing the sources connected to the port.
 
UIImage * sourcesIcon
 An icon representing the sources connected to the port.
 
NSArray * sourcesRecursive
 Returns direct and indirect sources of the port in the pipeline.
 
NSString * destinationsTitle
 A title representing the destinations the port is connected to.
 
UIImage * destinationsIcon
 An icon representing the destinations the port is connected to.
 
NSArray * destinationsRecursive
 Returns direct and indirect destinations of the port in the pipeline.
 
NSSet
< ABConnectionGraphPipeline * > * 
pipelines
 The connection pipelines of which this port is a member.
 

Additional Inherited Members

- Protected Member Functions inherited from ABMIDIPort
(void) - ABMIDIPortSendPacketList
 Send a MIDIPacketList.
 
(void) - ABMIDIPortFlushOutput
 Unschedule previously-sent packets.
 
(BOOL) - ABMIDIPortIsConnected
 Like property connected, but for usage in realtime context.
 

Detailed Description

ABMIDIReceiverPort receives MIDI messages.

The main things of ABMIDIReceiverPort is implemented in its base class ABMIDIPort. So look into the documentation of this class.

Method Documentation

- (instancetype _Nullable) initWithName: (NSString *_Nonnull)  name
title: (NSString *_Nonnull)  title
receiverBlock: (ABMIDIReceiverPortMIDIReceiverBlock _Nonnull)  receiverBlock 

Initialize.

Initializes a new MIDI Receiver Port.

Parameters
nameName of port, for internal use
titleTitle of port, shown to the user
receiverBlockThe block for receiving incoming MIDI
- (instancetype _Nullable) initWithName: (NSString *_Nonnull)  name
title: (NSString *_Nonnull)  title
instanceConnectedBlock: (ABMIDIReceiverPortInstanceConnectionBlock _Nonnull)  instanceConnectedBlock
instanceDisconnectedBlock: (ABMIDIReceiverPortInstanceConnectionBlock _Nonnull)  instanceDisconnectedBlock 

Initializes the MIDI Port as an multi instance port.

Initializes a new MIDI Port. Use ABMIDIPortSendPacketList to send MIDI data.

Parameters
nameName of port, for internal use
titleTitle of port, shown to the user
instanceConnectedBlockThis block is called when a port instance has been connected.
instanceDisconnectedBlockThis block is called when a port instance has been disconnected.

Property Documentation

- (NSArray* _Nonnull) sources
readnonatomicstrong

Currently-connected sources.

This is an array of ABPort.

- (ABMIDIReceiverPortMIDIReceiverBlock _Nullable) MIDIReceiverBlock
readwritenonatomiccopy

The block which is called when MIDI is received for the port.

Note: this will be called on the realtime MIDI receive thread, so be careful not to do anything that could cause priority inversion, like calling Objective-C, allocating memory, or holding locks.

- (ABMIDIReceiverPortMIDIFlushEventBlock _Nullable) MIDIFlushEventBlock
readwritenonatomiccopy

The block which is called when a MIDI flush event occurs.

Some MIDI sources may choose to send MIDI events some time in advance, in order to reduce latency or jitter effects. When this occurs, receivers will see incoming MIDI events with timestamps in the future, and should take steps to schedule the MIDI events accordingly.

To facilite elegant transport stop, MIDI sources will initiate a flush (see ABMIDIPortFlushOutput), which you should handle by assigning a block to this property. The block will be called when a flush occurs, and you should respond by unscheduling any pending events, and stopping any playing notes.

Note: this will be called on the realtime MIDI receive thread, so be careful not to do anything that could cause priority inversion, like calling Objective-C, allocating memory, or holding locks.

- (NSString* _Nullable) sourcesTitle
readnonatomicassign

A title representing the sources connected to the port.

- (UIImage* _Nullable) sourcesIcon
readnonatomicassign

An icon representing the sources connected to the port.


The documentation for this class was generated from the following file: