Python中最简单的方法是通过更长的顺序检测单个音频文件的时间放置?
因此,确实让我对DAW Ableton Live感到困扰的事情是,它无法用节奏导出MIDI文件,这意味着不可能为一首歌而改变速度的歌曲创建可导出的节奏映射。但是,我可以轻松地对自己进行“节拍器”示例并将其作为音频文件进行排序。
因此,我想做的是在节拍器的简短样本中喂食这个长期渲染的节拍器波文件,找到每次点击的位置,然后自动生成一个带有bpm的MIDI轨道,并从该轨道上解释了SIG的变化。文件。
目前,我的愚蠢方法只是扫描第一个非零示例,创建事件,等待另一个零示例,然后重复直到文件完全读取。这可以正常工作,因为输入与单击相互切割,但是如果我可以检测到代表测量启动或第八笔记的不同声音,这样我也可以正确地检测到仪表会更好。
对最简单的进口方法的最简单方法有什么想法吗?只需要一个带有最小依赖性的轻量级脚本来制作克隆英雄图表。
So something that really bugs me about the DAW Ableton Live is that it cannot export MIDI files with tempo, meaning it's impossible to create an exportable tempo map for a song that changes speed throughout. But I am able to easily sequence a "metronome" sample myself and render that out as an audio file.
So what I'd like to do is to feed this long rendered metronome wave file in, alongside the short sample of the metronome, find the placement of every click, and then auto generate a midi track with bpm and time sig changes interpreted from the file.
Right now, my dumb approach is just to scan for the first non-zero sample, create the event, wait for another zero sample, and repeat until the file is fully read. This works ok because the input is silence inter-spliced with clicks, BUT it'd be nicer if I could detect different sounds that represent measure start or an eighth note division so I can also properly detect meter.
Any thoughts on the simplest way to do this with minimal imports? Just want a lightweight script with minimal dependencies to make clone hero charts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如Dankal444所述,可以使用称为相关性的信号处理技术来完成。计算两个信号的相关性将创建一个新信号,该信号具有两个信号匹配的峰值。这是使用Scipy和Numpy的示例。
This can be done with the signal processing technique called correlation, as dankal444 mentioned. Calculating the correlation of two signals will create a new signal that has peaks where the two signals match. Here is an example using scipy and numpy.