List of usage examples for javax.sound.midi Instrument getPatch
public Patch getPatch()
From source file:com.rockhoppertech.music.midi.js.MIDITrack.java
/** * Changes the patch on all {@code MIDINote}s in this track. * /* www. j a v a2 s. c o m*/ * @param instrument * the {@code Instrument} */ public void useInstrument(Instrument instrument) { this.instrument = instrument; InstrumentModifier mod = new InstrumentModifier(instrument.getPatch().getProgram()); this.map(mod); }