public void getRandom() {
        //generate a temp value for the random;
        int temp = 0;
        if (!isVisible()) {
            setVisible(true);
        }
        temp = getBpm() + r.nextInt(tolerance);
        if (temp > max) {
            BPM = getBpm() - r.nextInt(tolerance);
        } else {
            BPM = temp;
        }

    }