Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Type aliases

Constructors

Properties

Methods

Type aliases

Static ArrayType

ArrayType: Array<[AudioUnit | undefined, MidiMessage | OSCMessage | Object] | [Array<AudioUnit | undefined>, Array<MidiMessage | OSCMessage | Object>]>

Static MapType

MapType: Map<AudioUnit | undefined | Array<AudioUnit | undefined>, MidiMessage | OSCMessage | Object | Array<MidiMessage | OSCMessage | Object>>

Constructors

constructor

  • Creates a step object with the specified values.

    Parameters

    • Optional map: MapType | ArrayType

      A Map object specifying the "mapping" for this step or an [[Array]] that should be of length (size * 2), where index N is the Nth key and index N + 1 is the Nth value.

    • Optional duration: number

      The length of the step in clock cycles "ppq".

    • Optional gate: number

      The length of the gate in clock cycles "ppq".

      See Map

      The keys for this map can be any target-able object i.e. a Sampler, MidiOut, OSCSender, etc. or a list[] of any target-able objects.

      The values for this can be any message type objects i.e. Note, Controller, PitchBend, Object or a list[] of any message type objects.

      ```javascript // Using a Map<>

      // send a Note to one sampler, with duration of 4 and a gate of 2. const map = new Map(); map.set (sampler1, new Note (64)); const step = new Step (map, 4, 2);

      // send a Note to two samplers, with duration of 4 and a gate of 2. const map = new Map(); map.set ([sampler1, sampler2], new Note (64)); const step = new Step (map, 4, 2);

      // send two Notes to one sampler, with duration of 4 and a gate of 2. const map = new Map(); map.set (sampler1, [new Note (64), new Note (67)]); const step = new Step (map, 4, 2);

      // send two Notes to two samplers, with duration of 4 and a gate of 2. const map = new Map(); map.set ([sampler1, sampler2], [new Note (64), new Note (67)]); const step = new Step (map, 4, 2);

      // send one Note to a sampler and a midi output, with duration of 4 and a gate of 2. const map = new Map(); map.set ([sampler1, graph.midiOut], new Note (64)); const step = new Step (map, 4, 2);

      // Using an Array

      // send a Note to one sampler, with duration of 4 and a gate of 2. const array = new Array(); array.push (sampler1, new Note (64)); const step = new Step (array, 4, 2);

      // send a Note to two samplers, with duration of 4 and a gate of 2. const step = new Step ([[sampler1, sampler2], new Note (64)], 4, 2);

      // send two Notes to one sampler, with duration of 4 and a gate of 2. const step = new Step ([sampler1, [new Note (64), new Note (67)]], 4, 2);

      // send two Notes to two samplers, with duration of 4 and a gate of 2. const step = new Step ([[sampler1, sampler2], [new Note (64), new Note (67)]], 4, 2);

      // send one Note to a sampler and a midi output, with duration of 4 and a gate of 2. const step = new Step ([[sampler1, graph.midiOut], new Note (64)], 4, 2); ```

    Returns Step

Properties

duration

duration: number

The duration for this step. Defaults to 4.

gate

gate: number

The gate for this step. Defaults to 4 | duration.

Optional id

id: ObjectID | undefined

The identifier of this object.

map

map: MapType

The map objet for this step.

Methods

withDuration

  • withDuration(duration: number): Step
  • Returns a new Step which has the same gate and map as this one, but with a different duration.

    Parameters

    • duration: number

    Returns Step

withGate

  • withGate(gate: number): Step
  • Returns a new Step which has the same duration and map as this one, but with a different gate.

    Parameters

    • gate: number

    Returns Step

withMap

  • Returns a new Step which has the same duration and gate as this one, but with a different map.

    Parameters

    Returns Step

Generated using TypeDoc