Project 04: String Art

sketch
//Julianna Bolivar
//jbolivar
//Section D
//Program: String Art


var dx1;
var dy1;
var dx2;
var dy2;

var dx3;
var dy3;
var dx4;
var dy4; 

var dx5;
var dy5;
var dx6;
var dy6; 



var numLines = 50;

function setup() {
    createCanvas(300, 400);
    background(244, 235, 232);
    //hot pink
    stroke(222, 49, 99);
    //right most lines
    line(300, 300, 350, 300); 
    dx1 = (250)/numLines;
    dy1 = (290)/numLines;
    dx2 = (100)/numLines;
    dy2 = (290)/numLines;
    //left most lines
    dx3 = (150)/numLines;
    dy3 = (320)/numLines;
    dx4 = (90)/numLines;
    dy4 = (90)/numLines;
    //overlapping lines
    dx5 = (150)/numLines;
    dy5 = (320)/numLines;
    dx6 = (90)/numLines;
    dy6 = (90)/numLines;
}

function draw() {
    //right most lines
    var x1 = 50;
    var y1 = 10;
    var x2 = 200;
    var y2 = 200;
    //left most lines
    var x3 = 0;
    var y3 = 200;
    var x4 = 220;
    var y4 = 350;
    //overlapping lines
    var x5 = 40;
    var y5 = 200;
    var x6 = 220;
    var y6 = 350;

    for (var i = 0; i <= numLines; i += 1) {
        line(x1, y1, x2, y2);
        line(x3, y3, x4, y4);
        line(x5, y5, x6, y6);

        x1 += dx1;
        y1 += dy1;
        x2 += dx2;
        y2 += dy2;

        x3 -= dx3;
        y3 -= dy3;
        x4 += dx4;
        y4 += dy4;

        x5 -= dx5;
        y5 -= dy5;
        x6 += dx6;
        y6 += dy6;   
    }

    noLoop();
}


Mine is quite simple, I wanted to have an interaction or at least have a variety of colors but I couldn’t get it to work in time. I knew I wanted the strings to work vertically, and the overlapping strings was a mistake I ended up liking.

LO 04: Sound Art

I looked at a critically-acclaimed game called Incredibox, published by So Far So Good, released in 2009. It is an interactive music experience where you drag and drop different sounds for a lineup of 8 beatboxers to produce. You mix and match the sounds and singing options to create songs. Almost all of the sound options sound good together, so it’s nearly impossible to make a song that sounds bad. It’s also a visual experience. In each theme, when you drag a sound icon onto one of the 8 beatboxers, it dresses them in a new outfit. You have 8 different themes to choose from, 4 unlocked and 4 initially locked; Alpha (basic beatboxing), Little Miss (hip-hop), Sunrise (pop), The Love (French house), Brazil (Brazilian music), Alive (Japanese/modern music), Jeevan (traditional Indian), and Dystopia (futuristic). Incredibox has seen a recent resurgence due to the Dystopia theme becoming popular on Tiktok. I find this game very impressive in that there are so many musical styles explored, as well as the musical ability needed to make sure all the sounds combine well with each other, and still there are enough options to create many unique songs. There must be many looping functions as the beatboxers keep making their sound until you pause or change the sound assigned to them.

https://www.incredibox.com/demo/

Screenshot from me playing the “The Love” theme.

Project 04- String Art

sketch

//Catherine Liu
//jianingl
//Section D

var strokeColorR = 255
var strokeColorG = 165
var strokeColorB = 0

var dx1;
var dy1;
var dx2;
var dy2;

var dx3;
var dy3;
var dx4;
var dy4;

var dx5;
var dy5;
var dx6;
var dy6;

var dx7;
var dy7;
var dx8;
var dy8;

var dx9;
var dy9;
var dx10;
var dy10;

var numLines = 50;

function setup() {
    createCanvas(400, 300);
    background(0);

    //draws line that curves downward
    line(0,0,width/2,height);
    line(width/2,height,width,0);
    dx1 = (width/2-0)/numLines;
    dy1 = (height-0)/numLines;
    dx2 = (width-width/2)/numLines;
    dy2 = (0-height)/numLines;

    //draws line that curves upward
    line(0,height,width/2,0);
    line(width/2,0,width,height);
    dx3 = (width/2-0)/numLines;
    dy3 = (0-height)/numLines;
    dx4 = (width-width/2)/numLines;
    dy4 = (height-0)/numLines;

    //draws line that curves left
    line(0,0,width,height/2);
    line(width,height/2,0,height);
    dx5 = (width-0)/numLines;
    dy5 = (height/2-0)/numLines;
    dx6 = (0-width)/numLines;
    dy6 = (height-height/2)/numLines;

    //draws line that curves right
    line(width,0,0,height/2);
    line(0,height/2,width,height);
    dx7 = (0-width)/numLines;
    dy7 = (height/2-0)/numLines;
    dx8 = (width-0)/numLines;
    dy8 = (height-height/2)/numLines;
}

