MIKMIDIPlayer
Deprecated
use MIKMIDISequencer instead
Objective-C
@interface MIKMIDIPlayer : NSObject
Swift
class MIKMIDIPlayer : NSObject
MIKMIDIPlayer can be used to play an MIKMIDISequence.
-
Prepares the MusicPlayer for playback.
Call this method in advance of playback to reduce a music player’s startup latency.
Declaration
Objective-C
- (void)preparePlayback;Swift
func preparePlayback() -
Starts playback from the beginning of the music sequence. Equivalent to calling -startPlaybackFromPosition with a position of 0.
Declaration
Objective-C
- (void)startPlayback;Swift
func startPlayback() -
Starts playback of the music sequence from the specified position.
Declaration
Objective-C
- (void)startPlaybackFromPosition:(MusicTimeStamp)position;Swift
func startPlayback(fromPosition position: MusicTimeStamp)Parameters
positionThe MusicTimeStamp to begin playback from.
-
Resumes playback of the music sequence from the MusicTimeStamp that the player last stopped at.
Declaration
Objective-C
- (void)resumePlayback;Swift
func resumePlayback() -
Stops playback of the music seuqenece.
Declaration
Objective-C
- (void)stopPlayback;Swift
func stopPlayback() -
The music sequence to play.
Declaration
Objective-C
@property (nonatomic, strong, nullable) MIKMIDISequence *sequence;Swift
var sequence: MIKMIDISequence? { get set } -
The current position in the music sequence.
Declaration
Objective-C
@property (nonatomic) MusicTimeStamp currentTimeStamp;Swift
var currentTimeStamp: MusicTimeStamp { get set } -
The additional amount of time in seconds to continue playing after the end of the last MIDI event in the sequence. The default is 0.
Declaration
Objective-C
@property (nonatomic) Float64 tailDuration;Swift
var tailDuration: Float64 { get set } -
Whether or not the player is currently playing. This property can be observed with KVO.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isPlaying;Swift
var isPlaying: Bool { get } -
Whether or not the player should loop playback of the music sequence.
Note
MIKMIDI currently only supports looping of an entire music sequence. The results of looping a MIKMIDISequence that has a length shorter than the end of the last MIDI event in the sequence is undefined.Declaration
Objective-C
@property (nonatomic, getter=isLooping) BOOL looping;Swift
var isLooping: Bool { get set } -
This is currently undocumented. Documentation contributions are always welcome!
Declaration
Objective-C
@property (nonatomic, getter=isClickTrackEnabled) BOOL clickTrackEnabledSwift
var isClickTrackEnabled: Bool { get set } -
This is currently undocumented. Documentation contributions are always welcome!
Declaration
Objective-C
@property (strong, nonatomic, nullable) MIKMIDIMetronome *metronomeSwift
var metronome: MIKMIDIMetronome? { get set } -
This is currently undocumented. Documentation contributions are always welcome!
Declaration
Objective-C
@property (nonatomic) BOOL stopPlaybackAtEndOfSequenceSwift
var stopPlaybackAtEndOfSequence: Bool { get set } -
This is currently undocumented. Documentation contributions are always welcome!
Declaration
Objective-C
@property (nonatomic) MusicTimeStamp maxClickTrackTimeStampSwift
var maxClickTrackTimeStamp: MusicTimeStamp { get set }
View on GitHub
MIKMIDIPlayer Class Reference