SOX_NG(1) Sound eXchange_ng SOX_NG(1) (NAME) sox_ng - Sound eXchange_ng (SYNOPSIS) sox_ng [global-options] [format-options] infile1 [[format-options] infile2] ... [format-options] outfile [effect [effect-options]] ... play_ng [global-options] [format-options] infile1 [[format-options] infile2] ... [format-options] [effect [effect-options]] ... rec_ng [global-options] [format-options] outfile [effect [effect-options]] ... (DESCRIPTION) (Introduction) SoX . ( ) . . SoX sox_ng . SoX play_ng rec_ng . soxi_ng . SoX libsox_ng . SoX libsox_ng . SoX . audacity(1) . * * * SoX : Input(s) -> Combiner -> Effects -> Output(s) SoX Output(s) () Effects () . SoX . sox_ng recital.au recital.wav Sun AU Microsoft WAV sox_ng recital.au -b 16 recital.wav channels 1 rate 16k fade 3 norm ( ) . sox_ng -r 16k -e signed -b 8 -c 1 voice-memo.raw voice-memo.wav <<>> ( << >>) sox_ng slow.aiff fixed.aiff speed 1.027 sox_ng short.wav long.wav longer.wav sox_ng -m music.mp3 voice.wav mixed.flac () . play_ng "The Moonbeams/Greatest/*.ogg" bass +3 (bass boost) play_ng -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 1 0.1 << >> ("A minor seventh") rec_ng -c 2 radio.aiff trim 0 30:00 play_ng -q take1.aiff & rec -M take1.aiff take1-dub.aiff ( POSIX ) . rec_ng -r 44100 -b 16 -e signed-integer -p \ silence 1 0.50 0.1% 1 10:00 0.1% | \ sox_ng -p song.ogg silence 1 0.50 0.1% 1 2.0 0.1% : \ newfile : restart (LP) . . SoX . SoX soxformat_ng(7) soxi_ng(1) ..SS (File Format Types) SoX <<>> (self-describing) <<>> (raw) . <<>> ( WAV FLAC MP3) . <<>> << >> SoX .gsm -c1 -r8000 -e gsm .f32 .s16 .ul . : (sample rate) (<<>> <>). 8000Hz ( ) 16 32kHz . (CD) 44100Hz (44.1kHz) (DAT) 48kHz 96kHz . (sample size) . 16-bit 8-bit 24-bit . (data encoding) ( <<>>) . . (floating point) -law ADPCM PCM (signed-integer PCM) MP3 FLAC . (channels) . (<<>>) (<<>>) <<>> (surround sound) . << >> (bit rate) . (kbps) . A-law 64 kbps MP3 128-196 kbps FLAC 550-760 kbps . <<>> (comments) . <> . SoX Replay Gain . SoX Replay Gain . --replay-gain --comment "" REPLAYGAIN : soxi_ng -a in.au | grep -v REPLAYGAIN > comments sox_ng --replay-gain=track in.au --comment-file comments out.au (Determining and setting the File Format) SoX . . SoX : 1. 2. 3. . SoX : 1. 2. 3. . SoX . ..SS play_ng rec_ng : play_ng existing-file.wav rec_ng new-file.wav : sox_ng existing-file.wav -d sox_ng -d new-file.wav ( ) . * * * SoX rate . rate <> . rate : play_ng ... rate -m --play-rate-arg ( ). * * * SoX play_ng . <> <> . softvol . SoX (peak level meter) ( ) : rec_ng -n ( SoX) << >> ( ). -S (--show-progress) . . . ( A-law GSM) ( MP3 Ogg Vorbis) . <<>> (lossy) . <<>> (lossless) . <<>> . SoX . 8-bit PCM 16-bit PCM 8-bit PCM A-law ( ) . SoX . . : sox_ng long.mp3 short.mp3 trim 10 SoX MP3 trim MP3 . . SoX SoX ..SS " (Dithering)" . (decorrelate) . SoX . SoX TPDF : o o o vol 0.25 ( 0.25 0.01 ) SoX . . -V SoX . -D (--no-dither) . ( ) dither . (Clipping) ( << >>) . . SoX vol gain . . (resampling) DC . << >> (headroom) . 9dB 3dB (~~ ) . CD MP3 0dBFS . stat stats SoX . gain vol : sox_ng dull.wav bright.wav gain -6 treble +6 (treble) . SoX . -G (--guard) gain norm ..SS " (Input File Combining)" SoX --combine : concatenate sequence mix mix-power merge multiply -m --combine mix -M merge -T multiply. play_ng sequence sox_ng concatenate . sequence . SoX concatenate . sequence concatenate . . mix mix-power SoX . . merge SoX remix . . multiply -1 +1 . . SoX ( vol ) . ( <<>>) . -v . . . -V . : mix (clipping) . SoX () ^1/n ( n ) . -v . norm . (dynamic range compression) - compand . mix-power . ^1/n ^1/n . ..SS " (Output Files)" SoX . newfile SoX . newfile . newfile . . %n . % . %n %n . newfile . . : sox_ng song.wav ringtone%1n.wav trim 0 30 : newfile : trim 0 30 SoX (Stopping SoX) SoX . Ctrl-C . SoX . SoX Ctrl-C : SoX . ffmpeg - (pipe) . trim . SoX . (FILENAMES) URL ( ) . URL wget wget2 curl . SoX SoX SoX . ./chorus Unix .\chorus MS/DOS . (truncate) . (Special Filenames) : - `-' SoX (pipeline) SoX << >> (stdin) SoX << >> (stdout) . ( -t ) . "|program [options] ..." <<>> (stdout) . - SoX . genw WAV : sox_ng -M "|genw --imd -" "|genw --thd -" out.wav ( raw) -t . "wildcard-filename" wildcard- filename * ? [A-Z] (globbing) SoX . . file1.vox file2.vox file3.vox play_ng --rate 6k *.vox ( ) : play_ng --rate 6k file1.vox file2.vox file3.vox `vox' 6k . play_ng --rate 6k "*.vox" . SoX (glob ) --no-glob (wildcard) . -p, --sox-pipe SoX . : play_ng "|sox_ng -n -p synth 2" "|sox_ng -n -p synth 2 tremolo 10" play_ng SoX . -p `-t sox -' . -d, --default-device ( SoX ) . rec_ng play_ng . -n, --null << >> (null file) . << >> SoX . trim synth. noiseprof stat spectrogram. 48kHz -r ( )..SS (Supported File and Audio Device Types) soxformat_ng(7) . (OPTIONS) (Global Options) (effect) . SOX_OPTS SoX . (ENVIRONMENT) ( ) . -A freq A4 440Hz freq . --buffer bytes --input-buffer bytes ( 8192). --buffer --input-buffer --buffer . --buffer SoX . --clobber . --no-clobber . --combine concatenate|merge|mix|mix-power|multiply|sequence . (Input File Combining) . -D --no-dither (dither) - (Dithering) . SoX dither . (bit- depth) stats . --effects-file filename . . : . : . . -G --guard gain (clipping) . : sox_ng -G in.au -b 16 out.au rate 44100 dither -s : sox_ng in.au -b 16 out.au gain -h rate 44100 gain -rh dither -s -V --norm gain . -h --help SoX . --help-effect name . all . --help-format name . all . --i --info sox_ng soxi_ng . --interactive SoX : v V (master volume) softvol . < > . n (track) . q Esc . R ( :). --keymap . . (stdin) play ... < file -k|--keymap key:effect.field[+|-|*|/|=]value value value . : play_ng -V -k D:dolbyb.gain+2 -k d:dolbyb.gain-2 in.wav dolbyb Dolby B Threshold Gain 2dB . --keymap --interactive -V . effect2.field effect echo.delay effect.field1 . --help-effect sox_ng --help-effect all | grep Keymap gain-out gain_out . -m|-M --combine mix --combine merge . --magic SoX <> . --multi-threaded|--single-threaded SoX <<>> (single threaded) --multi-threaded SoX hyperthreading . ( 131072 --buffer ) OMP_WAIT_POLICY=PASSIVE SoX OpenMP SoX . --no-clobber . : sox_ng file1 file2 effect1 effect2 ... : play_ng file1 file2 effect1 effect2 ... file2 . SOX_OPTS ( (ENVIRONMENT) )..TP --norm[=dB-level] gain (clipping) . : sox_ng --norm in.au -b 16 out.au rate 44100 dither -s : sox_ng in.au -b 16 out.au gain -h rate 44100 gain -nh dither -s 0 dBFS : sox_ng --norm=-3 in.au out.au -V -G gain . --play-rate-arg arg rate . SOX_OPTS ( (ENVIRONMENT) ) -l ( ) . rate . --plot gnuplot|octave|off off ( --plot) gnuplot GNU Octave (transfer function) . SoX . : sox_ng --plot octave input-file -n highpass 1320 > highpass.plt octave highpass.plt -q, --no-show-progress (quiet) SoX . -S . -V . -R <<>> (repeatable). SoX dither (seed) SoX . --replay-gain track|album|off replay gain . off sox_ng rec_ng album play_ng () track play_ng . -S, --show-progress / () ( ) . (peak level meter) (clipping) . : dB FSD dB FSD -25 - -11 ==== -23 = -9 ====- -21 =- -7 ===== -19 == -5 =====- -17 ==- -3 ====== -15 === -1 =====! -13 ===- headroom 6dB . SoX -q . -T --combine multiply . --temp directory . . <<--temp .>> ( ) . --version SoX . -V[level] (verbosity). SoX . SoX (stderr) : 0 . 1 . SoX . 2 . SoX (clipping) . . 3 SoX SoX . SoX . -V . -V -V0 . . --ignore-length (header) . SoX . -v, --volume factor factor . <<>> . ( amplitude) . . norm vol gain Input File Balancing Special Filenames wildcard-filenames . (Input & Output File Format Options) (headerless) . -b bits, --bits bits ( bit-depth ) . MP3 GSM A-law -law ADPCM . SoX (`raw` `headerless`) . : sox_ng -r 16k -e signed -b 8 input.raw output.wav (`raw`) `WAV` . . . : sox_ng input.cdda -b 24 output.wav CD ( signed-integer) `WAV` (signed-integer) . -c CHANNELS, --channels CHANNELS . . (`raw` ) SoX . ( ) . : sox_ng -r 48k -e float -b 32 -c 2 input.raw output.wav `raw` `WAV` . play_ng -c 1 music.wav . channels ( ) . : sox_ng input.wav -c 1 output.wav bass -b 24 sox_ng input.wav output.wav bass -b 24 channels 1 . -e ENCODING, --encoding ENCODING ( raw WAV AU) MP3 FLAC . : signed-integer PCM ( <>). . . unsigned-integer PCM . . . floating-point PCM (<<>>) ( ) ( ) IEEE 753. . a-law . PCM ( -X ). u-law/mu-law -law PCM ( -X ). oki-adpcm ADPCM OKI ( VOX Dialogic Intel) PCM . ADPCM / . ima-adpcm ADPCM IMA ( DVI) PCM . ms-adpcm ADPCM Microsoft PCM . gsm-full-rate GSM . . SoX <> GSM . unsigned-integer un u ( u-law). (`raw` ) SoX ( -b -c ). ( -b) . : sox_ng input.cdda -e float output1.wav sox_ng input.cdda -b 64 -e float output2.wav CD ( signed integer) `WAV` . . --no-glob (`globbing`) SoX . <> <> play_ng --no-glob "five*.wav" <> . -r, --rate rate[k] (sample rate) ( k ) . (`raw` ) SoX ( -b -c ). . 48k 1.5% sox_ng -r 48720 input.wav output.wav ( speed ). rate ( ) . : sox_ng input.wav -r 48k output.wav bass -b 24 sox_ng input.wav output.wav bass -b 24 rate 48k rate ..TP -t, --type FILE-TYPE . << >> SoX . : another-command | sox_ng -t mp3 - output.wav sox_ng input.wav -t raw output.bin SoX . SoX -t sndfile -t ffmpeg WAV MP3. . soxformat_ng(7) . -L, --endian little -B, --endian big -x, --endian swap <> <> SoX . (Endianness) . (self-describing) . . : ( ) . little-endian : sox_ng -B audio.s16 trimmed.s16 trim 2 trimmed.s16 little-endian sox_ng -B audio.s16 -B trimmed.s16 trim 2 big-endian . -V . -N, --reverse-nibbles ( ) ADPCM . -x . -X, --reverse-bits ( ) . -x . (Output File Format Options) . --add-comment TEXT ( ). --comment TEXT ( ). ( --comment-file) SoX `Processed by SoX' . --comment "" . --comment-file FILENAME ( ). -C, --compression FACTOR . . soxformat_ng(7) ..SH " (EFFECTS)" SoX . SoX << >> (effects chain) . soxeffect_ng(7) . (ENVIRONMENT) SoX . Unix : AUDIODRIVER=oss export AUDIODRIVER play_ng ... csh : setenv AUDIODRIVER oss Microsoft Windows: set AUDIODRIVER=waveaudio MS-Windows: Control Panel : System : Advanced : Environment Variables Mac OS X: Technical Q&A QA1067 Apple . AUDIODRIVER SoX ALSA OSS SUNAU AO ( << >>) . SoX SoX AUDIODRIVER . Unix: AUDIODRIVER=oss export AUDIODRIVER play_ng ... SoX coreaudio pulseaudio alsa waveaudio sndio oss sunau ao . soxformat_ng(7) . AUDIODEV : AUDIODEV=/dev/dsp2 export AUDIODEV play_ng ... sox_ng ... -t oss AUDIODEV=hw:soundwave,1,2 export AUDIODEV play_ng ... sox_ng ... -t alsa AUDIODEV oss SoX OSS_AUDIODEV . LADSPA_PATH LADSPA . SoX Unix /usr/lib/ladspa MacOS/X /Library/Audio/Plug- Ins/LADSPA . << >> LADSPA Ardour C:\Program Files\Ardour6\lib\ardour6\ladspa . LD_LIBRARY_PATH ( SoX ) . MIXERDEV 'v' 'V' . SOX_OPTS SoX . : SOX_OPTS="--buffer 20000 --play-rate-arg -hs --temp /mnt/temp" export SOX_OPTS SOX_OPTS SoX . SOX_OPTS SoX --no-clobber (alias) SoX . SOX_OPTS SOX_OPTS SOX_OPTS . TEMP TMP tmpfile() - - TEMP TMP . tmpfile() --temp . Unix --temp ( )..SH " (EXIT STATUS)" SoX 0 1 2 . (BUGS) SoX . (CITATION) SoX : Lance Norskog, Chris Bagwell et al. (2015). SoX: Sound eXchange, the Swiss Army knife of audio manipulation. URL http://sox.sourceforge.net BibTeX SoX : @manual{SoX2015, title = "SoX: Sound eXchange, the Swiss Army knife of audio manipulation", author = "Norskog, Lance and Bagwell, Chris and others", edition = "14.4.2", year = 2015, url = "http://sox.sourceforge.net", } (SEE ALSO) soxi_ng(1), soxeffect_ng(7), soxformat_ng(7), libsox_ng(3), audacity(1), ecasound(1), ffmpeg(1), gnuplot(1), octave(1), sndfile-convert(1). sox_ng https://codeberg.org/sox_ng/sox_ng SoX scripts/ SoX. (LICENSE) << >> (GNU General Public License) / . . GNU General Public License . (AUTHORS) Lance Norskog Chris Bagwell AUTHORS . SoX December 5, 2024 SOX_NG(1)