function draw() {
    background(0);
    stroke(strokeColorR, strokeColorG, strokeColorB);

    //draws line that curves downwards
    var x1 = 0;
    var y1 = 0;
    var x2 = width/2;
    var y2 = height;
    for (var i = 0; i <= numLines; i += 1) {
        line(x1, y1, x2, y2);
        x1 += dx1;
        y1 += dy1;
        x2 += dx2;
        y2 += dy2;
    }

    //draws line that curves upward
    var x3 = 0;
    var y3 = height;
    var x4 = width/2;
    var y4 = 0;
    for (var i = 0; i <= numLines; i += 1) {
        line(x3, y3, x4, y4);
        x3 += dx3;
        y3 += dy3;
        x4 += dx4;
        y4 += dy4;
    }

    //draws line that curves left
    var x5 = 0;
    var y5 = 0;
    var x6 = width;
    var y6 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        line(x5, y5, x6, y6);
        x5 += dx5;
        y5 += dy5;
        x6 += dx6;
        y6 += dy6;
    }

    //draws line that curves right
    var x7 = width;
    var y7 = 0;
    var x8 = 0;
    var y8 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        line(x7, y7, x8, y8);
        x7 += dx7;
        y7 += dy7;
        x8 += dx8;
        y8 += dy8;
    }
}

function mousePressed() {

    //checks for R value of color and switches
    if (strokeColorR == 255) {
        strokeColorR = 0
    } else {
        strokeColorR = 255
    }

    //checks for G value of color and switches
    if (strokeColorG == 165) {
        strokeColorG = 191
    } else {
        strokeColorG = 165
    }

    //checks for B value of color and switches
    if (strokeColorB == 0) {
        strokeColorB = 255
    } else {
        strokeColorB = 0
    }
}

It took me a while to figure out how to use the string to create patterns but once I had a good idea of what I wanted to create it was relatively easy to add strings. I also included the ability for the string to change color when you press the mouse.

Looking Outwards 04

There is a YouTube channel called “ELECTRONICOS FANTASTICOS!” that features people playing music by scanning barcodes of various lengths and widths. I was amazed by how such a simple tool can be reimagined to create music, and curious about how the scanner was reprogrammed to recognize different barcodes as different sounds. In fact, factors such as pitch and speed appear to be affected by how fast the scanner is moving and how far from the barcode it is.

Ei Wada, a Japanese artist and musician, reinvents such electrical appliances as tools to create electromagnetic music. He modifies the barcode scanners to generate sounds by connecting scanned signals directly to an audio terminal. When hovering over a printed backdrop with different variations of “barcodes”, the scanner senses changes in light patterns between the black and white lines to turns those signals into computer text. The computer recognizes the specific light patterns and emits a beep sound. It is likely that Wada created an algorithm that sets different light patterns to specific sounds so when the scanner goes over different barcodes, it produces a variety of beeps. However, to create music, the artist still has to physically scan the barcodes in a rhythmic way, moving throughout the different barcodes systemically in order to produce a set of sounds with musical qualities.

playing music from barcodes

Project 4: String art

Yash string art

// Yash Mittal
// Section D

var dx1;
var dy1;
var dx2;
var dy2;
var dx3;
var dy3;
var dx4;
var dy4;
var dx5;
var dy5;
var dx6;
var dy6;

var numLines = 30;

function setup() {
    createCanvas(400, 300);
    background (0);
    stroke (255);
    line (70, 200, 180, 10); // reference line 1 
    line (330, 180, 290, 70); // reference line 2
    strokeWeight (0);
    line (150, 290, 250, 260); // reference line 3
    line (100, 100, 200, 200); // reference to line 4 
    stroke ("white");
    line (30, 70, 290, 110); // reference to line 5
    strokeWeight (1);
    line (20, 20, 110, 10); // reference to line 6


    dx1 = (180 - 70) / numLines;
    dy1 = (10 - 200) / numLines;
    dx2 = (290 - 330) / numLines;
    dy2 = (70 - 180) / numLines;
    dx3 = (250 - 150) / numLines;
    dy3 = (260 - 290) / numLines;
    dx4 = (200 - 100) / numLines;
    dy4 = (200 - 100) / numLines;
    dx5 = (290 - 30) / numLines;
    dy5 = (110 - 70) / numLines; 
    dx6 = (110 - 20) / numLines;
    dy6 = (10 - 20) / numLines;

}

function draw() { 

    var x1 = 70;
    var y1 = 200;
    var x2 = 330;
    var y2 = 180;
    var x3 = 150;
    var y3 = 290;
    var x4 = 100; 
    var y4 = 200;
    var x5 = 30;
    var y5 = 290;
    var x6 = 20;
    var y6 = 20;
    var x7 = 110;
    var y7 = 10;

    for (var i = 0; i <= numLines; i = i + 0.9) { // center lines (left to right)

        line (x1, y1, x2, y2);
       
        x2 = x2+ dx2;
        y2 = y2 + dy2;
        
    }

    stroke ("yellow");

    for (var i2 = 0; i2 <= numLines; i2 = i2 + 3) { // bottom lines (bottom left to top)

        line (x2, y2, x3, y3);
        x2 = x2 + dx3;
        y2 = y2 + dy3;
        x3 = x3 + dx3;
        y3 = y3 + dy3;

    }


    stroke ("white");

    for (var i5 = 0; i5 <= numLines; i5 = i5 + 0.5) {

        line (x4, y4, x5, y5);

        x5 = x5 + dx5;
        y5 = y5 + dy5;
    }


 stroke ("red");

    for (var i3 = 0; i3 <= numLines; i3 = i3 + 1) { // top lines (top right to top center)

        line (x2, y2, x1, y1);
        x2 = x2 + dx3;
        y2 = y2 + dy3;
        x1 = x1 + dx1;
        y1 = y1 + dy1;
    }

    for (var i4 = 0; i4 <= numLines; i4 = i4 + 0.1) { 

        line (x3, y3, x2, y2);

        x3 = x3 + dx3;
        y3 = y3 + dy3;
        x2 = x2 + dx2;
        y2 = y2 + dy2;
        
}

    stroke ("yellow");
    strokeWeight (0.4);

    for (var i6 = 0; i6 <= numLines; i6 = i6 + 0.8) {

        line (x1, y1, x3, y3);

        x1 = x1 + dx1 / 2;
        y1 = y1 + dx1 / 2;
        x3 = x3 + dx3 / 2;
        y3 = y3 + dy3 / 2;
    }

    stroke ("red");

    for (var i7 = 0; i7 <= numLines; i7 = i7 + 0.5) {

        line (x6, y6, x4, y4);
        x4 = x4 + dx4;
        y4 = y4 + dy4;
    }

    strokeWeight (0.3);
    stroke ("red");

    for (var i8 = 0; i8 <= numLines; i8 = i8 + 0.1) {

        line (x7, y7, -x4, y4);
        x7 = x7 + dx6;
        y7 = y7 + dx6;
       
    }

noLoop();

}

I had fun working on this project. At first, I struggled to understand the mathematics behind the code but once I got the hang of it, it became pretty easy to draw new patterns on different parts of the canvas.

LO: Sound Art

For this week’s project, I chose a project called “Soundmachines” by Yannick Labbe, which are basically three units, resembling standard record players; and they translate concentric visual patterns into control signals so that a music software can process them. The rotation of these three units / discs, each holding three separate individual tracks, can be synced to a sequencer. I thought that this project was really cool and unique because of how simple it is to use but also the algorithm used to develop this was probably very complicated since picking up data from just a rotating disk and analyzing that data seems like a big task. In addition to this, I was really impressed with how the algorithm was able to combine individual music points from all three discs into one cohesive piece that was audibly pleasing.

Link to “Soundmachines” by Yannick Labbe – https://www.youtube.com/watch?v=_gk9n-2lBb8

Screenshot from “Soundmachines” Youtube video

Project 4: String Art

sketch

//Elise Chapman
//ejchapma
//Section D

function setup() {
    createCanvas(400,300);
}

var dx1;
var dy1;
var dx2;
var dy2;

function draw() {
    background(30,50,49); //periwinkle
    var dist=100; //distance from center of spiral
    var angle=5;
    var y=100;
    var x=100;
    push();
    //intricate purple
    translate(width/2+25,height/2+25); //sets center of spiral
    for(y=100; y<=200; y+=0.5) {
        strokeWeight(2);
        stroke(153,141,160); //purple
        rotate(radians(angle*10));
        line(mouseX/15,mouseY/15,mouseX+dist,y);
        dist-=0.5;
    }
    //star
    for (y=10;y<=300;y+=5) {
        strokeWeight(5);
        stroke(196,231,212); //grey
        rotate(radians(-angle+180)); //creates the spiral
        line(x+dist, y+dist, min(mouseX/2,300), min(mouseY/2,50));
        dist-=1;
    }
    //straight line spread
    pop();
    var numLines=20;
    dx1=0/numLines;
    dy1=mouseY/numLines;
    dx2=mouseX/numLines;
    dy2=0/numLines;
    var x1=0;
    var y1=100;
    var x2=500;
    var y2=250;
    for (var i=0; i<=numLines; i+=1) {
        stroke(300);
        strokeWeight(3);
        line(x1,y1,x2,y2);
        x1+=dx1;
        y1+=dy1;
        x2+=dy2;
        y2+=dy2;
    }
}

