乐谱库
我是一名 Python 黑客,希望构建一个乐谱应用程序。我很擅长阅读/理解乐谱(弹钢琴多年)。这是我完整的新手问题。
是否有以数字方式表示笔记的标准?我不想重新发明任何轮子。
给定一系列音符和持续时间,是否有一个库可以以乐谱格式显示这些内容?
基本上我正在寻找一个开始的地方。我不太热衷于图形,所以现有的开源库会很棒。如果 Python 中不存在,我也能胜任 Java/Javascript/C。
谢谢
I'm a python hacker looking to build a sheet music app. I'm comfortable with reading/understanding sheet music (played piano for many years). Here are my complete newbie questions..
Is there a standard for representing notes digitally? I don't want to reinvent any wheels.
Given a sequence of notes and durations, is there a library for displaying these in a sheet music format?
Basically I'm looking for a place to get started. I'm not heavily into graphics, so a existing open-source library would be awesome. If none exists in Python, I'm competent at Java/Javascript/C as well.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
看看 lilypond。它使用 LaTeX 来排版乐谱。它的输入格式是简单的文本,并且可以使用 Python 或其他语言轻松生成。
Abjad 是一个“用于形式化分数控制的 Python API”,也是 lilypond 的包装器,但我还没有使用过它,所以不能保证它。
Take a look at lilypond. It uses LaTeX to typeset sheet music. Its input format is simple text, and can be generated pretty easily with Python or whatever.
Abjad is a "Python API for Formalized Score Control" and a wrapper around lilypond, but I haven't used it and so can't vouch for it.
据我所知, abc 表示法 是 仍然是传统/民间音乐界事实上的标准文本格式。有相当多的软件可用,包括abctool 和 abc2ly(GNU LilyPond 的一部分),两者是用Python编写的。作为一个自称为Python黑客的人,我想你可以毫不费力地将其中任何一个变成一个库。
As far as I know, abc notation is still the de facto standard text format in traditional/folk music circles. There is quite a bit of software available for it, including abctool and abc2ly (part of GNU LilyPond), both of which are written in python. Being a self-described python hacker, I imagine you could turn either of these into a library without much trouble.
可能不完全是你要找的东西,但是有一个名为 capella 的商业程序(来自一个小德国软件公司;也有英文版本)。它支持 MusicXML 格式,并使用 Python 进行脚本编写,因此您可以编写脚本来扩展其功能(不过,这已经相当令人印象深刻了)。
我因为 capella 才学了 Python。 (事实证明,我从未为 capella 编写过任何脚本 - 从来不需要 - 但这确实让我对 Python 感到好奇:))
Probably not exactly what you're looking for, but there is a commercial program called capella (from a small German software company; there is an English version, too). It supports the MusicXML format, and it uses Python for scripting, so you can write scripts for extending its functionality (which is already quite impressive, though).
I learned Python because of capella. (Turns out I never did write any scripts for capella - never needed to - but it sure made me curious about Python :))
我假设您听说过 MIDI (它不仅仅包含音符和持续时间,而且还包括是一个以数字方式表示音符的标准)。
我建议您查看 音乐中的 Python Python wiki 页面中列出的乐谱程序,看看您是否可以在推出自己的应用程序之前扩展或为这些应用程序做出贡献。
I assume you've heard of MIDI (which encompasses far more than simply notes and durations, but which is a standard that represents notes digitally).
I recommend looking at the Music Notation programs listed in the Python in Music Python wiki page and seeing if you can extend or contribute to those applications before rolling your own.