vijaysylvester
vijaysylvester

Reputation: 5030

Converting MIDI byte array to MP3 byte array

Does someone know how to convert a MIDI file (average playback time of 30 seconds) which is represented in a byte array to an MP3 byte array?

So, ideally I need to have a C# function which accepts a MIDI byte array and returns a MP3 byte array.

The conversion should not take more than 2 - 3 seconds.

Are there any frameworks / tools / 3rd-party DLLs to perform this easily?

Please let me know.

Thanks, Vijay

Upvotes: 2

Views: 1485

Answers (2)

herzmeister
herzmeister

Reputation: 11297

Over at CodeProject there's a C# MIDI Toolkit which could help you. You'll probably have write the code to record the output stream yourself though.

Upvotes: 1

Aliostad
Aliostad

Reputation: 81700

MIDI file is not audio, it is audio instructions. This has to be "rendered/played" to audio (using various MIDI players depending on the capability of your sound card) and then compressed to MP3.

I do not know a DLL that can do all of that. Lame MP3 DLL is a free open source DLL that can do the compression for you.

http://lame.sourceforge.net/

Upvotes: 2

Related Questions