public void initPitcheslist(int notesNum) {

        int i = 0, noteIdx = 0;
        int octaveOffset = 0;
        int altIndex = this.currenttonality.getAlterationsNumber();
        pitcheslist.clear();

        if (this.isCurrentKeyBass()) {
            octaveOffset = -2;
            if (notesNum == 9) {
                noteIdx = 4; // starts from G
            }
        } else if (this.isCurrentKeyTreble()) {
            octaveOffset = 0;
            if (notesNum == 9) {
                noteIdx = 2; // starts from E
            }
        }

        for (i = 0; i < notesNum; i++) {
            int alteration = 0;
            if (this.currenttonality.issharp()) {
                alteration = sharpsMatrix[altIndex][noteIdx];
            } else if (this.currenttonality.isflat()) {
                alteration = 0 - flatsMatrix[altIndex][noteIdx];
            }

            pitcheslist.add(sharpsMatrix[0][noteIdx] + (octaveOffset * 12) + alteration);

            if (noteIdx == 6) {
                octaveOffset++;
                noteIdx = 0;
            } else {
                noteIdx++;
            }
        }

        //  for (i = 0; i < pitcheslist.size(); i++)
        //	  System.out.println("pitchtab #" + i + ": " + pitcheslist.get(i));
    }