Mihika Bansal – Project 10 – Sonic Sketch

sketch


// Mihika Bansal 
// Section E 
// mbansal@andrew.cmu.edu
// Project 10

var h1 = 35; // varying heights
var h2 = 80;  
var h3 = 50; 

var w1 = 10; //varying widths 
var w2 = 15; 
var w3 = 20; 


function preload() {
    // call loadImage() and loadSound() for all media files here
    //mySnd = loadSound("waves.wav"); 
   // mySnd.setVolume(0.5);
}


function setup() {
    // you can change the next 2 lines:
    rectMode(CENTER); 
    createCanvas(480, 400);
   
    //======== call the following to use sound =========
    useSound();
}


function soundSetup() { // setup for audio generation
    // you can replace any of this with your own audio code:
    s1 = new p5.Oscillator(); //the 4 tones I will be manipulating
    s1.setType('sine');

    s2 = new p5.Oscillator();
    s2.setType("sine"); 

    s3 = new p5.Oscillator();
    s3.setType("sine"); 
    
    s4 = new p5.Oscillator();
    s4.setType("sine"); 

    //starting all the audio files, so all sounds are playing at the same time
    s1.start();
    s2.start(); 
    s3.start();
    s4.start();

}


function draw() {

    //creating visual elements 
    background(15); 
    noStroke(); 

    h1 = map(mouseY, 0, height, 50, 80); 
    h2 = map(mouseX, 0, height, 100, 200);
    h3 = map(mouseY, 0, height, 80, 120); 

    w1 = map(mouseX, 0, width, 10, 30);
    w2 = map(mouseY, 0, width, 20, 40);
    w3 = map(mouseX, 0, width, 15, 35); 

    fill("#355C7D"); 
    rect(26, 200, w1, h1); 
    rect(185, 200, w1, h1);
    rect(344, 200, w1, h1);


    fill("#F67280"); 
    rect(79, 200, w2, h2);
    rect(238, 200, w2, h2);
    rect(397, 200, w2, h2);

    fill("#C06C84"); 
    rect(132, 200, w3, h3);
    rect(291, 200, w3, h3);
    rect(450, 200, w3, h3);

    if(mouseX > 0 & mouseX < 120){ //determing sound based on the mouse, moving the mouse changes the sound
        freq1 = map(mouseX, 0, width, 0, 200); //lowest frequency is to the left of the screen
        //amp1 = map(mouseY, 0, height, 0, 0.3); 
        s1.freq(freq1); 
        s1.amp(0.5); //when in that section of the screen the audio is louder
        //s1.start(); 
    }
    else{
        s1.amp(0); //when outside of that section of the screen, the audio is softer 
    }
    if(mouseX > 120 & mouseX < 240){
        freq2 = map(mouseX, 0, width, 200, 400); // increeasing frequency
        s2.freq(freq2);
        s2.amp(0.5); // louder sounds
        //s2.start(); 
    }
    else{
        s2.amp(0); //softer sounds 
    }
    if(mouseX > 240 & mouseX < 360){
        freq3 = map(mouseX, 0, width, 400, 600); // increasing the frequency 
        s3.freq(freq3);
        s3.amp(0.5); //louder sound
        //s3.start(); 
    }
    else{
        s3.amp(0); //softer sound  
    }
    if(mouseX > 360 & mouseX < 480){
        freq4 = map(mouseX, 0, width, 600, 800); //final increase in the frequency
        s4.freq(freq4);
        s4.amp(0.5);
        //s4.start(); 
    }
    else{
        s4.amp(0);  
    }

}

With this project, I created a sound piece that depends on the location of the mouse on the page. When the mouse is off of the screen the sound stops, but as long as it is on the page, a frequency will be emitted. The visuals correspond with the sound that is being emitted because I used the map function for both. Move the mouse completely to the left to stop emitting the sound on wordpress.

Lanna Lang – Project 10 – Sonic Sketch

sketch

//Lanna Lang
//Section D
//lannal@andrew.cmu.edu
//Project 10-Sonic Sketch

var c1, c2; //variables for background colors;
var sfxWolf;
var sfxNight;
var sfxFire;
var sfxSnore;

