O'Reilly logo

Cardboard VR Projects for Android by Matt Schoen, Jonathan Linowes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we built a music visualizer that runs as a Cardboard VR application. We designed a general architecture that lets you define multiple visualizations, plug them into the app, and transition between them. The app uses the Android Visualization API to capture the waveform and FFT data from the phone's current audio player.

First, we defined the VisualizerBox class responsible for the activity and callback functions to the Android Visualizer API. Then, we defined an abstract Visualization class to implement a variety of visualizations. We then added waveform audio data capture to VisualizerBox and used it to parametrically animate a series of cubes to make a 3D wavy box. Next, we wrote a second visualizer; this time using waveform ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required