Interactive Authoring – Interactive Visual Sound

 

This is a short project I worked on for my coding class. This is an interactive visual sound piece. The calm rap music is meant to represent a feeling of calm and relaxation. While the hard metal is meant to portray someone’s inner anxiety.

 

The code used to make this project is as follows:

float currentSize = 40;
int BG = 250;
import ddf.minim.*;
boolean music = true;

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

import codeanticode.tablet.*;

Tablet tablet;

public void setup()
{
size(720, 480, P3D);

tablet = new Tablet(this);
minim = new Minim(this);

song = minim.loadFile(“Between Friends.mp3”, 720);
anxiety = minim.loadFile(“Bring Me The Horizon – Tell Slater Not To Wash His D***.mp3”, 720);
background(BG);
stroke(255);
smooth();
}

public void draw()
{
song.play();
anxiety.play();
if (music == false){
song.mute();
anxiety.unmute();
}
if (music == true){
song.unmute();
anxiety.mute();
}
for(int i = 0; i < anxiety.bufferSize() – 1; i++)
{
if (mousePressed && (mouseButton == RIGHT)){
music = false;
background (mouseX/4,0,0);
//line(i, 50 + anxiety.left.get(i)*150, i+1, 50 + anxiety.left.get(i+1)*150);
//line(i, 430 + anxiety.right.get(i)*150, i+1, 430 + anxiety.right.get(i+1)*150);
pushMatrix();
noStroke();
fill(mouseX/8,0,0);
ellipse(width/4,height/2,50 + anxiety.right.get(i)*250,50 + anxiety.right.get(i)*250);
ellipse(width/1.333,height/2,50 + anxiety.right.get(i)*250,50 + anxiety.right.get(i)*250);
ellipse(width/4,height/2,25 + anxiety.left.get(i)*50,25 + anxiety.left.get(i)*50);
ellipse(width/1.333,height/2,25 + anxiety.left.get(i)*50,25 + anxiety.left.get(i)*50);
ellipse(width/2,height/2,100 + anxiety.left.get(i)*100,100 + anxiety.left.get(i)*100);
translate(width/2,height/2,0);
rotateX(pmouseX/50);
rotateY(pmouseY/50);
stroke(255);
strokeWeight(20);
fill(0);
box(100 + anxiety.left.get(i)*200);
popMatrix();
} else {
background(BG);
music = true;
}
}
for(int i = 0; i < song.bufferSize() – 1; i++)
{
if (mousePressed) {
strokeWeight(5 + song.right.get(i)*150);
line(pmouseX, pmouseY, mouseX, mouseY);
}
strokeWeight(5 + song.right.get(i)*30);
ellipse(width/2,height/2,100 + song.left.get(i)*50,100 + song.left.get(i)*50);
ellipse(width/2,height/2,50 + song.right.get(i)*25,50 + song.right.get(i)*25);
stroke(150 + song.right.get(i)*255);
strokeWeight(5 + song.right.get(i)*50);
line(i, 50 + song.left.get(i)*25, i+1, 50 + song.left.get(i+1)*25);
line(i, 430 + song.right.get(i)*25, i+1, 430 + song.right.get(i+1)*25);
}
}

The songs used are, in order of appearance:

– “Between Friends” by Flying Lotus

– “Tell Slater Not To Wash His D***” by Bring Me The Horizon. (I swear I’m not making up that song name)

This was recorded using Open Broadcast Software (64-bit).

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