0
$\begingroup$

i have two audio signals .wav and i want to convolve them, the trouble is that the frequency do not fit, they aren´t just the same frecuency-lenght in the wavread arguments. i am supposed to use the lesser frequency to resample the other one using interp1 and splines. I really appreciate your help. Thanks

$\endgroup$
  • 1
    $\begingroup$ What are the sampling frequencies of the two files? $\endgroup$ – Jim Clay Mar 14 '13 at 15:52
  • $\begingroup$ This is a question about MATLAB programming: how to use specific tools in a MATLAB toolbox, rather than a question about signal processing. It should be closed here or migrated to stackoverflow.SE or similar site. $\endgroup$ – Dilip Sarwate Mar 14 '13 at 17:48
  • $\begingroup$ I think it's a DSP question, but his tool of choice seems to be Matlab. The answer depends on the sampling rates though. $\endgroup$ – Dave C Mar 14 '13 at 19:42
1
$\begingroup$

If the ratio of the sample rates is reasonably rational (i.e can be represented as the quotient of reasonably small integers) then you can use the MATLAB function resample().

Convolving to audio signals is rather unusual. Typically and audio signal is convolved with filter impulse response. The impulse response could be stored in an aduio file, but that would be a bit unusual. I would double check if you understood the task correctly.

Both interp1() and spline() are poor choices for sample rate conversion as they don't control the mirror images in any predictable way. I recommend reading up on "sample rate conversion".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.