jeremynealbrown.com

AudioSpot Addition To Overlay Extension

May 8th, 2009

I recently completed some work on new set of classes for the Overlay Extension for the OpenZoom SDK. The new classes allow regions of a zoom image to be accompanied by audio ( read: music, narration, sound fx ). A region is defined as either radial or rectangular and within a zoom range. The demo below demonstrates the basic concept. Note: The blue circle is only an indicator of the AudioSpot, actual implementation does not add a visual element.

Get Adobe Flash player

AudioSpot coordinates: x:230, y:175, z-range:2-5
Keyboard Controls: i: zoom in, o: zoom out, a: pan left, s: pan down, d: pan right, w: pan up

Download Source Code And Examples:

audiospots_basics_CS3_2009_05_07.zip

When the blue circle in the image is moved to the center of the viewport and the zoom depth is between 2 and 5 audio begins. Once the circle is either moved away from the center or the image is zoomed beyond the given range the audio fades away.

In keeping with the overall design of the overlay extension this addition consists of a “layer” ( AudioLayer ) that listens for events from the zoom image and manages the AudioSpot object(s). It’s interface is consistent with the HotspotLayer in that there are methods for adding and removing AudioSpot objects. Like Hotspots, all coordinates are relative to the original size of the image.

To accomplish bounds checking each AudioSpot in a layer contains a ProximityGate object. The gate opens and closes based on the distance between the point in the image currently at the center of the viewport and a given point. As mentioned the proximity gate can define either a radial or rectangular region. The ProximityGate classes ( RadialGate & RectangularGate ) are abstracted from the AudioSpot code. This means that can be used in other situations where some functionality needs to be invoked based on proximity.

I’m looking forward to implementing the audio classes as ambient accompaniment to large zoomable collages. I’m also quite excited to see what others come up with. If you find these classes useful and end up using them in a project let me know! I’m amped to see what people come up with. If you have thoughts on improvements or find bugs don’t hesitate to leave a comment.