The Snail God

Long ago, in a land far away, a group of people lived peacefully in the village of “Intro to IM”. The village was known to harbor numerous people with extraordinary processing skills and arduino skills. Unfortunately, this led to no one wanting to become a farmer, so no food was harvested each year and therefore everyone was starving. As time went by, morale of the people began to decrease rapidly, and something had to be done.

In search of hope, Prophet Aaron Sherwood led a team of villagers to find contact with other villages in search of resources. The crew went through endless encounters of hardships, losing members along the way and struggling every second. However, when it seemed as if all hope was lost, there stood on top of the cliff a giant snail.

The Snail God (3739 B.C.)

 

 

 

 

 

 

The view was stunning. The sky blue brightness resembled the afternoon cloud, and patterns were on its body which were flickering in different colors. On its back was a metal spiral ball, a weight that the Snail God had to carry around. Prophet Aaron spoke on behalf of the village “O Snail God, what can we do to bring prosperity to the village? What is to be done to make the village happy?” The Snail God hesitated for a while, but finally decided to expose the answer. “To do so, the answer is very simple. You must provide the villagers with a good (A) end of the season assessment (grade) and everyone will become so happy that they will forget about the famine. Trust me, it will work.” And with those final words, the Snail God disappeared, floating until it reached heaven’s doors.

Prophet Aaron, once reaching the village, did what the Snail God had advised him to. Even if he didn’t want to, he gave every villager a high-end review. And like magic, the people started to become joyful again. With the new boosted morale, better outcomes were to come through processing and arduino, which meant better artworks produced. The village was finally able to sell these artworks again for trade, and eventually the famine disappeared and everyone lived happily ever after.


I was bored and it’s 2am in the morning so I decided to write a quick story about the work I had made. Everything above is fictional (although I hope it was true) and nothing is to be taken seriously. For the Snail God, the secret of its identity is revealed below.

int r =10;
float a = 1;

void setup(){
  size(600,800);
  rectMode(CENTER);
  background(255);
  
  for(int i = 150;i<550;i=51*i/50){ //for the background lines
    
    line(0,i,600,i);
    ;
  }
  
  //noFill();
  stroke(0); // for black linebrush for peacock
  line(0,750,50,600);
  
  fill(135,206,250);
  beginShape(); //begin shape for peacock base
  //fill(255);
  
  vertex(50,600); //start vertex, most left
  bezierVertex(-120,600,200,180,200,100); // front body curve
  
  
  vertex(198,66);
  bezierVertex(300,100,-50,450,400,570);
  
  vertex(400,570);
  bezierVertex(550,650,450,700,600,750);
  
  
  endShape();
  //fill(0);
  beginShape();
  arc(183,100,35,15,0,PI); //chin chin
  line(165,100,155,105); //beak
  line(155,105,165,95);  //beak
  line(165,95,145,105); //beak
  line(145,105,158,90); //beak
  line(158,90,160,83); //beak
  
  ellipse(175,85,10,10); //eyes
  fill(0,0,0);
  ellipse(175,85,5,5); //eyes
  
  //fill(0,0,255);
  line(160,83,120,65); //first spike
  line(120,65,163,77);
  line(163,77,140,45); //second spike
  line(140,45,165,75);
  line(165,75,169,72);
  line(169,72,167,42); // third spike
  line(167,42,173,70);
  line(173,70,179,68);
  line(179,68,188,40); //fourth spike
  line(188,40,183,67);
  line(183,67,193,66);
  line(193,66,210,47); //fifth spike
  line(210,47,198,66);
  endShape();
  fill(133,133,133);
  beginShape();
  vertex(0,800);
  vertex(0,750);
  vertex(50,600);
  vertex(600,750);
  vertex(600,800);
  endShape();
  pattern(50,500,15);
  pattern(300,650,15);
  pattern(100,450,15);
  pattern(140,550,15);
  pattern(230,580,15);
  pattern(180,500,15);
  pattern(230,580,15);
  pattern(230,580,15);
  pattern(420,660,15);
  pattern(320,580,15);
  pattern(380,640,15);
  pattern(120,340,15);
}

void draw(){
  pushMatrix();
  translate(340,370);
  for (int i = 0; i < 10000; i++) {
        float t = radians(i);
        float tt = radians(i+1);
        line(t*cos(t),t*sin(t),tt*cos(tt),tt*sin(tt));
       /*
        float x = 400 + a * t * r * cos(t);
        float y = 400 + a * t * r * sin(t);
        point(x, y);
        */
    }
    popMatrix();
  
  
}

void pattern(int x,int y,int z){ //draw the peacock pattern at x,y coordinates
  //stroke(255);
  ellipseMode(RADIUS);
  fill(random(255),random(255),random(255));
  ellipse(x,y,z,z);
  
  ellipseMode(RADIUS);
  fill(0);
  ellipse(x,y-z/3,z/2,z/2);
  
  
  
}

 

 