I wasn’t too sure about my string art going into programming. I didn’t really have a clear vision and in the end I kept playing around with the code until I reached a point I like. In the future, I think I’m going to try to redo this code on my own – I think it would be an engaging entrance piece for my website.

LO: Sound Art

Short video of Klompen

Trimpin, Klompen

I appreciate the works of Trimpin. I originally looked him up because I thought his artist name was neat, but I ended up really enjoying his sculptures. In particular, I enjoy his Klompen sculpture. 120 Dutch wooden clogs are connected to a computer by concealed wires and suspended from the ceiling, which then use small levers hidden inside the clogs to hit the wood of the clogs and create the distinctive rapping wood noises. I find it interesting for the layers of art that are embedded in the sculpture. Firstly, the clogs themselves are art pieces in how they are crafted and then individually painted. Then, hanging them from the ceiling introduces interesting three-dimensional and surrealist aspects. Finally, they make fun music using an unconventional method. You can tell how much digital work went into bringing the sculpture to life. I appreciate that the work isn’t necessarily “deep” or thought provoking, but is fun to look at and fun to listen to, which is all art needs to be sometimes.

LO4

This week I looked into theROOM, a physical and auditory installation by Keikan Uenishi. The installation is meant to simulate the sounds in a neighborhood, and highlight how physical partitions do not really divide up space the way we think they do. The installation is a room with another small room build in one corner of the room, and a pile of gray objects on the other. The small room has several loudspeakers inside of it oriented in different angles, such that you hear different sounds standing in different spots around the room. As you move around the room, you hear snipers of different things: overhear conversations, listen to office noise, etc.

theROOM/SOUNDLEAK

String Art

sketch

var dx1;
var dy1;
var dx2;
var dy2;

var numLines = 50;

function setup() {
    createCanvas(400, 400);
    background(220);
}

function draw() {
    background(200);
    //line(mouseX, mouseX, 150-mouseY, 300+mouseY);
    //line(mouseX, mouseX, 350-mouseY, 100+mouseY);

    var x1 = mouseX;
    var y1 = mouseX;
    var x2 = mouseX;
    var y2 = mouseX;

    dx1 = (mouseX-mouseY)/numLines;
    dy1 = (mouseX-mouseY)/numLines;
    dx2 = (150-mouseY-350-mouseY)/numLines;
    dy2 = (300+mouseY-100+mouseY)/numLines;

    for (var i = 0; i <= numLines; i += 1) {
        stroke(0);
        line(x1, y1, x2, y2);
        x1 += dx1;
        y1 += dy1;
        x2 += dx2;
        y2 += dy2;
    }

    var r = 20;

    fill(255,140,140);
    noStroke();
    circle(mouseY, mouseX, 2*r);

    fill(140,140,255);
    circle(width-mouseY, height-mouseX, 40);

    var xc1 = mouseY;
    var yc1 = mouseX+r;
    var xc2 = width-mouseY;
    var yc2 = height-mouseX-r;


    for (var i = 0; i <= 2*PI; i += PI/4) {
        stroke(0);
        line(xc1, yc1, xc2, yc2);
        if (i <= PI/2) {
            xc1 += r*Math.sin(i);
            yc1 -= r-r*Math.cos(i);
            xc2 -= r*Math.sin(i);
            yc2 += r-r*Math.cos(i);
        } else if (i > PI/2 & i <= PI) {
            xc1 -= r*Math.sin(i);
            yc1 -= r-r*Math.cos(i);
            xc2 += r*Math.sin(i);
            yc2 += r-r*Math.cos(i);
        } else if (i > PI & i <= 3*PI/2) {
            xc1 -= r*Math.sin(i);
            yc1 += r-r*Math.cos(i);
            xc2 += r*Math.sin(i);
            yc2 -= r-r*Math.cos(i);
        } else if (i > 3*PI/2 & i <= 2*PI) {
            xc1 += r*Math.sin(i);
            yc1 += r-r*Math.cos(i);
            xc2 -= r*Math.sin(i);
            yc2 -= r-r*Math.cos(i);
        }
    }
}