I have a JSUI object that is 500 pixels wide and is used to draw a waveform. The waveform data comes from an MXJ object as a list of 500 points.
My JSUI is also capable of displaying markers on top of the waveform.
Currently markers and waveform are drawn in a separate sketch to avoid redrawing the whole waveform each time a marker is moved.
In order to see the waveform I need to copy the markers sketch as an image and perform an alphachroma on the white pixels. I then copy both the waveform sketch and marker sketch in the main sketch using copypixels.
The problem is that each time I add a marker my RAM usage increments by about 1 meg ! This makes the object unusable beyond 40 markers ! This seems to happen only with the new Image method, if I draw my markers as a normal sketch the memory usage is fine. But the problem is that I need transparency for my marker sketch to see the waveform, is there a way using the sketch object to do the same thing ?
Thanks a lot.