Page 1 of 1
Generating (time, amplitude) data table using sound samples
Posted: Tue Jan 06, 2015 1:17 am
by princee
How do I return the points of every
nth sample in a .wav file?
I want to export the amplitude of each sample with respect to time into a file.
Note that my sound files are only 1 second long, so I don't think the data processing will be too difficult. Thus, I think that the
n in "every
nth" is 1.
See the below picture for clarification:
Also, if possible, how can I create a best fit curve — preferably in the form
for a selection of sound samples?
Thanks!
Re: Generating (time, amplitude) data table using sound samp
Posted: Tue Jan 06, 2015 1:39 am
by steve
Re: Generating (time, amplitude) data table using sound samp
Posted: Tue Jan 06, 2015 5:32 am
by Robert J. H.
Since you want only each nth sample, you could preprocess the audio.
- open the nyquist prompt
Code: Select all
(snd-avg s 1 <nth sample> op-average)
--> OK- Change the sample rate in the track dropdown menu (Set Rate --> Other)
The last point is optional but it assures the right time indexing.
The new sample rate is
The code is meant to work with mono tracks, don't enter < and >, just the number.