Inherits from NSObject
Conforms to NSCopying
Declared in MIKMIDIClock.h

Overview

MIKMIDIClock provides the number of seconds per MIDITimeStamp, as well as the number of MIDITimeStamps per a specified time interval.

Instances of MIKMIDIClock can also be used to convert between MIDITimeStamp and MusicTimeStamp.

Tasks

Class Methods

clock

+ (instancetype)clock
Discussion

Creates and initializes a new instance of MIKMIDIClock.

Return Value

A new instance of MIKMIDIClock.

Declared In

MIKMIDIClock.h

midiTimeStampsPerTimeInterval:

+ (Float64)midiTimeStampsPerTimeInterval:(NSTimeInterval)timeInterval
Discussion

Returns the number of MIDITimeStamps that would occur during a specified time interval.

Parameters

timeInterval

The number of seconds to convert into number of MIDITimeStamps.

Return Value

The number of MIDITimeStamps that would occur in the specified time interval.

Declared In

MIKMIDIClock.h

secondsPerMIDITimeStamp

+ (Float64)secondsPerMIDITimeStamp
Discussion

Returns the number of seconds per each MIDITimeStamp.

Return Value

Then number of seconds per each MIDITimeStamp.

Declared In

MIKMIDIClock.h

Instance Methods

midiTimeStampForMusicTimeStamp:

- (MIDITimeStamp)midiTimeStampForMusicTimeStamp:(MusicTimeStamp)musicTimeStamp
Discussion

Converts the specified MusicTimeStamp into the corresponding MIDITimeStamp.

Note: For this method to return any meaningful values, you must first call setMusicTimeStamp:withTempo:atMIDITimeStamp: at least once.

Parameters

musicTimeStamp

The MusicTimeStamp to convert into a MIDITimeStamp.

Return Value

The MIDITimeStamp that will occur at the same time as the specified MusicTimeStamp.

Declared In

MIKMIDIClock.h

musicTimeStampForMIDITimeStamp:

- (MusicTimeStamp)musicTimeStampForMIDITimeStamp:(MIDITimeStamp)midiTimeStamp
Discussion

Converts the specified MIDITimeStamp into the corresponding MusicTimeStamp.

Note: For this method to return any meaningful values, you must first call setMusicTimeStamp:withTempo:atMIDITimeStamp: at least once.

Parameters

midiTimeStamp

The MIDITimeStamp to convert into a MusicTimeStamp.

Return Value

The MusicTimeStamp that will occur at the same time as the specified MIDITimeStamp.

Declared In

MIKMIDIClock.h

setMusicTimeStamp:withTempo:atMIDITimeStamp:

- (void)setMusicTimeStamp:(MusicTimeStamp)musicTimeStamp withTempo:(Float64)tempo atMIDITimeStamp:(MIDITimeStamp)midiTimeStamp
Discussion

Internally synchronizes the musicTimeStamp with the midiTimeStamp using the specified tempo. This method must be called at least once before musicTimeStampForMIDITimeStamp: and midiTimeStampForMusicTimeStamp: will return any meaningful values.

Parameters

musicTimeStamp

The MusicTimeStamp to synchronize the clock to.

tempo

The beats per minute at which MusicTimeStamps should tick.

midiTimeStamp

The MIDITimeStamp to synchronize the clock to.

Declared In

MIKMIDIClock.h