MusicTrackMerge(_:_:_:_:_:)
Copies a range of events from one music track and merges them into another music track.
Declaration
func MusicTrackMerge(_ inSourceTrack: MusicTrack, _ inSourceStartTime: MusicTimeStamp, _ inSourceEndTime: MusicTimeStamp, _ inDestTrack: MusicTrack, _ inDestInsertTime: MusicTimeStamp) -> OSStatusParameters
- inSourceTrack:
The music track that you want to copy events from.
- inSourceStartTime:
The start time, in beats, for the range of music track events that you want to copy from the source track.
- inSourceEndTime:
The end time, in beats, for the range of music track events that you want to copy from the source track.
- inDestTrack:
The music track that you want to add events to.
- inDestInsertTime:
The insertion point, in beats, in the destination music track for the copied events.
Return Value
A result code.
Discussion
The events inserted into the destination music track are merged with existing events in that track. The events in the destination track that existed prior to calling this function remain in place.
The inSourceStartTime value must be less than the inSourceEndTime value.
See Also
Managing Music Tracks
MusicTrackClear(_:_:_:)MusicTrackCopyInsert(_:_:_:_:_:)MusicTrackCut(_:_:_:)MusicTrackGetDestMIDIEndpoint(_:_:)MusicTrackGetDestNode(_:_:)MusicTrackGetProperty(_:_:_:_:)MusicTrackGetSequence(_:_:)MusicTrackMoveEvents(_:_:_:_:)MusicTrackNewAUPresetEvent(_:_:_:)MusicTrackNewExtendedNoteEvent(_:_:_:)MusicTrackNewExtendedTempoEvent(_:_:_:)MusicTrackNewMIDIChannelEvent(_:_:_:)MusicTrackNewMIDINoteEvent(_:_:_:)MusicTrackNewMIDIRawDataEvent(_:_:_:)MusicTrackNewMetaEvent(_:_:_:)