Timeline Facade
Inheritors
Properties
Translation between persistent document identities and runtime indexes.
The undoable edits this project supports, and (through ProjectCommands.history) the history they record into. Everything that changes the document goes through here.
The project's seconds-to-beats curve, owned by the master track. This is the one the engine schedules playback against, so a display converting through it can never disagree with what is heard.
Functions
Capture is non-destructive; deleting is a separate removeClip. Must NOT be called inside a documentTransaction. The returned fragment is owned by the caller.
Both halves are asynchronous because a track owns live plug-in instances. The callback runs exactly once, on the thread completing the last plug-in operation. Capture must NOT be called inside a documentTransaction.
Removes every clip on the track. True when at least one was removed.
Groups the document events produced by everything inside block into a single batch. Use whenever one user-visible action performs several mutations, or observers can see it half-applied. Calls nest.
Returns MIDI notes for the given clip, or null if the track/clip is not found or is not a MIDI clip. Empty list means a valid MIDI clip with no notes.
Discards the current document and starts an empty one: no tracks, a fresh master track, no undo history, nothing dirty. Observers see the same closing/loaded pair a load emits, so state owned outside the timeline is dropped the same way. Whether unsaved changes may be discarded is the caller's decision, not this one.
Paste: attaches with fresh identifiers AND records the result as one undoable edit, which attachClipFragment does not do. Must NOT be called inside a documentTransaction.
Records a plug-in that has already been instantiated.
Records an already-published, fully constructed track as one addition.
Captures state, removes the instance, and records the removal as one step.
Rebuilds an audio clip's source from its file with the given markers and warp points. A non-empty filepath switches the clip to that file and adopts its length; otherwise the clip keeps its length.
Replaces a MIDI clip's authored content, resizing the clip to match.
Registers a callback invoked after every clip add/remove and after loadProject(). Pass null to unregister.