Blog 04: “Sound Machines”

By Ilia Urgen
Section B

“A visual instrument to compose and control electronic music in a comprehensive and responsible way.” – MediaArtTube, January 28, 2012. I love how this modern audiovisual concept is based on a timeless design used throughout the greater portion of the 20th Century – the record player.

I am truly fascinated and intrigued by this stunning piece of technology. As quoted by the creator, Sound Machines consist of 3 units, each unit resembling Vinyl record players. Each unit has the capacity of holding 3 tracks, just like traditional record players.

MediaArtTube, however, embodies this classical design with a 21st Century makeover. There is no direct contact of the needle to the groove in the disc in a Sound Machine. Signals received from the laser light of the “needle” is synced to a sequencer, producing a sound output.

Sound Machines are definitely a cool way to mix various digitally-transmitted tracks together, and I hope that we continue to see a greater implementation of this technology in everyday life.

(YouTube link: https://www.youtube.com/watch?v=_gk9n-2lBb8)

One of three Disc Units of a Sound Machine. Each color represents the different sound files electronically stored on the disc.

Project 04: Illuminati out of the Pyramid!

sketchDownload
// Ilia Urgen
// Section B

var numLines = 60;

function setup() {
    createCanvas (400,300); 
    
    color_1 = color (135,206,245);
    color_2 = color (253,217,181);

    // ombre 
    for (var y = 0; y < height; y++ ) {
        n = map (y,0, height, 0, 1);
        var color_3 = lerpColor (color_1, color_2, n);
        stroke (color_3);
        line (0, y, width, y);
    }

    stroke (0);

    // canvas border lines
    line (1,1,1,299);
    line (1,1,399,1);
    line (1,299,399,299);
    line (399,1,399,299);
} 

function draw() {
    
    for (var i = 0; i <= numLines; i += 1) {

        var x1 = 0;
        var y1 = i * width / numLines;
        var x2 = i * height / numLines;
        var y2 = 300;

        // lower eye curve
        strokeWeight(0.5);
        line (x1, y1, x2, y2);
        
        // upper eye curve and pyramid side
        line (x2, 0, 400, y1);

        // lower eye lines
        line (y1, x2 * 1.05, x1, y1 - 20);

        // pyramid face
        line (y2, x2, x1 - 2.1, y2 + 200);

        // eye line
        strokeWeight(2);
        line (0,0,382,303);
        
    }

    //illuminati eye
    push();

    translate (185, 152);
    rotate(radians(38));
    fill (0);
    ellipse (0,0,180,80);
    fill (255);
    ellipse (0,0,80);
    fill (0);
    ellipse (0,0,20);

    pop();

noLoop();
}

Looking Outwards 04: Sound Art

https://www.creativeapplications.net/maxmsp/forms-string-quartet/
Playmodes
FORMS – String Quartet
2021

The project “FORMS – String Quartet” uses an algorithm (a “realtime visual score generator” called  “The Streaming Bot”) to generate great visual representations of various forms including lines and shapes as graphic scores, which are then converted into actual sounds and music.

“FORMS – String Quartet”, which is a performance in its eventual form, is derived from the works of “Screen ensembles”. In “Screen ensembles”, graphics that work as scores were created by the algorithm and were later converted into different sounds. Each screen represents a different role like “Rhythm”, “Harmony”, or “Texture”.

Screen Ensembles

One thing that I appreciate and admire a lot about this project is that it liberated the music scores from the traditional, rigid, black and white styles and transformed them into more flexible, diverse, and artistically-attractive visual forms. Also, they try to generate music from random graphics and shapes, which I think is an innovative attempt.

Project-04: String Art

Shirley Du P4

sketch

Examples:

//Xinyi Du 
//15104 Section B

var dx;
var dy;
var dx2;
var dy2;
var numInterval1 = 12; //number of intervals
var numInterval2 = 10; //number of intervals

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

function draw() {
    background(0);

    //the first series of strings
    stroke(189, 252, 83);
    string1(mouseX, mouseY);
    stroke(100);
    string2(mouseX, mouseY);

    push();
    translate(400, 0); //translate the orgin to top right corner
    rotate(radians(90)); //rotate to get the second series of strings in another color
    stroke(47, 109, 246);
    string1(mouseX, mouseY);
    stroke(100);
    string2(mouseX, mouseY);
    pop();

    push();
    translate(400, 400); //translate the orgin to bottom right corner
    rotate(radians(180)); //rotate to get the third series of strings in another color
    stroke(106, 214, 129);
    string1(mouseX, mouseY);
    stroke(100);
    string2(mouseX, mouseY);
    pop();

    push();
    translate(0, 400); //translate the orgin to bottom left corner
    rotate(radians(270)); //rotate to get the fourth series of strings in another color
    stroke(91, 196, 218);
    string1(mouseX, mouseY);
    stroke(100);
    string2(mouseX, mouseY);
    pop();
}

//draw the small and grey central strings that follows the mouse
function string2(x, y) {
    var dx2 = (dist(x, y, width/2, y))/numInterval1; //strings horizontal interval
    var dy2 = (dist(x, y, x, height/2))/numInterval1; //strings vertical interval
    for (var i = 0; i < numInterval1; i += 1){ //use for loop to repeat the drawing process
        line(width/2, y+dx2*i, width/2+dx2*i+dx2, height/2);
        line(width/2, y, width/2, height/2);
        line(width/2, height/2, x, height/2);
    }
}

function string1(x, y) {
    //draw the bigger strings at one side of the canvas
    var dx = (height/2)/numInterval1; //strings horizontal interval
    var dy = (width/2)/numInterval1; //strings vertical interval
    for (var i = 0; i <= numInterval1; i += 1){ //use for loop to repeat the drawing process
        line(0, dy*i-dy, dx*i, width/2); 
        line(0, height/2, width/2, height/2)
        line(0, width/2+dy*i+dy, width/2-dx*i, height/2);
        
    }

    //draw the smaller strings that follows the mouse
    var dx2 = (dist(x, y, width/2, y))/numInterval2;
    var dy2 = (dist(x, y, x, height/2))/numInterval2;
    for (var i = 0; i < numInterval2; i += 1){ //use for loop to repeat the drawing process
        line(width/2+dx2*i, y, x, y+dx2*i+dx2);
        line(width/2, y, x, y);
        line(x, y, x, height/2);
    }

}



Project-04: String Art-Section B

All Seeing Eye.

sketch
/*
* Evan Stuhlfire
* estuhlfi@andrew.cmu.edu
* Section B
*
* Project-04: String Art
* This program uses geometric shapes to create
* string art.
*/

function setup() {
    createCanvas(400, 300);
    background(73, 80, 87); //davys grey from coolors.com

}

function draw() {   
    // draw the string lines for the frame in light blue
    stringLeftLower(204, 255, 255, 55);
    stringLeftUpper(204, 255, 255, 55);
    stringRightUpper(204, 255, 255, 55);
    stringRightLower(204, 255, 255, 55);

    // move origin of canvas to center
    translate(width/2, height/2);

    // draw the circle design with light blue
    stringCircle(204, 255, 255); 
    noLoop();
}

/* draw the string pattern at the lower left */
function stringLeftLower(r, g, b, t) {
    var numLines = 40;
    var x1 = 0; // start at top right
    var y1 = 0; // top right
    var y2 = height;
    var x2 = xInc = (width/numLines);
    var yInc = (height/numLines);

    stroke(r, g, b, t);
    // iterate over each line to draw
    for (index = 0; index < numLines; index ++) {
        line(x1, y1, x2, y2);
        y1 += yInc;
        x2 += xInc;
    }
}

/* draw the string pattern at the upper left */
function stringLeftUpper(r, g, b, t) {
    // set vars to start at lower left and draw up
    var numLines = 40;
    var x1 = 0;
    var y1 = height; // lower left
    var y2 = 0;
    var x2 = xInc = width/numLines;
    var yInc = height/ numLines;

    stroke(r, g, b, t);
    // iterate over each line to draw
    for (index = 0; index < numLines; index ++) {
        line(x1, y1, x2, y2);
        y1 -= yInc; // move up the canvas
        x2 += xInc; // move across the canvas
    }
}

/* draw the string pattern at the upper right */
function stringRightUpper(r, g, b, t) {
    var numLines = 40;
    var x1 = xInc = width/numLines;
    var x2 = width;
    var y1 = 0;
    var y2 = 0;
    var yInc = height/ numLines;

    stroke(r, g, b, t);
    // iterate over each line to draw
    for (index = 0; index < numLines; index ++) {
        line(x1, y1, x2, y2);
        y2 += yInc; // move down the canvas
        x1 += xInc; // move right across the canvas
    }
}

/* draw the string pattern at the lower right */
function stringRightLower(r, g, b, t) {
    // set variable
    var numLines = 40;
    var x1 = width; // right side
    var x2 = 0;
    var xInc = width/numLines;;
    var yInc = height/numLines;
    var y1 = height - yInc; // bottom right
    var y2 = height;

    stroke(r, g, b, t); // set color and transparency
    // iterate over each line to draw
    for (index = 0; index < numLines; index ++) {
        line(x1, y1, x2, y2); 
        y1 -= yInc; // move up the canvas
        x2 += xInc; // move right across the canvase
    }
}

/* draw the center string circle */
function stringCircle(r, g, b) {
    // 36 spokes on the circle design
    var circlePoints = 36;
    var angle = 0;
    var rotDeg = 0;

    // iterate over each spoke
    for (index = 0; index < circlePoints; index++) {
        // save settings
        push();

        // map the angle to the perimeter of the circle
        angle = map(index, 0, circlePoints, 0, TWO_PI);

        // convert angle to x y coordinates
        var radius = 90;
        var circleX = radius * cos(angle);
        var circleY = radius * sin(angle);

        // move origin to the starting point of the circle
        translate(circleX, circleY);

        // rotate each spoke to the origin
        rotate(radians(rotDeg));

        // variables for drawing string design
        var circleX2 = -radius * 2;
        var circleY2 = 0;
        var smallCircleDiam = 10;
        var offset = 15;

        // draw small circles at end of spokes
        stroke(r, g, b, 255);
        circle(0, 0, smallCircleDiam * .2);
        noFill();
        circle(0, 0, smallCircleDiam); // outline

        // set stroke color and decrease transparency to
        // see more detail.
        stroke(r, g, b, 125); 

        // draw three lines from each perimeter point to
        // create spokes
        line(0, 0, circleX2, circleY2);
        line(0, 0, circleX2, circleY2 + offset);
        line(0, 0, circleX2, circleY2 -offset);

        // extend lines off of spokes
        stroke(r, g, b, 50);
        line(0, 0, offset * 8, circleY2);
        line(0, 0, offset * 8, circleY2 + offset);
        line(0, 0, offset * 8, circleY2 -offset);

        // call function to draw the background circles with
        // transparancey
        backgroundCircles(index, offset, r, g, b, 80);

        pop(); // restore settings 
        rotDeg += 10; // rotate 10 degrees 36/360
    }
}

/* draw the background circles with design */
function backgroundCircles(index, offset, r, g, b, t) {
    // save settings
    push();
    stroke(r, g, b, t); // light blue with transparency
    // rest origin, space circles out
    translate(25, 0);

    // draw small inner circle on even spoke
    if (index % 2 == 0) {           
        circle(0, 0, 20);
        circle(110, 0, 70);
    } else {
        var diam = offset * 4; // set diameter
        // draw bigger circle on odd spoke
        circle(offset * 3, 0, diam);

        // string design of four circles inside each 
        // bigger circle
        var shiftValue = 10;
        circle(offset * 3, -shiftValue, diam/2);
        circle(offset * 3, shiftValue, diam/2);
        circle(offset * 3 + shiftValue, 0, diam/2);
        circle(offset * 3 - shiftValue, 0, diam/2);
    }
    pop();// restores settings
}

Looking Outwards-04-Section B

Experiments in Musical Intelligence, EMI or EMMY, is a program that analyzes musical compositions and generates entirely new compositions that emulate the sound, style, mood, and emotion of the original. Written by composer, author, and scientist, David Cope, this project allows entirely new compositions to be algorithmically generated in the style of any composer. Compositions have been generated in the styles of Bach, Beethoven, Chopin, and many more, including Cope himself. In fact, Cope’s original inspiration for the software project was writer’s block. He was stuck and wanted to identify his own compositional style.

Although the software is data driven and bases its compositions on works by the original composer, it never repeats or copies the original work. The compositions generated are unique. Cope’s software deconstructs the original works; then records their time signatures. The final step runs the data through a recombinant algorithm for which Cope holds a patent.

This project was truly revolutionary for its time. It inspires questions about creativity and the mind. Originally written in the LISP programming language in the 1980s, it has been modified to use AI techniques as they have advanced. Interestingly, the generative compositions have been used in a type of Turing Test. One particular test set out to see if audiences could identify which of three compositions was actually composed by Bach, which was an emulated composition written by a human, and which was generated by a computer. Audiences chose the EMMY generated composition as the actual Bach. Perhaps EMMY is the first piece of software to pass the Turing Test.

To learn more about David Cope and EMMY click here and here.

Project 04 – String Art

This project consists of abstract string art made with multiple stacking of straight lines, creating an illusion of circles that look like octagons. The most challenging part of this project is organizing the direction the lines are going.

sketch
//Jenny Wang
//Section B

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 numLines = 15


function setup() {

    createCanvas(400, 300);
    background("black");

    var cx = width/2 //center x
    var cy = height/2 //center y
    //draw ellipse
    noStroke();
    fill(110);
    ellipse(cx,cy,110,110);
    fill(180);
    ellipse(cx,cy,80,80);
    fill(230);
    ellipse(cx,cy,50,50);

    stroke("blue")
    line(cx,cy,width/2,0);//line 1 
    line(cx,cy, width, height/2);//line2
    line(cx,cy,width/2,height);//line 3
    line(cx,cy, 0,height/2);//line4

    //Q1
    dx1 = (cx-cx)/numLines;
    dy1 = (cy-0)/numLines;
    dx2 = (width-cx)/numLines;
    dy2 = (cy-cy)/numLines;

    //Q2
    dx3 = (cx-cx)/numLines;
    dy3 = (cy-height)/numLines;
    dx4 = (width-cx)/numLines;
    dy4 = (cy-cy)/numLines;

    //Q3
    dx5 = (cx-cx)/numLines;
    dy5 = (cy-height)/numLines;
    dx6 = (0-cx)/numLines;
    dy6 = (cy-cy)/numLines;

    //Q4
    dx7 = (cx-cx)/numLines;
    dy7 = (cy-0)/numLines;
    dx8 = (0-cy)/numLines;
    dy8 = (cy-cy)/numLines;
}

function draw() {
    //Q1.1
    var x1 = width/2;
    var y1 = 0;
    var x2 = width/2;
    var y2 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("lightblue")
        line(x1, y1, x2, y2);
        x1 += dx1;
        y1 += dy1;
        x2 += dx2;
        y2 += dy2;
    }

    //Q2.1
    var x3 = width/2;
    var y3 = height;
    var x4 = width/2;
    var y4 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("pink")
        line(x3, y3, x4, y4);
        x3 += dx3;
        y3 += dy3;
        x4 += dx4;
        y4 += dy4;
    }
    //Q2.2
    var x3 = width;
    var y3 = height/2;
    var x4 = width/2;
    var y4 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("white")
        line(x3, y3, x4, y4);
        x3 += dx3;
        y3 += dy3;
        x4 += dx4;
        y4 += dy4;
    }
    //Q2.3
    var x3 = 0;
    var y3 = height/2;
    var x4 = width/2;
    var y4 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("grey")
        line(x3, y3, x4, y4);
        x3 += dx3;
        y3 += dy3;
        x4 += dx4;
        y4 += dy4;
    }

    //Q3.1
    var x5 = width/2;
    var y5 = height;
    var x6 = width/2;
    var y6 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("lightgreen")
        line(x5, y5, x6, y6);
        x5 += dx5;
        y5 += dy5;
        x6 += dx6;
        y6 += dy6;
    }
    //Q3.2
    var x5 = 0;
    var y5 = height/2;
    var x6 = width/2;
    var y6 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("white")
        line(x5, y5, x6, y6);
        x5 += dx5;
        y5 += dy5;
        x6 += dx6;
        y6 += dy6;
    }
    //Q3.3
    var x5 = width;
    var y5 = height/2;
    var x6 = width/2;
    var y6 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke("grey")
        line(x5, y5, x6, y6);
        x5 += dx5;
        y5 += dy5;
        x6 += dx6;
        y6 += dy6;
    }

    //Q4.1
    var x7 = width/2;
    var y7 = 0;
    var x8 = width/2;
    var y8 = height/2;
    for (var i = 0; i <= numLines; i += 1) {
        stroke(224,199,166)
        line(x7, y7, x8, y8);
        x7 += dx7;
        y7 += dy7;
        x8 += dx8;
        y8 += dy8;
    }
 
    noLoop();
}

