kyungak-project-11-Composition

sketch

//Kyunga Ko
//15104B
//kyungak@andrew.cmu.edu
//Project-11

var turtle = [];
var redcolor = 100;
var greencolor = 150;
var bluecolor = 200;
var xinc = 0;
var yinc = 0;
var zinc = 0;

function setup() {
    createCanvas(480, 480);

    background(255);

    for(var i = 0; i < 50; i++) {
        turtle[i] = makeTurtle(random(width),random(height));
        turtle[i].setColor(color(redcolor,greencolor,bluecolor));
        turtle[i].setWeight(0.4);
        turtle[i].penDown();
        frameRate(10);
    }

}

function draw(){

    for (var i = 0; i < 50; i++) {
        turtle[i].setColor(color(redcolor,greencolor,bluecolor));
        turtle[i].forward(xinc);
        turtle[i].right(zinc);
        turtle[i].back(xinc);

    } 

    map(mouseX,0,600,0,5);
    xinc = random(0,30);
    yinc = random(0,30);
    zinc = random(0,mouseX);
        
}

function mousePressed(){

    redcolor = random(0,255);
    bluecolor = random(0,255);
    greencolor = random(0,255);

}

function turtleLeft(d){this.angle-=d;}
function turtleRight(d){this.angle+=d;}
function turtleForward(p){var rad=radians(this.angle);var newx=this.x+cos(rad)*p;
var newy=this.y+sin(rad)*p;this.goto(newx,newy);}
function turtleBack(p){
this.forward(-p);}
function turtlePenDown(){this.penIsDown=true;}
function turtlePenUp(){this.penIsDown = false;}
function turtleGoTo(x,y){
if(this.penIsDown){stroke(this.color);strokeWeight(this.weight);
line(this.x,this.y,x,y);}this.x = x;this.y = y;}
function turtleDistTo(x,y){
return sqrt(sq(this.x-x)+sq(this.y-y));}
function turtleAngleTo(x,y){
var absAngle=degrees(atan2(y-this.y,x-this.x));
var angle=((absAngle-this.angle)+360)%360.0;return angle;}
function turtleTurnToward(x,y,d){var angle = this.angleTo(x,y);if(angle< 180){
this.angle+=d;}else{this.angle-=d;}}
function turtleSetColor(c){this.color=c;}
function turtleSetWeight(w){this.weight=w;}
function turtleFace(angle){
this.angle = angle;}
function makeTurtle(tx,ty){var turtle={x:tx,y:ty,
angle:0.0,penIsDown:true,color:color(128),weight:1,left:turtleLeft,
right:turtleRight,forward:turtleForward, back:turtleBack,penDown:turtlePenDown,
penUp:turtlePenUp,goto:turtleGoTo, angleto:turtleAngleTo,
turnToward:turtleTurnToward,distanceTo:turtleDistTo, angleTo:turtleAngleTo,
setColor:turtleSetColor, setWeight:turtleSetWeight,face:turtleFace};
return turtle;}

I wanted to express snowflakes through the turtles function. When you move mouseX around the canvas, it changes the angle to which the snowflakes spread. When you click the mouse, the color changes. It will create a dynamic and a non-symmetrical snowflake across the canvas. It was a very interesting process, and the results were satisfying.

BrandonHyun-LookingOutwards11

According to the

Stanford Laptop Orchestra, ” The Stanford Laptop Orchestra (SLOrk) is a large-scale, computer-mediated ensemble and classroom that explores cutting-edge technology in combination with conventional musical contexts – while radically transforming both. Founded in 2008 by director Ge Wang and students, faculty, and staff at Stanford University’s Center for Computer Research in Music and Acoustics (CCRMA), this unique ensemble comprises more than 20 laptops, human performers, controllers, and custom multi-channel speaker arrays designed to provide each computer meta-instrument with its own identity and presence. The orchestra fuses a powerful sea of sound with the immediacy of human music-making, capturing the irreplaceable energy of a live ensemble performance as well as its sonic intimacy and grandeur. At the same time, it leverages the computer’s precision, possibilities for new sounds, and potential for fantastical automation to provide a boundary-less sonic canvas on which to experiment, create, and perform music. ”
Ge Wang, the founder of Stanford Laptop Orchestra is giving a TED talk to the public on the DIY Orchestra of the future using computers and phone to create digital music.

They are becoming one of the first innovators and pioneers on this area and theyr are performing a lot.

Site for the Stanford Laptop Orchestra(SLOrk) 

jamieh-Looking-Outwards-11

Example of the visualizations of the computer generated music

Atlås, created by Agoston Nagy, “generates music in a conversational cognitive space”. The app basically creates music through programming language in Pure Data and creates graphics with javascript’s p5js library. What I like about this project is that music is not just something that can be heard, but also visualized. The graphics locate the sounds within space, which brings an aspect of cognitive process into the experience of listening. The sounds generated by the machine through coding may seem random and distinct from each other, but through the visuals, such sounds then seem to show a narration and a relationship with each other.

 

Below is a video example of his work.

 

nahyunk1 – Looking Outwards 11

https://www.youtube.com/watch?v=S-T8kcSRLL0&feature=share

sound art incorporates sound with an existing visual piece, generating a new meaning through the convergence of the two medium. Music as itself is a singular form of art that can exist on its own and portray a meaning or thought. The project that I found from this week’s looking outwards was Ge Wang’s computational musical instruments in Stanford. He laid out a series of machines in which he could install an app or program a set of codes that loop into a playable instrument. Ge incorporated his computer engineering skills to create a sound machine which people can interact and also utilize in creating music. Throughout the talk, I realized that his project much related to what I was learning in my other class which also incorporates computer language with musical form of art.

Project 11- Turtles!

Customwall

var myTurtle; //my turtyle variable
var distToM; //variable for distance between turtle and mouse 
var MyTurtles = []; //turtle array 

function setup() {
    createCanvas(480, 480); //canvas size   
    background(0); //background to black
    frameRate(10); //frame rate to 10

    for (var v =0; v < 6; v ++){
    for (var i = 0; i < 12; i ++){
        var turs = makeTurtle(20+i*(width/12),40+v*(height/6)); //create turtles in array 
        MyTurtles.push(turs);
    }
}
}

function draw() {
    for (var t = 0; t < MyTurtles.length;t++){
        distToM =MyTurtles[t].distanceTo(mouseX,mouseY); // get distance of mouse to each turtle
        var redist = map(distToM,0,600,0,360); //remap the distance 
        MyTurtles[t].penDown(); //pendown to true
        MyTurtles[t].setWeight(2); //set weight to 2
        if (redist < 180){ // if remappe is less than 180 
            MyTurtles[t].right(redist); // turn right with remapped value
        }
        else 
       { MyTurtles[t].left(redist); //if not turn left with remapped value
       }

        MyTurtles[t].forward(5); //constantly moving 5 steps
       
    }
}
function mousePressed(){
    var ran = int(random(0,72)) //get random turtle in array
    MyTurtles[ran].setColor(color(random(0,255),random(0,255),random(0,255))); //random color when mouse pressed 
}


function turtleLeft(d){this.angle-=d;}
function turtleRight(d){this.angle+=d;}
function turtleForward(p){var rad=radians(this.angle);var newx=this.x+cos(rad)*p;
var newy=this.y+sin(rad)*p;this.goto(newx,newy);}
function turtleBack(p){
this.forward(-p);}
function turtlePenDown(){this.penIsDown=true;}
function turtlePenUp(){this.penIsDown = false;}
function turtleGoTo(x,y){
if(this.penIsDown){stroke(this.color);strokeWeight(this.weight);
line(this.x,this.y,x,y);}this.x = x;this.y = y;}
function turtleDistTo(x,y){
return sqrt(sq(this.x-x)+sq(this.y-y));}
function turtleAngleTo(x,y){
var absAngle=degrees(atan2(y-this.y,x-this.x));
var angle=((absAngle-this.angle)+360)%360.0;return angle;}
function turtleTurnToward(x,y,d){var angle = this.angleTo(x,y);if(angle< 180){
this.angle+=d;}else{this.angle-=d;}}
function turtleSetColor(c){this.color=c;}
function turtleSetWeight(w){this.weight=w;}
function turtleFace(angle){
this.angle = angle;}
function makeTurtle(tx,ty){var turtle={x:tx,y:ty,
angle:0.0,penIsDown:true,color:color(128),weight:1,left:turtleLeft,
right:turtleRight,forward:turtleForward, back:turtleBack,penDown:turtlePenDown,
penUp:turtlePenUp,goto:turtleGoTo, angleto:turtleAngleTo,
turnToward:turtleTurnToward,distanceTo:turtleDistTo, angleTo:turtleAngleTo,
setColor:turtleSetColor, setWeight:turtleSetWeight,face:turtleFace};
return turtle;}

Iterations: 

For this project, I have thought of the wall paper project that we have done in past. I wanted to see if I could come up with a randomly generating turtles spaced apart that will create certain pattern to create custom wall paper  based on movement of the turtle.

I made the turtles’ color to change randomly whenever user clicks on.

For the movement, I wanted them to keep the constant speed but different direction based on the mouse position. I have calculated the distance from each turtle to the mouse location and let the turtles to turn based on the distance and its decision factor on to turn right or left.

I have came up with two different iteration playing with the code.

Enjoy.

jiaxinw-Looking Outwards 11- Computer Music

A.I. Duet by Yotam Mann

Someone is trying AI Duet with the keyboard

Yotam Mann created this experiment for letting people play a duet with a computer. When the user presses some keys on the keyboard, the computer will respond to your melody. I like how this experiment showed a potential of letting human beings interact with computers to create artistic works. One thing surprised Yotam Mann a lot was that some people didn’t wait for the response but tried to play music at the same time with the computer, which was really like a real-time duet with another person.

In this project, Yotam Mann used machine learning to let the computer “learn” how to compose. He used neural networks and gave the computer tons of examples of melody. The computer analyzed the notes and timings and gradually built a map for the relationships between them.  So that when the melody was given to the computer, it can give a response to people based on the map.

Here is the video of A.I. Duet

If you want to know more, please go to : https://experiments.withgoogle.com/ai/ai-duet

Looking outwards 11

I have choose the Google’ Magenta project as computer Music. I am very much interested in machine’s capability on learning realm that is considered to be human’s. The Magenta research project is aimed to push limits of what AI can do in arts. In order to achieve such an intelligence for the AI, they have tried many different machine- learning techniques, such as recurrent neural networks, convolutional neural networks, variational methods, adversarial training methods, and reinforcement learning.

They used NSynth algorithm, which uses neural networks to synthesize new sounds, on notes generated by different instruments.

This is such an inspiring and provoking project that allows more thought to be brought up on limits of AI and possibilities.

kyungak-lookingoutwards-11

(Simon de Diesbach, Jonas Lacôte, Laura Perrenoud,  “The Computer Orchestra”, 2013)

The creators of “The Computer Orchestra” initially met  at University of Art and Design of Lausanne in Switzerland during their Bachelor’s degree in media and interaction design. This project started as a small project, but later grew into an amazing piece that was exhibited in various parts of the world.

“The Computer Orchestra” is an interactive installation that allows viewers to conduct their own orchestra.  Users can upload or download music samples and integrate them to their own taste using the simple interface within in the computer. The sounds also change according to space. Kinect connected to the center of the computer detects motion of the user’s hands and position and interacts accordingly.

I personally admire the interactivity of this artwork. Being able to produce an orchestra that usually needs a handful of people with computers sounds amazing. The original thought and the combination of interactiveness made the artwork accessible and fun. I feel like this artwork was also educational, which makes it extra worthy to exhibit.

mjanco – Section B – Project 10

sketch

//Michelle Janco
//Section B
//mjanco@andrew.cmu.edu
//Project10

var blobs = [];
var mountain = .05;
var mountainSpeed = .0009;


function setup() {
    createCanvas(640, 240);

    // create blobs
    for (var i = 0; i < 10; i++){
        var rx = random(width);
        blobs[i] = makeBlob(rx);
    }
    frameRate(30);
}

function draw() {
    background(240, 215, 87);
    displayHorizon();
    makeMountain();
    updateAndDisplayBlobs();
    removeBlobsThatAreOutOfView();
    addNewBlobsWithSomeRandomProbability();

}

//make mountain
function makeMountain() {
    stroke(1);
    fill(240, 160, 34);
    beginShape();
    for (var i = 0; i < width; i++) {
        var x = (i * mountain) + (millis() * mountainSpeed);
        var y = map(noise(x), 0, 1, height/7, height/2);
        vertex(i, y);
    }
    vertex(width, height-height/4);
    vertex(0, height-height/4);
    endShape();
}

function displayHorizon(){
    strokeWeight(3);
    stroke(0);
    line (0,height-height/4, width, height-height/4);
}


function updateAndDisplayBlobs(){
    // update blobs' positions, display them
    for (var i = 0; i < blobs.length; i++){
        blobs[i].move();
        blobs[i].display();
    }
}


function removeBlobsThatAreOutOfView(){
    var blobsToKeep = [];
    for (var i = 0; i < blobs.length; i++){
        if (blobs[i].x + blobs[i].breadth > 0) {
            blobsToKeep.push(blobs[i]);
        }
    }
    blobs = blobsToKeep;
}


function addNewBlobsWithSomeRandomProbability() {
    //small probability, add a new tree to the end
    var newBlobLikelihood = 0.010;
    if (random(0,1) < newBlobLikelihood) {
        blobs.push(makeBlob(width));
    }
}


//update position of blob
function blobMove() {
    this.x += this.speed;
}


//draw blob
function blobDisplay() {
    var blobHeight = random(5, 15);
    var bHeight = (random(15, 30));
    fill(255);
    noStroke();
    push();
    translate(this.x, height - 40);
    ellipse(0, -bHeight, this.breadth, bHeight);
    ellipse(0, bHeight, this.breadth, bHeight);
    stroke(200);
    pop();
}


function makeBlob(birthLocationX) {
    var blo = {x: birthLocationX,
                breadth: 50,
                speed: -4.0,
                nBlo: round(random(2,8)),
                move: blobMove,
                display: blobDisplay}
    return blo;
}

For this project I wanted to make some sort of reflection, and was able to get my abstract blobs to have their own reflections on this mysterious glass like surface. I wanted to make something not too literal or specific, and just focus on using what I’ve learned since I found it difficult. But I still found the end result mysterious and ambiguous which is what I like.

Nayeon-Project10-Generative Landscape

nayeonk1

//Na-yeon Kim
//15-104, B section
//nayeonk1@andrew.cmu.edu
//Project-10 (Generative Landscape)

var terrainSpeed1 = 0.0001;
var terrainDetail1 = 0.005;
var terrainSpeed2 = 0.0005;
var terrainDetail2 = 0.003;
var terrainSpeed3 = 0.001;
var terrainDetail3 = 0.0005;
var xoff = 0.0;
var terrain = [];
var lines = ["The impossible could not have happened, therefore the impossible must be possible in spite of appearances.",
            "If you confront anyone who has lied with the truth, he will usually admit it - often out of sheer surprise.",
            "You’re the world famous detective, Hercule Poirot.",
            "I see evil on this train. A passenger has died.",
            "My name is Hercule Poirot and I’m probably the greatest detective in the world."]
var index = 0;
var mX = 50;
var trees = [];

function setup() {
    createCanvas(480, 300);
    frameRate(12);
    for (var i = 0; i < 5; i++) {
      var rx = random(width);
      trees[i] = makeTrees(rx);
    }
}

//draw assets on canvas "orient express"
function draw() {
    background(0);
    moon();
    makeMountain();
    updateAndDisplayTrees();
    removeTreesThatHaveSlippedOutOfView();
    addNewTreesWithSomeRandomProbability();
    train();
    quotes();
    oldfilm();
}

//display trees on screen
function updateAndDisplayTrees(){
    // Update the tree's positions, and display them.
    for (var i = 0; i < trees.length; i++){
        trees[i].move();
        trees[i].display();
    }
}

//remove trees that have slipped out of view
function removeTreesThatHaveSlippedOutOfView(){
    var treesToKeep = [];
    for (var i = 0; i < trees.length; i++){
        if (trees[i].x + trees[i].breadth > 0) {
            treesToKeep.push(trees[i]);
        }
    }
    trees = treesToKeep;
}

//add trees with random probability
function addNewTreesWithSomeRandomProbability() {
    var newTreeLikelihood = 0.05;
    if (random(0,1) < newTreeLikelihood) {
        trees.push(makeTrees(width));
    }
}

//tree movement
function treesMove() {
    this.x += this.speed;
}

//tree display function
function treeDisplay() {
    var treeHeight = 100;
    var treeHeight = this.nFloors * treeHeight;
    fill(random(50, 100));
    noStroke();
    push();
    translate(this.x, height);
    rect(0, -treeHeight, this.breadth, treeHeight);
    ellipse(30, -treeHeight, this.bush, this.bush);
    pop();
}

//draw trees
function makeTrees(birthLocationX) {
    var trees = {x: birthLocationX,
                breadth: random(30, 70),
                bush: random(150, 300),
                speed: -150,
                nFloors: round(random(2,8)),
                move: treesMove,
                display: treeDisplay}
    return trees;
}


//draw moon
function moon() {
    fill(230)
    ellipse(mX, 70, 50, 50);
    mX += 0.3;
    //if moon goes further than screen, it goes back to original place
    if (mX > width) {
      mX = 50;
    }
}

//draw mountain layers
function makeMountain() {
    noStroke();
    fill(100)

    //farthest mountain
    beginShape();
    for (var x1 = 0; x1 < width; x1++) {
      var t1 = (x1 * terrainDetail1) + (millis() * terrainSpeed1);
      var y1 = map(noise(t1), 0, 1, 0, height);
      vertex(x1, y1);
    }
    vertex(width, height)
    vertex(0, height)
    endShape();

    //middle mountain
    beginShape();
    fill(150);
    for (var x2 = 0; x2 < width; x2++) {
      var t2 = (x2 * terrainDetail2) + (millis() * terrainSpeed2);
      var y2 = map(noise(t2), 0, 1.5, 0, height);
      vertex(x2, y2 + 80)
    }
    vertex(width, height);
    vertex(0, height);
    endShape();

    //closest hill
    beginShape();
    fill(200);
    for (var x3 = 0; x3 < width; x3++) {
      var t3 = (x3 * terrainDetail3) + (millis() * terrainSpeed3);
      var y3 = map(noise(t3), 0, 2, 0, 200);
      vertex(x3, y3 + 180)
    }
    vertex(width, height);
    vertex(0, height);
    endShape();
}

// draw train and window
function train() {
    push();
    noFill();
    strokeWeight(50);
    stroke(30);
    rect(0, 0, width, height);
    rect(0, 0, 50, height)
    rect(430, 0, width, height)
    ellipse(width / 2, 25, 10, 10)
    pop();

    push();
    fill(60);
    rect(10, 20, 50, 260, 10);
    rect(420, 20, 50, 260, 10);

}

//create old film style noise
function oldfilm() {
    for (i = 0; i < 5; i ++) {
      for (j = 0; j < 20; j ++) {
        xoff = xoff + 0.01;
        var offset = random(0, 300)
        var n = noise(xoff) * width;
        strokeWeight(random(0.1, 1));
        stroke(0)
        line(n * offset, 0, n * offset, height)
    }
    ellipse(random(0, width), random(0, height), random(0, 2), random(0, 4))
  }
}

//put cc on canvas. change the line everytime mouse is pressed
function quotes() {
    fill(250)
    textSize(15)
    textFont("Times New Roman")
    var x = random(100, 101)
    text(lines[index], x, 240, 300, 100)
}

//mousepressed function
function mousePressed() {
    index +=1;
    if (index > 4) {
      index = 0;
    }
}

I saw a trailer of movie “Murder on orient express” few days ago and I decided to choose this as a theme for this project. “Murder on Orient express” is one of my favorite detective novel and I can’t wait to see this movie! I put some old movie style -black & white and old film noise- because I wanted to create lonely and mysterious atmosphere of the train. I also put some of famous quotes from the novel.
Here are the sketch of idea and some inspiration photos from google.