Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Something similar to Audacity "Plot Spectrum" export to txt? (Read 5956 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Something similar to Audacity "Plot Spectrum" export to txt?

*If this is the wrong forum, please move for me... I wasn't sure what was best.

So, I thought I was good at using google but this has been really frustrating. Audacity can plot a spectrum for 237 seconds or some figure like that, and has the ability to export this as a simple txt file with Frequency - dB numbers. The problem being that I need something without a time limit that can do this for a longer sound. (Why the limit anyway? I'm not an engineer so I don't know about this stuff)

The idea being that I'm looking to create a website that has comparisons of different versions/masterings of CDs. I've been looking hard for a program that'll simply read in a WAV file and allow me to spit out a txt file (or anything similar) like the one Audacity is capable of generating, but I'm having absolutely no luck.

I have a VST plugin, "Voxengo CurveEQ" which comes with a utility to "capture" a WAV file spectrum for use in EQ matching. The resulting file isn't big but seems to be in an arbitrary format and it's no use to me. But this little utility is capable of reading in a 40 minute WAV file in less than a minute, so... I don't know why this is such an issue for me!

Does anyone know of a program with this kind of function? Or am I better off trying to modify Audacity source to remove the hard limit?

Something similar to Audacity "Plot Spectrum" export to txt?

Reply #1
SoX stat --freq will print the results of a N=4096 DFT, but is apparently restricted to a single channel, so you'll need to downmix stereo files before processing. SoX also prints out a ton of other useful information besides, so even if N=4096 is a tad too small, you might want to go down that route.

Something similar to Audacity "Plot Spectrum" export to txt?

Reply #2
Just remove the header, SoX can do that, and read the PCM data directly from your web app. It is just a sequence of numbers: 16 bit left channel, right channel, left channel, right channel, etc. This is even easier than interpreting text data.

 

Something similar to Audacity "Plot Spectrum" export to txt?

Reply #3
Do you mean remove the header of the WAV?

I tried to use the stat -freq function of SoX, and regardless of stereo or mono it just seems to output to the console endlessly. If it were capable of simply outputting the final result (and if I could use a resolution greater than 4096) it would probably be the perfect solution as I could just have users download an archive containing sox and a batch file that'll print the result for every WAV file in a directory.

I don't know enough on how to integrate sox into a web app... if I were to do that it would have to be something that can access files on a user's HDD from within the browser, and only send back the resulting text or numbers.

Thanks for the help guys I appreciate it.