Project 04 – String Art – srauch

Here’s my string art — when the mouse is pressed, it makes rainbow spiderwebs in each corner of the canvas. To erase the canvas and start over, press “e”.

sketch

//Sam Rauch / srauch / section B
//this code generates four "rainbow spiderwebs", one in each corner of the canvas,
//as long as the mouse is pressed. When the user presses the "e" key, the canvas
//erases. 

// two points of A line
var ax1;
var ay1;
var ax2;
var ay2;

// two points of B line
var bx1;
var by1;
var bx2;
var by2;

// endpoints of connecting lines
var x1; 
var y1;
var x2; 
var y2;


function setup() {
    createCanvas(400, 300);
    background(0);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {

    //draw spiderwebs in each quadrant of the canvas as long as mouse is pressed
    if (mouseIsPressed){
        strokeWeight(1);

        stringart();

        push();
        translate(200,0);
        stringart();
        pop();

        push();
        translate(200,150);
        stringart();
        pop();

        push();
        translate(0, 150);
        stringart();
        pop();
    }

    //erase canvas when user presses e key
    if (keyIsPressed){
        if (key == "e") {
            background(0);
        }
    }
}

//creates two lines, with 50 "stringers" between each line
function stringart() {
    //canvas size (200, 150)

    //randomly generate location of A line
    ax1 = random(10, 190);
    ay1 = random(10, 140);
    ax2 = random(10, 190);
    ay2 = random(10, 140);

    //randomly generate location of B line
    bx1 = random(10, 190);
    by1 = random(10, 140);
    bx2 = random(10, 190);
    by2 = random(10, 140);

    //assign first stringer's location connecting top of A and bottom of B
    x1 = ax1; 
    y1 = ay1;
    x2 = bx2;
    y2 = by2;

    //draw A line and B line in a random color
    stroke(random(255), random(255), random(255));
    line(ax1, ay1, ax2, ay2);
    line(bx1, by1, bx2, by2);
    strokeWeight(0.5);

    //draw 50 lines between A line and B line, incrementing 1/50th of distance between x values
    //and y values of each line
    for (var i = 0; i < 51; i+=1) {

        var x1Increment = (ax2- ax1) / 50;
        var y1Increment = (ay2 - ay1) / 50;
        var x2Increment = (bx1 - bx2) / 50;
        var y2Increment = (by1 - by2) / 50;

        //first stringer
        line (x1, y1, x2, y2);

        //changing position of stringer for each loop
        x1 += x1Increment;
        y1 += y1Increment;
        x2 += x2Increment;
        y2 += y2Increment;

    }

}

Looking Outwards-04

The most recent iteration, ‘FORMS – String Quartet,’ invites musicians on stage to interpret a series of graphic scores, which build up the visual scenery, giving the audience the experience of anticipating the “music to come.” Each instrument on the score is identified by a color code, with white representing the random engine itself. This performance was recorded in collaboration with the Brossa String Quartet at Barcelona’s CosmoCaixa Science Museum in April 2021, as part of the art+science NEO cycle curated by Irma Vilà and Pau Alsina. According to their website, ​​the generative graphics were written in Processing, while the image sonification was done in Max/MSP. The part that I was most intrigued by was how music/sound could be visualized in a sense. And it’s not just any visuals but interactive visuals with cool light effects. That could be a way for people with hearing impairments to enjoy music. I think this style of performance has excellent potential.

Link:https://www.creativeapplications.net/maxmsp/forms-string-quartet/

Forms – String Quartet – Irma Vilà and Pau Alsina

LO4: FORMS!

FORMS – String Quartet, 2021 https://vimeo.com/553653358?embedded=true&source=vimeo_logo&owner=7721912

FORMS is a live event where musicians interpret and play scores that are randomly generated by a bot in real time. Each instrument corresponds to a certain color, displayed on screen, and the result is a comprehensive piece combining both randomized audio and visual elements. I think this piece piqued my interest because recently I’ve been toying with the idea that certain movements “lock” and “unlock” events that occur. There’s specifically a video piece that I’m working on at the moment in which a specific twist of the wrist prompts a four minute long rendition of “One Day More” from Les Mis performed by hand puppets. While this is certainly not random, I think the ideas are pretty analogous, especially in terms of audio/visual component, and especially in the way that a random notation is able to elicit a programmed response. In terms of how this (FORMS, not Les Mis puppetry) functions algorithmically, it seems pretty clear that a series of shapes are randomly notated, each with a corresponding color, and likely shifted in positionality to notate rests, changing of notes, etc. Because there are so many (infinite) shapes, and notating a specific number would perhaps be unwise for practicality reasons, it might be possible that for loops were utilized? Don’t quote me on that, but I think otherwise the work would be quite tedious.

Shot of the quartet along with the randomized score notation.