Downsampling to 16kHz without aliasing

    Sep 30 2019 | 1:03 pm
    Hi all,
    I've tried many methods and maybe I just lack a general understanding of aliasing, but I'm attempting to record audio from adc~ to sfrecord~ and change the sample rate to 16kHz by sending sfrecord~ a 'resample 0.362812' message, but there is aliasing!
    Before I attempt to drag in a lowpass filter from BEAP, try and use poly~ for resampling, or some other futile attempt, would anyone be able to help me and explain how resampling works in max and how to achieve a 16kHz 8 channel wav. file?
    I do have a good understanding of sample rate but just not this advanced.
    Any help is greatly appreciated,

    • Oct 09 2019 | 4:59 pm
    • Oct 11 2019 | 7:31 am
      looks like sfrecord~ does it's down-sampling by simply applying a sah without interpolation (no anti-aliasing/brickwall filter). So it's up to you to make sure there are no signal components above nyquist of your target rate (e.g. by using a suitable lowpass) _before_ the recording/downsampling stage. But without any compelling reason against it, I'd recommend doing the whole resampling business offline using software, that was made for it.
    • Oct 11 2019 | 10:38 am
      If recording file needs not to be very long, one could record into 8 channel buffer set to sr of 16000. crop the buffer at end of recording.
      In case of recording with sfrecord, shell object could post process the file. On mac for example using afconvert : afconvert -d LEI16@16000 -f WAVE path_to_file