Response: Eyeo2012

Considering that this happened in 2012, I believe that this video shows numerous positive accomplishments that people like Casey Reas have made that are applied in our works today.

To begin with, I want to acknowledge the multi-dimensional aspect of processing. For instance, the work “Signals” done by Casey Reas is an artwork created by technology which portrays the biological procedure of proteins communicating in cancer cells. His artwork already crosses three fields of mastery: art, computer science, and biology. Even on the next example, Reas explains how for years he had been gathering information about certain architecture works before he starts coding. The fact that this individual is able to weave multiple seemingly unrelated works into creating a work that can amaze others is in my opinion very touching and inspiring. His creativity, I believe, is certainly something I can learn of and hopefully apply into my own work.

Michael Noll also contributes greatly to what tools we have today, because I agree with the statement that “the ability to use a rational device to create randomness is amazing”. And not only in military books, or in technical, mathematical programs, it is great to hear from Noll and Reas that randomness in fact can be used to generate creative pieces of work. The element of surprise that people receive when an unexpected result arrives due to randomness is also one of the aesthetics of what we now call a “cool” project.

Overall, Reas helped me re-visualize what kind of projects I would like to do in the future. Now that the lessons I have learned are ingrained within me, I know that IM is one of the few classes where I will be able to really express the creativeness inside me. And to do that, I will definitely refer to the key points of this video: traversing between multiple fields, and using randomness as a tool.

Beach at Day or Night – Self-Portrait Processing

Hi! So for this project, I decided to make a portrait of myself at a beach. I made the background first as part of the setup so I can change the value later on. It is sky blue at the start, along with the sun being yellow and the cloud being white. Then I have the sand and the sea, while my figure is at the front.

The main feature of my project I would say is the ability to switch to “Night Mode”, in which when I press a button everything becomes darker and when I click on the screen everything becomes daytime again. Below is an example of me toying around with my project.

https://youtu.be/7TLhmqCURAA

I do not know why but the embedded feature does not work for this link.

Also below is the code for my project.

color rectColor = color(255);
color circleColor = color(255);
color a = color(255);
color b = color(249,215,28);

int count = 1;
void setup(){
  size(500,1000);
  background(135,206,235);
}

void draw(){
  
   //sky blue
  
  
  fill(194,178,128); // sand
  
  beginShape();
  vertex(0,400);
  vertex(0,1000);
  vertex(500,1000);
  endShape(CLOSE);
  
  fill(0,119,190);
  beginShape();
  vertex(0,300);
  vertex(0,400);
  vertex(500,1000);
  vertex(600,1000);
  vertex(600,300);
  endShape(CLOSE);
  
  fill(b);
  ellipse(400,50,60,60); //sun
  
  fill(240,184,160); //skin color
  ellipse(250,350,300,300); //face
  rect(100,500,300,500); //body
  
  pushMatrix();
 
  translate(99,0);
  rotate(radians(10)); //left arm
  rect(50,550,50,500);

  
  
  rotate(radians(335.3)); //right arm
  rect(150,620,50,400);
  
  popMatrix();
  
  fill(255);
  ellipse(200,300,45,30); //left eye
  ellipse(300,300,45,30); //right eye
  
  fill(0);
  ellipse(200,300,20,20); //left pupil
  ellipse(300,300,20,20); //right pupil
  
  fill(255,0,0);
  arc(250,400,120,80,0,3.14); //mouth
  line(190,400,310,400);  //line
  
  fill(0); //hair
  beginShape();
  vertex(110,280);
  vertex(180,205);
  vertex(300,190);
  vertex(370,235);
  endShape(CLOSE);
  
  fill(101,67,33);
  ellipse(180,600,10,10); //left nip
  ellipse(320,600,10,10); //right nip
  
  fill(50,80,120);
  rect(100,900,300,200); // pants
  
  fill(a);
  arc(100,70,100,100,PI,TWO_PI); //for the clouds
  arc(135,70,100,100,0,PI);
  fill(0);
  line(50,70,85,70);
  line(150,70,185,70);
  

}

void keyPressed(){
  background(43,47,119);
  a = color(190,169,222);
  b = color(244,241,201);
}

void mouseClicked(){
  background(135,206,235);
  a = color(255);
  b = color(249,215,28);
}

 

Responses to Readings

HER CODE GOT HUMANS ON THE MOON—AND INVENTED SOFTWARE ITSELF

For a woman who created influential change in a STEM field during the 1960s, Hamilton is surely an outlier as well as a role model to women and girls who wish to follow similar paths. What blew my mind during the Apollo mission procedure was the meticulous behavior of Hamilton. While others hastily moved on with the main project, Hamilton went step-by-step and made sure everything was in order, including the P01 note. Moreover, having extra responsibilities while being a mother meant work would be more tedious towards someone like Hamilton, but because she enjoyed what she did she was able to endure the hardships that came along with it.

