
Here we build a soundscape representing data captured by the Hubble Space Telescope.
This example is a port of NASA's open-source, Hearing Hubble app found
here.
Since you can already run their example in your browser, you might be
wondering, why port this to Hz? Here's why:
Hz audio-engine supports arbitrary audio plugins and a simpler
note-generation API and this opens the door to more powerful synthesis
and effects possibilities than available in web-audio.
The application is a collection of code and data files depicted at right.
hubble.js is the main driver program described below.
app/App.js is the main application context loaded by hubble.js via
our slightly unusual Require idiom. The system is driven by animation
event callbacks. This triggers updates to the playback head, and triggers
the soundscape changes.
app/ImageSynth.js implements the synthesis of image-based sound. It is
based on a bank of oscillators with unique frequencies and amplitudes
of stars found under the playhead.
app/StarSynth.js implements the synthesis of star-based sound. We
employ Hz.Samplo to produce the
sound. You can programatically or manually change the current voice.
This is the driver file for our app. Most of the action occurs elsewhere
but the driver is responsible for loading, instantiating and initializing
the app. Once the performance begins (via Hubble.Perform()) our job
is just to periodically yield control to the system and check for
cancelation requests.
color and grey datasets, etc.