Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sox is amazing.

I used it about 10 years ago to take raw audio of paintball guns shooting and help pre-process said audio for analysis of shots per second.

It was great for a bunch of reasons:

- it could so a frequency analysis to show me which frequencies were present in the audio

- I figured out there was the frequency of the sound when the ball left the barrel but also a frequency for the gun's firing mechanism

- I could then do a bandpass on just the frequency of the ball leaving the barrel

- It then let me convert the audio to a numerical format that made analyzing the peaks and valleys much easier in Perl

- The end result was I could accurately calculate shots per second given just a raw recording and some processing time



I used it to diagnose a funny noise on my car, by recording the ambient sound in the cabin with my phone - velcroed to the dashboard with its microphone pointing down at the gearbox tunnel - and announcing my speed when the noise was particularly pronounced.

Then I used sox to extract loud but low frequencies, and since I could hear it correlated with road speed I was able to verify that it was a particular bearing in the front propshaft by working out the relationship of frequency and gear ratio.

All without crawling underneath and getting oily!


The amusing thing about that for me is that, as someone with perfect pitch, I've used the pitches made by failing components in my car for diagnostic purposes without even thinking about the fact that most people can't do that without technological help. It's just... you know what pitch it is and therefore how fast it's moving/rotating/oscillating. Everyone knows that about everything they hear. Right?

Makes me wonder how many lived experiences I take for granted that are totally different for others, and likewise the lenses through which others see the world that I would never imagine.


As a musician, I'm glad I don't have "perfect pitch". It would be impossible to play with any other musicians!


I would love to see a video of how exactly you did this. Nice work


It's sad that if we have one option we're comfortable with we might never find another that might serve us better. I'm a coder and a command line fiend but I've been using Audacity all these years and somehow managed to never stumble across Sox.

Completely aside, I think what you describe is going to soon be considered an arcane art - I fear "machine learning" is going to be the catch-all to describe what is really just pure math.


Machine Learning = we learned how to make the machine do what we wanted


I'll have to check it out!

In the past for commercial audio analysis, I've used ArtemiS Suite from Head Acoustics for similar requirements. It would trivially do all of those things, including the Perl (well, what the Perl did).

I think it's really fascinating from a UI perspective, the multi-column separation of the project, audio files, analyses (chained back to other analyses where appropriate), graphics, and report generation makes it really flexible. Rather than pointing and clicking through a wizard each time you want to accomplish something, or up-arrowing in the command line to a previous entry, you set up a pipeline to accomplish that thing and then iterate the pipeline intake over all your inputs and it spews the outputs you need. And all that from an intuitive GUI with lots of graphical feedback, rather than a command line with more difficult discovery of features.

It changes your activity from executing commands one after another to engineering a script to execute those commands automatically, you almost can't help but make something reusable.

Tragically, it's locked behind a 4- or 5-figure license cost. Not a big deal when you're using it for testing automotive products, but not exactly accessible for paintball hobbyists.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: