Detecting peaks in a sound

I’ve been working on some projects, and I’ve stumbled upon how I would approach finding the peaks of a sound. How would I make a script that listens to the sound, and detects if it’s at a peak compared to other peaks of the sound?

2 Likes

You could use the Sound.PlaybackLoudness property to measure the current amplitude of the sound: Sound | Documentation - Roblox Creator Hub

You’d have to define the threshold for a “peak”, and then compare the amplitude at every certain interval to determine if there’s currently a peak, or something similar based on your specific needs.

1 Like