NoteClip
interface NoteClip extends Clip, NoteEventOwner {
uuid: string
index: number
duration: number
mute: boolean
label: string
hue: number
launch: ClipPlayback
events: readonly NoteEvent[]
track: NoteTrack
groove: Nullable<AnyGroove>
remove(): void
addEvent(props?: NoteEventProps): NoteEvent
addEvents(events: readonly Partial<Pick<NoteEvent, 'velocity' | 'chance' | 'pitch' | 'velocityFade' | 'position' | 'duration' | 'cents' | 'playCount' | 'playCurve' | 'repeatLength'>>[]): readonly NoteEvent[]
groupEvents(events: readonly NoteEvent[], mode?: NoteGroupMode): NoteGroup
clearEvents(): void
}Clip holding notes
Hierarchy
Properties
uuid: string
Inherited from uuid
Unique id
index: number
Inherited from index
Slot index in the clip launcher
duration: number
Inherited from duration
Length in PPQN (seconds for non-synced audio clips)
mute: boolean
Inherited from mute
Mute the clip
label: string
Inherited from label
Custom label
hue: number
Inherited from hue
Color hue (0 to 360)
launch: ClipPlayback
Inherited from launch
Launch settings
events: readonly NoteEvent[]
Inherited from events
All notes sorted by position
track: NoteTrack
The note track this clip belongs to
- See:
groove: Nullable<AnyGroove>
The groove its notes play through, running on the timeline grid the clip repeats on, null for none. Set a groove of the project or null.
- See:
Methods
remove(): void
Inherited from remove
Remove the clip
Returns
void
addEvent(props?: NoteEventProps): NoteEvent
Inherited from addEvent
Add a note (defaults: position 0, duration 1/16, pitch 60, velocity 100/127)
Parameters
props(NoteEventProps, optional)
Returns
addEvents(
events: readonly Partial<Pick<NoteEvent, 'velocity' | 'chance' | 'pitch' | 'velocityFade' | 'position' | 'duration' | 'cents' | 'playCount' | 'playCurve' | 'repeatLength'>>[],
): readonly NoteEvent[]
Inherited from addEvents
Add many notes at once
Parameters
events(readonly Partial<Pick<NoteEvent, "velocity" | "chance" | "pitch" | "velocityFade" | "position" | "duration" | "cents" | "playCount" | "playCurve" | "repeatLength">>[])
Returns
Example
region.addEvents([60, 64, 67].map((pitch, index) => ({position: index * PPQN.Quarter, duration: PPQN.Quarter, pitch})))groupEvents(
events: readonly NoteEvent[],
mode?: NoteGroupMode,
): NoteGroup
Inherited from groupEvents
Group notes of this region or clip, so they decide their chance together. Notes leave their previous group
Parameters
events(readonly NoteEvent[])mode(NoteGroupMode, optional)
Returns
Example
const chord = region.addEvents([60, 64, 67].map(pitch => ({pitch, duration: PPQN.Quarter})))
region.groupEvents(chord, "play-all").chance = 50clearEvents(): void
Inherited from clearEvents
Remove all notes
Returns
void