About DingX

DingX is a sound spectrum analyzer package supporting 2D and 3D visualizations. It is meant to run on Flash, and written in AS3. It is based on Flint, a particle system engine, and Papervision3D (PV3D) for 3D visualizations.

The main aim of DingX is to make it easy for any lay programmer to seamlessly embed sound visualizations within a Flash application with minimal (3 lines of) code. In addition, gradient-coloured visualizations can be created. Please refer to the documentation and examples for more details.

This technology shipped on Dec 22, 2009. It is still being maintained and updated.

Preliminary concepts

DingX works by playing around with the native SoundMixer.computeSpectrum() method found in AS3. By altering a variable, or a couple of variables, the DingX engine is able to display visualizations that dance to music in real time.

DingX can be easily embedded within a Flash player. It can be treated as a normal DisplayObject in Flash.

Implementing DingX

The basic implementation is as follows:
package
{
	import flash.display.MovieClip;
	import org.joelTong.dingX.twoD.initializers.InitializerTwoD;
	import org.joelTong.dingX.twoD.visualizations.Type3;


	public class Main extends MovieClip {
		//optimize if needed
		stage.quality = StageQuality.LOW;

		//sample sound loading stuff
		var sound:Sound = new Sound();
		var req:URLRequest = new URLRequest("Song1.mp3"); //Song1.mp3 is the filename
		sound.load(req);
		sound.play(0, int.MAX_VALUE);


		/* -----------------------THIS IS THE DINGX PART------------------ */

		//add an initializer. It is like a renderer and behaves like a Sprite.
		var initializer = new InitializerTwoD(stage.stageWidth, stage.stageHeight);

		//add a visual. In this case, I chose Type3. You can add more later.
		initializer.addVisualizer(new Type3(stage.stageWidth, stage.stageHeight));

		//add the initializer (renderer) to the stage.
		this.addChild(initializer);

	}

} 
	

Please refer to the DingX website for more details.

Downloading DingX and Documentation

Please refer to the official DingX website and documentation (located on the website) for more details.

License

Currently, DingX is distributed under the MIT license.