Overview
TheClip class is an abstract base class representing a clip in the Lumix DAW. Clips are regions of audio or MIDI data placed on tracks. They can be moved, resized, renamed, and duplicated.
Namespace
Inheritance
Properties
Identity Properties
Unique identifier for the clip. Automatically generated using
Guid.NewGuid().The display name of the clip.
Whether the clip is active. Disabled clips are not played during playback.Default:
trueTrack and Visual Properties
The track that contains this clip.
The width of the clip in pixels, calculated based on duration and zoom level.
RGBA color of the clip for visual identification.
Time Properties
The arrangement starting time of the clip in ticks.
The arrangement ending time of the clip in ticks.
The duration of the clip in ticks.
The arrangement starting time in musical notation (bars:beats:ticks).
The arrangement ending time in musical notation (bars:beats:ticks).
The duration in musical notation (bars:beats:ticks).
The portion trimmed from the start of the clip content, in ticks.
The portion trimmed from the end of the clip content, in ticks.
State Flags
Flag indicating the clip is being moved between tracks.
Whether the mouse cursor is hovering over the clip (including menu bar).
Whether the mouse cursor is hovering over the clip’s menu bar specifically.
Whether this clip has been triggered during the current playback session.
Flag to mark the clip for deletion.
Flag to request clip duplication.
Methods
Play (AudioFileReader)
Triggers playback of an audio clip through the track engine.The audio file to play.
Starting offset in the audio file (in seconds).
Ending offset in the audio file (in seconds).
Play (MidiFile)
Triggers playback of a MIDI clip through the track engine.The MIDI file to play.
Starting offset in the MIDI file (in seconds).
SetStartTick
Sets the starting time of the clip on the timeline.The start time in ticks.
GetStartTimeInMusicalTime
Gets the clip’s start time in musical notation.MusicalTime - Start time as bars:beats:ticks
GetEndTimeInMusicalTime
Gets the clip’s end time in musical notation.MusicalTime - End time as bars:beats:ticks
GetDurationInMusicalTime
Gets the clip’s duration in musical notation.MusicalTime - Duration as bars:beats:ticks
GetDurationInSeconds
Gets the clip’s duration in seconds.double - Duration in seconds
Render
Renders the clip in the arrangement view, handling user interactions.- Clip visualization
- Dragging and dropping
- Selection
- Context menu
- Rename functionality
Abstract Methods
These methods must be implemented by derived classes:GetClipDuration
GetClipWidth
RenderClipContent
OnClipDoubleClickLeft
Example Usage
Derived Classes
- AudioClip: For audio files (WAV, MP3, etc.)
- MidiClip: For MIDI data
See Also
- Track - Container for clips
- MusicalTime - Time representation
- TrackEngine - Audio playback engine