本文介绍了MIDI在Android:Java和/或AIR库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在考虑(重)建在iPad上的应用程序一段时间,在那里我会用Objective-C和 DSMI 来发送MIDI信号的主计算机。这不是坏的(我的意思是,除了实际编写的应用程序)。

I've been contemplating (re)building an app on iPad for some time, where I would use objective-C and DSMI to send MIDI signals to a host computer. This is not bad (I mean, except for actually writing the app).

现在我考虑可能是开发Android平板电脑(TBA)的应用程序。

Now I'm contemplating perhaps developing the app for Android tablets (TBA).

在Java中,哪些选项可用于MIDI信息的沟通?我很熟悉javax.sound.midi中,但我需要一个虚拟的MIDI端口将消息发送到主机。

In Java, what options are available for MIDI message communication? I'm quite familiar with javax.sound.midi, but then I would need a virtual MIDI port to send messages to the host.

在另一方面,如果应用程序是在Adobe AIR做的,什么选择,我会可用与MIDI沟通?

On the other hand, if the app were done in Adobe AIR, what options would I have available for communicating with MIDI?

显然,另一种选择是发送/接收通过TCP / IP套接字消息到Java主机,说话的方式,但它的声音一点点麻烦的......或许不是? DSMI确实使用宿主程序,毕竟。

Obviously another option is to send/receive messages over a TCP/IP socket to a Java host, and talk that way, but it sounds a tad cumbersome... or perhaps not? DSMI does use a host program, after all.

推荐答案

javax.sound.midi中没有Android的使用。

javax.sound.midi is not available in android.

在Android中,以MIDI功能的唯一途径就是通过JetPlayer类和它非常适用于在游戏中使用。 Android将播放MIDI文件,但它使用它不清楚是什么code路线,世界上没有办法写,从内存中的MIDI硬件。

The only access to midi functionality in android is through the JetPlayer class and its very much designed for use in games. Android will play a midi file but its unclear what code path it uses, theres no way to write to the midi hardware from memory.

在一个应用程序我做了我需要基于GUI /用户交互的动态弹奏音符和最后不得不使用的样品和俯仰过滤器,以创建注释。

In one app I've made i needed to play notes dynamically based on the GUI/user interaction and ended up having to use samples and pitch filters to create the notes.

声音对我来说,你需要做的是端口DSMI到Android,它的开源 iPhone的库看起来pretty的简单,应该不难移植过来。

Sounds to me like what you need to do is port DSMI to android, its open source the iPhone library looks pretty simple, shouldn't be difficult to port over.

编辑:

在思考这个为第二个你不会使用javax.sound.midi中或在任何存在空气MIDI功能反正获得什么之后。所有你需要做的是通过网络链接到另一个设备是谁负责与实际的MIDI合成器设备的通信通过MIDI信息。这正是DSMI一样。移植iPhone的libdsmi到Android就是你需要做的,它只有2个源文件和2头。 1处理这是非常简单的,并且可以通过线路pretty的简单,只是转换线至java和其他处理网络连接到DSMI服务器,这将需要被重写,以使用机器人语义创建网络连接的MIDI消息格式。

After thinking about this for second you wouldn't gain anything by using javax.sound.midi or whatever midi functionality exists in AIR anyway. All you need to do is pass MIDI messages through a network link to another device who is responsible for communication with the actual MIDI synth device. This is exactly what DSMI does. Porting the iPhone libdsmi to Android is what you need to do, its only 2 source files and 2 headers. 1 handles the MIDI message format which is very simple and can pretty much just be converted line by line to java and the other handles the network connection to the DSMI server which will need to be rewritten to use Android semantics for creating network connections.

这篇关于MIDI在Android:Java和/或AIR库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 04:02