如何阅读在C#中的MIDI文件? [英] How to read MIDI file in C#?

查看:260
本文介绍了如何阅读在C#中的MIDI文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道在C#中的图书馆,我可以为了用它来读取现有的* .MID文件?我想提请MIDI文件的声音频率曲线图,但我不能得到的内部数据。我试着用n音讯和Alvas.Audio,但我wans't能够读取的MIDI文件。任何建议

Do you know any library in C# that I can use in order to read an existing *.mid file? I want to draw the sound frequency graph for the MIDI file, but I cannot get the inner data. I tried using NAudio and Alvas.Audio, but I wans't able to read a MIDI file. Any suggestions?

推荐答案

的MIDI文件格式比较复杂(见这里)。写他们比阅读他们(与WAV文件)更容易。我不知道这样做的任何C#库,但我要指出,因为你的最终目标是创建一个光谱仪,你也许并不需要一个图书馆阅读的MIDI文件的。

The MIDI file format is relatively complicated (see here). Writing them is easier than reading them (as with WAV files). I don't know of any C# libraries that do this, but I should mention that since your ultimate goal is to create a spectrograph, you probably don't need a library to read the MIDI file at all.

MIDI文件不包含任何实际的音频信息 - 它只是包含了一个合成器,如指示注意,邮件,音量增减等mesages为了从一个MIDI文件创建一个光谱仪,你需要让你得到实际的音频数据运行FFT分析了玩它的东西。

A MIDI file does not contain any actual audio information - it merely contains instructions for a synthesizer, e.g. note on messages, volume change mesages etc. In order to create a spectrograph from a MIDI file, you need to "play" it with something so that you get actual audio data to run FFT analyses on.

您并不真正需要的东西打它,当然。谷歌 MIDI到WAV 为自动转换MIDI文件转换成WAV文件的选项的负荷。一旦你的WAV文件,谷歌 wav文件的频谱分析仪C#来查看生成的WAV文件数据光谱仪的许多选项。

You don't really need to play it with something, of course. Google midi-to-wav for a load of options for automatically converting MIDI files into WAV files. Once you have the WAV files, Google wav file spectrum analyzer c# to see the many options for generating spectrographs from WAV file data.

要向下选民:谷歌暗示的关键字作为一个答案是不会自动坏事。在这种情况下,我只是想STEAR在正确的方向的提问者,让他们不花时间做一些他们并不需要做什么。

To the down-voters: suggesting Google keywords as an answer is not automatically a bad thing. In this case, I'm just trying to stear the asker in the right direction, so that they don't spend time doing something they don't need to do.

这篇关于如何阅读在C#中的MIDI文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