I had a quick look at minim and couldn’t see or find any examples of multiple channel audio in (more than 2), so i discounted it from my search - minim.getLineIn(); only seems to be for mono and stereo from the default sound card?
so i’ve had a look at beads and i got to the following;
import beads.*;
import java.util.Arrays;
AudioContext ac;void setup() {
size(800,800);ac = new AudioContext();
UGen microphoneIn = ac.getAudioInput();
Gain g = new Gain(ac, 1, 0.5);
g.addInput(microphoneIn);
ac.out.addInput(g);ac.start();
}color fore = color(255, 102, 204);
color back = color(0,0,0);void draw() {
loadPixels();
//set the background
Arrays.fill(pixels, back);
//scan across the pixels
for(int i = 0; i < width; i++) {
//for each pixel work out where in the current audio buffer we are
int buffIndex = i * ac.getBufferSize() / width;
//then work out the pixel height of the audio data at that point
int vOffset = (int)((1 + ac.out.getValue(0, buffIndex)) * height / 2);
//draw into Processing’s convenient 1-D array of pixels
vOffset = min(vOffset, height);
pixels[vOffset * height + i] = fore;
}
updatePixels();
}
but this is for a single audio input - i have found Generated Documentation (Untitled) and think that defaultaudioformat is what i need - but i have no idea how to implement it within the above ?