Examples / Algorithmic / Hubble-Hearing

Songs.hz . Algorithmic
Hz.Plugins . 3rd Party Plugins
MIDI . MusicAPI
home . Topics . Interface . Reference . Examples

Examples can be imported into the workspace via its panel menu.


Here we build a soundscape representing data captured by the Hubble Space Telescope.

The Source

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:

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.

hubble.js

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.

Explore Further