Waveform Generator (F8)

VIEW HERE | [url=“http://dylan.surreal-media.com/actionscript/waveform.rar”]DOWNLOAD (212k rar)

(note: see additional question at the end, it was the original reason I posted)

This is a waveform generator that takes two formal sine waves, which you manipulate, and generates a new wave based on the two input waves and a selection of input functions. Note that I wouldn’t call this finished, cause I have a few other ideas, and of course there’s some bugs hiding around.

Be careful with the ‘resolution’ stepper, as it works exponentially, and will go up to 10 (about 12,000 total dots, each with their own set of calculations to perform).

I’ve always had the impression that some of my coding practices aren’t the most efficient, so I’d appreciate any input on improving speed, effeciency, and workflow.

**future ideas:
**- generate a grayscale representation of the wave

  • ability to add custom functions
  • more input functions
  • [your ideas here]

I welcome anyone to add on to this, for I’d be interested to see what else can be done. I have hardly any formal education in math, so if there’s some neat functions you know of (as well known as you think they may be) that can be added to the input panel, I’d appreciate you posting them here.

Please let me know of any comments/ideas/suggestions!

**question:
**- Around line 160 for the progress bars, i’m using this to determine the total progress (ratio): *
(_xmouse-progressBar._x)/progressBar._width

*Sounds simple enough, but after much frustration and 3 missing patches of hair later, I was helped to realize that the progress bar was NOT returning the right _width value. Even when I did so manually, and also tried setSize(). No matter what I set it to, it keeps returns the wrong width. I’m assuming there’s some sort of seperate Getter I should be using, but I can’t find anything in the docs. Can any enlighten me on this matter?

thanks,
-dylan