Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a set of interconnected node objects through which audio/midi/osc data flows.

Hierarchy

Index

Properties

Methods

Properties

Optional id

id: ObjectID | undefined

The identifier of this object.

midiIn

midiIn: [ObjectID, Channel]

The midi input for this graph.

midiOut

midiOut: MidiOut

The graph's MIDI output object.

nodes

nodes: GraphNode[]

The nodes for this graph.

output

output: [ObjectID, Channel][]

The audio output channels of this graph.

see

Graph.connect

Methods

add

  • Adds an object to this graph.

    Parameters

    • object: GraphNode

      The object to add to this graph.

    Returns ObjectID | undefined

    The identifier of the object that was added or undefined if the object can't be added to the graph.

    ```javascript const sampler = new Sampler(); const soulPatch = SOULPatch ("./Reverb.soulpatch"); graph.add (sampler); graph.add (soulPatch); ```

connect

  • Connects two specified channels of two objects or one specific channel to another object's channel.

    ```javascript const sampler = new Sampler(); graph.add (sampler);

    graph.connect (sampler.output, graph.output); ```

    ```javascript const sampler = new Sampler(); graph.add (sampler);

    graph.connect (sampler.output [0], graph.output [0]); graph.connect (sampler.output [1], graph.output [1]); ```

    see

    AudioUnit.input

    see

    AudioUnit.output

    see

    Graph.output

    Parameters

    Returns boolean

get

  • Returns an object for the specified identifier or undefined if the object does not exist.

    ```javascript const samplerId = graph.add (new Sampler()); const sampler = graph.get (samplerId); ```

    Parameters

    Returns GraphNode | undefined

Generated using TypeDoc