0

i want to analyze multiple mp3 files and get the bpm of the files. Therefore i'm using soundstretch. At first i'm converting the mp3 files using sox

sox -t mp3 -r 44100 -c 2 file.mp3 -t wav file3.wav

after this i want to analyze the track with soundstretch

soundstretch file.wav -bpm

this also gives me the result in the console. But i'm not able to redirect the printed response to a file. i already tried stuff like

soundstretch file.wav -bpm > file.mp3.bpm
soundstretch file.wav -bpm 2>&1 > file.mp3.bpm

the only result is, that the messages are displayed in the console and there is a empty file

simon
  • 3,378
  • 2
  • 22
  • 32

2 Answers2

1

Switch it around if you want one file

soundstretch file.wav -bpm > file.mp3.bpm  2>&1

or use two file two files:

soundstretch file.wav -bpm 2> file.mp3.err > file.mp3.bpm
Gabriel Littman
  • 552
  • 3
  • 13
  • Basically > goes to stdout and 2> goes to stderr. Actually in your case it looks like there is not stdout since you had an empty file and could just redirect stderr alone. `soundstretch file.wav -bpm 2> file.mp3.bpm` – Gabriel Littman Jan 07 '14 at 20:16
  • soundstretch file.wav -bpm 2> file.bpm - thanks didn't notice that everything is responded via error – simon Jan 07 '14 at 20:19
-1

I think you should use the soundstretch as

soundstretch inputFile outputFile options

ex. : soundstretch Sample.waw out.txt -bpm

Tlos
  • 151
  • 1
  • 12