function preload() {
    sfxWolf = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/10/wolf-lanna.wav");
    sfxWolf.setVolume(1);

    sfxNight = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/10/night-lanna.wav");
    sfxNight.setVolume(0.1);

    sfxFire = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/10/fire-lanna-2.wav");
    sfxFire.setVolume(1);

    sfxSnore = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/10/snore-lanna-2.wav");
    sfxSnore.setVolume(10);
}

function setup() {
    createCanvas(600, 480);
    ellipseMode(CENTER);
    frameRate(5);

    //calling the gradient function
    c1 = color('#0b0043'); //background sky blue
    c2 = color('#fa3500'); //background sky red
    setGradient(c1, c2);
}

function draw() {
    //calling all the other draw functions
    drawLandscape();
    drawWolf();
    drawCamp();
    drawText();
    
    //play the background sound effect
    sfxNight.play();
}

//function to draw all the landscape in the background
function drawLandscape() {
    noStroke();
    
    //moon
    fill('#d0cba3');
    ellipse(390, height / 2, 400, 400);

    //left mountain
    fill(28);
    triangle(80, 370, 280, 100, 520, 370);
    //middle mountain
    fill(7);
    triangle(250, 350, 530, 115, width + 150, 350);
    //right mountain
    fill(41);
    triangle(120, 350, 370, 130, width, 350);

    //draw the smaller trees
    for (y = 0; y < height; y += 40) {
        for (x = -100; x < width + 50; x += 160) {
            fill('#051107'); //very dark green
            triangle(x + 150, y + 250, x + 70, y + 350, x + 230, y + 350);
        }
    }

    //draw the bigger trees
    for (y = 0; y < height; y += 40) {
        for (x = 0; x < width + 50; x += 160) {
            fill('#08190a'); //dark green
            triangle(x + 130, y + 170, x + 60, y + 270, x + 200, y + 270);
        }
    }

    //ground
    fill('#2d1c17');
    rect(0, 450, width, 30);
}

//function draw the wolf on the mountain
function drawWolf() {
    var x1 = [360.6, 363.08, 365.31, 367.38, 368.72, 369.44, 377.04, 
        383.33, 383.64, 382.46, 379.41, 352.73, 350.96, 354.51, 364.05, 
        353.13, 351.06, 355.04, 353.34, 353.15, 354.65, 356.89, 358.31];

    var y1 = [91.1, 97.49, 99.05, 104.99, 106.07, 107.05, 124.71, 134.52,
        145.3, 153.01, 155.56, 156.09, 154.64, 151.27, 146.85, 132.89, 123.88,
        103.92, 98.75, 97.08, 96.79, 98.41, 92.87];

    var nPoints1 = x1.length;
    beginShape();
    for (var i = 0; i < nPoints1; i++) {
        fill(10);
        vertex(x1[i], y1[i]);
    }
    endShape(CLOSE);
}

//function to draw the camp
function drawCamp() {
    var x2 = [248.75, 253.55, 257.24, 258.2, 258.32, 258.21, 259.05, 261.99, 
        264.49, 263.6, 263.47, 264.48, 265.59, 266.17, 266.09, 264.98, 263.59, 
        242.52, 241.6, 240.02, 238.84, 238.46, 238.53, 239.54, 240.74, 240.75, 
        240.76, 242.51, 243.35, 242.69, 242.52, 242.64, 243.96, 246.81, 248.93, 
        250, 249.69]

    var y2 = [420.75, 423.75, 427.8, 430.42, 434.29, 435.15, 433.61, 430.98, 429.8, 
        433.4, 433.09, 438.56, 440.94, 442.74, 446.81, 449.99, 451.9, 451.9, 451.03,
        448.74, 445.82, 442.64, 440.15, 437.17, 435.48, 436.47, 438.45, 441.95, 
        442.74, 440.55, 438.56, 436.58, 433.3, 430.33, 428.12, 425.34, 422.93]

    //tent
    fill('#ffef86');
    triangle(380, 450, 410, 410, 430, 470);
    fill('#ffe641');
    quad(410, 410, 430, 470, 480, 450, 450, 390);
    stroke(0);
    strokeWeight(6);
    line(410, 412, 400, 457);

    //person sleeping inside the tent
    //pants
    stroke('cyan'); 
    strokeWeight(4);
    line(390, 458, 402, 458);
    line(400, 458, 403, 463);
    //feet
    stroke('#d5a88f');
    line(390, 458, 387, 456);
    line(403, 463, 405, 461);

    //fire
    //flames
    stroke('#f7da14');
    strokeWeight(3);
    fill('#ff7901');
    var nPoints2 = x2.length;
    beginShape();
    for (var i = 0; i < nPoints2; i++) {
        var px = x2[i] + random(-1, 1);
        var py = y2[i] + random(-1, 1);
        vertex(px, py);
    }
    endShape(CLOSE);
    //wood logs
    noStroke();
    fill('#a36d4e');
    rect(235, 451.9, 35, 6);
    fill('#845640');
    rect(235, 457.9, 35, 6);
}

//function for drawing the text
function drawText() {
    textFont('Comic Sans MS');
    textStyle(BOLD);
    textSize(20);
    fill('#5c94bd');
    text('Z', 415, 450);
    textSize(30);
    text('Z', 430, 440);
    textSize(40);
    text('Z', 455, 420);
}

//function to draw the gradient for the background sky
function setGradient(c1, c2) {
    noFill();
    for (var y = 0; y < height * 0.7; y++) {
        var inter = map(y, 0, height * 0.7, 0, 1);
        var c = lerpColor(c1, c2, inter);
        stroke(c);
        line(0, y, width, y);
    }
}

function mousePressed() {
    //if the mouse position is within the wolf,
    //then the wolf howl will play
    if (mouseX < 384 & mouseX > 349 && mouseY < 157 && mouseY > 90) {
        sfxWolf.play();
    }
    
    //if the mouse position is within the fire,
    //then the fire crackling will play
    if (mouseX < 267 & mouseX > 238 && mouseY < 452 && mouseY > 420) {
        sfxFire.play();
    }

    //if the mouse position is within the tent,
    //then the snoring will play
    if (mouseX < 450 & mouseX > 380 && mouseY < 470 && mouseY > 410) {
        sfxSnore.play();
    }
}

I have 4 sounds in my sketch: the background/ambient noise is nightlife/crickets, if you click the wolf it will howl, if you click the fire there is a wood crackling/fire sound, and if you click the tent with the person inside there is a snoring sound. I had a lot of fun creating this interactive piece because I wanted to challenge myself and do something a little intricate.

Kristine Kim- Looking Outwards-10

Adrien Kaeser, Weather Thingy, 2018

Weather Thingy, created by Adrien Kaeser at ECAL( Media and Interaction Design Unit), is a custom hand built sound controller that uses real time climate-related events to control and modify the settings of musical instrument.  The device are made up of two main parts in which are a weather station on a tripod microphone and a custom built controller connected to the weather station. The controller is formulated with a brightness sensor and an interface allowing it to assign the various parameters received to audio effects and it transform climatic data into midi data which can be interpreted by instruments.  

4 interface screens each displaying a data received by one of the 4 sensors

Kaeser was interested in being able to use the controller in Live so that the listeners can feel the impact of the climate on the composition.  It is also possible to use the device in the studio by pre-recording the climate data of a certain place at a certain time. This allows the musician to capture moments that he has found inspiring to create new melodies. I was really interested in this piece because of Kaeser’s use of technology and nature. Not just naturalistic ideas or a project derived from an idea of nature but the actual form and nature. I don’t recall seeing any projects that incorporated such an intricate technique of technology and weather together. I was very impressed by the all prototypes and the process of turning this project into reality. I also admire that it can be controlled live so that the audience can feel the real time impact of the climate on the work.

Weather Thingy ECAL/ Adrien Kaseser, How-to, run down of the project.

Austin Garcia – Looking Outwards 10 – Section C

While still not entirely sure what sound art could be defined as, I was looking around online and found this piece by Jana Winderen called “Out of Range”. This piece was created by using a variety of different, specialized microphones and hydrophones to capture sounds of various animals that are out of the range of human hearing. From the echolocation of bats to the communications of whales and dolphins, this audio ensemble combines all these inaudible noises and brings them to our ears. The result is a suite of natural sounds that seem familiar but are truly unique.

