Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a Pattern

A pattern object is a special kind of voice that can generate steps that trigger some kind of target object(s) with some kind of message/data.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Optional channel

channel: number

The midi channel for this pattern. Defaults to -1, all channels.

Optional clockMultiplier

clockMultiplier: number

The clock multiplier for this pattern. Defaults to 1.0.

Optional cycle

cycle: boolean

Whether or not this pattern should cycle. Defaults to true.

Optional id

id: ObjectID | undefined

The identifier of this object.

Optional keyRange

keyRange: [number, number]

The key range for this pattern. Defaults to [0, 127]

Optional name

name: string

The name for this pattern.

Optional offset

offset: number

The offset for this pattern. If the offset value is greater than zero then the steps will be shifted to the right by the offset amount. If the offset value is less than zero then the steps will be shifted to the left.

```javascript let steps = [step1, step2, step3]; this.offset = 1; // [step3, step1, step2] ``` ```javascript let steps = [step1, step2, step3]; this.offset = -1; // [step3, step2, step1] ```

Defaults to 0.

Optional onAdvanced

onAdvanced: (context: Context) => void

The advanced callback for this pattern.

This callback is called when this pattern progresses to a new step.

Type declaration

Optional onAfterTouchChanged

onAfterTouchChanged: (context: Context) => void

The after touch changed callback for this pattern.

Type declaration

Optional onChannelPressureChanged

onChannelPressureChanged: (context: Context) => void

The channel pressure changed callback for this pattern.

Type declaration

Optional onControllerMoved

onControllerMoved: (context: Context) => void

The controller moved callback for this pattern.

Type declaration

Optional onEnded

onEnded: (context: Context) => void

The ended callback for this pattern.

This callback is called when this pattern reaches the end of the last step.

Type declaration

Optional onNoteOff

onNoteOff: (context: Context) => void

The note off callback for this pattern.

Type declaration

Optional onNoteOn

onNoteOn: (context: Context) => void

The note on callback for this pattern.

Type declaration

Optional onPitchWheelMoved

onPitchWheelMoved: (context: Context) => void

The pitch wheel moved callback for this pattern.

Type declaration

Optional onSequence

onSequence: (context: Context) => Step | Step[]

The sequence callback for this pattern.

This callback is triggered when a note on is received and should return a Step or a list of Steps. This callback will be called repeatably while a note is held down in the key/velocity range of this pattern, while there are 1 or more steps, Pattern.resequence is set to true (default) and if Pattern.cycle is set to true (default).

see

Step

Type declaration

Optional resequence

resequence: boolean

Whether or not to re-sequence this pattern once it reaches the end. If this is set to false then Pattern.onSequence callback will not be called and the last sequence of steps will be used again. If this is set to true (default) then the Pattern.onSequence callback will be called when this pattern reaches the end to get a new set of steps for the sequence.

Defaults to true.

Optional reversed

reversed: boolean

Whether or not this pattern is reversed.

Optional velocityRange

velocityRange: [number, number]

The velocity range for this pattern. Defaults to [0, 127]

Optional visualisation

visualisation: Visualisation

Represents the visualisation method to use for this Pattern's voices. The default visualisation method is [Pattern.Visualisation.automatic]

Generated using TypeDoc