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 ...