在 python 中播放歌曲时更改歌曲的 bpm

发布于 2024-09-29 07:25:45 字数 1435 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鹿港小镇 2024-10-06 07:25:46

这里有几个不同的部分,每个部分都需要解决。它们都不是微不足道的,需要大量的信号处理知识,因此您可能需要寻找库来处理这部分繁重的工作。

  1. 心跳检测。这超出了我的知识范围,但我们假设您可以以某种方式访问​​它。

  2. 音乐节拍检测 有多个库可用于此目的,包括商业库和开源库。您可能需要查看 http://aubio.org/ ——它已经有可用的 python 绑定。

  3. 节奏更改 - 一旦您知道了目标 BPM 和当前 BPM,您就需要另一个库来更改音轨的节奏以进行匹配(而不改变音调)。一些值得一看的是橡皮筋SoundTouch

谷歌搜索会找到用于这些操作的其他库(以及您需要的其他部分,例如用于打开和播放声音的 PyMedia 等)

There are a few different pieces here, each of which needs to be solved. None of them are trivial and require a decent amount of signal processing knowledge, so you'll probably want to look for libraries to handle that part of the heavy lifting.

  1. Cardiac beat detection. This is outside my area of knowledge, but let's assume that you can access this somehow.

  2. Music beat detection There are several libraries available for this, both commercial and open source. You may want to look at http://aubio.org/ -- it already has python bindings available.

  3. Tempo Change -- Once you know the target BPM and the current BPM, you need another library that can be used to change the tempo of your audio track to match (without changing the pitch). A few to look at are Rubber Band and SoundTouch

Googling will find other libraries for these manipulations (and other pieces that you'll need, something like PyMedia to open and playback the sounds, etc.)

人心善变 2024-10-06 07:25:46

也许有一款软件可以让您使用另一个输入来控制某些正在进行的音频的节奏,那就是“Puredata”——

它是一个非常完整、虽然复杂的基于节点的软件,旨在处理来自视觉节点连接的各种多媒体转换——但也可以通过 Python API 进行编程

http://crca.ucsd.edu/ ~msp/Pd_documentation/index.htm

Python 绑定:

http://mccormick.cx/projects/PyPd /

maybe one piece of software that can allow you to control the tempo of some ongoing audio using another input is "Puredata" --

It is a very complete, although complicated, node based software aimed to deal with various multimidia transformations from visual node connections - but it can also be programed through a Python API

http://crca.ucsd.edu/~msp/Pd_documentation/index.htm

Python bindings:

http://mccormick.cx/projects/PyPd/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文