Comments (2)
Yes. This library can play MIDI files.
This library includes javax.sound.midi porting library.
There is a MidiSystem.getSequencer()
method, to get a MIDI sequencer instance.
The sequencer can play SMF files on the app's asset, or on the external directory.
Regards,
Kaoru
from usb-midi-driver.
Hi kshoji i've got send midi out as i wanted, it works fine, but i have another 2 issues:
1- When i open and play a midi file it does not perform any sound. I've verified all this steps:
-
No exception handling the midi file.
-
Previously i've got play the midi file with winamp and with a DAW.
-
I've placed soundbank.gm to directory C:\Program Files\Java\jdk1.7.0_45\lib\audio and C:\Program Files (x86)\Java\jre1.8.0_66\lib\audio
-
MidiSystem.getSynthesizer() returns null (i do not know if it is something related with this...)
-
I've got play it successfully with MediaPlayer class
-
My code:
private Sequencer openMidiFile() { try { Sequencer mSeqr = MidiSystem.getSequencer(); InputStream in = getAssets().open(MIDI_FILE); Sequence mSeq = MidiSystem.getSequence(in); mSeqr.open(); mSeqr.setSequence(mSeq); mSeqr.start(); //it is supposed this execution will perform the play of the file return mSeqr; } catch (MidiUnavailableException e) { e.printStackTrace(); } catch (InvalidMidiDataException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; }
2- Second issue: i0ve implemented a timertask to catch the midievents from the sequencer, but it seems that it is not 100% accurated, i'm using 1ms period, What's the best way to achieve this?
Thanks and happy new year!!
from usb-midi-driver.
Related Issues (20)
- Add some utility methods on Input/Output device class HOT 1
- trying to send this sysex message for example HOT 1
- Separate RPN/NRPN messages for each cableId. HOT 1
- Synthesizer doesn't be registered to MidiSystem
- Can't find a onMidiInEvent
- Audio stops when USB midi device is connected HOT 2
- sequencer.start() method not generating any sound in Android application.
- MIDI Input Broken on Android 4 HOT 34
- Some vendor ids are wrong in device_filter.xml HOT 1
- Trouble adding MidiDriver as a module to a project HOT 3
- Missing Midi Events HOT 5
- Support multi process?
- Sysex not working HOT 1
- Filter Out Active Sensing HOT 1
- WaiterThread will spin and crash device
- Issue with Android 12 and PendingIntent
- I don't see this library working when device is connected to computer or ipad HOT 1
- Google Play Market url broken
- Library not working when targeting Android 34 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usb-midi-driver.