This class represents a clip in Live. It can be either an audio clip or a MIDI clip in the Arrangement or Session View, depending on the track / slot it lives in.

Clip

Hierarchy

Properties

raw: RawClip
arrangementPath: string = 'live_set tracks $1 arrangement_clips $2 clip'
sessionPath: string = 'live_set tracks $1 clip_slots $2 clip'

Accessors

  • get id(): undefined | number
  • Returns undefined | number

  • get length(): number
  • The clip's length (duration)

    Returns number

    Memberof

    Clip

  • get name(): string
  • The name of the clip

    Returns string

    Memberof

    Clip

  • get path(): string
  • Returns string

Methods

  • Add new notes to a clip. For MIDI clips only.

    Parameters

    Returns Promise<void>

    Memberof

    Clip

  • Add new notes to a clip. For MIDI clips only.

    Parameters

    • notes: Note[]

      as returned from getNotesExtended

    Returns Promise<void>

    Memberof

    Clip

  • Removes all automation in the clip

    Returns Promise<void>

    Memberof

    Clip

  • Removes the automation of the clip for the given parameter

    Parameters

    • Optional deviceParameterId: number

    Returns Promise<void>

    Memberof

    Clip

  • Crops the clip: if the clip is looped, the region outside the loop is removed; if it isn't, the region outside the start and end markers.

    Returns Promise<void>

    Memberof

    Clip

  • Call this before replace_selected_notes if you just want to add some notes. For MIDI clips only.

    Returns Promise<void>

    Memberof

    Clip

  • Makes the loop two times longer by moving loop_end to the right, and duplicates both the notes and the envelopes. If the clip is not looped, the clip start/end range is duplicated. For MIDI clips only.

    Returns Promise<void>

    Memberof

    Clip

  • Duplicate the notes in the specified region to the destination_time. Only notes of the specified pitch are duplicated or all if pitch is -1. If the transposition_amount is not 0, the notes in the region will be transposed by the transpose_amount of semitones. For MIDI clips only.

    Parameters

    • Optional regionStart: number

      beats time

    • Optional regionLength: number

      beats time

    • Optional destinationTime: number

      beats time

    • Optional pitch: number = -1
    • Optional transpositionAmount: number = 0

    Returns Promise<void>

    Memberof

    Clip

    Example

    // duplicates 1 bar to the beginning of the next bar
    await clip.duplicateRegion(0, 4, 4);
  • Same effect as pressing the Clip Launch button.

    Returns Promise<void>

    Memberof

    Clip

  • Returns a list of notes that start in the given area. The output is similar to get_selected_notes.

    Parameters

    • Optional startTime: number = 0
    • Optional timeRange: number = 256
    • Optional startPitch: number = 0
    • Optional pitchRange: number = 127

    Returns Promise<Note[]>

    Memberof

    Clip

  • Provided note IDs must be associated with existing notes in the clip. Existing notes can be queried with getNotw.

    Parameters

    • ids: number[]

      note ids

    Returns Promise<Note[]>

    Memberof

    Clip

  • Use this if you want to operate on the selected notes

    Returns Promise<Note[]>

    Memberof

    Clip

  • Jumps by given amount, unquantized. Unwarped audio clips, recording audio clips and recording non-overdub MIDI clips cannot jump.

    Parameters

    • beats: number

      relative jump distance in beats. Negative beats jump backwards.

    Returns Promise<void>

    Memberof

    Clip

  • Quantizes all notes in the clip to the quantization_grid taking the song's swing_amount into account.

    Parameters

    • quantizationGrid: number
    • amount: number

    Returns Promise<void>

    Memberof

    Clip

  • Same as quantize, but only for notes in the given pitch.

    Parameters

    • pitch: number
    • quantizationGrid: number
    • amount: number

    Returns Promise<void>

    Memberof

    Clip

  • Deletes all notes that start in the given area.

    Parameters

    • Optional startTime: number = 0
    • Optional timeRange: number = 256
    • Optional startPitch: number = 0
    • Optional pitchRange: number = 127

    Returns Promise<void>

    Memberof

    Clip

  • Deletes all notes associated with the provided IDs.

    Parameters

    • ids: number[]

      note ids

    Returns Promise<void>

    Memberof

    Clip

  • Remove all selected notes

    Parameters

    Returns Promise<void>

    Memberof

    Clip

  • Scrub the clip to a time, specified in beats. This behaves exactly like scrubbing with the mouse; the scrub will respect Global Quantization, starting and looping in time with the transport. The scrub will continue until stopScrub() is called.

    Parameters

    • beatTime: number

    Returns Promise<void>

    Memberof

    Clip

  • Use this function to process all notes of a clip, independent of the current selection.

    Returns Promise<void>

    Memberof

    Clip

  • If the state is set to true, Live simulates pressing the clip start button until the state is set to false, or until the clip is otherwise stopped.

    Parameters

    • state: boolean

    Returns Promise<void>

    Memberof

    Clip

  • Same effect as pressing the stop button of the track, but only if this clip is actually playing or recording. If this clip is triggered or if another clip in this track is playing, it has no effect.

    Returns Promise<void>

    Memberof

    Clip

  • Stops an active scrub on a clip

    Returns Promise<void>

    Memberof

    Clip

  • Parameters

    • trackNumber: number
    • clipSlotNumber: number

    Returns string

  • Parameters

    • trackNumber: number
    • clipSlotNumber: number

    Returns string