I started experimenting with the SoundMixer.computeSpectrum() function and created a very simple visual effect. Make sure you have some kind of sound playing in your browser for it to work! I recommend some Squarepusher or Aphex Twin
It was tested listening mostly to: “The Exploding Psychology”

- Click to activate
Edit: Will not work in IE for reasons unknown to me. Get a real browser 
I will embed a default tune in future experiments
I plan on doing (many?) more of these in the future. I also plan on making them (much?) more interesting. For now this is a decent proof of concept.
function onEnterFrame(e:Event) {
SoundMixer.computeSpectrum(byteArray, false);
var drawCanvas : Shape = new Shape();
var matrix = new Matrix();
matrix.createGradientBox(768, 1);
drawCanvas.graphics.lineStyle(1);
drawCanvas.graphics.lineGradientStyle(GradientType.LINEAR,
[0x005599, 0x8888FF, 0x005599],
[0, 1, 0],
[0, 128, 255],
matrix);
drawCanvas.graphics.moveTo(0, 160);
for (i in 0...256) {
var t:Float = byteArray.readFloat();
var controlX = i*3;
var controlY = 0 + 160;
var xx = (i + 1) * 3;
var yy = t * 200 + 160;
drawCanvas.graphics.curveTo(controlX , controlY, xx , yy);
}
bitmap.bitmapData.applyFilter(bitmap.bitmapData, bitmap.bitmapData.rect, new Point(), blurFilter);
bitmap.bitmapData.draw(drawCanvas,new Matrix(),colorTransform);
}
Posted by DakaSha on January 19, 2012 at 11:49 am under Audio, Code Snippet, Demo App, Flash, haXe, Visual.
Tags: As3, Audio, computeSpectrum, Flash, haxe, Sound Spectrum, Visualization
Comment on this post.
Just a very simple tutorial about a very simple subject that can catch an unaware noob (such as myself) off guard:
Click to visit tutorial
Posted by DakaSha on January 17, 2012 at 7:56 pm under Code Snippet, Coding Techniques, haXe.
Tags: Enums, haxe, index, indices, proper use, tutorial
Comment on this post.
My posts should now automatically post to my facebook wall. In order to do this I needed to create a facebook app.
The funny thing is that after creating said app I needed to authorize it.. And it actually took me a second to click the ‘allow’ button…
Posted by DakaSha on January 16, 2012 at 4:35 pm under Site Update, Uninteresting.
Comment on this post.
Aka “How to waste precious coding time designing something worthless”

Click to visit project page and try demo
But hey.. you wouldn’t know it yet but this IS supposed to be a procedural generation blog
Features (If they can be called that)
- Setting and visualization of all perlin noise parameters in real time
- Offset animation
- Merging of 3 separate noise patterns for complex perlin effects
- Randomize button so you don’t have to deal with my Ui
Posted by DakaSha on January 15, 2012 at 9:19 am under Demo App, Flash, haXe, Procedural Content Generation, Visual.
Tags: As3, channelOptions, Flash, haxe, Offsets, Perlin Noise, Programming
Comment on this post.
Soooo Here is my first post and while I’m at it the first version of my first project in Haxe

- Click to visit project page and try demo
A pretty dang fast and flexible port of this: A-Star (A*) Implementation in C#.
Still needs some work but I’m happy with the current results.
Features
- Weighted nodes
- Choice of allowing or not allowing diagonal movement
- Choice of adding ‘weight’ to diagonal moves to deter from using them
- Choice of punishing any change in direction to promote straight paths when possible
- Implementation of a ‘ Tie Breaker ‘
- Multiple built in heuristic methods
- Possibility of limiting the nodes the pathfinder may test (returning no path when the limit is reached)
Posted by DakaSha on January 10, 2012 at 12:46 am under Ai, Demo App, Flash, haXe.
Tags: Ai, As3, AStar, Flash, Game Programming, haxe, Pathfinding, Programming
Comment on this post.