Use Flash library for pattern storage, add debugging messaging, play audio asynchronously.  Appears to have a memory leak...