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; boolean[][] samples;
void setup() { void setup() {
size(640, 460);
size(640, 460, P2D);
background(255); background(255);
loadData(); loadData();
setData(); setData();
@ -28,19 +28,20 @@ void setup() {
void draw() { void draw() {
background(50); background(50);
stroke(255);
strokeWeight(3);
fill(200); fill(200);
printControllerStatus(); printControllerStatus();
if(controller[0] == "PLAY") {
for(int i=0; i<numSounds; i++) { for(int i=0; i<numSounds; i++) {
for(int y=0; y<divider; y++) { for(int y=0; y<divider; y++) {
fill(samples[i][y] ? 120: 90); 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++) { for(int i=0; i<numSounds; i++) {
fill(150); fill(150);
if(samples[i][beat]) { if(samples[i][beat]) {
@ -48,7 +49,9 @@ void draw() {
file[i].stop(); file[i].stop();
file[i].play(); 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++; beat++;

Loading…
Cancel
Save