Page 1 of 1

Displaying a waveform using canvas

Posted: 27 Oct 2016 12:18
by amundsen
Hello,

Here's a short video showing canvas used to display a waveform. Note that the usual representation is not used but I have rather chosen to use brightness to display amplitude (RMS value, so no negative numbers to display).

The data are sent from Max to Lemur with OSC upon sound selection. The waveform is a 944-points simplification from a 30 seconds-waveform (1323000 samples).

https://youtu.be/aZqiRb9I1Jw

The drawing is refreshed fast enough when switching from one sound to another, but there's increased lag globally. In the second video below, the ball is far behind the finger :(

https://youtu.be/iefkpbwc0AE

Re: Displaying a waveform using canvas

Posted: 27 Oct 2016 12:33
by amundsen
Wouldn't the display of a bitmap picture instead of execution of complex canvas code accelerate the display?