This question was originally posted on StackOverflow, where it was suggested it belongs on audio.SE. I don't see a [signal-processing] tag on audio.SE, and this is definitely a signal processing question. Can someone with sufficient rep add this tag?