Answer the question
In order to leave comments, you need to log in
How to find out the volume of music (sound) in Unity?
I want to write my own "Audio Visualizer" in Unity. To do this, you need a function that finds the number of dB (volume of a piece of music) in the music being played.
An example of such a visualizer: https://www.youtube.com/watch?v=qol5HvBR8jc
Answer the question
In order to leave comments, you need to log in
If you are talking about pulsation, then for this the unit is not needed and will only act as a visualizer here.
In fact - you need to get AX - amplitude characteristic. You read the file, decode it - I'm sure there are already tools for all this in sysharp - and you just get an array of bytes from 0 to 256. That's the "sound volume" for you.
PS And if you need not only pulsation, but also that wave around, then there is most likely already a frequency response - fast Fourier transform and all that. Again, it has nothing to do with Unity.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question