Calebjhammel
4 min readSep 13, 2020

--

Success from Failure

My over-ambitious humbling into the world of Ultasonic Audio and Java-Script.

Mistake 1

When told to make something for 14 days I knew exactly what to do. I have been affixed lately with the idea of ultrasonic tracking and was eager to explore this technology for my assignment in Critical Making Studio. This practice utilizes a phone’s microphone and audio played above 19 kilohertz.

Source: Salote A via http://gbssalotea.blogspot.com/

At this frequency the human ear cannot detect sound, but the microphone of a cell phone can. Although a wiser man would work with a familiar tool and create an obtainable goal, I felt that pushing hard now would save me down the line. My goal was simple, work a little each day to create a code that would hear sound, determine what frequency it was, and respond accordingly.

Mistake 2

My journey began within Processing. A tool I have used many times in the past to create visual art that would otherwise take hours in Illustrator. I knew Processing had some audio capabilities and I felt comfortable using it’s sandbox style language. Some success was had, audio files were playing on command and I was even beginning to analyze the files themselves.

A simple play command

I was realizing the limitations though of Processing in regards to what I needed it to do. Although nervous to jump into full Java-Script I thought this would be necessary to achieve audio frequency analysis and value utilization. I abandoned my progress within Processing and ventured into a world I knew little about.

Journey

Entering this foreign landscape I needed a guide, enter Daniel Shiffman of Coding Train. Shiffman is a saint for those lacking comfortability in code. Video after video and tutorial after tutorial I began to understand the basics of coding Java-Script on my machine. I followed Shiffman like a trusting voyager into this exploration of the digital unknown.

Confidence was high as my local Python server sprung to life and displayed something that I coded on a webpage, utilizing a local host of course. I made a colored square. Wooh! Something that would have taken me 13 seconds in Processing took several days in this new and scary world. Now was time for the audio. I continued to follow Shiffman’s tutorials, downloading the necessary supporting P5-JS libraries, and wrote what I thought was the needed code to play audio through my script onto a webpage. Broken.

The once fulfilling page now sat blank. Moving beyond simple shapes broke my code and eventually my spirit. Nothing I could do would remedy the now lifeless web page titled, “localhost:8000”. Removing all elements of audio infrastructure remedied the problem and awoken my code but moved the task farther from the ultimate end goal. Consulting my instructor and internet forums alike found no avail.

Realization

The end of this creation sprint resulted in nothing for me. This post contains little in the 14 images to show like many others assigned the same objective. I don’t possess a code that magically hears sound unheard by our own ears.

The “my code is working” slouch

By many marks I failed, hopefully not however by the mark on this grade. I do feel some success. I pushed beyond my comforts and although my activity with Java-Script yielded no grand prize, my understanding and readiness for advancement within grew exponentially. Creating isn’t a binary metric. One cannot be judged by the number of works they make. Regardless of the outcome of this sprint, and more down the road, I am excited to push into supersonic audio recognition and to see where this technology can go.

The Full Journey

--

--