如何在iPhone上播放MIDI?
据我所知,没有本地或第三方库可用于在 iPhone 上播放 MIDI。但似乎有不少应用程序可以做到这一点。他们用什么?有什么线索吗?
As far as I know, there is not native or third party library available to play MIDI on the iPhone. But there seem to be quite a few apps that do exactly that. What are they using? Any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
供那些走这条路的人参考:AVMIDIPlayer 是在 iOS 8 中引入的。似乎在设备上运行良好,但 sim 不太好。
FYI for those going down this road: AVMIDIPlayer was introduced in iOS 8. Seems to work well on device, sim not so much.
这对我在 iPhone 上播放 midi 文件有用:
然后
MidiPlayer.shared.play(file: "midifile")
This worked for me for playing midi file on iPhone:
and then
MidiPlayer.shared.play(file: "midifile")
查看 MusicPlayer 类。结合自 iOS 5.0 起可用的 AUSampler 音频单元,您可以非常轻松地构建 MIDI 播放器。 (该链接适用于 OS X,但也适用于 iOS)
https://developer.apple.com/library/mac/#documentation/MusicAudio/Conceptual/CoreAudioOverview/ARoadmaptoCommonTasks/ARoadmaptoCommonTasks.html#/ /apple_ref/doc/uid/TP40003577-CH6-SW13
关于采样器音频单元请参阅:
适用于 iOS 的简单嵌入式 MidiSynth?
Check out the MusicPlayer class. Combined with the AUSampler audio unit available since iOS 5.0 you can build a MIDI player quite easily. (The link is OS X, but it applies for iOS as well)
https://developer.apple.com/library/mac/#documentation/MusicAudio/Conceptual/CoreAudioOverview/ARoadmaptoCommonTasks/ARoadmaptoCommonTasks.html#//apple_ref/doc/uid/TP40003577-CH6-SW13
About the sampler audio unit see:
Simple embeddable MidiSynth for iOS?