BPM (beats per minute)python script

Please can somebody help me with this script for gameengine…??? i wan to detect bpm from playing mp3 or wav or only from playng track from inserted cd…becouse i am not very skilled in python i want this bpm number in some property et the end…more data then bpm will be welcomed!!! i wan to make similar game as vib ribbon…thx MUCH

That’s a pretty tall order. It also involves a different discipline in programming than most gamers are used to: sound manipulation. I have an idea of how to start, but it would probably take a long time, at least for me, to hammer out the details. I think if you really want to do this you are going to have to hit the books and learn to code this yourself. It can be done. That or wait for someone else with the same interest and more experience to release a dev tool. :frowning:

maybe this can help to me??? http://adion.djdecks.be/vb/bpmdetect/ Sorry but i am not a programator:( And what this… some little external application which will detect bpm of hole cd and it will write it in some text file and than blender will read it and it will be used as property???

That definitely might help. I’ll have to look into it. Thanks for sharing.
Just because you aren’t a programmer now doesn’t mean you can’t start. Python can interface with C/C++ which makes it an excellent place to start.

i wanted to be programator many times…but every time i failed…becouse my proffesion is artist…my thinking is more abstract then matematical:)) if you will hellp me i can help you with some graphic…or i can pay you …this project is important to me…Imagine that you insert your favourite music and play some arcade game in tempo of your music…maybe arcade game…maybe some abstract … AND BETTER…if it will be possible to detect BPM live from line in or mic…!!!like in winamp … and what do you think about my second resolution with external program

You realize that the library you listed requires that you get permission before you can use it right?

Yes…it cant be problem i think…so can you help me please??? you can take it like i normal works contract and and i will pay you if you want

I can’t guarantee anything, but you’ve peeked my interest. I’ll poke around with it and see what I come up with. If there is anyone else with more experience who wants to give this a shot feel free to jump in. I won’t be offended.
Also, it might be a while. I’ll post here if I make any progress ok?:slight_smile:

ok THX MUCH !!!

There are problably external programs that do this and might be able to generate text/data files for your use.

One that I know of, and is very intereting is Houdini, a very high end 3d app. You can download the apprentice version from sidefx.com. (It’s 99% (or so :slight_smile: ) functional, restriction on render size (640x480) and a watermark on rendered images.)

As part of it’s “CHOPS” (channel operators), Houdini has operators for working on sound files / extracting information etc.

This file
http://www.stickylight.com/public/houdini-hacker/FrankFirsching/

is a very neat example, where it reads in a .wav file, analyzes the beats and connects the output to a “dancing man”. I know that Houdini can write out animation channel information in text format, so this file might be used as a head start.

Then again, Houdini is a monster app, and it might take the same amount of time to code it in Python from scratch :slight_smile:

Mike

I have new idea!!! i need a program which detect bpm live from sound…like in winamp visualisatnion but it will press a keys in rythm of bpm…then i will only map functions to the keys in blender???

If you are pretty good with blender download the dancing dude on this page
http://www.bentstraight.org/tutorials.html
and see if you can use it. I can only get it working with 2.25
But it is fun.
It analyses the sound and behaves like a spectrum analyser 20Hz to the left, then 40Hz, 80Hz etc. Perhaps you could average this data, see how many peaks you are getting per minute then display that on the screen.
Have Fun
Dave (Dr S)

I did make some head way with this but only if you are willing to scan the songs first and access their bpm from a text file. I haven’t found a program that will out put the bpm in real time. Python sound is so far very limited.
It is possible to modify existing open source non-python programs, but they have to be modified to work with python and then compiled. That can be a long process for a person of my limited skill.
For dj use it would probably be easier to write a small script to allow the dj to tap out the speed. Otherwise you have to find a library that allows you to get the level at a given time in the song and then analyze whether or not it is a beat pattern then measure the time between such patterns. That or just have the level at a certain volume trigger an event.

i found something about spectral analyzer script …maybe it is right way???

and what this??? http://www.speech.kth.se/snack/ “Real-time visualization/spectrum analysis.”
i think this can be very helpfull…

Well, you still won’t be able to analyze the BPM with ‘snack’. It just analyzes the waveform (the bumps and dips, like on a vinyl record). You would have to write the BPM-finding stuff yourself.

maybe bpm is not necessary for my concept…i woud like to create for example rythm game like vib ribbon…so i want showing some objects when wave of sound is up or down …is it problem to programate relationship between position of wave,better in different positions of HZ, and creating or modifying object in gameengine???