android - sound level bar visualizer for music player -
i need build sound level bar. sound goes level of sound rises. it's kind of visualizer bar. :
https://itunes.apple.com/tr/app/disco-lightning/id893088657?mt=8
you can see the level bar in link above.
i hope inquire question right. thanks
the valid way show powerfulness of sound calculate rms. portion of samples (for illustration 4096 samples) , calculate rms them. rms calculated rms = sqrt(1/n*(x1^2 + x2^2 + x3^3 ...... xn^2)) n number of samples , x values of samples. after calculating rms can normalize value , draw rectangle. not seek calculate average instead of rms. average near 0 because of negative sample values. if computation time problem can go average of absolute values of samples value 10% different of rms (for sinusoidal wave) can multiply 1.11 after that, close rms. @ end, if don't multiply 1.11, nobody notice there 10% difference...
android audio
No comments:
Post a Comment