dajee
dajee

Reputation: 964

Merging MIDI and Wav files

I want to be able to merge multiple midi files and wav files and produce single wav or mp3 file in Python or C. Is there a library that does this? Do I have to first convert MIDI to wav and then merge wav files together? I know there are libraries out there for Python that does that, but I didn't know if there's a way to do it with MIDI and wav.

Also, how expensive is this operation? I would rather do this in Python, but if it's better to do it in C, I know C so I'd be open to that also.

Thanks,

David

Upvotes: 1

Views: 1444

Answers (1)

AKX
AKX

Reputation: 169051

You're mixing audio apples and oranges here. :)

WAV files are sampled audio, whereas MIDIs are only instructions that tell a MIDI player what to play and with which instruments.

You can't directly mix WAVs and MIDIs, but if you render the MIDI sequence to a WAV, then you can mix stuff however you like.

TiMidity++ is a player/renderer you might be able to interface with: http://timidity.sourceforge.net/

Upvotes: 9

Related Questions