@Override
	public void  analyze(){			
		try {			

			for(int i=0; i<numFiles; i++){
				File f = files.get(i);
				InputStream traingInputStrem = new BufferedInputStream(new FileInputStream(f.getPath()));
				trainSequencer.setSequence(traingInputStrem);
				Sequence trainSequence = trainSequencer.getSequence();
				Track[] trainTracks = trainSequence.getTracks();
								
				for (int j=0; j<trainTracks.length;j++){
					Track singleTrainTrack = trainTracks[j];
					ArrayList<Chord> noteLists = trackAnalyze(singleTrainTrack);
					updateHistogram(noteLists);
				}

			}
			//printHistogram();
		} catch (ArrayIndexOutOfBoundsException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvalidMidiDataException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
			
	}