JFugue Java music API implementation in Android

你说的曾经没有我的故事 提交于 2019-12-11 03:22:26

问题


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:

MidiSystem.initialize(this);

since Eclipse doesn't seem to know what MidiSystem is at all and I can't fix the problem. Should I import anything else to my project in order to be able to play some simple patterns on an Android device?


回答1:


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. In case you want to do that, I recommend you build your project using Android Studio instead of 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

It basically takes a musical strings such as "A5s B5q E6h" and converts it into a wav file of a certain instrument. It can also handle multiple instruments at the same time.




回答2:


You have to chose between BLE or USB interfacing

And write the type of code consequently, for example USB

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


来源:https://stackoverflow.com/questions/27782301/jfugue-java-music-api-implementation-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!