Between The Lines

One of the most useful things that I learnt when playing around with processing, was the ease it took to make something look complex through creative coding. Even though the piece exhibited on this blog looks full of sound, movement and colour, the use of basic Processing tutorials and repetition meant that the “Behind the scenes” work was fairly easy.

screen-shot-2016-11-02-at-11-35-14-am

This caused some problems. Initially, I had created a piece that was full of text, audio panning, colour shifts when the cursor was pressed etc. this, though easy to code, was a mess to look at and forced my computer in to overdrive, the final piece itself however keeps my favourite aspects from what I have learned from the libraries of processing.org. These were; Randomised colour, Brown noise, Interactivity, Ellipses and repetition. Mixing this with my attraction to complementary colours and patterns led to an extremely deep blue background, repeated layers of randomised red dots, stripes, the deep crumble of brown noise and the rewarding “Ding” accompanied with a start stop animation when the courser is clicked. Though this piece lacks deep meaning, it is a piece I was proud to create and thoroughly enjoy interacting with.

References:

Processing.org. (2016). Examples \ Processing.org. [online] Available at: https://processing.org/examples/ [Accessed 1 Nov. 2016].

 

Coding

import processing.sound.*;
BrownNoise noise;

TriOsc triOsc;
Env env;

float attackTime = 0.001;
float sustainTime = 0.004;
float sustainLevel = 0.3;
float releaseTime = 0.4;

boolean toggleLoop = true;

void setup() {
frameRate(25);
fullScreen(P2D);
background(0, 0, 22);
noStroke();
fill(0);
loop();

noise = new BrownNoise(this);
noise.play(0.01);

triOsc = new TriOsc(this);
env = new Env(this);
}
void draw() {

fill(random(0, 255), 0, 0);

ellipse(random(0, 1300), 10, 10, 10);

ellipse(random(0, 1300), 20, 10, 10);

ellipse(random(0, 1300), 30, 10, 10);

ellipse(random(0, 1300), 40, 10, 10);

ellipse(random(0, 1300), 50, 10, 10);

ellipse(random(0, 1300), 60, 10, 10);

ellipse(random(0, 1300), 70, 10, 10);

ellipse(random(0, 1300), 80, 10, 10);

ellipse(random(0, 1300), 90, 10, 10);

ellipse(random(0, 1300), 100, 10, 10);

ellipse(random(0, 1300), 200, 10, 10);

ellipse(random(0, 1300), 210, 10, 10);

ellipse(random(0, 1300), 220, 10, 10);

ellipse(random(0, 1300), 230, 10, 10);

ellipse(random(0, 1300), 240, 10, 10);

ellipse(random(0, 1300), 250, 10, 10);

ellipse(random(0, 1300), 260, 10, 10);

ellipse(random(0, 1300), 270, 10, 10);

ellipse(random(0, 1300), 280, 10, 10);

ellipse(random(0, 1300), 290, 10, 10);

ellipse(random(0, 1300), 300, 10, 10);

ellipse(random(0, 1300), 400, 10, 10);

ellipse(random(0, 1300), 410, 10, 10);

ellipse(random(0, 1300), 420, 10, 10);

ellipse(random(0, 1300), 430, 10, 10);

ellipse(random(0, 1300), 440, 10, 10);

ellipse(random(0, 1300), 450, 10, 10);

ellipse(random(0, 1300), 460, 10, 10);

ellipse(random(0, 1300), 470, 10, 10);

ellipse(random(0, 1300), 480, 10, 10);

ellipse(random(0, 1300), 490, 10, 10);

ellipse(random(0, 1300), 500, 10, 10);

ellipse(random(0, 1300), 600, 10, 10);

ellipse(random(0, 1300), 610, 10, 10);

ellipse(random(0, 1300), 620, 10, 10);

ellipse(random(0, 1300), 630, 10, 10);

ellipse(random(0, 1300), 640, 10, 10);

ellipse(random(0, 1300), 650, 10, 10);

ellipse(random(0, 1300), 660, 10, 10);

ellipse(random(0, 1300), 670, 10, 10);

ellipse(random(0, 1300), 680, 10, 10);

ellipse(random(0, 1300), 690, 10, 10);

ellipse(random(0, 1300), 700, 10, 10);

ellipse(random(0, 1300), 800, 10, 10);

fill(0, random(0, 255), 0);
}

void mouseClicked() {

if (toggleLoop) { noLoop(); toggleLoop = false; }
else { loop(); toggleLoop = true; }
triOsc.play();
env.play(triOsc, attackTime, sustainTime, sustainLevel, releaseTime);
}

Advertisements

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