6

In Linux, I used to use the following command, which takes audio input, applies reverb and a pitch shift effects, and then outputs the result to the specified audio device.

sox -r 44100 -t alsa hw:1 -t alsa hw:0 reverb 1 50 10 50 pitch 100

On mac/OSX, I have installed the commandline audio utility sox, and I can record OR play audio using -d (default audio device), but I'm unable to get sox to do the same real-time audio manipulation that I did in Linux shown above. I think the key is finding out what to specify for the -t option

regulatre
  • 500
  • 2
  • 6
  • 18

1 Answers1

7

Indeed, the trick was 1. to specify -t coreaudio followed by the device name, and 2. figuring out what to use for the device name.

What to use for the device name:

$ sox -V6 -n -t coreaudio junkname

<snip>
sox INFO coreaudio: Found Audio Device "Built-in Mi"
sox INFO coreaudio: Found Audio Device "Built-in Ou"
sox INFO coreaudio: Found Audio Device "Scarlett 2i"

Full commandline:

sox -r 48000 -t coreaudio "Scarlett 2i2 USB" -t coreaudio "Built-in Output" reverb 1 50 10 50 pitch 100

I was able to run the command successfully with either the abbreviated names shown in the -V6 output, as well as the full name seen in sound settings under system preferences.

OS: Mojave/10.14, Darwin 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64

regulatre
  • 500
  • 2
  • 6
  • 18