Albert
Albert

Reputation: 68140

Python: midi to audio stream

I need convert/synthesize MIDI data to audio stream PCM data. What would be an easy way to do so?

Upvotes: 10

Views: 9524

Answers (4)

Ramiro Aires Melo
Ramiro Aires Melo

Reputation: 41

You can try this:

midi2audio

Project description:

"Easily synthesize MIDI to audio or just play it. It provides a Python and command-line interface to the FluidSynth synthesizer to make it easy to use and suitable for scripting and batch processing. In contrast, most MIDI processing software is GUI-based."

Upvotes: 1

Albert
Albert

Reputation: 68140

I decided to code my own (based on timidity and subprocess). The code can be seen here: https://github.com/albertz/learn-midi/blob/master/decode.py

I downloaded a prebuild binary of Timidty for MacOSX here: http://www.merenbach.com/software/ports/timidity

And I installed the Freepats package from here: http://freepats.zenvoid.org/

Upvotes: 2

Steven D. Majewski
Steven D. Majewski

Reputation: 2157

Is using Jython an option ? I think the javax.sound.midi classes would handle this.

Upvotes: 0

user225312
user225312

Reputation: 131647

Take your pick on what you want to do, there is a MIDI section on the page.

Upvotes: 3

Related Questions