3

For stupid reasons, I think I recorded a bunch of stuff through a USB microphone that reported to the OS as a 48.0 kHz input device while it was actually 44.1 kHz. Oddly enough it worked normally until suddenly my sound files sounded high pitched. I can only speculate what happened exactly, but these are the facts:

  • I usually record through an aggregate device on macOS that is set to 48 kHz. Normally I initialize my microphone (which is part of the aggregate device) to 48 as well, but this time it accidentally recorded to 44.1.
  • My recordings report a 48 kHz sample rate and sound high pitched.

I assume that I somehow have to edit the metadata of all my sound files to report a sample rate of 44.1 kHz instead of 48.0 kHz. How do I do that? I have Reaper.

1 Answer 1

5

Nevermind, I found something. The command line tool sox seems to do the trick:

find . -name '*.wav' | xargs -I {} basename {} .wav | xargs -I {} sox -r 44100 {}.wav {}.edited.wav
find . -name '*.edited.wav' | xargs -I {} basename {} .edited.wav | xargs -I {} mv {}.edited.wav {}.wav

First line takes all of the WAV files in the current directory and saves a copy of every file with 44.1 kHz set as the sample rate. Second line takes all of the edited copies and renames them to the original input files, overwriting the file in the process. This second command is a destructive operation.

1
  • Okay, I will. According to the website I can't do that for another 20 hours but I'll come back tomorrow.
    – Pieter
    Nov 15, 2020 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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