import javax.sound.midi.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class Noodirakend9a extends JApplet implements ActionListener, MetaEventListener{ Sequence sequence; Sequencer sequencer; JButton nupp=new JButton("Mängi"); JCheckBox ruut=new JCheckBox("Korda"); JCheckBox bass=new JCheckBox("Bass"); JCheckBox akord=new JCheckBox("Akord"); JCheckBox taust=new JCheckBox("Taust"); JComboBox helistik=new JComboBox(); JRadioButton[] raadionupud=new JRadioButton[3]; String[] raadionupustring={"I", "IV", "V"}; JScrollBar tempo=new JScrollBar(JScrollBar.HORIZONTAL, 190, 5, 40, 320); Track muutuvRada; String[] helistikud={"Bb", "F", "C", "G", "D", "A", "E"}; int[] helikorgused={58, 53, 60, 55, 50, 57, 52}; String jooksevHelistik=""; static final int[] noodivahed={-1, 0, 2, 4, 5, 7, 9, 11, 12}; //toonika kohal 1 väärtus 0 int[] duurid={0, 1, 2, 0, 1, 2, 0, 0}; // Juhansonide unenäo laul // 0- toonika, 1-IV, 2-V int duurinr=0; //takti järjekorranumber void looKolmkola(Track t, int toonika){ try{ ShortMessage m[]=new ShortMessage[7]; for(int i=0; i