Random Graphics

I am trying to create a action script that uses a random path set to a musical composition to drop in pieces of graphics whose size, color and rotation depend on the “beat” or “equalizer” level, then export into illustrator. Anyone have any Ideas?