The Hang: a musical instrument in the idiophone class and originates from Switzerland

I wanted to create an interaction experience that would generate the soothing tones that I had once heard on a street in Geneva, from a musician who was tapping away on the Hang

Why the blues?

...In addition to the soothing tones that the Hang generates, I wanted to add in the flat fifth, so as to allow for a slightly jazzy listening experience.

Design and Features

The Room

The user is placed inside a room with walls of different colors. The wall opposite the user is constructed out of even smaller particles of shattered glass..

Usage Description

Users begin by clicking inside the room, to launch a ball that will be hurled forward in the direction of the click.

If the user clicks towards the left side of the screen, then a darker colored ball is launched, and if a user clicks to the right side of the screen, a lighter colored ball is launched.

When a ball hits one of the glass walls, a tone from the blues scale is generated. If the ball is dark, then the tone will be of a lower octave, where as if the ball is light, then the tone will be of a higher octave.

On the third time that a ball hits the back wall, the back wall shatters and the ball slips through the cracks, disappearing into the abyss.

Future Features

Given that Blue Glass was created as a final project for Music 256a, there are a number of features that are yet to be implemented in the future.

Technical details

The software is built in C++ and uses OpenGL for visuals and RtAudio for real time audio. The project utilizes a C++ framework created by Professor Ge Wang to efficiently work with OpenGL

Each wall is bound to an Arpeggiator object, which generates a random note from a blues scale when the wall is hit. An Arpeggiator object is of a polymorphic type, because one can write a class that inherits from the Arpeggiator class and implement a custom generateNote method, which can generate notes following another pattern (other than a blues scale).

User Guide


Download the source from the downloads section, unzip it, navigate to the BlueGlass directory and open the project in XCode.

Make sure that the required libraries are installed as well.

To launch the software...

Click the run/play button from the XCode project


The user interaction is primarily the mouse


q Quit
[ key Rotate Down
] key Rotate Up


Click on the left half of the room Launch a low-pitched ball
Click on the right half of the room Launch a high-pitched ball



You can download version 0.0.1 is here.

See here for installation and usage instructions.

BlueGlass is currently licensed under GPL v3.0.

OS Requirements

BlueGlass has been tested on OSX and Linux.

Please install all of these libraries as directed in their distribution README files