class Test extends Sprite { float eRadius; Test(SoundInfo sinfo){ super(sinfo); textFont(createFont("Arial", 12)); topLevel = 0; eRadius = 20; ellipseMode(CENTER); } float topLevel; void render(boolean isCut){ super.render(isCut); fill(255,255,255); textAlign(CENTER); textSize(si.kick); text("KICK", width/4, height/2); textSize(si.snare); text("SNARE", width/2, height/2); textSize(si.hat); text("HAT", 3*width/4, height/2); si.kick = constrain(si.kick * 0.95, 16, 32); si.snare = constrain(si.snare * 0.95, 16, 32); si.hat = constrain(si.hat * 0.95, 16, 32); eRadius = map(si.level, 0, maxLevel, 0, 100); fill(0, 250, 250); eRadius *= 0.9; ellipse(width/2, 200, eRadius, eRadius); fill(0); textAlign(LEFT); textSize(14); text("level > " + str(si.level), 50, 100); if(topLevel < si.level) topLevel = si.level; text("top-level > " + str(topLevel), 50, 140); } }