开发者

Converting MIDI byte array to MP3 byte array

开发者 https://www.devze.com 2023-01-19 01:21 出处:网络
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?

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 frame开发者_JAVA技巧works / tools / 3rd-party DLLs to perform this easily?

Please let me know.

Thanks, Vijay


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/


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号