Re: How would i go about making a BPM calculator in python?

Hi,
if I was doing this myself, I would make something like following algorithm:
1. create a list of ints, in Python simply list.
2. Each space press, add the time passed since last press to the list.
3. Calculate the average value of the list to get average time passed between each hit.
4. Divide one minute by this average. Use the same units for both values i.e. if the average time is in milliseconds, use 60000.0/The average time.

Of course there are things that could be done to make this algorithm smarter e.g. exclude values much larger than average as mistakes, calculate bpm for each hit and then take the most frequentone, you can try them out and see how it will work.

Best regards

Rastislav

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : roelvdwal via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : roelvdwal via Audiogames-reflector

Reply via email to