Interactive Authoring – Sound Detection Project

The song is “Sabotage” by Beastie Boys. This was recorded using Open Broadcast Software (OBS) 32-bit.

The code used to make this program is as follows:

float defaultSize = 40;
float eventSize = 200;

import ddf.minim.*;

Minim minim;
AudioPlayer player;
AudioInput input;
AudioPlayer song;

void setup()
{
size(512, 200, P2D);

minim = new Minim(this);

song = minim.loadFile(“Beastie Boys – Sabotage Lyrics.mp3”, 512);
song.play();
}

void draw()
{
background(0);
stroke(255);
for(int i = 0; i < song.bufferSize() – 1; i++)
{
ellipse(width/4,height/2,50 + song.right.get(i)*250,50 + song.right.get(i)*250);
ellipse(width/1.333,height/2,50 + song.right.get(i)*250,50 + song.right.get(i)*250);
ellipse(width/4,height/2,25 + song.left.get(i)*50,25 + song.left.get(i)*50);
ellipse(width/1.333,height/2,25 + song.left.get(i)*50,25 + song.left.get(i)*50);
ellipse(width/2,height/2,100 + song.left.get(i)*100,100 + song.left.get(i)*100);
fill(0);
ellipse(width/2,height/2,50 + song.right.get(i)*50,50 + song.right.get(i)*50);
stroke(song.left.get(i)*1000);
line(i, 50 + song.left.get(i)*150, i+1, 50 + song.left.get(i+1)*150);
line(i, 150 + song.right.get(i)*150, i+1, 150 + song.right.get(i+1)*150);
}
}

Advertisements
This entry was posted in Time-Based and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s