Creates a buffer for the audio data.

// @input int sampleRate
// @input float delayInSeconds

var delayBuilder = MachineLearning.createDelayBuilder();
var delay = delayBuilder.setNumFeatures(1)
.setDelay(script.sampleRate * script.delayInSeconds).build();
interface Delay {
    maxTensorSize: number;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    process(inTensor: Float32Array, inShape: vec3, outTensor: Float32Array): vec3;
}

Hierarchy (view full)

Properties

maxTensorSize: number

Maximum amount of features (channels).

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Process current frame data passed in inTensor of shape inShape, writes the result (delayed frame) to the outTensor and returns the shape of outTensor.

    Parameters

    • inTensor: Float32Array
    • inShape: vec3
    • outTensor: Float32Array

    Returns vec3