Processing Final; Stay Calm

import ddf.minim.*;
import ddf.minim.analysis.*;
Minim minim;
AudioPlayer player;
AudioInput input;
AudioPlayer song;
BeatDetect beat;
String[] headlines = {
“‘I’m losing control…'”,
” ‘I feel like I’m going crazy…’ “,
” ‘I’m smothering and I can’t breathe…’ “,
” STOP. “,
” Do you hear that?”,
” The sound you’re hearing is a normal heartbeat”,
” The scariest part of what’s happening to you…”,
” Is that you’ve tricked yourself into thinking you’re in danger…”,
” And, this, is causing your heart to beat abnormally…”,
” This is what I want you to do…”,
” Hear the heartbeat and try to match it…”,
” Once you match it, you regain the control you thought you lost.”,
” Whatever caused this,”,
” Whether it’s a presentation or just talking in class…”,
” You will survive it, no matter what, and that will build you.”,
” Build you into the indestructible being you’re meant to be.”,
” What doesn’t destroy you, refines you.”,
” Remember that.”,
” Now do what you have to do to make a better you.”

};

PFont f; // Global font variable
float x; // Horizontal location
int index = 0;
float eRadius;

void setup(){
size(900,900);

minim = new Minim(this);
// specify 512 for the length of the sample buffers
// the default buffer size is 1024
song = minim.loadFile(“normal_heartbeat.mp3”, 512);
song.play();
beat = new BeatDetect();
f = createFont( “Arial”, 16);

// Initialize headline offscreen
x = width;

}
void draw(){

background(0);
noStroke();
fill(253,214,245);
beat.detect(song.mix);
if ( beat.isOnset() ) eRadius = 80;
triangle(449,442,424,535,372,510);
fill(135,99,99);
triangle(465,560,378,549,367,514);
fill(244,242,175);

triangle(373,553,326,555,360,516);
fill(98,71,96);

triangle(446,437,364,509,356,445);
fill(253,207,218);

triangle(447,432,362,438,411,338);
fill(251,255,211);

triangle(356,440,409,336,252,298);
fill(255,247,183);

triangle(230,302,175,332,253,304);
fill(255,225,209);

triangle(266,457,351,441,255,307);
fill(252,206,132);

triangle(273,471,351,511,323,549);
fill(251,219,163);

triangle(352,449,360,510,266,464);
fill(255,244,169);

triangle(236,511,322,552,191,360);
fill(255,202,154);

triangle(262,453,251,310,177,334);
fill(236,170,242);

triangle(512,479,426,536,452,447);
fill(98,84,102);

triangle(525,473,659,495,428,540);
fill(111,71,71);

triangle(439,542,468,557,664,498);
fill(221,178,252);

triangle(455,446,518,474,415,335);
fill(236,150,203);

triangle(686,645,660,504,560,534);
fill(101,71,97);

triangle(689,647,706,589,661,500);
fill(236,150,203);

triangle(693,648,751,603,706,593);
fill(101,71,97);

triangle(827,664,753,605,699,647);
fill(136,88,140);

triangle(719,369,554,475,658,490);
fill(205,121,166);

triangle(587,386,545,475,712,369);
fill(58,44,85);

triangle(722,368,692,458,661,492);
fill(18,60,98);

triangle(772,319,693,463,725,374);
fill(0,64,117);

triangle(763,388,706,451,804,266);
fill(12,108,182);

triangle(837,285,805,273,779,353);
fill(248,217,240);

triangle(414,336,303,262,245,291);
fill(226,198,143);

triangle(300,259,234,293,285,254);
fill(208,171,223);

triangle(370,303,289,249,344,216);
fill(248,195,235);

triangle(349,214,456,360,373,303);
fill(89,59,95);

triangle(522,477,472,372,421,338);
fill(109,45,45);

triangle(477,379,580,386,528,475);
fill(245,233,233);

triangle(441,186,356,218,495,187);
fill(93,25,118);

triangle(669,282,649,249,487,182);
fill(45,66,69);

triangle(676,286,655,248,803,272);
fill(183,123,214);

triangle(358,221,462,359,494,188);
fill(219,171,223);

triangle(497,190,555,223,467,362);
fill(242,209,243);

triangle(560,221,532,378,474,369);
fill(85,1,1);

triangle(638,267,564,226,538,377);
fill(240,166,166);

triangle(639,268,699,368,542,379);
fill(69,0,104);

triangle(659,292,703,368,794,276);
fill(24,41,77);

triangle(839,278,649,240,634,215);
fill(0,48,121);

triangle(630,214,535,196,643,238);
fill(254,251,251);

// Display headline at x location
textFont(f, 20);
textAlign (LEFT);

// A specific String from the array is displayed according to the value of the “index” variable.
text(headlines[index], x, height-150);

// Decrement x
x = x – 3;

// If x is less than the negative width, then it is off the screen
// textWidth() is used to calculate the width of the current String.
float w = textWidth(headlines[index]);
if (x < -w) {
x = width;
// index is incremented when the current String has left the screen in order to display a new String.
index = (index + 1) % headlines.length;
eRadius *= 0.95;
if ( eRadius < 20 ) eRadius = 20;
}
}

Advertisements

About schinnery1996

My name is Shanelle Chinnery and I study Digital Media and Animation at Alfred State College. It’s my third year and the last time this bio was updated was on my very first day of college. I had ended off my previous bio with my desire to grow throughout my years here in Alfred State and with my senior year on the horizon, I’m glad to say I’ve definitely grown since that day. With the variety of classes and mediums I’ve experienced during these three years, I’ve learned what grasps my attention and what strays it away. I came into college with an unclear direction of what I wanted to do in my field and to be quite honest, I’m still not sure what direction I’m going in, but I have a better idea. I enjoy the storytelling aspect of animation, but then again I also enjoy animating in 3D and would love to explore the possibility of voice acting. While I’m uncertain about the exact route of my future, I still take great pride in the how much I’ve changed, art wise. I’ve gained knowledge and experience in endless number of programs I never thought I’d be able to work around, I’ve grown accustomed to digital art rather than traditional pencil to paper art, and most importantly, I’m just a better artist in general. I could say that is my favorite achievement and I can’t wait to see what my future holds in this field.
This entry was posted in Non-timebased 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