private void paintPitches(Graphics g) {
        // graph pitches
        FontMetrics fm = g.getFontMetrics(f);
        int ascent = fm.getAscent() / 2;

        for (int i = 0; i < 127; i++) {
            if (i % 12 == 0) {
                g.setColor(Color.red);
            } else if (i % 12 == 4) {
                g.setColor(Color.orange);
            } else if (i % 12 == 7) {
                g.setColor(Color.blue);
            } else g.setColor(Color.black);
            g.fillRect(lableSpace, i * barWidth + lableSpace,
                    (int) ((double) pitchValues[i] / (double) maxPitchValue *
                            ((double) this.getSize().width - lableSpace)), barWidth - 1
            );
            if (i % 12 == 0) {
                g.setColor(Color.red);
                g.drawString("C" + (i / 12 - 1), 2, i * barWidth + ascent + lableSpace);
            }
            if (i % 12 == 4) {
                g.setColor(Color.orange);
                g.drawString("E" + (i / 12 - 1), 2, i * barWidth + ascent + lableSpace);
            }
            if (i % 12 == 7) {
                g.setColor(Color.blue);
                g.drawString("G" + (i / 12 - 1), 2, i * barWidth + ascent + lableSpace);
            }
        }
    }