Ultimately, Hamilton’s example is great since it paves a new way of thinking about women in STEM fields. And because of great women like Hamilton, Marie Curie, Rosalind Franklin, etc. we now live in a society where women are encouraged to follow their dreams of being a scientist or an engineer and are given the environment to do so. Let us hope that in the future theses environments can be created for girls in third world countries as well.

I do agree that aesthetics can correlate to better results, yet I also want to add on to the emotion part, while providing my own argument. When we look at a device that is aesthetically pleasing, we are suddenly filled with a positive emotion since “something” had exceeded our expectations. Because the object has given us happiness, we reciprocate and think highly of our counterpart. This, however, can also be dangerous since it may cause us to overrate the object, thus giving it a better judgement than its actual perceived functionality. Even though the positive feeling may “arouse curiosity, engages creativity, and makes the brain into an effective learning organism”, I believe that even in real life situation we trust ourselves too much that we think better of what something actually is. For instance, if I go to a sushi restaurant that has normal sushi but has the highest quality of service, I would probably still say it is a great restaurant. This packages my statement but the people who listens to my rumors may also believe that the food is good as well. If you are interested in more of these examples, people from VICE have been making fake restaurants and models to reach the highest points just by spreading “positive” rumors. When we hear something positive, I believe that at the end of the day we need to question ourselves once more if we are judging a certain object by its functionality or its objective features rather than our subjective emotions.

Pumped Up Kicks Studio Session

Hey all,

So for my midterm I decided to make a cover for one of my favorite songs, Pumped Up Kicks.

DRUM & BASS

First things first, I needed a drum or a bass sound that would imitate the original low pitch sounds of the song itself. What I built was a drum kit of three Servos, with different sizes of foam balls and spoon heads attached to each. In order to amplify the sound, I built structures around the tapping so that the sound waves would flow through one direction that was not blocked and the spoon heads also increased the noise of tapping as inside was hollow. Below is a picture of the drum kit. The one on the middle has the top opened because I constantly need to fix the Servo as it was harder to reach than other Servos and it had some initial malfunctions. Lastly, the Servos, or bass drums, were hitting through a function called Bass() which matched the actual beat of the song.

 

ACOUSTIC (VERSE & CHORUS)

For the sound inside, I used a Piezo Buzzer but mask-taped the buzzer so that I could amplify the sound. Most of my acoustic part was coded. Basically I had a BassHelper() function which would match with Bass() [Servo Drums] and also provide an intro to the Verse() function, which was the tone for the first verse. Then came the Chorus() function, and the song ended there. In order to run all of this together, I had to use millis() instead of delay as well as create the song from scratch by myself. Here is the whole code: It may be hard to read, but it is an easy concept: just using millis() to code every tone for each function.

#include <Servo.h>
//#ifndef _Tone_h
#define _Tone_h

#include <stdint.h>

/*
|| Public Constants
*/

#define NOTE_B0  31
#define NOTE_C1  33
#define NOTE_CS1 35
#define NOTE_D1  37
#define NOTE_DS1 39
#define NOTE_E1  41
#define NOTE_F1  44
#define NOTE_FS1 46
#define NOTE_G1  49
#define NOTE_GS1 52
#define NOTE_A1  55
#define NOTE_AS1 58
#define NOTE_B1  62
#define NOTE_C2  65
#define NOTE_CS2 69
#define NOTE_D2  73
#define NOTE_DS2 78
#define NOTE_E2  82
#define NOTE_F2  87
#define NOTE_FS2 93
#define NOTE_G2  98
#define NOTE_GS2 104
#define NOTE_A2  110
#define NOTE_AS2 117
#define NOTE_B2  123
#define NOTE_C3  131
#define NOTE_CS3 139
#define NOTE_D3  147
#define NOTE_DS3 156
#define NOTE_E3  165
#define NOTE_F3  175
#define NOTE_FS3 185
#define NOTE_G3  196
#define NOTE_GS3 208
#define NOTE_A3  220
#define NOTE_AS3 233
#define NOTE_B3  247
#define NOTE_C4  262
#define NOTE_CS4 277
#define NOTE_D4  294
#define NOTE_DS4 311
#define NOTE_E4  330
#define NOTE_F4  349
#define NOTE_FS4 370
#define NOTE_G4  392
#define NOTE_GS4 415
#define NOTE_A4  440
#define NOTE_AS4 466
#define NOTE_B4  494
#define NOTE_C5  523
#define NOTE_CS5 554
#define NOTE_D5  587
#define NOTE_DS5 622
#define NOTE_E5  659
#define NOTE_F5  698
#define NOTE_FS5 740
#define NOTE_G5  784
#define NOTE_GS5 831
#define NOTE_A5  880
#define NOTE_AS5 932
#define NOTE_B5  988
#define NOTE_C6  1047
#define NOTE_CS6 1109
#define NOTE_D6  1175
#define NOTE_DS6 1245
#define NOTE_E6  1319
#define NOTE_F6  1397
#define NOTE_FS6 1480
#define NOTE_G6  1568
#define NOTE_GS6 1661
#define NOTE_A6  1760
#define NOTE_AS6 1865
#define NOTE_B6  1976
#define NOTE_C7  2093
#define NOTE_CS7 2217
#define NOTE_D7  2349
#define NOTE_DS7 2489
#define NOTE_E7  2637
#define NOTE_F7  2794
#define NOTE_FS7 2960
#define NOTE_G7  3136
#define NOTE_GS7 3322
#define NOTE_A7  3520
#define NOTE_AS7 3729
#define NOTE_B7  3951
#define NOTE_C8  4186
#define NOTE_CS8 4435
#define NOTE_D8  4699
#define NOTE_DS8 4978
int button = 8;
int PBuzz = 7;
int PBuzz1 = 5;
Servo hello;
Servo hello1;
Servo hello2;
int angle = 0;
//For Bass Support
unsigned long previousMillis = 0;
int intervala[] = {750,550,300};
int currentNote = 0;

