/** * This sketch demonstrates how to use the getControls method of a Controller object. * The class used here is an AudioOutput but you can also get the controls of * AudioSample, AudioSnippet, AudioInput, and AudioPlayer objects. * getControls returns an array of JavaSound Control objects. You can determine what type * of Control each one is by using the getType method and then comparing the type to one * of the static control types of Controller (see the hasControl example). If you plan to use the * getControls method you must also import the Control class from JavaSound (see the source). */ import ddf.minim.*; import ddf.minim.signals.*; import javax.sound.sampled.Control; Minim minim; AudioOutput out; Control[] controls; void setup() { size(512, 200); minim = new Minim(this); out = minim.getLineOut(); controls = out.getControls(); textFont(createFont("Arial", 12)); } void draw() { background(0); for ( int i = 0; i < controls.length; i++ ) { text("Control " + (i+1) + " is a " + controls[i].toString() + ".", 5, 15 + i*15); } } void stop() { // always close Minim audio classes when you are finished with them out.close(); minim.stop(); super.stop(); }