Thanks Frank,

I use cubic interpolation to interpolate between samples and it seems a bit better than linear for me. I am more worried about the downsampling, when the playhead is going faster than the original samplerate and that's when the high frequencies of the original material start to fold back at Nyquist to cause aliasing.

My concern is if it would be a constant pitching up (downsample) rate then it would be "easy" to apply an antialias filter based on the resampling rate. But as the resampling rate can change by every step (as the speed of the playhead is modulating), you should apply different antialias filters for every step. Or at least the filter needs to use different coefficients every time it's applied... That's what I am unsure of what is the best solution to solve.

--
Kevin



/Hi Kevin. />//>/I'm the least-expert guy here I'm sure, but as a fellow newbie I might />/have some newbie-level ideas for you. />//>/Just to mention something simple: linear interpolating between samples is />/a huge improvement in reducing aliasing over not interpolating. For />/instance if your playback math says to get sample 171.25 out of the
buffer, />/use .75 of sample 171 and .25 of sample 172. I don't know the math but my />/listening tests of tricky test waveforms (eg, a waveform with a fundamental />/at 100Hz and a 60th harmonic at 6kHz pumped up to 10, 20,30x the power, />/showed aliasing reduced by about the same amount that quadrupling the />/buffer sample rate did. />//>/I looked into other interpolations besides linear, and they didn't seem />/effective enough to bother programming. Just to give a feeling for it, if />/linear eliminated 90% of aliasing, then then more complex interpolation />/might eliminate 95%. So they might reduce it by half compared to linear, />/but only a tiny bit better compared to none at all. (The percentages are />/just meant to be illustrative and actually everything totally depends on />/your input data.) />//>/Another thing is to make sure your input data has been filtered out such />/that there's no frequencies over the Nyquist frequency. But if you're />/dealing with a PC or smart phone I'd imagine the computer hardware handles />/that for you. Once the data is in memory you cannot filter it out, as it />/will already have morphed into an alias in your input buffer and be "baked />/in" no matter how you try to play the data back. />//>/Finally, listen with good headphones; you'll hear things you probably />/won't in a room even if you have a good amp and speakers. />//>/Frank />/http://moselle-synth.com//

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to