ABMIDIFilterPort Class Reference

ABMIDIFilterPort transforms MIDI messages. More...

#import <ABMIDIFilterPort.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.
 
ABMIDIFilterPortMIDIReceiverBlock
_Nullable 
MIDIReceiverBlock
 The block which is called when MIDI is received for the port.
 
ABMIDIFilterPortMIDIFlushEventBlock
_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.
 
NSString *_Nullable destinationsTitle
 A title representing the destinations the port is connected to.
 
UIImage *_Nullable destinationsIcon
 An icon representing the destinations the port is connected to.
 
- 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

ABMIDIFilterPort transforms MIDI messages.

MIDI messages are received from the sources, transformed and forwarded to its destinations. MIDI FX ports will appear in the Note Filter section of Audiobus.

The main things of ABMIDIFilterPort 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: (ABMIDIFilterPortMIDIReceiverBlock _Nonnull)  receiverBlock 

Initialize.

Initializes a new MIDI Filter 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: (ABMIDIFilterPortInstanceConnectionBlock _Nonnull)  instanceConnectedBlock
instanceDisconnectedBlock: (ABMIDIFilterPortInstanceConnectionBlock _Nonnull)  instanceDisconnectedBlock 

Initializes the MIDI Port as an multi instance port.

Initializes a new MIDI Port.

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.

- (ABMIDIFilterPortMIDIReceiverBlock _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.

- (ABMIDIFilterPortMIDIFlushEventBlock _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, filters will see incoming MIDI events with timestamps in the future, and should take steps to schedule MIDI events accordingly.

To facilite elegant transport stop, MIDI sources will initiate a flush (see ABMIDIPortFlushOutput), which you may 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. Any MIDI messages already dispatched via ABMIDIPortSendPacketList which have a timestamp in the future will be automatically removed.

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.

- (NSString* _Nullable) destinationsTitle
readnonatomicassign

A title representing the destinations the port is connected to.

- (UIImage* _Nullable) destinationsIcon
readnonatomicassign

An icon representing the destinations the port is connected to.


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