You'd have to take a look at individual frequencies and decibels in a sound file, if you could read sections of .wavs into bytes you could probably do it, but I have no clue how.
If you don't care about moving it to sound, just the graphical effect, then you just need to write a function to write it that contains a for loop (so that it runs a set number of time), and has a random number generator that will give you a deviation from a zero value either negative or positive(you'll have to write your own random number function to get ranges). Use these new points to plot where to draw using the LINE command. X will be constant, and Y will be determined by the RAND (I think that was it) function.
You could also set up a deviation factor so that as it draws closer to the center the ranges are more extreme and as you start or move toward the end the deviation is less.
Crazy Donut Productions
Current Project: A Redneck game