使用字符串匹配算法或动态编程对齐音符

发布于 2024-09-04 17:36:28 字数 409 浏览 3 评论 0原文

我需要比较 2 组音乐作品(即以 MIDI 格式拍摄的演奏 - 提取并保存在数据库表中的音符详细信息,与采用 XML 格式的乐谱)。当根据乐谱评估演奏时(即音符细节 - 音高、持续时间、节奏),需要进行音符对齐 - 以识别参考(乐谱)音符中遗漏/额外/不正确/交换的音符。

我在一首乐曲中大约有 1800-2500 个音符(甚至可以更多——复调,现在我正在做单音)。那么我必须将所有这些放入一个数组中吗?会不会是内存超载或者栈溢出?

有 KMP、Boyce-Moore 等字符串匹配算法。但音符对齐也可以通过动态编程来完成。我如何使用动态规划来解决这个问题?有哪些可用的算法?与近似字符串匹配有关吗?

哪种方法更有成效?像 Boyce-Moore 这样的字符串匹配算法,或者动态规划?我如何评估哪个更有效?

非常感谢任何见解或建议 提前致谢

I need to compare 2 sets of musical pieces (i.e. a playing-taken in MIDI format-note details extracted and saved in a database table, against sheet music-taken into XML format). When evaluating playing against sheet music (i.e.note details-pitch, duration, rhythm), note alignment needs to be done - to identify missed/extra/incorrect/swapped notes that from the reference (sheet music) notes.

I have like 1800-2500 notes in one piece approx (can even be more-with polyphonic, right now I'm doing for monophonic). So will I have to have all these into an array? Will it be memory overloading or stack overflow?

There are string matching algorithms like KMP, Boyce-Moore. But note alignment can also be done through Dynamic Programming. How can I use Dynamic Programming to approach this? What are the available algorithms? Is it about approximate string matching?

Which approach is much productive? String matching algos like Boyce-Moore, or dynamic programming? How can I assess which is more effective?

Greatly appreciate any insight or suggestions
Thanks in advance

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

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

发布评论

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

评论(1

知你几分 2024-09-11 17:36:28

有趣的问题 - 我认为这篇论文涵盖了您的很多内容他们解决了错误和音乐对齐问题,并使用 DP 作为求解器讨论了他们的结果。他们引入了一种称为“快速近似匹配”的算法,并声称该算法比 DP 方法更好。

看起来搜索中使用的关键作者是 Mongeau 和 Mongeau。桑科夫。看来他们的原始论文引发了这一领域的大量工作。

整洁的东西。希望这有帮助。

Interesting question - I think this paper covers a lot of what you're interested in. They address the issue of errors and music alignment and discuss their results using DP as a solver. They introduce an algorithm called "fast approximate matching" which they claim is better than the DP approach.

It looks like the key authors to use in a search are Mongeau & Sankoff. It would appear that their original paper set off a lot of work in this area.

Neat stuff. Hope this helps.

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