@giuliomoro - First off, thanks, as always, for the extremely detailed reply and code review.
giuliomoro Display(), however, transmits the whole buffer to the display, and this is the real bottleneck: regardless of how many pixels you changed since the last time you called Display(), calling it will always take the same time.
Ahh! Ok - I didn't realize this redrew the whole screen for each call. Presumably I can just grab a snapshot of the waveform from PD every 20ms and redraw the whole updated waveform rather they redrawing the whole screen pixel by pixel.
giuliomoro ideally I would send the whole display at one time. This way you would only call Display() when you have a handful of pixels or even a full display to draw. When sending such large buffers you may want to send OSC messages as blob instead of float. Either way, drawing the display less often is going to be a big advantage.
Yeah - this definitely seems like the best way to approach it. I'm actually kind of relieved to know that the library is fairly efficient and it was just my approach and misunderstanding of the
Display() function that has been the issue.
giuliomoro it seems that it could possibly reach 1MHz or beyond.
I'll try to work within the confines of the 400kHz clock frequency for now. I clearly have to re-evaluate my approach to drawing the waveforms. I think if I can achieve 10-15 fps at 400kHz it would still be acceptable for this application.
I'll report back with my progress! Thanks again!