[Audio-engine-dev] SotfSynthesizer.remapInstrument
Alex Menkov
alex.menkov at sun.com
Thu Feb 14 09:49:09 PST 2008
Hi again,
Karl, did you see that Synthesizer.remapInstrument() spec has been changed in
Java6? It look like you used spec from 1.5.
new spec is:
boolean remapInstrument(Instrument from, Instrument to)
Remaps an instrument. Instrument to takes the place of instrument from.
For example, if from was located at bank number 2, program number 11,
remapping causes that bank and program location to be occupied instead by to.
If the function succeeds, instrument from is unloaded.
To cancel the remapping reload instrument from by invoking one of
loadInstrument(javax.sound.midi.Instrument),
loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[]) or
loadAllInstruments(javax.sound.midi.Soundbank).
Parameters:
from - the Instrument object to be replaced
to - the Instrument object to be used in place of the old instrument,
it should be loaded into the synthesizer
Returns:
true if the instrument succeessfully remapped, false if feature is not
implemented by synthesizer
Throws:
IllegalArgumentException - if instrument from or instrument to aren't
supported by synthesizer or if instrument to is not loaded
NullPointerException - if from or to parameters have null value
Regards
Alex
More information about the audio-engine-dev
mailing list