Hello,
I am very new to processing and hardly know any programming language. Im trying to edit some of the parameters of this sketchbook example from the beads library. If anyone can help me out, that would be great.
I have this line of code here:
I am very new to processing and hardly know any programming language. Im trying to edit some of the parameters of this sketchbook example from the beads library. If anyone can help me out, that would be great.
I have this line of code here:
- * Just do the work straight into Processing's draw() method.
- */
- void draw() {
- loadPixels();
- //set the background
- Arrays.fill(pixels, back);
- //scan across the pixels
- for(int i = 1; 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
- pixels[vOffset * height + i] = fore;
- }
- updatePixels();
- }
1