2

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!

Blender
  • 289,723
  • 53
  • 439
  • 496

2 Answers2

1

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.

bgporter
  • 35,114
  • 8
  • 59
  • 65
  • Thanks, I've looked through that a few times before. I was preferring it to run in real time (or something close), but I guess that's not easy to do... – Blender Nov 19 '10 at 18:14
  • Maybe http://code.google.com/p/pyata/ -- lets you use PureData as a Python module. – bgporter Nov 19 '10 at 18:17
0

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.

Community
  • 1
  • 1
slebetman
  • 109,858
  • 19
  • 140
  • 171
  • Thanks. I already have it playing the sounds with the system beep speaker, but it just sounds really cheesy. – Blender Nov 19 '10 at 18:07