It's quite a common feature in audio programs. Press a key/button in time with the music for a few seconds, work out the BPM from that and then run everything following at that BPM.
It's not difficult. Just measure the time between button pushes, calculate an average over some period (2 or 3 seconds is usually enough) and set the BPM accordingly. It's usually set up so at any time you can have another go and reset the program BPM.
Give it a try.
Steve