Terry Feng

MUS 256A, Stanford University


Beach.Waves - An AudioVisual Narrative


Youtube Link

Welcome to Beach.Waves! Here the sun is always shinging, the waves are spirited, and the crabs and dolphins love to come out and jam to music! Enjoy the sun, relax with the calming waves, or dance like it's summer to your heart's content!

Keyboard Controls:
- [m] toggle mic input
- [c] advance to next camera
- [n] play audio visual narrative
- [d] play demo song - OneRepublic - I Ain't Worried


This was a lot of fun to build. Using Unity for the first time was challenging, especially how to put objects and the camera in 3d space. I really enjoyed making the waves, especially the texture and colors, it's so soothing, fluid, and informative to read. Making the crabs and dolphins jump in response to the music were really satisfying, especially how they react to different frequencies. The most challenging part of this project was hooking things up from Unity > Chunity > ChucK, finding bugs and limitations in ChucK, and of course, writing out tons of MIDI notes as arrays.

The entire narrative is ~550 lines of ChucK and two bongos :)


3D Models
- Red/White Beach Umbrella by S. Paul Michael [CC-BY] (https://creativecommons.org/licenses/by/3.0/) via Poly Pizza (https://poly.pizza/m/2li3sdSkmCI)
- Crab by Poly by Google [CC-BY] (https://creativecommons.org/licenses/by/3.0/) via Poly Pizza (https://poly.pizza/m/1O5Q4pE8X6e)
- Starfish by Poly by Google [CC-BY] (https://creativecommons.org/licenses/by/3.0/) via Poly Pizza (https://poly.pizza/m/6H-0K9IEr56)
- Sand castle by Poly by Google [CC-BY] (https://creativecommons.org/licenses/by/3.0/) via Poly Pizza (https://poly.pizza/m/5iuHHfVoaza)
- Dolphin by Poly by Google [CC-BY] (https://creativecommons.org/licenses/by/3.0/) via Poly Pizza (https://poly.pizza/m/4Gkg2wLGJ_p)
Unity Tutorials
- Lerp - https://medium.com/slamatron/how-to-smoothly-rotate-an-object-over-time-with-a-single-button-click-event-in-unity3d-46d39b3785df
- Water Shader - https://www.youtube.com/watch?v=gRq-IdShxpU
Unity Assets
- 3D seashell - https://assetstore.unity.com/packages/3d/characters/animals/fish/3d-seashell-208785
- Water Foam Texture - https://assetstore.unity.com/packages/2d/textures-materials/water/foam-textures-72313

Download Unity Project

Audio Visualizer Project Zip (Mac)

Progress Update: (Milestone 2)



Project Updates:
Working on the audio visualizer has been quite a process. I found that with my lack of experience with unity, it was hard to find the tutorials that I needed to build what I wanted. I struggled a lot with working on water shaders, trying to find the specific tutorials that actually addressed the universal render pipeline. The other thing that I found difficult was trying to figure out the scale of my scene versus where or how close my camera should be placed. I'm still a bit unsure of my camera placement as I want multiple camera angles for my scene. I have sort of the basic components done, the waves, and the sun, but they could be polished more. I still want to build sand terrain, and make the sun look better.

Working with c sharp scripts were pretty easy and building mesh terrains to show the waterfall plot of the spectrum went pretty smoothly. I like the way that my ocean looks, and now I just need to make sure of how I want the ocean to fit in the camera, hiding the edges of the world. I want to make my ocean deeper. I plan to decorate the terrain of the beach.

My current project doesn't build for some reason, so I needed to take a screen recording.

Audio Visualizer Project Zip (Mac)

Progress Update: (Milestone 1)


After completing the 3 tutorials and getting a basic grasp of Unity, C#, and Chunity (ChucK in Unity), my first experiences have shown me how versatile Unity as a platform is. Coming from a background in programming in Java, C++, and Python, as well as having built a game and sound engine in OpenGL and FMOD from scratch, Unity and Chunity simplify a lot of the overhead in bringing an idea to life. The video and written tutorials were pretty easy to follow because the tasks and videos were pretty bite-size, making scripting and debugging reasonably painless.

While using Unity, the software did occasionally crash but thankfully, I didn’t lose too much work. Chunity would sometimes have some weird audio glitches when multiple sources were playing at once. The starting and stopping of sound were not always as smooth as I had hoped. But overall, in getting to the last AudioVisualizer, it was cool seeing how simple it was to use the in-built AudioSource objects and library scripts to read the microphone and build out the waveform and audio spectrum analyzer. I’m looking forward to building my own Audio Analyzer, and hopefully I can think of a creative idea.