1 / 12

Java Beat Detection Program

Java Beat Detection Program. A Java Application Based on Eric Scheirer and Others. Sources. Tempo and Beat Analysis of Acoustic Musical Signals by Eric Scheirer Beat Detection Algorithms by Frederic Patin http://www.gamedev.net/reference/programming/features/beatdetection/

Download Presentation

Java Beat Detection Program

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Beat Detection Program A Java Application Based on Eric Scheirer and Others

  2. Sources • Tempo and Beat Analysis of Acoustic Musical Signals by Eric Scheirer • Beat Detection Algorithms by Frederic Patin http://www.gamedev.net/reference/programming/features/beatdetection/ • Beat This: A Beat Synchronization Projectby Cheng, Nazer, Uppuluri, Verret http://www.owlnet.rice.edu/~elec301/Projects01/beat_sync/beatalgo.html

  3. Program Input • Wav file • 8-bit • Mono • 22050 samples/sec

  4. Step 1: FFT • Performed on sliding frame of 1024 samples. • With each step, the frame moves forward 256 samples (so chunks overlap) • Resolution of 16.1 ms • Min frequency of 22.5 Hz

  5. FFT (cont.) • Frequency outputs are grouped into 9 bands • Varying sizes, as suggested by Patin • Different from Scheirer and Beat This web site • Use half-hanning window for smoothing

  6. Differentiation • Scheirer’s method for finding onsets in each band • For each band, at each frame, computeDiff[band][f] = BandData[band][f]-BandData[band][f-1]; • Half-wave rectify If(BandData[band][f] <0) BandData[band][f] = 0; • This gives a picture of sudden increases in each band

  7. Peak Finding • Start a few seconds into the recording (for comb filter, explained next) • Take a window of about 20 frames. • Sum frequency data across bands. • Consider the peak to be our first estimation of a beat

  8. Comb Filter • Alternate to autocorreclation described by Scheirer for finding periods of repetition. • I use a simplified method – seems to work better than Scheirer’s or Beat This.

  9. Comb Filter (cont.) • Given a starting time t, • For each band, b, and for every candidate period T:CF(T) = Diff[t] + Diff[t-T] + … + Diff[t-nT] • Sum results across bands • Maximum value is the new estimate for the music’s rhythmic period.

  10. Peak Finding + Comb Filter • When we find a peak at time t • Estimate period T starting from t. • Begin looking for a new peak in the neighborhood of t+T. • Repeat: find peak, find period, find peak, find period… until the end of the data.

  11. Results • St. Etienne • Chemical Brothers • Beethoven • Tito Puente

  12. Questions?

More Related