//For Chorus
unsigned long previousMillis1 = 0;
int intervalb[] = {250,300,400,500,600,450,350};
int currentNote1 = 0;

//For Verse
unsigned long previousMillis2 = 0;
int intervalc[] = {250,500,700};
int currentNote2 = 0;

//For Bass Servo
unsigned long previousMillis3 = 0;
int intervald[] = {50,250,300,450};
int currentState = 0;

//For Main
unsigned long previousMillis4 = 0;
int counter = 0;

const int ledPin = 4;
void setup() {
  // put your setup code here, to run once:
  hello.attach(6);
  hello1.attach(9);
  hello2.attach(10);
  pinMode(PBuzz,OUTPUT);
  pinMode(PBuzz1,OUTPUT);
  pinMode(button,INPUT);
  pinMode(ledPin,OUTPUT);
  Serial.begin(9600);
  
}

void loop() {
  int knobValue = analogRead(A0);
  
  Serial.println(knobValue);
  
  if(knobValue >= 1000){
    unsigned long currentMillis4 = millis();
    digitalWrite(ledPin,HIGH);
    Bass();
    if(currentMillis4 - previousMillis4 >= 10 && counter == 0){
      previousMillis4 = currentMillis4;
      BassHelper();
    }
    if (currentMillis4-previousMillis4 >= 95 && counter == 1){
      previousMillis4 = currentMillis4;
      Verse();
    }
  
    if(currentMillis4-previousMillis4 >= 20 && counter ==2){
      previousMillis4 = currentMillis4;
      Chorus();
    }
    
  
  }
  
  
    digitalWrite(ledPin,LOW);
    
  }

 void Bass(){
  unsigned long currentMillis3 = millis();
  //hello2 here
  if(currentMillis3 - previousMillis3 >= intervald[0] && currentState ==0){
    previousMillis3 = currentMillis3;
    hello2.write(280);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==1){
    previousMillis3 = currentMillis3;
    hello2.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[3] && currentState ==2){
    previousMillis3 = currentMillis3;
    hello2.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==3){
    previousMillis3 = currentMillis3;
    hello2.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[1] && currentState ==4){
    previousMillis3 = currentMillis3;
    hello2.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==5){
    previousMillis3 = currentMillis3;
    hello2.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= 100 && currentState ==6){
    previousMillis3 = currentMillis3;
    hello2.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==7){
    previousMillis3 = currentMillis3;
    hello2.write(90);
    currentState += 1;
  }
  //hello1 here

  if(currentMillis3 - previousMillis3 >= intervald[0] && currentState ==8){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==9){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[3] && currentState ==10){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==11){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[1] && currentState ==12){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==13){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= 100 && currentState ==14){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==15){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  

  //hello here

  if(currentMillis3 - previousMillis3 >= intervald[0] && currentState ==16){
    previousMillis3 = currentMillis3;
    hello.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==17){
    previousMillis3 = currentMillis3;
    hello.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[3] && currentState ==18){
    previousMillis3 = currentMillis3;
    hello.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==19){
    previousMillis3 = currentMillis3;
    hello.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[1] && currentState ==20){
    previousMillis3 = currentMillis3;
    hello.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==21){
    previousMillis3 = currentMillis3;
    hello.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= 100 && currentState ==22){
    previousMillis3 = currentMillis3;
    hello.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==23){
    previousMillis3 = currentMillis3;
    hello.write(90);
    currentState += 1;
  }

  //hello1 here

   if(currentMillis3 - previousMillis3 >= intervald[0] && currentState ==24){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==25){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[3] && currentState ==26){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==27){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[1] && currentState ==28){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==29){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= 100 && currentState ==30){
    previousMillis3 = currentMillis3;
    hello1.write(180);
    currentState += 1;
  }
  if(currentMillis3 - previousMillis3 >= intervald[2] && currentState ==31){
    previousMillis3 = currentMillis3;
    hello1.write(90);
    currentState = 0;
  }


  
 
  
//   hello1.write(90);
//  delay(300);
//   hello.write(90);
//  delay(300);
//  hello2.write(90);
//  delay(300);
 }
  
void Verse(){
  unsigned long currentMillis2 = millis();
  if(currentMillis2- previousMillis2 >= 700 && currentNote2 == 0){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 1){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 2){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 3){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_GS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 4){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 5){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,600);
    currentNote2 += 1;
  }

  
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 6){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_GS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 7){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 8){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_DS4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 9){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C5,300);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= intervalc[2] && currentNote2 == 10){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 11){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2>= intervalc[0] && currentNote2 == 12){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 13){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 14){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 15){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 16){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 17){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 18){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,400);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 19){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 20){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 21){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= 800 && currentNote2 == 22){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 23){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 24){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 25){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_GS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 26){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 27){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_DS4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 28){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,600);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 29){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_DS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 30){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_G3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 31){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 32){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_G4,300);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= intervalc[2] && currentNote2 == 33){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 34){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 35){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 36){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 37){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,300);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 450 && currentNote2 == 38){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_G3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 39){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 40){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 41){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,300);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 400 && currentNote2 == 42){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 400 && currentNote2 == 43){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }

  //NEW LOOP!
  
  if(currentMillis2- previousMillis2 >= 700 && currentNote2 == 44){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 45){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 46){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 47){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_GS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 48){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 49){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,600);
    currentNote2 += 1;
  }

  
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 50){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_GS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 51){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 52){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_DS4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 53){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C5,300);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= intervalc[2] && currentNote2 == 54){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 55){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2>= intervalc[0] && currentNote2 == 56){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 57){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 58){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 59){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 60){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 61){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 62){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,400);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 63){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 64){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 65){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= 800 && currentNote2 == 66){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 67){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 68){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 69){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_GS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 70){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 71){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_DS4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 72){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,600);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= intervalc[1] && currentNote2 == 73){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_DS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 74){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_G3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 75){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 250 && currentNote2 == 76){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_G4,300);
    currentNote2 += 1;
  }


  if(currentMillis2- previousMillis2 >= intervalc[2] && currentNote2 == 77){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 78){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 79){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 80){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 81){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,300);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 450 && currentNote2 == 82){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_G3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 83){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 84){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_C4,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= intervalc[0] && currentNote2 == 85){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,300);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 400 && currentNote2 == 86){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 400 && currentNote2 == 87){
    previousMillis2 = currentMillis2;
    tone(PBuzz,NOTE_AS3,200);
    currentNote2 += 1;
  }
  if(currentMillis2- previousMillis2 >= 800 && currentNote2 == 88){
    previousMillis2 = currentMillis2;
    currentNote2 += 1;
    counter += 1;
  }
}

void BassHelper(){
  //int intervala[] = {900,900,600};
    unsigned long currentMillis = millis();
      //Function 1:Bass Helper
  if(currentMillis - previousMillis >= 500 && currentNote ==0){
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_F2,300);
    currentNote += 1;
  }
  
  //delay(700);
  if (currentMillis - previousMillis >= intervala[0] && currentNote == 1) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_F2,200);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 2) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_F2,200);
    currentNote +=1;
    }
    
    
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 3) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_G2,200);
    currentNote +=1 ;
    }
    
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 4) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS2,300);
    currentNote += 1;
    }
  //delay(700);
  if (currentMillis - previousMillis >= intervala[0] && currentNote == 5) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS2,150);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 6) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,200);
    currentNote += 1;
    }
    
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 7) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C3,100);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 8) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS3,300);
    currentNote += 1;
    }
  //delay(700);
  if (currentMillis - previousMillis >= intervala[0] && currentNote == 9) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS3,150);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 10) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS3,200);
    currentNote += 1;
    }
    
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 11) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C3,100);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 12) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,300);
    currentNote += 1;
    }
  //delay(700);
  if (currentMillis - previousMillis >= 700 && currentNote == 13) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,150);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= 450 && currentNote == 14) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,200);
    currentNote += 1;
    }
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 15) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_G2,200);
    currentNote += 1;
    }
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 16) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS2,200);
    currentNote += 1;
    }
    //Loop One more time
  if(currentMillis - previousMillis >= 300 && currentNote ==17){
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_F2,300);
    currentNote += 1;
  }
  
  //delay(700);
  if (currentMillis - previousMillis >= intervala[0] && currentNote == 18) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_F2,200);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 19) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_F2,200);
    currentNote +=1;
    }
    
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 20) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_G2,200);
    currentNote +=1 ;
    }
    
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 21) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS2,300);
    currentNote += 1;
    }
  //delay(700);
  if (currentMillis - previousMillis >= intervala[0] && currentNote == 22) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS2,150);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 23) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,200);
    currentNote += 1;
    }
    
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 24) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C3,100);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 25) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS3,300);
    currentNote += 1;
    }
  //delay(700);
  if (currentMillis - previousMillis >= intervala[0] && currentNote == 26) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS3,150);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 27) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS3,200);
    currentNote += 1;
    }
    
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 28) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C3,100);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= intervala[1] && currentNote == 29) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,300);
    currentNote += 1;
    }
  //delay(700);
  if (currentMillis - previousMillis >= 700 && currentNote == 30) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,150);
    currentNote += 1;
    }
  //delay(500);
  if (currentMillis - previousMillis >= 450 && currentNote == 31) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS2,200);
    currentNote += 1;
    }
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 32) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_G2,200);
    currentNote += 1;
    }
  //delay(200);
  if (currentMillis - previousMillis >= intervala[2] && currentNote == 33) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS2,200);
    currentNote += 1;
    }

  //ADD INTRO HERE
  if (currentMillis - previousMillis >= 500 && currentNote == 34) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_GS4,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 35) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C5,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 36) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS5,400);
    currentNote += 1;
    }

    
  if (currentMillis - previousMillis >= 1050 && currentNote == 37) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C5,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 38) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS5,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 39) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_G5,400);
    currentNote += 1;
    }

    
  if (currentMillis - previousMillis >= 1050 && currentNote == 40) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS4,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 41) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS5,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 42) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_G5,400);
    currentNote += 1;
    }


  if (currentMillis - previousMillis >= 1050 && currentNote == 43) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_AS4,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 44) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_C5,400);
    currentNote += 1;
    }
  if (currentMillis - previousMillis >= 500 && currentNote == 45) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS5,400);
    currentNote += 1;
    
    }
    if (currentMillis - previousMillis >= 500 && currentNote == 46) {
    previousMillis = currentMillis;
    tone(PBuzz,NOTE_DS5,400);
    currentNote += 1;
    counter += 1;
    }
   }

   void Chorus(){
  //Function 2: 
  //int intervalb[] = {250,300,400,500,600,450,350,700};
  unsigned long currentMillis1 = millis();
  if(currentMillis1 - previousMillis1 >= 600 && currentNote1 == 0){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[2] && currentNote1 == 1){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,150);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 2){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 3){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 4){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 5){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 6){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 7){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 500 && currentNote1 == 8){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 500 && currentNote1 == 9){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 500 && currentNote1 == 10){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 11){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 12){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 400 && currentNote1 == 13){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 14){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 15){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 750 && currentNote1 == 16){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,300);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[3] && currentNote1 == 17){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 450 && currentNote1 == 18){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 300 && currentNote1 == 19){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,250);
    currentNote1 += 1 ;
  }
  
  //New loop, with added
  
  if(currentMillis1 - previousMillis1 >= 700 && currentNote1 == 20){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[2] && currentNote1 == 21){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,150);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 22){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 23){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 24){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 25){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 26){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 27){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 28){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 29){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 30){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 31){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 32){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 400 && currentNote1 == 33){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 34){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 35){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 750 && currentNote1 == 36){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,300);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[3] && currentNote1 == 37){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 450 && currentNote1 == 38){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 300 && currentNote1 == 39){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,250);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 300 && currentNote1 == 40){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,250);
    currentNote1 += 1 ;
  }

