Skip to main content
TikTok Effect House Platform Logo
Latest
Download
Log in
Audio

Onset Detection

Use Onset Detection to detect the onsets of notes in the musical audio in realtime based on a certain threshold. Onset Detection is in the Audio category.

Input

NameData typeDescription
AudioAudio StreamThe audio stream you want to detect the onsets
EnabledBooleanEnable this node or not
ThresholdNumberThe value of spectrum magnitude difference between current and previous audio frame. When the difference is greater than the Threshold, usually when a sound is louder, it is detected as an onset. Value range: 0 to 160.

Output

NameData typeDescription
AudioAudio StreamThe connected audio stream. Connect it to a speaker to play or connect it to a Detection Output to play with no sound.
Onset ValueNumberThe detection result of the onset. The value of onset energy. Value range: 0 to 1024.

Example

In this example, it detects the onset of notes in the audio stream. It filters the result below 600, and remaps the result to control the position of the red and green TikTok logo images.

↓ OnsetDetection.zip

AI Music powered by TikTok – SAMI.