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

Audio signals are not sparse at all, unless you are using a definition of “sparse” that I’m unfamiliar with. I also don’t understand your complaint about the looping point, or window size.

If you don’t understand how autocorrelation works, I can provide some pseudocode to demonstrate the technique. This is not an esoteric or unusual way of finding a looping point.



I might be misusing "sparse". What I meant was that in a sufficiently high sample rate music, there are a lot of samples between notes and a lot of the samples are noise and garbage.

I do understand how autocorrelation works, to a reasonable degree. And that is the reason for the DFT. We are talking music, so we care about the frequencies more than about the immediate sample value.

And the window is important because autocorrelating over individual data points is useless, sound signals are noisy and you get a lot of randomness.

Also, I tried the code provided on a few pieces I thought would be appropriate and it didn't do a very good job. I might run a few experiments.


> We are talking music, so we care about the frequencies more than about the immediate sample value.

The frequencies and the sample values are just two different ways at looking at the same data.

> And the window is important because autocorrelating over individual data points is useless, sound signals are noisy and you get a lot of randomness.

I’m not sure what you mean by “individual data points”. The autocorrelation is computed for an entire signal, not for any individual data point. Talking about an individual data point in the input doesn’t make much sense.

Autocorrelation is not especially susceptible to noise.

> Also, I tried the code provided on a few pieces I thought would be appropriate and it didn't do a very good job. I might run a few experiments.

Try doing just a simple autocorrelation instead. This will work for the use cases described (looped samples of music), you will see a large spike in the autocorrelation for the loop point.

For music which repeats but is not looped, you can do some preprocessing e.g. to find envelopes and do autocorrelation on that.


> you will see a large spike in the autocorrelation for the loop point

Why? All I can hope for is to pick the max autocorrelation value, but why would I see a spike?


That is the exact intended purpose of the autocorrelation




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

Search: