Browse Source

graphic fixes

develop
Carmine De Rosa 5 years ago
parent
commit
87ff91b18d
  1. 13
      Processing/Sampler/Sampler.pde

13
Processing/Sampler/Sampler.pde

@ -20,7 +20,7 @@ String swingLabel = "100%";
boolean[][] samples;
void setup() {
size(640, 460);
size(640, 460, P2D);
background(255);
loadData();
setData();
@ -28,19 +28,20 @@ void setup() {
void draw() {
background(50);
stroke(255);
strokeWeight(3);
fill(200);
printControllerStatus();
if(controller[0] == "PLAY") {
for(int i=0; i<numSounds; i++) {
for(int y=0; y<divider; y++) {
fill(samples[i][y] ? 120: 90);
rect((width/divider)*y,((height-100)/numSounds)*i, width/divider, (height-100)/numSounds);
stroke(50);
rect((width/divider)*y,((height-100)/numSounds)*i, width/divider, (height-100)/numSounds, 5);
}
}
if(controller[0] == "PLAY") {
for(int i=0; i<numSounds; i++) {
fill(150);
if(samples[i][beat]) {
@ -48,7 +49,9 @@ void draw() {
file[i].stop();
file[i].play();
}
rect((width/divider)*beat,((height-100)/numSounds)*i, width/divider, (height-100)/numSounds);
stroke(50);
rect((width/divider)*beat,((height-100)/numSounds)*i, width/divider, (height-100)/numSounds, 5);
}
beat++;

Loading…
Cancel
Save