addMidiClipFromData

abstract fun addMidiClipFromData(trackIndex: Int, position: TimelinePosition, umpEvents: List<UInt>, tickTimestamps: List<ULong>, tickResolution: UInt, clipTempo: Double = 120.0, tempoChanges: List<MidiTempoChange> = emptyList(), timeSignatureChanges: List<MidiTimeSignatureChange> = emptyList(), clipName: String = "", needsFileSave: Boolean = true): ClipAddResult

AppModel::addMidiClipFromData, for a clip built in memory rather than read from a file - what a generator or a step sequencer produces.

umpEvents and tickTimestamps are parallel: one timestamp per event. Set needsFileSave when the clip has no file behind it yet, so that saving the project writes one out.