Constructor
new DataRecorder(options)
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Override default parameters. Properties
|
- Source:
- To Do:
-
- - Add auto record param.
Example
import * as lfo from 'waves-lfo/common';
const eventIn = new lfo.source.EventIn({
frameType: 'vector',
frameSize: 2,
frameRate: 0,
});
const recorder = new lfo.sink.DataRecorder({
callback: (data) => console.log(data),
});
eventIn.connect(recorder);
eventIn.start();
recorder.start();
eventIn.process(0, [0, 1]);
eventIn.process(1, [1, 2]);
recorder.stop();
> [{ time: 0, data: [0, 1] }, { time: 1, data: [1, 2] }];
Methods
start()
Start recording.
- Source:
- See:
-
- module:client.sink.DataRecorder#stop
stop()
Stop recording and execute the callback defined in parameters.
- Source:
- See:
-
- module:client.sink.DataRecorder#start