Inspiration

Initially our inspiration was to create a tool to generate music and art using multi-sensory inputs from the surrounding environment. Communities can collaborate with the goal of creating unique art that expresses their culture and what they stand for. We feel it is important that our tool is accessible to everyone. After viewing the ALGORAVE, we got heavily inspired to incorporate mosaic art and displays in our project to allow for users to better express themselves.

What it does

Our project turns environmental sensor readings and hand gestures into a live, collaborative audiovisual artwork. Users can create a virtual room, share its code, and join from their browsers to shape the same evolving composition. Arduino sensors contribute sound, distance, light, and colour readings. Light changes the artwork’s brightness, distance changes its scale, colour readings influence its palette, and sound influences its movement. Camera-based finger gestures add visual textures and musical notes. Each participant sees their own camera preview alongside the shared artwork and hears the combined musical contributions. Users can choose which sensor inputs affect the room and capture the artwork as an image.

How we built it

We used Entire to manage our agentic workflow and coordinate the team's tasks.

We used terraform to deploy a VPS on Vultr's cloud, acting as our server. The VPS is hidden in a VPC with a NAT gateway forwarding only the ports we are interested in and with safe firewall rules to protect our machine.

When phones connect to a room their camera and mic stream to a Python backend server over WebRTC. Then using Next.js we display a dashboard which shows each users camera feed in a grid.

We built the frontend with Next.js and React, using WebGL shaders to generate the artwork and the Web Audio API to synthesise gesture-controlled notes. A Python FastAPI backend receives Arduino sensor readings through REST endpoints and coordinates shared rooms through secure WebSockets. Camera frames are sent to the backend for MediaPipe hand-landmark detection. The backend returns tracking information to the participant and shares numerical gesture and musical data within the room, without displaying participants’ camera feeds to one another. Finger-to-thumb touches control different notes and visual effects, while a shared pentatonic scale helps participants’ musical contributions blend together.

We constructed the hardware using an Arduino uno Q to take an input from multiple sensors. We used breadboard as a way to create a positive and negative rail in order to power the sensors, these were connected to the 3.3 v and ground pins on the Arduino. We used 2 digital pins one as an input and one as an output for the ultrasonic distance sensor having one of the pins set as an output to cause an ultrasonic burst with the other pin being input in order to read the duration of the return echo pulse and then calculating the distance from this. For the sound sensor we used an analog pin so we could use analogRead to get the sound level, for what we were doing there was no need to convert to decibels so we used the pure analog value. For the light sensor it simply plugged into the Arduino, and we then pulled the ambient light in lux, the infrared intensity and rgb values from the sensor. We then sent the data to the server using rest APIs so it was able to be used to make changes to the website.

Challenges we ran into

  • We run into some difficulties detecting the pinch at first, and debugging was made more difficult by the fact that we were ignoring the root exception. The fix was wrapping frames in mp.Image and making sure no errors are silently caught and ignored.
  • The pitch effect took multiple attempts before getting the right shift amount down.
  • The laptop camera can only be held by one process, so every browser test meant killing the Python tracker first.
  • Browser camera permissions and secure connections required careful handling of HTTPS, WebSockets, and local development addresses.
  • And, of course, some standard git drama, with merge conflicts so intricate they make you wonder why people don't just go back to naming the folder "Version2Final" instead.

Accomplishments that we're proud of

  • Joining a room is as easy as opening a web page on your phone's browser.
  • We efficiently handle the computer vision on the server and perform all additional computation in one detection pass.
  • Your hands are your instrument.
  • We reveal the music and art hidden in your surroundings.

What we learned

  • Planning and establishing an MVP is the key to not lose track of the goal.
  • Silencing exception is never a good idea.
  • Branching and pull requests are the only sane way to collaborate when multiple people are working on the same repository at breakneck speed.

What's next for Natural Composition

  • Recording and layering musical loops within a room.
  • Exporting collaborative audio alongside the artwork.
  • Two-hand controls for notes, tempo, and effects.
  • Hand-position-driven liquid distortions and expressive sound effects.
  • Additional sensor devices and visual fusion modes.

Built With

Share this project:

Updates

Submission history