private ArrayList<Chord> trackAnalyze(Track track){
		ArrayList<Chord> result = new ArrayList<Chord>();

		long tick = -1;
		int t = 0;
		
		while(t<track.size()-1){
			try{
				ShortMessage tmp = (ShortMessage) track.get(t).getMessage();
				long newTick = track.get(t).getTick();
				if (tmp.getCommand()>=144 && tmp.getCommand()<=159 && newTick != tick){
					Chord newChord = new Chord(tick);
					tick = newTick;
					newChord.addMessage(tmp);
					int size = result.size();
					if(size != 0){
						result.get(size-1).setEnd(tick);
					}
					result.add(newChord);
				}else if (tmp.getCommand()>=144 && tmp.getCommand()<=159 && newTick == tick){
					result.get(result.size()-1).addMessage(tmp);
				}
			}catch(Exception e){}
			t++;
		}		
		return result;
	}