We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
用计算机进行音乐创作和分析是一个巨大的领域。这类工作有两个基本领域,有些重叠。
很多很多库、工具和专门的编程语言 的存在可以帮助解决这些问题的不同部分。以下是与音乐相关的Python 程序和库的列表。有很多可用的技术;您应该能够找到可以为您完成主要工作的东西。通过非常低级的频率分析工具(例如傅立叶变换)重新实现“音乐解析器”,如其他答案表明,虽然可能,但会相当困难,而且几乎肯定是不必要的。
如需进一步的建议和具体问题,国际音乐信息检索协会有一个邮件列表,您可能会找到非常有帮助。
Composition and analysis of music by computer is a huge field. There are two basic areas in this type of work, which overlap somewhat.
Many, many libraries, tools and specialised programming languages exist which can help with different parts of these problems. Here's a list of music-related programs and libraries for Python. There is a lot of technology available; you should be able to find something that will do the brunt of the work for you. Reimplementing a 'musical parser' through very low-level frequency analysis tools such as Fourier Transforms, as other answers have suggested, while possible, will be quite difficult and is almost certainly unnecessary.
For further advice and specific questions, the International Society for Music Information Retrieval has a mailing list which you would probably find very helpful.
一旦您了解了 Lennart 提到的 FFT 内容,您可能想看看用于分析音符之间的间隔和聚合模式的马尔可夫链。
这是一种踩过的地方,但过去马尔可夫链已被用来构建一种来自各种歌曲的旋律的统计模型,可用于生成新的旋律。马尔可夫链可以对书面英语句子做同样的事情。举个例子来看看它看起来如何,与 megahal 聊天机器人一起玩,看看马尔可夫链如何产生在统计上看起来像其输入的混乱输出(在 megahal 的情况下,它看起来像英语句子)
你可以想象地混搭前 100 个,并让马尔可夫链发生器爆炸出下一个大热门。
另一方面,您可能需要考虑这样一种可能性:并不是音乐本身的任何质量使歌曲流行。或者也许是音乐质量问题与营销相结合。
Once you get past the FFT stuff that Lennart mentioned, you might want to have a look at Markov chains for analyzing intervals between notes, and aggregated patterns.
This is kind of treaded ground, but Markov chains have been used in the past to build a kind of statistical model of melodies from various songs which can be used to generate new melodies. Markov chains can do the same with written english sentences. For an example of how that looks, have a play with the megahal chatterbot to see how markov chains can produce mangled output that statistically looks like its input (in megahal's case, it looks like english sentences)
You could concievably mash up the top 100, and have a markov chain generator blast out the next big hit.
On the other hand, you may want to consider the possibility that it is not any quality of the music itself that makes a song popular. Or perhaps it is a quality of music issue combined with marketing.
要分析声波,您需要某种傅里叶变换 (fft),这样您就可以将歌曲分解为其频率以及它们如何随时间变化。 numpy中有fft支持,我没有使用过,所以我不知道它是否有好处。但这将是一个很好的起点。
之后你需要对频率和模式进行某种统计分析,然后我就不再知道我在说什么了。
很酷的东西,尽管去做吧!
To analyze soundwaves you need some sort of fourier transformation (fft), so you can split the song up into it's frequencies and how they change over time. There exists fft support in numpy, I haven't used it, so I don't know if it's any good. But it would be a great place to start.
After that you then need to make some sort of statistical analysis on frequencies and patterns, and then I no longer have any clue what I'm talking about.
Cool stuff though, go for it!
您可能想从查看 MIDI 格式开始,与压缩格式相比,它相当简单,并且您可以在其中生成一些不错的东西。
取决于你真正想做什么。
You may like to start by looking at the MIDI format, it's reasonable simple compared to the compressed formats, and you can generate some nice things in it.
Depends what you want to do really.
Echo Nest remix API 可让您在 Python 中分析和操作音乐。这里有一些例子:战俘在哪里和这里:你让我量化了莉齐小姐。这里有一个很棒的教程:Echo Nest API 概述
There's the Echo Nest remix API that lets you analyze and manipulate music in Python. Some examples here: Where's the pow and here: You make me quantized miss lizzie. There's a nifty tutorial here: An overview of the Echo Nest API