Class ClipCC

ClipCC represents a control change to be played within a clip, specifying the start and end of the control change within the clip, as well as the information to be sent by the control change.

Hierarchy

Constructors

  • Parameters

    • start: number

      What beat within the clip that the control change starts.

    • duration: number

      How many beats the control change lasts.

    • controller: number

      The MIDI controller to modify, valid values range from 0 - 127.

    • value: number | ITween

      The value to set, valid values range from 0 - 127, or a Tween object which defines a strategy for how to change over the course of the control change's lifetime.

    • channel: number = null

      Which channel to play the control change on, valid values range from 0 - 15, or null to allow whatever is playing the clip to decide.

    Returns ClipCC

Accessors

  • get channel(): number
  • Which channel to send the control change to, valid values range from 0 - 15, or null to allow whatever is playing the clip to decide.

    Returns number

  • set channel(value: number): void
  • Parameters

    • value: number

    Returns void

  • get controller(): number
  • The MIDI controller to modify, valid values range from 0 - 127.

    Returns number

  • set controller(value: number): void
  • Parameters

    • value: number

    Returns void

  • get duration(): number
  • The difference between the start and end values.

    Attempts to set this to a negative value will result in an error being thrown.

    Returns number

  • set duration(value: number): void
  • Parameters

    • value: number

    Returns void

  • get end(): number
  • The value which the range ends at.

    Attempts to set this to a value less than start will result in an error being thrown.

    Returns number

  • set end(value: number): void
  • Parameters

    • value: number

    Returns void

  • get start(): number
  • The value which the range starts at.

    Attempts to set this to a value greater than end will result in an error being thrown.

    Returns number

  • set start(value: number): void
  • Parameters

    • value: number

    Returns void

  • get typeName(): string
  • Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.

    Returns string

  • get value(): number | ITween
  • The value to set, valid values range from 0 - 127, or an ITween object to allow for values that change over time.

    An example of using a tween to sweep the CC value from 0 to 127 over the course of 1 beat: new ClipCC(0, 1, 25, Tween.linear(0, 127));

    Returns number | ITween

  • set value(value: number | ITween): void
  • Parameters

    Returns void

Methods

  • Returns true if the passed in point is greater than or equal to range start, and less than or equal to range end.

    Returns

    Parameters

    • point: number

      The point value to determine whether it's within the range.

    Returns boolean

  • Returns a copy of this ClipCC object

    Returns ClipCC

  • Accepts a value and returns what percentage of the way into the range that the value is.

    The returned value can be negative, or greater than 100%, if the passed in value is less than the range start, or greater than the range end.

    Returns

    Parameters

    • value: number

      The value to compare against the range.

    Returns number

  • Used by the library for the custom serialization of Clips

    Returns any

  • Takes an object parsed from JSON ClipCC data to load into an actual clip CC instance.

    Parameters

    • clipCCData: any

    Returns ClipCC

Generated using TypeDoc