CLI 钢琴合成器?
我一直在为我正在上的一门课制作一个音乐即兴创作项目,我需要能够向全班展示它的作用。目前,该程序以科学格式输出音符,并在括号中输出和弦(我使用Python)。以下是输出示例:
C5 D4 [D#5, D#4]
有没有可以用来演奏这些音符的 CLI 软件?我将在 Mac 上演示此内容,并在 Linux 上进行开发,因此如果有一个 CLI 实用程序可以将程序的输出通过管道传输到其中,那就太好了。
谢谢!
I've been working on a music improvisation program for a class I'm taking, and I need to be able to show what it can do to a class. Currently, the program outputs notes in scientific format and chords in brackets (I use Python). Here's an example of the output:
C5 D4 [D#5, D#4]
Is there any CLI software that I can use to play those notes? I will be presenting this on a Mac, and I develop on Linux, so it would be nice to have a CLI utility that I can just pipe the output of my program into.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此处提供了大量可能对您有用的资源。如果不需要实时运行,您可能最乐意编写一个标准的 midi 文件并使用其他一些软件来实际渲染播放。
There are a whole bunch of resources that might be useful to you here. If it does't need to run in real time, you might be happiest just writing a standard midi file and using some other software to actually render the playback.
我不知道有哪个程序可以做到这一点。虽然我已经编写了一个程序,可以通过 PC 的“嘟嘟”扬声器播放诺基亚铃声格式。但是你不能同时发出两个音,所以我的程序无法处理和弦。
相反,为什么不使用这里提到的库之一: 简单的跨平台 MIDI 库对于 Python 并输出一个 MIDI 文件,然后可以使用任何标准音频播放器播放该文件。
I don't know of a program that does that. Though I have written a program that plays Nokia ringtone format through the PC 'beep' speaker. But you can't beep two tones at once so my program can't handle chords.
Instead, why not use one of the libraries mentioned here: Simple, Cross Platform MIDI Library for Python and output a MIDI file which can be then played using any standard audio player.