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

Jun 14, 2013 at 1:45pm

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

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

#252799
Jun 14, 2013 at 2:54pm

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.

#252807
Jun 14, 2013 at 4:48pm

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

#252812
Jun 14, 2013 at 4:53pm

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

#252813
Jun 15, 2013 at 1:46am

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!

#252826

You must be logged in to reply to this topic.