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.
|Audio||Audio Stream||The audio stream you want to detect the onsets|
|Enabled||Boolean||Enable this node or not|
|Threshold||Number||The 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.|
|Audio||Audio Stream||The connected audio stream. Connect it to a speaker to play or connect it to a Detection Output to play with no sound.|
|Onset Value||Number||The detection result of the onset. The value of onset energy. Value range: 0 to 1024.|
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.
AI Music powered by TikTok – SAMI.