MIKMIDIMetaKeySignatureEvent

Objective-C

@interface MIKMIDIMetaKeySignatureEvent : MIKMIDIMetaEvent

Swift

class MIKMIDIMetaKeySignatureEvent : MIKMIDIMetaEvent

A meta event containing key signature information.

  • Initializes an instane of MIKMIDIMetaKeySignatureEvent with the specified musical key and timeStamp.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMusicalKey:(MIKMIDIMusicalKey)musicalKey
                                     timeStamp:(MusicTimeStamp)timeStamp;

    Swift

    init(musicalKey: MIKMIDIMusicalKey, timeStamp: MusicTimeStamp)

    Parameters

    musicalKey

    The musical key for the event. See MIKMIDIMusicalKey for a list of possible values.

    timeStamp

    The time stamp for the event.

    Return Value

    An initialized MIKMIDIMetaKeySignatureEvent instance.

  • The musical key for the event. See MIKMIDIMusicalKey for a list of possible values.

    Declaration

    Objective-C

    @property (nonatomic, readonly) MIKMIDIMusicalKey musicalKey;

    Swift

    var musicalKey: MIKMIDIMusicalKey { get }
  • The key for the event. Values can be between -7 and 7 and specify the key signature in terms of number of flats (if negative) or sharps (if positive).

    Declaration

    Objective-C

    @property (nonatomic, readonly) int8_t numberOfFlatsAndSharps;

    Swift

    var numberOfFlatsAndSharps: Int8 { get }
  • The scale for the event. A value of 0 indicates a major scale, a value of 1 indicates a minor scale.

    Declaration

    Objective-C

    @property (nonatomic, readonly) MIKMIDIMusicalScale scale;

    Swift

    var scale: MIKMIDIMusicalScale { get }

Deprecated

  • key

    Deprecated

    @deprecated: This property is deprecated, and didn’t work properly in previous versions due to the use of a signed type. Use numberOfFlatsAndSharps, which is directly equivalent, or musicalKey, instead.

    The key for the event. Values can be between -7 and 7 and specify the key signature in terms of number of flats (if negative) or sharps (if positive).

    Declaration

    Objective-C

    @property (nonatomic, readonly) UInt8 key;

    Swift

    var key: UInt8 { get }