NEW FEATURE: BPM detection and analysis of many files at once

Bug #326568 reported by enry on 2009-02-07
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Wishlist
Albert Santoni
Nominated for 2.3 by Hans Jakobsen

Bug Description

It would be useful such a feature:

1) Select multiple files in library
2) Right click

A menu entry "BPM detect" for all selected tracks should be available. It should analyze all selected tracks, displaying BPM values and creating summary waveforms. User could ba asked for BPM scheme to be used.

While this activity is in progress, a popup window should come out to give user the possibility to stop it.

ironstorm (ironstorm-gmail) wrote :

There actually is a very crude implementation of batch bpm detection in trunk that is turned off.

There were a number of issues with it, firstly it's sloooooooow (BPM detection is really slow to start and it thrashes the disk a lot, repeat by 1200 songs for an hour of joy... :D), secondly mixxx can be crashed by songs that are corrupt/not really songs (this tended to happen a lot when it was first added, we might have better handling now) -> the chances of finding such a corrupt file in a large library seem to be fairly high and finally you need to prevent people from doing this while Mixxx is playing otherwise it will most certainly lead to skipping or a crash during a performance.

When it crashed during detection you lost everything up to the last save (which was the last start of Mixxx, so all your bpms that you just detected), so for that reason it was arbitrarily limited to doing 100 tracks at a time before it would stop and save the library, and the user could start it again.

If you want to play with it and have a go at adding a nice progress dialog (probably not too hard, look at the library scanner for an idea of how to do it), then you could ditch the 100 song limit for 1 run (though it would still be a good idea to save the library periodically)... Here are the relevant bits (search for batch)

$ grep -in batch *
mixxx.cpp:439: batchBpmDetect = new QAction(tr("Batch BPM Detect (up to 100 songs per run)"), this);
^- menu entry
mixxx.cpp:598: //libraryMenu->addAction(batchBpmDetect);
^- with this line commented out it does not get added to the menu

track.cpp:1408:void Track::slotBatchBPMDetection()
^- main method for processing tracks
track.cpp:1436: if (processed == 100) { qDebug() << "----- BPM detection/Waveform generation batch processing limit of " << processed << " songs has been reached. Rerun to detect more songs."; break; }
^- stop after 100 songs with blank/null BPMs have been processed this will also trigger a library save.

Cheers,
-G

ironstorm (ironstorm-gmail) wrote :

Oh and one more gotcha, if you find a track in your library that crashes Mixxx. There is no way to remove it from Mixxx's library. You can delete the file from the location on disk (Mixxx shouldn't crash anymore), but you can't actually remove the entry from the library table.

If you delete it from the raw XML you will bugger the sequence numbers and your library will be entirely rescanned and the bad file (if you didn't physically remove it from your music lib folder) will be re-added.

Albert's going to replace the library back-end eventually, and that will resolve that particularly issue. :D

Changed in mixxx:
importance: Undecided → Wishlist
Hans Jakobsen (hansjakobsen) wrote :

I would just like to add that this missing feature makes Mixxx unusable for me. I have a library of several thousand songs, there has to be a reliable automatic BPM detection. I can not start the BPM detection for every single song. Maybe make a crude command line option, but there has to be some way to use this, otherwise Mixxx is unusable with large libraries.

hiend (hippako) wrote :

Why would you like to scan all song at once when 1.7.0 automatically detects BPM when you play the song?

Hiend: So a DJ can sort songs by BPM ahead of time to make track selection easier.

Albert Santoni (gamegod) wrote :

Bulk BPM detection will be possible in 1.8.0 via the Analyze view in the library.

Thanks guys!
Albert

Changed in mixxx:
assignee: nobody → Albert Santoni (gamegod)
milestone: none → 1.8.0
status: New → Fix Committed
RJ Skerry-Ryan (rryan) on 2010-10-05
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers