             clear()
             MusicTrackSetProperty(track, kSequenceTrackProperty_TrackLength, &durationAsMusicTimeStamp, size)
             MusicTrackCopyInsert(newTrack, 0, durationAsMusicTimeStamp, track, 0)
-            MusicSequenceDisposeTrack(newSequence, newTrack)
-
-            DisposeMusicSequence(newSequence)
 
             //now to clean up any notes that are too long
             var tempIterator: MusicEventIterator?

        } else {
            MusicTrackSetProperty(track, kSequenceTrackProperty_TrackLength, &durationAsMusicTimeStamp, size)
        }
    }

    /// A less destructive and simpler way to set the length


        MusicSequenceNewTrack(newSequence, &tempTrack)
        guard let newTrack = tempTrack,
            let track = internalMusicTrack else {
            return
        }
        MusicTrackSetProperty(track, kSequenceTrackProperty_TrackLength, &durationAsMusicTimeStamp, size)
