Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace midiclip

Index

Functions

clear

  • clear(): { address: string }
  • Clear all MIDI notes in the currently selected clip.

    Returns { address: string }

    • address: string

create

  • create(clipName: string, startTimeSeconds: number, durationSeconds: number, notes: any[]): { address: string }[]
  • Build an OSC message that creates a clip with a bunch of midi notes

    Parameters

    • clipName: string

      name of the clip.

    • startTimeSeconds: number

      clip start time in whole notes

    • durationSeconds: number

      clip length in whole notes

    • notes: any[]

      array of objects, which look like: { duration: lengthWholeNotes, n: midiNoteNumber, startTime: startTimeWholeNotes }

    Returns { address: string }[]

note

  • note(noteNumber: number, startTimeSeconds: number, durationSeconds: number, velocity?: number): { address: string; args: { type: string; value: number }[] }
  • Insert A midi note, specifying the time and duration in seconds.

    Parameters

    • noteNumber: number

      MIDI note number

    • startTimeSeconds: number

      start time in seconds, relative to clip start

    • durationSeconds: number

      duration in seconds, relative to clip start

    • Optional velocity: number

      optional velocity (server default = 64)

    Returns { address: string; args: { type: string; value: number }[] }

    • address: string
    • args: { type: string; value: number }[]

noteBeats

  • noteBeats(noteNum: number, startTimeInWholeNotes: number, durationInWholeNotes?: number, velocity?: number): { address: string; args: { type: string; value: number }[] }
  • Create an /midiclip/note message

    Parameters

    • noteNum: number

      MIDI Note Number

    • startTimeInWholeNotes: number

      Note start time in whole notes

    • durationInWholeNotes: number = 0.25
    • Optional velocity: number

    Returns { address: string; args: { type: string; value: number }[] }

    • address: string
    • args: { type: string; value: number }[]

select

  • select(name: string, startTimeSeconds: number, durationSeconds: number): { address: string; args: ({ type: string; value: string } | { type: string; value: number })[] }
  • Select a MIDI clip by name on the currently selected track. Create the clip if it does not exist. Set the clip's start time and length in whole notes.

    Parameters

    • name: string

      name of the MIDI clip to select.

    • startTimeSeconds: number
    • durationSeconds: number

    Returns { address: string; args: ({ type: string; value: string } | { type: string; value: number })[] }

    • address: string
    • args: ({ type: string; value: string } | { type: string; value: number })[]