I am still not 100% sure what could be considered sound art and what could not. However, I do certainly believe that this piece ought to be classified as sound art due to the grace in its composition but also its reason for existing. To bring these sounds to human ears in such a way is truly an artistic feat.

Link

Austin Garcia – Project 10 – Group C

sketch

/*  Austin Garcia
		Section C
		aegarcia@andrew.cmu.edu
		Project 10
*/
//I decided to take some old code from a lab that I bugged out on accident
// and use it as a visually interesting way to generate random y VALS
// PLEASE CLICK ON CANVAS AND DRAG mouseX

var balls = [200]
var ball = {
  x: balls,
  y: 0,
  speed: 0,
  display: function() {
  fill(255); ellipse(this.x, this.y, 20, 20);
},
  move: function() {
    this.y = this.y + this.speed;
    this.speed = this.speed + gravity;
},
  bounce: function() {
    if (this.y > height - 11) {
      this.speed = this.speed * -1;
    }
  }
};

var xarray = []
var yarray = []
var size = 0;


var gravity = 0.1;



function setup() {
    // you can change the next 2 lines:
    createCanvas(400, 700);
    createDiv("p5.dom.js library is loaded.");
    //======== call the following to use sound =========
    useSound();
}


function soundSetup() { // setup for audio generation
    // you can replace any of this with your own audio code:
    osc = new p5.TriOsc();
    osc.freq(500);
    osc.amp(.1);
    osc.start();

    osc1 = new p5.TriOsc();
    osc1.freq(200);
    osc1.amp(.1);
    osc1.start();

    frameRate(10)
}


function draw() {
    // you can replace any of this with your own code:
    background(200);
    fill("yellow");
    size = 1

    //draw circle
    for (var i = 0; i < xarray.length; i += 1) {
        ellipse(xarray[i], yarray[i], size, size)
        size += 1
        if (size > 20) {
          size = 1
        }
        yarray.push(random(10, height - 10));
        osc1.freq(yarray[i])


    }

    if (xarray.length > 5 || yarray.length > 5) {
        xarray.shift();
        yarray.shift();
    }
    //draw line
    stroke("orange");
    strokeWeight(4);
    for (var i = 0; i <= xarray.length; i += 1) {
        //for (var n = 0; n <= yarray.length; n += 1){}     ADD THIS IN FOR A COOL EFFECT (DONT FORGET TO CHANGE Y VALS)
            line (xarray[i], yarray[i], xarray[i+1], yarray[i+1]);

        }

    ball.display();
    ball.move();
    ball.bounce();

    osc.freq(-ball.y);
    osc.amp();


}




function mouseDragged() {
    xarray.push(mouseX);
    yarray.push(mouseY);

}

function mousePressed() {
    xarray = []
    yarray = []


}

I lowered the frame rate to give the randomness less of an oppressive sound. I kept the gradual rise and fall of the sphere in the center as a constant element amidst the randomness.

Jasmine Lee – Looking Outwards – 10

During my search for computational sound art, I stumbled upon the Looks Like Music exhibit by Yuri Suzuki. Created as an installation for MUDAM, the piece involves small robots which create sound based on the tracks they encounter. These little robots move using little wheels, following a black path drawn by the user. When colored marks are also drawn along that path, the colored visuals are translated into sounds as they are encountered by the machine.

Above: Video of MUDAM 2013 Looks Like Music exhibit

The installation invites people to interact with it, encouraging people to make their own marks using colored felt pens on a large roll of white paper on the ground. There are five of the sound robots, each with their own distinct set of noises. The noises include low bass noises, computer percussion, drum samples, arpeggio, and chord samples. The artist’s sensibilities in the way he chose to depict the installation as a whimsical playground for visitors to enjoy. This is shown by the curvy, exploring lines drawn in the video example, the colorful visuals, and the abstract shapes of the machines.

Some of the drawn notations used in Suzuki’s project.
From left to right: drumcar, glitch car, arpeggiocar, basscar, melodycar