Forums > MaxMSP

Is it possible to obtain the amplitude value from each sample?

June 14, 2013 | 1:45 pm

So, the name says it all, or at least I believe it does. I wrote another topic before but I believe it was too messy for someone to understand. My idea is simple, as I understand, computers sample sound amplitude into values that can understand. Then, each sample has an approximate value of the amplitude sound had in a given moment. My question comes here, is it possible to obtain that value from each sample? I’m not a sound engineer, so my question may be a little dumb, but I want to know if it is possible, and if it is, how could I achieve it. I believe it is logical that if my computer can graph the waveform of a song, then it should be fairly easy to obtain the value of the amplitude on a given milisecond.
Thanks for the help


June 14, 2013 | 2:54 pm

a snapshot with a time value of 1/samplingrate will theoretically do it, but i see absolutely no useful application for such data in realtime, as it is simply too fast to be kept in snyc with audio signals, even when you copy it in the high priority thread.

to do things on single samples, use signal processing objects.


June 14, 2013 | 4:48 pm

Thank you a lot for answering so fast! That’s where my second question comes, my intention is not to work by playing the audio. Here comes my idea: make a program that allows me to analyze a sound through the waveform, let’s say I want to know were does the amplitude is 0 in the song without needing to play it. You already helped me a lot with your quick response, now I want to know if it is possible to analyze this without playing the song?

Thank you again Roman Thilenius


June 14, 2013 | 4:53 pm

If it’s a sound file, load it into buffer~ and use peek~. For signals, look at zerox~.


June 15, 2013 | 1:46 am

That was just what I needed! Now I can continue with my program haha thanks alot! both Mzed and Roman Thilenius helped me a lot! Thanks for your help, hope everything runs OK now!


Viewing 5 posts - 1 through 5 (of 5 total)