LeffelMania / android-midi-lib

MIT License
255 stars 72 forks source link

How to change the Instrument? #11

Open d9x2knv7 opened 8 years ago

d9x2knv7 commented 8 years ago

The same as title, thank you.

girvain commented 5 years ago

Sorry, I don't understand what "the same as title" means. If anyone could help that would be amazing. thanks

pissartel commented 4 years ago

I found this code from a project that uses android-midi-lib :

https://github.com/kszr/MIDI-Player-App/blob/1094dfcaf8c1455fa48ad4f7304e33d6bbcccb0e/app/src/main/java/com/kszr/midiplayer/util/MidiOperations.java

You can use it just like this : MidiOperations.changeProgram(midiFile, instrument)

where instrument is the midi number (e.g 27 for clean guitar, for more information : http://fmslogo.sourceforge.net/manual/midi-instrument.html)