	public Pair<Integer[],Long[]> getMidiNumsWithTicks(int[] midiNums,int clipRate){
		long TICKS_PER_OCCURRENCE = bpm*ppq/(6*10*1000*clipRate);
		ArrayList<Integer> newMidiNums = new ArrayList<Integer>();
		ArrayList<Long> ticksPerMidiNum = new ArrayList<Long>();
		int lastNum = midiNums[0];
		int dur = 1;
		for(int m: midiNums){
			if(m != lastNum){
				newMidiNums.add(m);
				ticksPerMidiNum.add(dur*TICKS_PER_OCCURRENCE);
				lastNum = m;
				dur = 1;
			}else{
				dur++;
			}
		}
		Integer[] outMidiNums= new Integer[0];
		outMidiNums = newMidiNums.toArray(outMidiNums);
		Long[] outTicksPer = new Long[0];
		outTicksPer = ticksPerMidiNum.toArray(outTicksPer);
		return new Pair<Integer[],Long[]>(outMidiNums,outTicksPer);
	}

	public Pair<Integer[],Long[]> getMidiNumsWithTicks(int[] midiNums,int clipRate){
		long TICKS_PER_OCCURRENCE = bpm*ppq/(60*clipRate);
		ArrayList<Integer> newMidiNums = new ArrayList<Integer>();
		ArrayList<Long> ticksPerMidiNum = new ArrayList<Long>();
		int lastNum = midiNums[0];
		int dur = 1;
		for(int m: midiNums){
			if(m != lastNum){
				newMidiNums.add(m);
				ticksPerMidiNum.add(dur*TICKS_PER_OCCURRENCE);
				lastNum = m;
				dur = 1;
			}else{
				dur++;
			}
		}
		Integer[] outMidiNums= new Integer[0];
		outMidiNums = newMidiNums.toArray(outMidiNums);
		Long[] outTicksPer = new Long[0];
		outTicksPer = ticksPerMidiNum.toArray(outTicksPer);
		return new Pair<Integer[],Long[]>(outMidiNums,outTicksPer);
	}
