Category Archives: Uncategorized

Tuner

For the sound project I attempted to create a ukulele tuner (to little success). The idea was to listen to the microphone input, call on the fft functions of p5. Find the frequency of the input sound, and map a range to a note – which would tell me if the ukulele was within that range. The program should display The note being played on the screen. For some reason (which I can’t identify) the frequencies didn’t display as the notes I assigned them to. But the actual frequency would print. Ideally I would add more specific ranges to incorporate more notes.

Here’s my code

The ISS Flying through SPACE!

For the data project I wanted to find a simple API to play around with. The position of the international space station is one that is readily available (and doesn’t require a key!). I decided it would be fun to draw the ISS in p5 (well, a basic representation of it), and change its color based on the current position of the ISS. I also decided to track its position to the actual positional data of the ISS. Finally I wanted to make it look like it was flying through space (wee!), so I added loads of ellipses, made them all white, and had their positions change randomly — making it appear as if the station was flying rapidly through a star-field.

Here’s the Code

Here’s it in action

Social Weight Instagram Machine

For my final project I set out to create a machine that puts Instagram notifications in the physical world. I initially wanted to work with the Instagram API to make it so I could simply type in a username and the notification data from their most recent post would be pulled (This should have been possible given that this is public content, but apparently Facebook hates developers). When I discovered that I couldn’t access public content without greater API approval than sandbox, and was rejected from that approval process, I decided that as a proof of concept I would simply build the machine for myself.

The Idea of the final product had two elements, a physical representation of the “likes” and a textual representation of the user’s “self-worth” based on the number of likes on a photo. Every time the photo got a like, a ball would drop and a message would show on the screen. The messages began as condescending, and progressed to more pleasant and kind messages. i.e. the first message is “sad” at 15 likes the message “not everyone hates you, just most people” appears, and at 40 likes “good content” is displayed.

Of these two pieces I was only able to get the second one to work consistently. The messages, stored in an array, are displayed in the most condescending font imaginable — comic sans. I would have liked to make this code a bit more efficient, perhaps storing the number of likes in an array as well, therefore only having to type the font information once rather than for every instance of the messages (which became a bit tedious). Regardless, it worked in the way it is written.

The second piece of the project proved much more difficult, I’m still not incredibly proficient with JavaScript (and my lack of sleep didn’t help toward the end, sorry for being incompetent at times…), so making this part took a lot of work, and a bit of help. For a while I was able to print the notification info in the console, but for some reason (which I still don’t know) I couldn’t call it anywhere. I decided it was best to rewrite everything from scratch and organize it more sensibly/comment out more of my code to make it easier to find things.

The machine eventually worked for a bit at a time before failing, so going forward I’d like to do a few things to improve it.

First – I need to update the communication between the Arduino and p5 to set up a ‘checks and balances’ sort of system where p5 doesn’t send the Arduino new information until it asks for it. Currently too much info is being sent and the whole program freezes up after a few notifications.

Second – On the physical build of the machine, I’d either like to better figure out the correct angle of the delivery tube, and rate at which the servo motor opens and closes, or create a new delivery system that doesn’t rely on such finicky machines.

Third – I want to house the whole project in a nice chassis, I plan to 3D print a new chassis for the whole project to make it more aesthetically pleasing and function more smoothly.

Finally – Instead of using Instagram’s API I want to switch to YouTube, making the machine a subscription counter. YouTube’s API is much easier to work with and much less restrictive, so the whole machine would hopefully work better.

 

My Code is available here

It will currently only work with media ID’s from my own instagram @chestahab due to Instagram’s restrictions.

You can try it here (but it’ll just be the text responses since you don’t have the machine – Also it might not work unless you download it)

Here are a few Media Id’s for testing

1469227156566679526_40290595

1470499988697034800_40290595

1471185248866935939_40290595

1471956652910591666_40290595

1247180011493478957

Final Post

Final Project 1.1

My final project is an instrument. The player can use the sounds of nature and the sounds of a guitar, which are played by pressing the keys ASDF and JKL; on the keyboard. QWER and UOIP are able to turn on and off the reverb.

outmersion

(working title)

The intention of the project is to provide a relaxing environment in our modern lives. This life has lost all the background sounds that the environment that human beings evolved from. The sound of wind, trees, rain and thunder are muted by the sounds of traffic and other noises of the city.

This instrument is trying to attempt to use the sounds of a man made instrument (the guitar) and the sounds of nature: the wind, the rain, birds and thunder.

The visuals were inspired by the painting Kalinda of SOHAN QADRI.

Kalinda is a Hindi name meaning “Sun”. 

I gave some thought to the colors of the piece and I decided that there will be two gradients: one is the color of the night and daytime sky. When the sound is played, the amplitude controls the gradient of the outer squares to yellow; the color of the sun.

The Code can be found here: https://github.com/adamnnagy/FinalProject (there are many separate JavaScript files.)

Maps API

I used the Mapquest API to make a fun way to check how much a trip will cost and measured the length of time in units of a song I chose. I added the fun display just to give it motion, but it is not that interactive. I also think it only works for the continental US and I don’t know about cities with two part names like New York you may have to add a ‘+’ or something like that.

Here is the code and below is a video of it in action.

Organized

My Project.

For “Organized”, I decided to recreate an existing work of Art by Sohan Qandri.

 

SOURCE

“Artist, poet and Tantric guru Sohan Qadri (1932-2011) is one of the only internationally acclaimed artists deeply engaged with spirituality. Qadri abandoned representation early on in his long career, incorporating Tantric symbolism and philosophy into his vibrantly colored minimalist works. Born in India, he was initiated into yogic practice at age seven. In 1965, he left India and began a series of travels that took him to East Africa, North America, Paris and Zurich.”

— from the gallery’s website.

 

 

Starting to Build

I have started to build my piano and found some easy to follow instructions here. Since the main focus is the display rather than the actual keyboard I just chose a design I liked and will go from there. Now I have to decide whether or not I want to try making sharps and flats because that decides the difference between using pitch or pre-recorded piano notes or if I want to find an extension so I can have more digital pins. I also started playing around with some code, but it doesn’t really resemble my final code yet.

Many Things

I had a lot of difficulty trying to decide what to do for the assignment this week. Looking through past projects wasn’t very helpful, so I watched all the videos linked on the Creative Computing WordPress. I decided to make something heavily based off one of Dan Shiffman’s videos, but still ran into a bunch of issues.
This was another outer space-themed project because I run out of ideas a lot. The goal was to generate stars randomly with the push of the up arrow key and to place floating images where the mouse was clicked. I was able to get the stars and then the first image, but I couldn’t get them to work together.

 

Went back and re-worked the assignment to make it work.

 

Organized

I was originally going to make the Snake Game, but had troubles making a certain amount of the tail appear, I tried using an array but it wasn’t working so I just turned it into a more artistic program. So I turned to tweaking a code I had made for a creative coding class a few weeks ago that fulfilled the rest of the requirements for the home work. It is much more abstract and just plays around with some of the functions in p5. With for loops, arrays, different events, and time.

For some reason since I built the other one in the p5 web browse

r it doesn’t work well in the p5 IDE, but here’s the link.

Link to all my code.