0
$\begingroup$

An audio sampler (in "music" terms because I'm not experienced in dsp) is a software which loads an audio file and allows you to play it at different pitches by slowing it down and speeding it up.

The audio file should be playable at any new frequency, and the frequency at which I'm playing it can change at any time, even continuously for "pitch slides".

My understanding is that if I am pitching it up, I should use a lowpass filter first so I don't create frequencies above nyquist that will alias. After that I need to use an interpolation function.

What kind of filter I should use? IIR or FIR? What type? Please also keep in mind that for audio the phase changes and the ringing in the time domain can be undesired because they change the way the transients sound.

$\endgroup$
  • $\begingroup$ Are you OK that the pitch and speed changes at the same time? You basically want to play the samples faster/slower just as what would happen on a gramophone running at the incorrect speed? $\endgroup$ – Oscar Nov 10 '14 at 15:58
  • $\begingroup$ Yes, that is how most of the time an audio sampler works. If the original pitch is 440hz, and you play it back at 220hz, it will be double in length. $\endgroup$ – m fran Nov 10 '14 at 19:45
  • $\begingroup$ OK, then it is rather straightforward: look into fractional delay filters. With these you can select samples at any fractional sample position, i.e., go arbitrarily fast in the sample sequence. A common structure for fractional delay filters is the Farrow structure, which can be implemented using either IIR or FIR filters (or a combination). $\endgroup$ – Oscar Nov 11 '14 at 9:22
  • $\begingroup$ Sorry, again, I'm not experienced at all in signal processing, so is "splitting the unit delay [fir/all pass filters design]" the right kind of thing I should be looking into? $\endgroup$ – m fran Nov 14 '14 at 15:40
  • $\begingroup$ The C# application "Practice#" does all you want to do, it might prove worthwhile to try and look at the code to get clues on how this has been achieved.Practice# changes pitch and speed independently not together. $\endgroup$ – KillaKem Dec 23 '14 at 13:56

Your Answer

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

Browse other questions tagged or ask your own question.