Breaks length is determined by : wait((40+getRandom(20))); inside the loop (that means 40s to 60s, randomly).
Period between beats (in seconds, with decimals) is determined by : def period = (5+getRandom(6))/10.0;
Number of beats is line : def nb2 = 20+getRandom(100);