Class: AudioInNode

AudioInNode

Use a WebAudio node as a source for the graph.

Constructor

new AudioInNode(options)

Parameters:
Name Type Description
options Object

Override parameter' default values.

Properties
Name Type Attributes Default Description
sourceNode AudioNode <optional>
null

Audio node to process (mandatory).

audioContext AudioContext <optional>
null

Audio context used to create the audio node (mandatory).

frameSize Number <optional>
512

Size of the output blocks, define the frameSize in the streamParams.

channel Number <optional>
0

Number of the channel to process.

Source:
Example
import * as lfo from 'waves-lfo/client';

const audioContext = new AudioContext();
const sine = audioContext.createOscillator();
sine.frequency.value = 2;

const audioInNode = new lfo.source.AudioInNode({
  audioContext: audioContext,
  sourceNode: sine,
});

const signalDisplay = new lfo.sink.SignalDisplay({
  canvas: '#signal',
  duration: 1,
});

audioInNode.connect(signalDisplay);

// start the sine oscillator node and the lfo graph
sine.start();
audioInNode.start();

Methods

start()

Propagate the streamParams in the graph and start to propagate signal blocks produced by the audio node into the graph.

Source:
See:

stop()

Finalize the stream and stop the whole graph.

Source:
See: