public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		AudioFormat f= new AudioFormat(44100,8,1,true,true);
		try{
			SourceDataLine d = AudioSystem.getSourceDataLine(f);
			d.open(f);
			d.start();
			String exitToken;
			boolean morenote=true;
				while(morenote){
				d.flush();
				Thread dr= new Thread(new AudioDrain(d));
				Thread t = new Thread(new AudioLoader(d,makeNote(s)));
				t.start();
				//Thread.sleep(10);
				dr.start();
				System.out.println("Enter any key to exit");
				while(!s.hasNext()){}
				t.interrupt();
				s.next();
				System.out.println("good job! make another? y/n");
				while(!(exitToken=s.next()).equals("y")&&!exitToken.equals("n"));
				if (exitToken.equals("n"))
					morenote=false;
			}
		}catch (Exception ex){
			ex.printStackTrace();
		}
	}