Displaying a waveform using canvas

Discuss Lemur and share techniques.
Post Reply
amundsen
Regular
Posts:62
Joined:04 May 2013 19:11
Displaying a waveform using canvas

Post by amundsen » 27 Oct 2016 12:18

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

amundsen
Regular
Posts:62
Joined:04 May 2013 19:11

Re: Displaying a waveform using canvas

Post by amundsen » 27 Oct 2016 12:33

Wouldn't the display of a bitmap picture instead of execution of complex canvas code accelerate the display?

Post Reply