android-midi-lib icon indicating copy to clipboard operation
android-midi-lib copied to clipboard

How to change the Instrument?

Open d9x2knv7 opened this issue 8 years ago • 2 comments

The same as title, thank you.

d9x2knv7 avatar Oct 03 '16 17:10 d9x2knv7

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

girvain avatar Oct 04 '19 18:10 girvain

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)

pissartel avatar May 23 '20 12:05 pissartel