Final Update #2

I spent the better part of my day collecting songs that sound alike, which led to an inevitable journey into songs that sound like another song that sound like another song and so on. Now I have groups of 5 songs that sound the same that I’ll need to somehow put on the fader. Originally, I had it set up so that I would only preload two songs at once for comparison. This new development is truer to my original idea which was an installation that would allow someone to hear the way I experience music. Usually when I hear a song it automatically flows into another song in my head and that usually leads to a playlist of music that sounds similar. Certain parts of a song will remind me of another and sure enough, I’ll be whistling another tune after a short while. Here is the running list of music so far:

Since I now have some sets of songs that are in groups of as much as 5, I have to rethink how I’m going to incorporate the fader. I know I want to have the songs blend into each other when the fader is moved, but now that 5 songs are going to be in a set at a time, I need to organize them so they flow when played. Originally, I wanted to have the album cover show on the LCD when the fader was all the way to one side. Now I’m going to have to have the album cover show whenever you only hear one particular song. The second the fader is moved to hear something else, the album cover will disappear and the a visualization of the two songs will be on the LCD.

I’m working with clips of songs to enunciate the listeners understanding of the similarities, but I’d like to maybe incorporate a button on the interface that will allow the user to hear the entirety of each song.

On the coding side, I’m going to need to incorporate the following:

Play/Rewind/Next buttons, fader values, serial communication, TFT LCD library, sound library, some kind of music visualization, image and sound files.

ICM Week 8 – Pumpkin Drum Kit

For this assignment I added a collection of sounds to my p5.js sketch and made a pumpkin drum set that uses the keys A, S, D, and F to play sounds. It is based off of code from here.

Here’s the code:let pumpkin;
let scream;
let kick;
let snare;
let hihat;
let extraScale = 0;
function preload() {
pumpkin = loadImage("pumpkin.jpg");
scream = loadSound("scream.mp3");
kick = loadSound("kick.mp3");
snare = loadSound("snare.mp3");
hihat = loadSound("hihat.mp3");
}
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
imageMode(CENTER);
translate(width/2, height/2);
scale(1 + extraScale);
image(pumpkin, 0, 0);
if (extraScale > 0) {
extraScale -= 0.05;
}
}
function keyTyped() {
extraScale = 1;
if (key == "a") {
kick.play();
}
else if (key == "s") {
hihat.play();
}
else if (key == "d") {
snare.play();
}
else if (key == "f") {
scream.play();
}
}

I ran into a problem trying to add instructional text at the top because I added a noLoop to the function setup but then the pumpkin stopped enlarging every time a key was hit so I got rid of it and instead of adding the coordinate 0 on the x axis I added 25 and it finally showed up!

Here’s my new code:let pumpkin;
let scream;
let kick;
let snare;
let hihat;
let extraScale = 0;
function preload() {
pumpkin = loadImage("pumpkin.jpg");
scream = loadSound("scream.mp3");
kick = loadSound("kick.mp3");
snare = loadSound("snare.mp3");
hihat = loadSound("hihat.mp3");
}
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
text("Press a s d f to play", 150, 25);
fill(255);
imageMode(CENTER);
translate(width/2, height/2);
scale(1 + extraScale);
image(pumpkin, 0, 0);
if (extraScale > 0) {
extraScale -= 0.05;
}
}
function keyTyped() {
extraScale = 1;
if (key == "a") {
kick.play();
}
else if (key == "s") {
hihat.play();
}
else if (key == "d") {
snare.play();
}
else if (key == "f") {
scream.play();
}
}