public static void main(String[] args) {

		JFileChooser chooser = new JFileChooser();
	    FileNameExtensionFilter filter = new FileNameExtensionFilter(
	        "Midi files", "mid");
	    chooser.setFileFilter(filter);

		System.out.println("Enter operation (grt/w/b): ");

		Scanner scanIn = new Scanner(System.in);
		String input = scanIn.nextLine();
		input = input.toLowerCase();
		//old read method, use gr now
		/*
	    if(input.equals("r")){
	    	File bpath = new File("Songs/Bach");
	    	File [] bfiles = bpath.listFiles();
	    	File cpath = new File("Songs/Chopin");
	    	File [] cfiles = cpath.listFiles();
	        for (int i = 0; i < bfiles.length && i < cfiles.length; i++){
	            if (bfiles[i].isFile()&&cfiles[i].isFile()){
	                Reader.buildLibrary(bfiles[i].getPath(),cfiles[i].getPath());
	                Reader.weightRhythms("trees.txt", "percents.txt");
	            }
	        }
	    }
	    */
	    //really old, use b or w
		/*
	    else if(input.equals("s")){
		    int returnVal = chooser.showOpenDialog(null);
		    if(returnVal == JFileChooser.APPROVE_OPTION) {
		       String filePath = chooser.getSelectedFile().getAbsolutePath();
		       SinglePhraseSelector.read(filePath, 100, 1, 0, 0);
		    }
	    }
	    */
	    //use for single song, use b for a folder of songs
	    if(input.equals("w")){
		    int returnVal = chooser.showOpenDialog(null);
		    if(returnVal == JFileChooser.APPROVE_OPTION) {
		    	//choose your song with this
		       String filePath = chooser.getSelectedFile().getAbsolutePath();
		       WholeSongAnalysisBigram.analisisTrigramMethod(filePath);
		    }
	    }
	    //calls the GeneralReader class to analyze a library of music
	    //only does bigrams
	    /*
	    else if(input.equals("gr")){
	    	System.out.println("Enter Composer Name: ");
			input = scanIn.nextLine();
			//path just needs to point at the folder containing
			//the library of songs for a composer. Was set up this ways
			//just from how I organized music into the folder "Songs/[composer]"
	    	File path = new File("Songs/"+input);
	    	File [] files = path.listFiles();
	    	for (int i = 0; i < files.length; i++){
	            if (files[i].isFile()){
	            	GeneralReader.read(files[i].getPath(),input);
	            }
	    	}
	    }
	    */
	    //tests a batch of music against the data from libraries
	    else if(input.equals("b")){
	    	System.out.println("Enter Composer Name: ");
	    	input = scanIn.nextLine();
	    	File path = new File("Songs/"+input+" Test Songs");
	    	File[] files = path.listFiles();
	    	BatchTester.test(files, input);
	    }
	    //calls GeneralReaderTrigram to analyze a library
	    else if(input.equals("grt")){
	    	System.out.println("Enter Composer Name: ");
			input = scanIn.nextLine();
			//path just needs to point at the folder containing
			//the library of songs for a composer. Was set up this ways
			//just from how I organized music into the folder "Songs/[composer]"
	    	File path = new File("Songs/"+input);
	    	File [] files = path.listFiles();
	    	for (int i = 0; i < files.length; i++){
	            if (files[i].isFile()){
	            	GeneralReaderTrigram.read(files[i].getPath(),input);
	            }
	    	}
	    }
	    else{
	    	//default
	    }



	    scanIn.close();
	}