Plotter for control signals (and other things)
| Newsgroups | gmane.comp.audio.supercollider.devel |
|---|---|
| Message-ID | <CAEBNZeAJM0LsvE8RzoASFn=K_7gcD3JhQfN4ShPhLsH7NyNeXQ@mail.gmail.com> |
Hello List, I have been in need of plotting various control signals (sensors, brainwaves) for quite some time. After hitting the limitations of SenseWorld <https://github.com/supercollider-quarks/SenseWorld>'s PlotterMonitor (and maxing out sclang's CPU usage), I developed a similar plotter based on the ScopeOut2 mechanism: LivePlotter <https://github.com/dyfer/LivePlotter>. This implementation still has deficiencies which I believe can only be solved by building a new plotting mechanism in QT. Please bear with me as I'm trying to explain the current implementation: - currently I need to create a "sliding" copy of the buffer in the scsynth, which sometimes produces artifacts - the display by necessity always resamples the signal from the "history" buffer, which leads to artifacts as well (esp. signal peaks are "flickering" as they pass by) - I'm using the same scope mechanism as freqscope, and it seems a little "hacky": the buffer is transferred to the QT in a linear fashion, instead all at once, which makes it hard to solve some of the above issues - there is limitation on the size of the plotted buffer in relation to the framerate I'm thinking, that a better implementation would transfer live data to QT using a shared memory interface, and QT would do processing for display, like in the case of SoundFileView. At the same time, maybe some of the processing could still happen on the scsynth? Like calculating min/max/rms for the signal? The two main issues I'm trying to solve are the representation of the peaks (important e.g. for motion controllers) and the general visual quality (flickering). Also, when I plot many signals or when the plotter occupies a large portion of the screen, the CPU load is still very high. Maybe this is something that could also be improved. I would appreciate any feedback and ideas for this, if you can take a look at my LivePlotter. I plan to make an attempt to build the QT plotter, but as this is a larger project for me I don't want to get myself to a dead end with something that others might catch early on. Thanks, Marcin