//NEW LOOP

  if(currentMillis1 - previousMillis1 >= 600 && currentNote1 == 41){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[2] && currentNote1 == 42){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,150);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 43){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 44){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 45){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 46){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 47){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 48){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 500 && currentNote1 == 49){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 500 && currentNote1 == 50){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 500 && currentNote1 == 51){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 52){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 53){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 400 && currentNote1 == 54){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 55){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 56){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 750 && currentNote1 == 57){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,300);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[3] && currentNote1 == 58){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 450 && currentNote1 == 59){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 300 && currentNote1 == 60){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,250);
    currentNote1 += 1 ;
  }
  
  //New loop, with added
  
  if(currentMillis1 - previousMillis1 >= 700 && currentNote1 == 61){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[2] && currentNote1 == 62){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,150);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 63){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 64){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 65){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 66){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 67){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 68){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 69){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 70){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[5] && currentNote1 == 71){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_C5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 72){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_AS4,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 73){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,300);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 400 && currentNote1 == 74){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 75){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[1] && currentNote1 == 76){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 750 && currentNote1 == 77){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,300);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= intervalb[3] && currentNote1 == 78){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 450 && currentNote1 == 79){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_G5,200);
    currentNote1  += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 300 && currentNote1 == 80){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_F5,250);
    currentNote1 += 1 ;
  }
  if(currentMillis1 - previousMillis1 >= 300 && currentNote1 == 81){
    previousMillis1 = currentMillis1;
    tone(PBuzz,NOTE_DS5,250);
    currentNote1 += 1 ;
  }





  
   }

 

INPUT

For the input, I used a potentiometer to crank up, and if the meter reached at least a value of 1000, then the bass and basshelper() would start playing. Then, I had a counter to say that when basshelper() ended, add a count and if that counter matched the number with the next function then the next function would play. Like that, I was able to play the Tone functions one at a time while having the Bass() on for the whole time. Also, I could check if my potentiometer was on by connecting the value to an ledPin and seeing if the light lit up as I cranked the value past 1000. Here is the picture of the board below.

FINAL PRODUCT

Here is a video of a demonstration of the final product. There are also audio explanation of the features as well.

Enjoy!

 

A Brief Rant on the Response to the Brief Rant on the Future of Interaction Design

So, after reading the response, I still stick to what I have said.

First off, yes, he did not provide a solution. And technically, everyone can rant about everything. But if you rant about something, without providing a potential solution or a plausible counter-argument, I believe that your ‘rant’ loses a lot of credibility.

As for my main response to his argument, it did not change at all. I firmly believe that his way. of changing interaction design will remain inefficient unless he can provide an actual solution that will, indeed increase the sentiment of using our hands as tools yet simultaneously keep or improve the efficiency that touching and swiping provides.

He probably wasn’t the first one to ask, “Hey, but isn’t touching and swiping giving less sentimental values?” But the reason it hasn’t been heard, or has been but haven’t been implemented yet is because there are maybe significant drawbacks to doing so. If it was a beneficial argument, I think that people would have incorporated that and tried to actually come up with a solution that is the best of every problem, but efficiency and additional actions do not go hand in hand.

A Brief Rant on the Brief Rant on the Future of Interaction Design

Okay, so this is before I read the response to the first article, and I will upload a similar thought to that article soon. For now, though, here are my thoughts to the original piece.

One on hand, I do comprehend the intention of the author. Bret Victor aims to criticize the current state of design of interaction technology by mocking that the “Pictures Under Glass” (PUG) does not comply well with how our fingers and hands are supposed to use tools. And in a sense, that is true: most of the time the only gestures we utilize are touches, swipes, and a few others. However, I do disagree with his point, and here are two reasons why.

First of all, I want to address this issue in a different perspective. Why make our tools more intricate than it is right now? We use touches and swipes because they are feasible to use. Yes, maybe it gives less sentiment to use these few gestures to go about with our technological devices, yet I do believe that if we were to make them more “hand-interactive”, as the author intends to, most processes will take longer to finish. The goal then, is to try to improve and give sentiment of using our hands without creating more problems.

Furthermore, our tools (phones, tablets) do utilize numerous hand-like gestures. Of course, this is usually when we are playing mobile games, but it is not like they are not capable of doing so. For instance, there is a mobile game where you have to grab your phone/pad and hold it up, trying to balance a ball that is on the screen. The game itself feels like the ball is actually on the device, since the device senses your balance motion. So this again self-explains that although we CAN use these tools, we do not because of maybe the first reason.

 

Midterm Proposal: Song Cover

For my midterm, I wanted to expand on my last weekly assignment, which was to build an instrument using tone and servos. What I had in mind, then was to have a self-made band, or in other words creating a cover for a song using what I have.

The song I have chosen is “Pumped Up Kicks” by Foster the People, and it is actually a cover of the acoustic live version of that. Here is the cover.

So basically, if you listen to the song, there is the drum, the bass guitar, and the acoustic guitar. I will now describe how each component will be re-created through Arduino.

Drum: I have already started on the drums. I made a small kit, as you will see in the video below, and now I just need the servos to be attached and do the job for me. I will also have to code the speed at which the servos, or should I say drumsticks, will move up and down.

https://www.youtube.com/watch?v=pbI4eq4lDOw&feature=youtu.be

I do not know why this video is not showing as embedded, but the link should redirect you to the video.

Bass, Acoustic: Both the Bass guitar and the acoustic, I believe, should be recorded on Tone. However, as you can see, while the bass plays constantly throughout the song, the acoustic solo is only partial. So I have to make sure while one is looping constantly the other should only play once when I perform a certain action.

All of this will be performed through an analog input. When I fiddle with the photoresistor, for instance, the drum will start playing, etc. I want to make sure that each layer is added when I start the song, and hopefully my singing voice will be the last one to be added, completing the cover for the song.

