# How to add multiple waves and different colours?

**URL:** <https://discourse.processing.org/t/how-to-add-multiple-waves-and-different-colours/19169>\
**Category:** Libraries\
**Created:** [March 30, 2020, 7:27am UTC](https://discourse.processing.org/t/how-to-add-multiple-waves-and-different-colours/19169 "2020-03-30T07:27:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![firetryer](https://avatars.discourse-cdn.com/v4/letter/f/d6d6ee/32.png) [@firetryer](https://discourse.processing.org/u/firetryer)\
**Post date:** [March 30, 2020, 7:27am UTC](https://discourse.processing.org/t/how-to-add-multiple-waves-and-different-colours/19169/1 "2020-03-30T07:27:28Z")

</div>

```auto
import processing.sound.*;

SoundFile song;
int n;
Circle[] ellipse;
float ty = 0;
float noiseScale = 0.02;

void setup() {
  size(400,400);
  
  song = new SoundFile(this, "kgf.mp3");
  song.loop();
  
  n =100;
  ellipse = new Circle[n];
  
  for(int i=0; i<n; i++) {
    ellipse[i] = new Circle(i);
  }
}

void draw(){
  background(0);
  
  for(int i=0; i<n; i++) {
    ellipse[i].display();
  }
}

class Circle{
  // float noise;
  // //int index;
  // color c;
  
  Circle(int index) {
  // //x = random(width);
  // //y = random(height);
  // //this.index = index;
  // //noise = 0.0000000001;    
  // //int randomColor = int(random(1,4));
  // // c = color(255, 255,255);
  }
  
  void display() {
    
    //noStroke();
    // fill(130, 5);
    float tx = 0;
    float x = 0, y = 0;
    
    for(int i = 0; i < width; i++) {
      stroke(noise(x*y)+100, 20,20 );
      // stroke(c);
      ellipse(i*5,noise(tx,ty)*width, 50, 5);
      tx += map(i, 0, width, 0.00001, 0.1);
      
      //x++;
      //y++;
      frameRate(60);
    }
    ty += map(20, 0, height, 0.00001, 0.1);
  }
}

```
