Class ArpeggioNote

Each ArpeggioNote object contains a definition for a single note to be played as part of a repeating arpeggio pattern.

Hierarchy

  • Range

    Hierarchy

    • ArpeggioNote

Constructors

  • Parameters

    • start: number

      What beat within the clip that the note starts on

    • duration: number

      How many beats the note lasts

    • pitch: ((c: Chord) => number)

      The method that converts a chord object into a MIDI pitch value from 0 - 127

        • (c: Chord): number
        • Parameters

          Returns number

    • velocity: number | ITween

      The note's velocity, valid values range from 0 - 127, or an ITween object to allow for values that change over time.

    • channel: number = null

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

    Returns ArpeggioNote

Accessors

  • get channel(): number
  • Which channel to play the note on, valid values range from 0 - 15, or null to default to signal that the Arpeggiator's chosen channel should be used.

    Returns number

  • set channel(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 pitch(): ((c: Chord) => number)
  • Stores a function that takes a chord as a parameter, and returns a pitch value The recommended way to use this is with the Chord.getPitch method, for example: pitch = c => c.getPitch(0). The pitch function is evaluated whenever the ArpeggioNote is deemed ready to play by a running Arpeggiator. The return value is expected to be in the range 0 - 127. Any pitch returned outside of that range will result in no note being created

    Returns ((c: Chord) => number)

      • (c: Chord): number
      • Stores a function that takes a chord as a parameter, and returns a pitch value The recommended way to use this is with the Chord.getPitch method, for example: pitch = c => c.getPitch(0). The pitch function is evaluated whenever the ArpeggioNote is deemed ready to play by a running Arpeggiator. The return value is expected to be in the range 0 - 127. Any pitch returned outside of that range will result in no note being created

        Parameters

        Returns number

  • set pitch(value: ((c: Chord) => number)): void
  • Parameters

    • value: ((c: Chord) => number)
        • (c: Chord): number
        • Parameters

          Returns 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 velocity(): number | ITween
  • The note's velocity, valid values range from 0 - 127, or an ITween object to allow for values that change over time.

    Returns number | ITween

  • set velocity(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

  • Intended for use by the Arpeggiator. This method generates a new Note object based on the passed in chord.

    Returns

    Parameters

    • chord: Chord

      The chord which is being arpeggiated.

    • channel: number

      The default channel to use if the ArpeggioNote doesn't define one.

    • percent: number

      How far into the note we should start from

    Returns Note

  • 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

Generated using TypeDoc