Joe's loop code with arrays

import ddf.minim.*; AudioSnippet loops [] = new AudioSnippet[10]; int randomNum = int (random(1,10)); void setup {  size(200,200); Minim.start(this); for(int i = 1; i < 10; i++) {    loops[i] = Minim.loadSnippet("loop"+i+".wav"); }  println(randomNum); } void draw {  background(255); play; } void play {  loops[randomNum].cue(0); loops[randomNum].play; delay(loops[randomNum].length); loops[randomNum].pause; randomNum = (int) random(1,10); println(randomNum); }