import javax.sound.midi.*; public class Noot{ public static void main(String argumendid[]) throws Exception{ Synthesizer synthesizer=MidiSystem.getSynthesizer(); synthesizer.open(); MidiChannel kanal=synthesizer.getChannels()[0]; //kanal 0; int korgus=69; //A int valjus=65; //keskmine kanal.noteOn(korgus, valjus); Thread.sleep(1000); kanal.noteOff(korgus); System.exit(0); } }