简体   繁体   English

JFugue Java 音乐 API 在 Android 中的实现

[英]JFugue Java music API implementation in Android

I already implemented Ksoji's 'jfugue-android' library ( https://github.com/kshoji/JFugue-for-Android/tree/master/jfugue-android ) in my project, but I can't do anything with it, for example initialize it by typing:我已经在我的项目中实现了 Ksoji 的“jfugue-android”库( https://github.com/kshoji/JFugue-for-Android/tree/master/jfugue-android ),但我不能用它做任何事情,因为例如通过键入初始化它:

MidiSystem.initialize(this);

since Eclipse doesn't seem to know what MidiSystem is at all and I can't fix the problem.因为 Eclipse 似乎根本不知道 MidiSystem 是什么,我无法解决这个问题。 Should I import anything else to my project in order to be able to play some simple patterns on an Android device?为了能够在 Android 设备上播放一些简单的模式,我是否应该将其他任何内容导入到我的项目中?

Kshoji's Project doesn't provide the sound playback.To play MIDI notes on application, The USB MIDI devices or BLE MIDI devices will be needed. Kshoji的项目不提供声音播放。要在应用程序上播放MIDI音符,将需要USB MIDI设备或BLE MIDI设备。 In case you want to do that, I recommend you build your project using Android Studio instead of Eclipse. 如果要这样做,建议您使用Android Studio而不是Eclipse构建项目。

I did a Library that is kind of a solution to have Music Strings played on Android, check it out: https://github.com/ziad-halabi9/AlgorithmicMusicPlayer 我做了一个库,可以在Android上播放音乐字符串,这是一种解决方案,请查看: https : //github.com/ziad-halabi9/AlgorithmicMusicPlayer

It basically takes a musical strings such as "A5s B5q E6h" and converts it into a wav file of a certain instrument. 它基本上采用诸如“ A5s B5q E6h”之类的音乐字符串,并将其转换为特定乐器的wav文件。 It can also handle multiple instruments at the same time. 它也可以同时处理多种乐器。

You have to chose between BLE or USB interfacing 您必须在BLE或USB接口之间进行选择

And write the type of code consequently, for example USB 然后编写代码类型,例如USB

UsbMidiSystem usbMidiSystem = new UsbMidiSystem(this);
usbMidiSystem.initialize();

如果你只是想让你的 android 应用程序播放 JFugue 字符串,你可以试试这个库https://sourceforge.net/projects/jfugue4a/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM