Get the pace of music or BPM?

I am currently creating a game in Windows Phone 7 using xna, I am trying to get a bit per minute from a song that is playing in the background, I am also not quite sure that what I want is BPM, what I want it’s something like tempo or tempo in music, faster than tempo, faster sprites moving. What I think now, BPM is how far the frequency of music falls into the range of a certain constant, for example, 20 MHz - 30 MHz, Feel free to correct me, if I am wrong, I am not very versed in audio things, I tried to use VisualizationData from MediaLibrary XNA, but after some search queries they said that VisualizationData does not work with WP7, I also tried this and the output of 256 floating point arrays contains 0 values, or if I can do a few fft with it, I will try Thanks .. .

+4
source share
1 answer

As you said, with regard to strikes, you cannot get it directly, but you will have to interpret this data . If you can personally project this music and send it with your title, this will be your best bet.

In XNA, you really have MediaPlayer.GetVisualizationData to work with. There is nothing in it that allows you to predetermine such things. It is used as follows and receives information about the different frequencies that play.

MediaPlayer.IsVisualizationEnabled = true; VisualizationData visData = new VisualizationData(); MediaPlayer.GetVisualizationData(visData); 

So, how do you perceive this frequency and make it useful for your application? There's a lot of discussion on how you can do this on the Hub forums in this thread called "Audio Analysis" in jwatte's answer . In essence, you will look at low frequencies and try to figure out when they are beating. Nothing is perfect, but I hope you get what you approve of.

Good luck

+3
source

Source: https://habr.com/ru/post/1382607/


All Articles