@Override
    public void run() {
        setVisible(true);
        while (true) {
            long tEnd = System.currentTimeMillis();
            long tDelta = tEnd - tStart;
            double elapsedSeconds = tDelta / 1000.0;
            if (elapsedSeconds > delay) {
                tStart = System.currentTimeMillis();
                getRandom();
                ds.setBPM(BPM);
                ds.setDelay(delay);
            }
        }
    }