private void findFrequencies() {
		
		for(int i = 0; i < modifiedSamples.length; i++){		
			
			int width = AudioData.WINDOW_SIZE;
			
			int result = autoCorrelation(i, width);
			
			if(result!= -1){//markFrequencyMethod
				
				//the autocorrelated max result minus the index starting point gives the width of the significant partial
				int wavWidthHolder = result - i;
				waveWidth[i] = wavWidthHolder;
				
				//the sample rate divided by the size of the partial wavelength gives the frequency of the the partial
				float freq = AudioData.SAMPLE_RATE/(float) wavWidthHolder;
				for(int j = i; j <= result; j++){
					frequencies[i] = freq;
				}
				//the loop skips ahead to the significant value returned by autocorrelation
				//result -1 to compensate for the adding of one at the end of the loop
				i = result-1;
			}
		}
		
		//marking zero frequencies as silence
		for(int i = 0; i < modifiedSamples.length; i++){
			if(modifiedSamples[i] == 0){
				modifiedSamples[i] = -1;
			}
		}
		
		pitches = new Note[frequencies.length];
		
		for(int i = 0; i < modifiedSamples.length; i++){
			if(frequencies[i] > 0){
				Pitch newPitch = new Pitch();
				pitches[i] = newPitch.getNote(frequencies[i]);
			} else {
				pitches[i] = null;
			}
			if(pitches[i] != null){
				//System.out.println(pitches[i].getPitch());
			}
		}
		
		audioData.setFrequencies(frequencies);
		audioData.setPitches(pitches);
	}