Reputation: 5030
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
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
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.
Upvotes: 2