Stuff
public text v1 · immutableimport javax.sound.midi.*;
class SoundTest
{
public static void main(String[] args) {
try {
Synthesizer synth = MidiSystem.getSynthesizer();
synth.open();
final MidiChannel[] mc = synth.getChannels();
Instrument[] instr = synth.getDefaultSoundbank().getInstruments();
synth.loadInstrument(instr[76]); // Bottle Blow
for (int i = 0; i < 120; ++i) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {}
mc[4].noteOn(i,200);
}
} catch (MidiUnavailableException e) {}
}
}