Skip to main content

SpectrumDetector

Detects the raw audio frequency spectrum in real time.

TypeNameInterface Description
Functionsconstructor()

FunctionsgetResult(): 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) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies