SpectrumDetector
Detects the raw audio frequency spectrum in real time.
| Type | Name | Interface Description |
|---|---|---|
| Functions | constructor() | |
| Functions | getResult(): Array<number> | • Function: Gets the current spectrum detection result. Returns Array of 512 raw FFT magnitude values (each in [0, 255]), or an empty array when no result is available. |
Examples
constructor()
let obj = new APJS.SpectrumDetector();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use SpectrumDetector here
}
onUpdate(deltaTime: number) {
}
}