Java Reference
In-Depth Information
stored in an audio file is proportional to the change in pressure on our eardrums when we are hearing
the same sound as was recorded.
Therefore, an audio visualization is simply any graphic that is in some way proportional to those
values in the digital file. When the visualization is created at the same time as the sound is played back, it
creates an opportunity for the eyes to see something that is synchronized with what we are hearing. In
general, this is a pretty compelling experience.
There are numerous examples of audio visualizations in the world. Some visualizations are useful to
audio engineers, allowing them get another perspective on the data on which they are working. Other
visualizations are more decorative and simply exist as another way of enjoying music. Many home-stereo
components include a display, which shows the sound levels of whatever is playing; this usually takes the
form a column of small LED lights. The more lights that are illuminated, the louder the sound. Sometimes
there are two columns of lights, one representing the left channel and the other representing the right
channel. Other times there are numerous columns, which break down the song into different pitches; these
are more complex since some computational work must be done to separate the different parts of the music.
Most applications for playing music on computers these days come with a view that shows the music
as a psychedelic composite of colors. This is the type of visualization we are going to focus on in this chapter.
In Figure 9-1 we can see the end result of this chapter. We have a scene with a control panel for
starting and stopping the audio. There are a number of buttons on the right to control which of our three
example visualizations are visible.
Figure 9-1. Audio visualizer in JavaFX
Search WWH ::

Custom Search