[sdiy] resampling wav files

Eric Brombaugh ebrombaugh1 at cox.net
Thu Apr 19 20:34:27 CEST 2018


Matlab & Octave have a variety of different ways to do interpolation / 
decimation. The resample() function that I suggested does rational 
resampling - the p & q arguments tell the upsampling and downsampling 
rates with a lowpass antialias FIR filter that's tailored to the p & q 
requirements. There are optional arguments that allow further refinement 
of the filter characteristics, but with the simplest call it's pretty 
close to an optimum sinc interpolation.


On 04/19/2018 11:18 AM, Richie Burnett wrote:
> Eric, What resampling method does octave  use internally? Sinc? Linear interpolation? Etc...
> ---- Eric Brombaugh wrote ----
>> Install a copy of Gnu Octave:
>> https://www.gnu.org/software/octave/
>> Write a quick script to read a .wav file, resample and write it out. Use
>> these functions:
>> y = wavread (filename)
>> [y, h] = resample (x, p, q)
>> wavwrite (y, filename)
>> Done.
>> On 04/19/2018 10:29 AM, Tim Ressel wrote:
>>> Hi,
>>> Looks like there's some DSP in my future. I need to resample wave files
>>> to get them from 600 samples down to 256 samples. Unless there is a
>>> groovy toll out there that can do that, I gotta write an app for it. As
>>> far as I can tell I need to interpolate 32x and then decimate 75x, with
>>> all the attendant filters that these processes need. I know just enough
>>> DSP to be dangerous.
>>> Thoughts?
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy

More information about the Synth-diy mailing list