MusicSequenceSetSequenceType(_:_:)
Sets the sequence type for a music sequence.
Declaration
func MusicSequenceSetSequenceType(_ inSequence: MusicSequence, _ inType: MusicSequenceType) -> OSStatusParameters
- inSequence:
The music sequence whose sequence type you want to set.
- inType:
The type of sequence to assign to the music sequence. For the list of available sequence types, see Musicsequencetype. The default sequence type is
kMusicSequenceType_Beats.
Return Value
A result code.
Discussion
The sequence type can be set to kMusicSequenceType_Beats at any time. The sequence type can only be set to kMusicSequenceType_Seconds or kMusicSequenceType_Samples if there are no tempo events already in the sequence.
The following considerations pertain to the various sequence types:
kMusicSequenceType_Beats—Tempo is specified as beats-per-minute. A music sequence of this type can contain any number of tempo events.kMusicSequenceType_Samples—Tempo is specified as a sample rate, in terms of samples-per-second. If you set the tempo to 44,100 using a sequence of this type, then 44,100 beats corresponds to a duration of one second.kMusicSequenceType_Seconds—The tempo should be set to 60; a beat is a second.
After setting a music sequence to the kMusicSequenceType_Samples or kMusicSequenceType_Seconds type, add a single tempo event to specify the tempo.
A meta event of interest for the kMusicSequenceType_Seconds sequence type is the SMPTE Offset meta event, which is stored in the tempo track. The sequence doesn’t do anything with this event.
See Also
Managing Music Sequences
NewMusicSequence(_:)DisposeMusicSequence(_:)MusicSequenceBarBeatTimeToBeats(_:_:_:)MusicSequenceBeatsToBarBeatTime(_:_:_:_:)MusicSequenceDisposeTrack(_:_:)MusicSequenceFileCreate(_:_:_:_:_:)MusicSequenceFileCreateData(_:_:_:_:_:)MusicSequenceFileLoad(_:_:_:_:)MusicSequenceFileLoadData(_:_:_:_:)MusicSequenceGetAUGraph(_:_:)MusicSequenceGetBeatsForSeconds(_:_:_:)MusicSequenceGetIndTrack(_:_:_:)MusicSequenceGetInfoDictionary(_:)MusicSequenceGetSMPTEResolution(_:_:_:)MusicSequenceGetSecondsForBeats(_:_:_:)