Musical onset detection approach I'm working on a real time beat detection algorithm. The first step, I believe, is to detect onsets (sudden volume increases). Then, in simplified terms, I can correlate these to find the tempo and use the strongest onsets to guess the beat position.

Say we are reading the audio in with 20ms chunks. My first guess was to just subtract the volume of one chunk from the previous one. The "volume" for a chunk would be a sum over the absolute value or squared signal, or maybe just the peak value (not sure which approach would be best). Then I can threshold these values to find the biggest volume changes.

To my surprise, according to papers like these (page 3) it seems that we often do onset detection by splitting into frequency ranges. For each audio chunk, they get the power for each of 7 frequency ranges, and compare it to the power of the previous chunk at that frequency (and the two neighboring frequency ranges), taking successive differences.

Then we have onset strengths, i.e. changes in power, for the 7 distinct ranges. And sum them back up across frequency to get the overall onset strength for that time.

Why is this done instead of just using the signal (no FFT required)? This seems to me to be just deconstruct and reconstruct the same information. The only thing I can think of is that the intermediate information of the power at different frequencies could be useful (isolating a kick drum, etc.)
Your question is really quite broad. 

In a nutshell, if you think of the "successive differences", called spectral flux, understood per frequency range you can start to generalize to different kinds of music where maybe the kick drum is not present but the other instrumentation is sufficient to conclude that there is still on onset. One can also better measure the "strength" (loudness) of an onset, which is useful for algorithms processing onsets to conclude something at a higher rhythmic level (meter, phrasing, other groupings)

There's a lot of literature &amp; code out there to try:


Look into MIREX publications and datasets
Try out code on github (https://github.com/CPJKU/SuperFlux, https://github.com/search?utf8=%E2%9C%93&amp;q=onset+detection&amp;type=Repositories&amp;ref=searchresults, https://github.com/adamstark/Beat-Tracking-Evaluation-Toolbox)
Play with Beatseeker (https://www.ableton.com/en/packs/beatseeker/)