I’ve been in quite an audio mood these days (also a “finding an apartment” mood, but hopefuly that’s over). I’m working on porting an old audio analysis tool I once wrote in C to Java (my current main programming language, allowing me to work much faster). I think there are a lot of simple things about audio that many people don’t know, and thus a lot of wasted potential – my initial motivation for learning about audio was the dream of making a guitar-hero-like game, but using a microphone and an actual guitar, which I still think is possible and one day perhaps will happen. For now, here’s a little introduction.
Before starting working on it, I had no idea what audio was, and I was quite surprised to find out how simple it actually was – every sound we hear is just a certain sequence of changes in air pressure, which objects around us cause when they move. After turning into a digital input (using a microphone), what we have is simply a sequence of numbers. Much like the images we see can be translated to a two-dimentional array of numbers representing the color in each location, sound can be translated to a one-dimentional array of numbers representing the air pressure at each point in time.
It would have made sense now to learn about how different sound are made, how what we hear and understand corresponds with those sequences of numbers. But I like to be able to check things myself. It’s nice to read how a guitar works, but wouldn’t it be much nicer to see for myself?
Thus I wrote this little thing that takes a wavefile and shows it on a graph. I tried it with several musical instruments I had in my house, and came to the conclusion that the harmonica was the prettiest. Here is what the sound of a harmonica looks like:
More on what that means and how to go on from there, in some later time.