Resample audio signal with a low factors

Currently, we need to handle a piece of an audio signal. We want to resample it with different factor rate (p/q) starting with 1.0002 to 0.9998 with a decrement of 0.000005. But Matlab function cannot handle this because of the Integer Limit. Are there any ways to solve it?

• big deal. MATLAB y = resample(x,p,q); works fine. so for whatever ratio $r=\tfrac{p}{q}$ that you want set $$p=\left\lfloor \tfrac{r}{0.000005} \right\rfloor =\left\lfloor 200000 \cdot r \right\rfloor$$ and $$q=\left\lfloor \tfrac{1}{0.000005} \right\rfloor = 200000$$ and you have your integers for p and q. – robert bristow-johnson Jul 9 '18 at 8:40

if your resampling can be done batch, interp1 using ‘spline’ as the type works well.

A good article that argues in favor of splines over sinc interpolation is

Unser, Michael. "Splines: A perfect fit for signal and image processing." IEEE Signal processing magazine 16.6 (1999): 22-38.

Please see my answer to this question : Various size arrays interpolation - resampling

The best method really depends on your application and your requirements. Matlab's resample() is perfectly fine, if you don't care about efficiency, have enough memory, no real time requirement, and reasonably short signals. If's unsuitable for real time sample rate adaption of two different master clocks.

Both sinc kenrnel and splines are different ways to create an interpolation filter, but it's not easy to adapt them to numerical requirements. If you have a requirement like "aliasing, THD and intermod need to be lower than -80dB below 20 kHz" it's better to directly design a low pass filter in a suitably upsampled domain. You an certainly do this by using a sinc kernel but you'll need a lot more filter taps than using a custom low pass filter

You can resample to any, including floating point approximations of irrational rates, using reconstruction by Sinc kernel interpolation (realistically, by using a windowed Sinc interpolator).