Constructor
new Dct(options)
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Override default parameters. Properties
|
- Source:
Example
import * as lfo from 'waves-lfo/client';
// assuming some audio buffer
const source = new AudioInBuffer({
audioBuffer: audioBuffer,
useWorker: false,
});
const slicer = new Slicer({
frameSize: 512,
hopSize: 512,
});
const dct = new Dct({
order: 12,
});
const logger = new lfo.sink.Logger({ data: true });
source.connect(slicer);
slicer.connect(dct);
dct.connect(logger);
source.start();
Methods
inputSignal(values) → {Array}
Use the Dct
operator in standalone
mode (i.e. outside of a graph).
Parameters:
Name | Type | Description |
---|---|---|
values |
Array | Input values. |
- Source:
Returns:
- Dct of the input array.
- Type
- Array
Example
const dct = new lfo.operator.Dct({ order: 12 });
// mandatory for use in standalone mode
dct.initStream({ frameSize: 512, frameType: 'signal' });
dct.inputSignal(data);