package jmsltutorial; import java.applet.Applet; import java.awt.GridLayout; import com.softsynth.jsyn.*; import com.softsynth.jsyn.view102.SoundTester; public class SynthNoteTesterApplet extends Applet { SynthCircuit circ; LineOut myOut; public void start() { setLayout(new GridLayout(0, 1)); Synth.startEngine(0); circ = new SineSynthNote(); myOut = new LineOut(); add(new SoundTester(circ)); circ.output.connect(0, myOut.input, 0); circ.output.connect(0, myOut.input, 1); myOut.start(); /* Synchronize Java display. */ getParent().validate(); getToolkit().sync(); } public void stop() { myOut.delete(); circ.delete(); removeAll(); // remove portFaders and scope Synth.stopEngine(); } /* Can be run as either an application or as an applet. */ public static void main(String args[]) { SynthNoteTesterApplet applet = new SynthNoteTesterApplet(); AppletFrame frame = new AppletFrame("Test Circuit", applet); frame.setSize(600, 500); frame.show(); frame.test(); } }