#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# Can you calculate a 44.1k wav streams volume by looking atthe integers

Posts: 1Member
I've noticed that the difference between successive integers affects the volume the most, for example, if the first integer is 4000 and then next integer is -4000, then this is an 8000 difference. This 8000 difference is louder than say a 4000 difference.

At first, I thought, ok this difference is the volume, but it is more complicated than this. For example, if an 8000 for 1/100 second is one particular volume, where the 8000 for 1/1000 second is much less volume. My point is that even though I can find differences in the wav file of say 20000, they only exist for very small amounts of time and create much less volume than the 20000 difference would if it were longer.

Is there an algorithm to look at this and estimate the volume?

Thanks,

Alan

· ·

## Comments

• Posts: 35Member
hi

what you described is the 'peak'-performance of a sound, but our ear does not judge volume that way: it rather follows the 'energy' of the signal. This should explain why a 10 ms signal appears louder as a 1 ms signal: there is more area unther the waveform: more energy.

A common way to express volume is tho measure the RMS of a signal: Root Mean Square. It explains itself: take the square of the sample values, add them, divide them by the number of samples in the equation, and take the root of it.

I hope this explanation was clear helpfull to you

greetings

tom
· ·
Sign In or Register to comment.