The Midnight Band

For this week’s project, Nick and I decided to create a cover for one of our favourite songs, “Shooting Stars” by the prominent Disco/Tech group Bag Raiders. Our project was divided into two parts, the beat (using Servos) and the melody (using Tone).

In total, we had three percussion-like instruments. The first, being a cork attached to a wooden stick, banging on a piece of wood, functioned as the underlying drum that would provide the 1/4 beat. Next, we had two metal rods attached to two different Servos hit glass cups to create clinking sounds that would harmonise with the Tone produced by the buzzers.

Our Tone had 4 buttons, namely four sounds (E-flat, E,B,A-flat). Each button would make the sound designated for 300 milliseconds, and with code we just had to make sure that we were using F-sharp, for example, the different name of A-flat since those weren’t registered in the library.

So below is the result of what we have created, since midnight yesterday when we first joined forces. Hence the name “Midnight Band”. Enjoy!

https://youtu.be/G1A2rHHSoMI

// Include the Servo library 
#include <Servo.h> 

Servo myServo1;
Servo myServo2;
Servo myServo3;
int pos1 = 0;  //variable for number of degrees for servo1
int pos2 = 0; //variable for number of degrees for servo2
int pos3 = 0; //variable for number of degrees for servo3
int buttonPin = 2; //activating pin 2 for Push Button 
int buttonPin2 = 4; // activating pin 4 
int buttonPin3 = 7;
int buttonState = 0; //variable for Push Button
int buttonState2 = 0;
int buttonState3 = 0;
 
int angle = 0;

void loop() { 
buttonState = digitalRead(buttonPin); //reading buttonPin and storing it as buttonState.
buttonState2 = digitalRead(buttonPin2);
buttonState3 = digitalRead(buttonPin3);
//Serial.println(buttonState, buttonState2,buttonState3); //telling computer to print buttonState. 
if (buttonState == LOW){ //if button is pressed...
  
  myServo2.write(180); //setting servo2 to 180 degrees
  delay(500); //wait one second   
   //setting servo1 to 180 degrees
  myServo2.write(20); //setting servo2 to 20 degrees
  delay(500); //wait one second
  }
if (buttonState2 == LOW){
  myServo3.write(20);
  delay(500);
  myServo3.write(180);
  delay(500);
 }
 if(buttonState3 == LOW){
  for(angle = 0; angle<180;angle+=6){
    myServo1.write(angle);
    delay(15);//setting servo1 to 20 degrees
  }
 }
}

void setup() {
  // attach the servo to pin number 9
  Serial.begin(9600); //activating Serial Monitor
  myServo1.attach(9); //activating pin 9 for servo1
  myServo2.attach(11); //activating pin 11 for servo2
  myServo3.attach(10); //
  pinMode(buttonPin , INPUT); //setting Push Button as an input
  pinMode(buttonPin2 , INPUT);

}

 

Project 3: The Green Lamp

For my third project, I decided to play around with the photo-resistor. The goal was to use analog inputs to manipulate LEDs, so what I did was set my LED to first turn on if there was a certain amount of light.

After, I built a small lamp-like device that covered or shadowed my photo-resistor. That way, the LED would remain turned off. Inside my lamp box, there is a small green LED. I programmed so that the switch I had next to it would turn on the green LED, which would provide artificial light to my photo-resistor. Once it detected light, the photo-resistor would provoke my original red LED to start blinking, indicating that my green LED inside was working since the box is so small and it is arduous to look inside.

const int PR = A0;
const int checklight = 3;
const int rlight = 2;
int value;
const int button = 4;
int PBS = LOW;
int checklightstate = LOW;
unsigned long  pm = 0;
const long interval = 1000;
int rlightstate = LOW;
void setup() {
  // put your setup code here, to run once:
  pinMode(checklight,OUTPUT);
  pinMode(rlight,OUTPUT);
  pinMode(PR,INPUT);
  pinMode(button,INPUT);
  
}

void loop() {
  // put your main code here, to run repeatedly:
  value = analogRead(PR);
  int CBS = digitalRead(button);
  unsigned long cm = millis();
  if(value>500){
    if(cm - pm >= interval){
      pm = cm;
      if(rlightstate == LOW){
        rlightstate = HIGH;
      } else{
        rlightstate = LOW;
      }
      digitalWrite(rlight,rlightstate);
    }
  }
  else{
    rlightstate = LOW;
    digitalWrite(rlight,rlightstate);
  }
  
  if(CBS == HIGH && PBS == LOW){
    if(checklightstate ==HIGH){
      checklightstate = LOW;
    }
    else if (checklightstate ==LOW){
      checklightstate = HIGH;
    }
  }
  digitalWrite(checklight,checklightstate);
  PBS = CBS;
}