int[] bassline = { 3,0,0,0,3,0,0,0,0,2,0,0,0,1,0,0,0,0 };
int[] bari = { 0,1,1,0,1,1,1,0,0,0,0,1,1,0,1,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,1,1,0,0,1 };
void setup()
{
  size(300,300);
  background(25);
  smooth();
  noStroke();
}

void draw()
{
  int rH = 15;
  int rows = height/rH;
  
  fill(150);
  int i = 0;
  for (int y = rH; y <= height+rH; y=y+rH ) {
    for (int x = 0; x <= width; x=x+rH ) {
      int note = (bassline[i]+1)*4;
      int myY = y - note;
      rect(x,myY,rH-1,note);
      i = (i == bassline.length-1) ? 0 : i+1;
     }
   }
  
  fill(190);
  int n = 0;
  for (int k = 0; k < height+rH; k=k+rH ) {
    for (int j = 0; j <= width; j=j+rH) {
      int note = (bari[n] == 0) ? rH/2 : rH-1;
      int myK = k - note;
      ellipse(j,k,note,note);
      n = (n == bari.length-1) ? 0 : n+1;
    }
  }
  
  stroke(255);
  beginShape(LINE_STRIP);
  for (float p = 0; p < 150; p=p+.05 ) {
    float x = cos(p)*p + random(10);
    float y = sin(p)*p + random(10);
    float z = p;
    vertex(width/2+x,height/2+y,z);
   }
   endShape();
    
}
Exercise 1.C: SoundForm
Using only grayscale values, develop an abstract pattern reflecting the structure of one of your favorite songs. Use three or more "for" and "if" structures.