All posts by Caleb Ferguson

Final Project: Visualizing Sound


Guysssss I’m gonna miss y’all. Thank you for a great semester. Friend me on the ‘book, and/or check out ma website to stay in touch!




Step 1 of ‘the dream’ is complete. The program plays a select set of songs and visualizes the music using a forward fourier transformation (fft). The “.getBand()” command is used to quantify the various aspects of the audio waves.



As a user, hold down the ‘P’ key to view the menu. It will tell you that you have the option to change the song (with the number keys), the colors of the visualization (keys a through g). You can increase and decrease the intensity of the visualization with the ‘=’ and ‘-‘ keys, respectively. Finally, you can pause the movie with the ‘I’ key and take a screenshot by clicking on the screen. downloadable .zip file – including .mp3’s – here.


Worldstar-quality video clip of the in-class demo




In 1965 Gordon E. Moore claimed that computing hardware growth would enable computers to double in speed and other capabilities approximately every two years. In 2014 we find this claim to be roughly correct. Computers have transformed from room-sized to pocket-sized, and their capabilities have grown significantly along the way.

This evolution is occuring faster than I can really keep up with. At work last summer I was researching a computer security company. The litany of acronyms and knotty relationship of computational vocabulary terms showed me that truly understanding how something as apparently simple as email works is no easy task. That week, I took a dive down the rabbit hole and am still falling. I love it. I’m in wonderland.

I love ICM because we are trying to bridge the gap between “tricking electrons” and expressing ourselves. Consider ‘expression’ as the mouth of the rabbit hole, and the “tricked electrons” on the non-linear, opposite end. We are exploring the part of the rabit hole that is most tangible. Phyiscal computing gives us an essential framework for understanding our relationship with the machines.

Computers don’t discriminate based on age, race, or gender. To a computer, all humans look the same until told otherwise.


This is both a good and bad thing. Its a bad thing because it makes communicating with a computer difficult. Discovery of the relationship between each others INPUTs and OUTPUTs has a steep learning curve. Losing three hours of my life because I forgot to put a semicolon somewhere is bad.

Yet the pros of this non-discrimination greatly outweight the cons.  Technology is a democratizing force (think TwitterRedditHypeM), which is why Open Source is such a powerful idea. Technology empowers to those willing to learn and particpate, allowing people to self-actualize. Much like the printing press, computers allow more people to add scale to our actions. This is the first era where a teenager can out-muscle a mega corporation with the right tools.

I remain uncertain about what the future holds for the relationship between man and computer. Yet as Moore predicted, this future is arriving at a exponentially faster rate. I think the Matrix trilogy was poignant in suggesting that mishandling our relationship with computers will lead to our slavery. At the same time, films like Her, Cortana from Halo, and Claptrap from Borderlands suggest that humans and computers will become more intimate friends, not enemies. I sleep next to my phone every night, which is more than I can say of any human…


Final Project Progress: visualizing sound

Inspired by Alice. The process of turning sound into numbers and numbers into visuals is tough for exactly the reasons we talked about in class. Sound has many aspects to it that change from instant to instant. Fourier Tranformations? Spectrum size? Changes in waves over time? If you think I remember ANY trigonometry, you’re wrong.

Recall my dream for Amon Tobin-style crowdsourced music visuals, tersly summarized below:


This weeks I got the basics of minim down. I am exploring use of the getBand(), noise(), and averaging sound bytes over time. The code below plays the very basic “jingle” file so we can observe how changes in the sound of the music are reflected across the soundbytes. Different axis feature different equalizer-type representations of the sound.

Notice how the equalizers tend to have a long-tail situation in terms of frequency.

Screen Shot 2014-04-21 at 12.48.59 PM

My inner economist thinks the next step is to take the (inverse?) natural log of this equalizer value and see how it looks.


Fuel of the Week

I used data from my Nike FuelBand for this weeks project. “Fuel” is a proprietary unit that measures estimated activity over the course of the day. While “3206 Fuel” is meaningless on its own, this unit is an excellent relative measure of activity.

Fuel of the Week collects Fuel data from a .csv file, groups Fuel earned from every day of the week, and performs some math operations to create what we see below:


Monday = m, Tuesday = t, Wednesday = w, Thursday = h, Friday = f, Saturday = s, Sunday = u.

Pressing a corresponding key will activate that day of the week. The size AND color of the column correspond to what proportion of weekly activity is attributed to that day (on average). Red = LOW, Green = HIGH. It will also show sample Fuel units from a day on that day of the week.

TIL it’s a good rule of thumb to conceptualize the final product before jumping into the code. This code can probably be made more succinct through use of a couple if statements and for loops.

Download the application here. Here is the code:



Music Video redefined

Video feed where certain pixels change color based on their brightness, which the color being based on MUSIC. MUSIC. VIDEO. get it?

I realized I have no idea how sound works, so this is very bruteish.


K so…

1. Pick an mp3 from your music library

2. Copy/paste this code into processing, save it under whatever name you want

3. Add a folder titled “data” to the folder containing the .pde filde

4. rename your favorite mp3 file “crispy.mp3” and place it in the data folder

5. Run da trackkkkkkkkkk


Almost there

I’m close to something happening. Unfortunately my photo-sensor broke, so as a proxy I’ve been using a button as an input.

Every time the button is pushed, I want the expanding circle to revert back to its original size. Check da code, help me!

This Arduino code prints “1” to the serial when the button is pressed and “0” otherwise:

Processing main file:

Processing class file:

Object Oriented: Space Jam

Space Jam was on TV. ’nuff said.

Michael Jordan’s firey, inquisitive eyes are the only thing that can block the five Monstars’ (Pound, Bupkus, Bank, Blanko, and Nawt) shots. Use your mouse to block the shots.

I tried adding music, but couldn’t get around a file type error. See the commented out parts (audio code from Anna). Next steps include:

-a score/block counter

-debugging for the egdechecks

-more sound effects

-idk, you tell me!



Alright Alright Alright

This week I combined my drawing and animation projects.

Muffin + Bouncing Seizure Ball = Bouncing Seizure Muffin

Next steps:

1. Get rid of that stupid line created by the overlap of the two rectangles

2. Get the muffin to bounce when its edge hits a side, as opposed to the x1 & y1 coordinates

3. Give the muffin the eyes, eyebrows, and wrapper that it usually sports






Bouncing mini seizure

With some help from the very animated video teacher and Anna, I figured out the basics of the direction changes via if statements. After getting the bare bones, I added some elements of randomness to the color, size, and speed of the ball for a slightly-more exciting bouncing mini-seizure.

Here is the .pde file

Just for fun, here is the .pde file of the interactive drawing I made in class




Truco estúpido de la mascota

My stupid pet trick used the photosensor to determine how many LED’s should be lit. Pretty simple concept, but I’m proud of myself for figuring out how to code it into the Arduino. Check out the video.


Though I’m not sure how practical something like this is, I imagine we can come up with some cool ideas on how to extend this project in class. I was thinking:

-Auto-adjustment for darkness of an environment (think about how an iPhone can auto-adjust its brightness)

-LED variation based on a different input e.g. sound, number of tweets, weight in an elevator (this how amplifiers/receivers have LEDs that indicate decibel output of different parts of a sound)

Here is the nesty code:



Muffin Men 2014

My friends and I -the self proclaimed ‘muffin men’ – draw a muffin whenever we get a chance.

My first experience with drawing with code was in Steinhardt’s Introduction to Digital Art. In that class we didn’t use processing, but did a similar assignment. You can check it out on my website.


I’d like to improve on the muffin through the semester. After drawing a new muffin in the processing environment, I took the first step to making interactive. Using the mouseX and mouseY functions/parameters and an if statement, I made it so the colors of the shapes change based on mouse movement. As we continue to explore mouseX & mouseY, I hope to make the interactiveness more fun and understandable. The code goes:





Double the switches, double the fun


Meet the two switches involved in making this project:

Caleb's first soldered piece, ever
Mr. panic button from last week
Emily's Switch
the well-soldered not-so-panic button


…and the full setup:

a tad complicado


Using the code below, we made a setup which set off different LED light combinations based on which switches were open and closed. Watch the video to view all of the different LED blinking combinations.

void setup(){
pinMode(10, OUTPUT);

void loop(){

if (digitalRead(8) == HIGH){

if (digitalRead(9) == HIGH){


It’s only weird if it doesn’t work

Congratulations to the Seahawks. Anecdotally, its clear that defense wins championships. However, can the ‘hawks really take 100% credit for their victory? I say neigh; instead, the Arduino-powered Seahawks D-fence activation button should receive some of said credit.



Seahawks D Flashing


Whenever the Seahawks needed a defense boost, anyone in the room simply needed to push and hold the button in order to activate the boost. Clearly, it worked very well:

Superbowl score

Awesome right? Here’s how I made it…

I called up my best friend from middle school to help me solder and glue the some wires to the button we received in class:

Caleb's first soldered piece, ever
Caleb’s first soldered piece, ever


Then, I made a series circuit that flashed blue and green Seahawks colors:

Blue and green LED series circuit


Unfortunately, together, the lights were too dim for my intended purposes, so I made a single-LED setup. I found an empty box, cut some holes in it and covered it in a thin wrapping paper, and put the setup inside:

Breadboard in the BoxIMG_0015 IMG_0017


See how it works in the video below: