windows 用于绘制音符的库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/670906/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Library for drawing musical notes
提问by erikkallen
I'm looking for a Windows library that can draw musical notes on the screen in some way. I'm going to use it to write an app in C#, but a pure Win32-based solution is good enough. Does anybody know of any such library?
我正在寻找一个可以以某种方式在屏幕上绘制音符的 Windows 库。我将使用它来用 C# 编写应用程序,但纯基于 Win32 的解决方案就足够了。有人知道任何这样的图书馆吗?
Edit: I'm going to update the notes in real-time, and they need not look incredibly fancy.
编辑:我将实时更新笔记,它们不需要看起来非常花哨。
采纳答案by Jacek Salamon
You can try that:
你可以试试:
http://www.archiwistykamuzyczna.pl/index.php?article=download&lang=en#psamcontrollibrary
http://www.archiwistykamuzyczna.pl/index.php?article=download&lang=en#psamcontrollibrary
It's a simple library written in C# for displaying notes. It is limited to only one stave but it supports many voices on one stave. The input format is MusicXml but you can add notes programatically too.
这是一个用 C# 编写的用于显示笔记的简单库。它仅限于一个谱表,但它支持一个谱表上的多个声音。输入格式是 MusicXml,但您也可以以编程方式添加注释。
Here is an article about PSAM Control Library on CodeProject: http://www.codeproject.com/KB/miscctrl/psamcontrollibrary.aspx
CodeProject 上有一篇关于 PSAM 控制库的文章:http: //www.codeproject.com/KB/miscctrl/psamcontrollibrary.aspx
回答by John Feminella
You will definitely want to look into Lilypond, widely acknowledged as the best choice for musical typesetting. It's open-source and has all kinds of output formats, and is highly scriptable. It would be pretty easy to write your own C# wrapper around it. Example output:
您肯定会想要研究Lilypond,它被广泛认为是音乐排版的最佳选择。它是开源的,具有各种输出格式,并且高度可编写脚本。围绕它编写自己的 C# 包装器会很容易。示例输出:
(source: lilypond.org)
(来源:lilypond.org)
回答by vartec
Use MusicXML. There is C++ binding.
Rosegardencan export MusicXML to PDF or PS.
Rosegarden可以将 MusicXML 导出为 PDF 或 PS。
回答by Eugene Morozov
You can try to extract relevant code from Rosegarden, although it's very Qt-specific.
您可以尝试从Rosegarden 中提取相关代码,尽管它非常特定于 Qt。