private void updateStrings(final int frequency) {

    final int stringFreq = FrequencyDetector.detectStringFreq(frequency);
    final Tuple stringName = FrequencyDetector.getStringName(stringFreq);

    String tempnote = stringName.get_note_name();

    String dashes = "";

    if (frequency > 554) {
      dashes = "--";
    } else {
      dashes = "-";
    }

    if (tempnote == "E") {
      E = E + "-" + (stringName.get_fret_number() + "");
      A = A + dashes;
      D = D + dashes;
      G = G + dashes;
      B = B + dashes;
      e = e + dashes;
    } else if (tempnote == "A") {
      E = E + dashes;
      A = A + "-" + (stringName.get_fret_number() + "");
      D = D + dashes;
      G = G + dashes;
      B = B + dashes;
      e = e + dashes;
    } else if (tempnote == "D") {
      E = E + dashes;
      A = A + dashes;
      D = D + "-" + (stringName.get_fret_number() + "");
      G = G + dashes;
      B = B + dashes;
      e = e + dashes;
    } else if (tempnote == "G") {
      E = E + dashes;
      A = A + dashes;
      D = D + dashes;
      G = G + "-" + (stringName.get_fret_number() + "");
      B = B + dashes;
      e = e + dashes;
    } else if (tempnote == "B") {
      E = E + dashes;
      A = A + dashes;
      D = D + dashes;
      G = G + dashes;
      B = B + "-" + (stringName.get_fret_number() + "");
      e = e + dashes;
    } else {
      E = E + dashes;
      A = A + dashes;
      D = D + dashes;
      G = G + dashes;
      B = B + dashes;
      e = e + "-" + (stringName.get_fret_number() + "");
    }
  }
  private void processRecordedData() {
    mIsProcessing = true;

    float[] recordedDataFFT;
    recordedDataFFT = FrequencyDetector.convertToFloats(mRecordedData);
    fft.realForward(recordedDataFFT);

    float[] halfAbsFFT;
    halfAbsFFT = FrequencyDetector.absAndHalve(recordedDataFFT);

    int[] peaks;
    peaks = FrequencyDetector.identifyPeaksAndRemove(halfAbsFFT);

    String peakString = "";
    for (int e : peaks) peakString += e + " ";
    Log.d(TAG, peakString);

    int frequency = FrequencyDetector.detectFrequency(peaks);
    if (frequency != -1) this.updateStrings(frequency);

    mIsProcessing = false;
  }