Changed MidiGenerator to accept a datainput stream and changed android code to pass it a data input stream