获取音乐速度或BPM? [英] Get music tempo or BPM?

查看:421
本文介绍了获取音乐速度或BPM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在建立一个游戏的Windows Phone 7使用XNA
我想要得到的歌曲,在背景歌曲,
I也不太清楚,如果我想的是打每分钟打BPM,我想要的是像步伐或音乐节奏,更快的步伐,更快的精灵正在移动。我在想什么,现在,BPM是从音乐的频率多少打了一系列定义的常量,比如20兆赫 - 30兆赫,
随意纠正我,如果我错了,我不是真的熟悉音频的东西,我一直在使用VisualizationData从MediaLibrary XNA尝试过,但经过一番google搜索他们说VisualizationData不与WP7的工作,我也有尝试过了,输出为256长度float数组包含0值,,还是我可以做一些FFT有了它,我会试试看
谢谢...

I'm currently building a game in windows phone 7 using xna i'm trying to get beat per minute from song that played in background song, i also not quite sure if what i want is BPM, what i want is something like pace or tempo in music, faster the pace ,faster the sprites is moving. What i'm thinking right now, BPM is how much a frequency from music hits a range of defined constant, e.g 20 Mhz - 30 MHz, Feel free to correct me if i'm wrong, i'm not really familiar with audio thing, i have tried using VisualizationData from MediaLibrary XNA, but after some googling they said that VisualizationData doesn't work with WP7, i also had tried it and the output is 256 length float array contains 0 value,,or if i could do some fft with it,i'll give it a try Thank you...

推荐答案

你一样在说,作为拍你不能直接得到它,但你要解释这个数据即可。如果你能亲自预处理这种音乐并与您的标题出货这将是你最好的选择。

Like you were saying, as for the beats you can't get it directly but you'll have to interpret this data. If you personally can preprocess this music and ship it with your title it would be your best bet

在XNA你真的只拥有的 MediaPlayer.GetVisualizationData 一起工作。没有内置,可让您预先确定这样的事情什么。它使用类似下面,并让你有关正在播放的不同的频率信息

In XNA you really only have MediaPlayer.GetVisualizationData to work with. There isn't anything built in that allows you to predetermine this sort of thing. It's used like the following and gets you information about the different frequencies that are playing.

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



那么,你如何利用这个频率的东西,使它值得您的应用?还有的你如何能做到一个很好的细分这是在应用程序中心论坛在此线程由jwatte 回复称为音频分析。从本质上讲,你要看看低频和揣摩的时候拍的都来了。没有完美,但希望你会得到你同意的东西。

So how do you take this frequency stuff and make it worthwhile for your application? There's a great breakdown of how you can do this that's on the App Hub forums in this thread called "Audio Analysis" in the reply by jwatte. Essentially, you're going to look at the low frequencies and try to figure out when the beats are coming in. Nothing perfect, but hopefully you'll get something that you approve of.

祝你好运!

这篇关于获取音乐速度或BPM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