jsusfx icon indicating copy to clipboard operation
jsusfx copied to clipboard

read back of sliders?

Open umlaeute opened this issue 8 years ago • 3 comments

afaict (not having REAPER at hand), the specs allow a plugin to write to a slider variable, and the host is supposed to display this value.

probably the [jsusf~] could be given an extra outlet that would output the slider-values? (either when triggered manually, when a value has changed or for each block).

umlaeute avatar Mar 03 '16 12:03 umlaeute

[jsusfx~] already supports this with the [dumpvars( message.

But I think that the runtime object ([jxrt~], see ref #11) should support this and output (via the oulets) the slider value for each slider when the [slider( message is received.

asb2m10 avatar Mar 04 '16 04:03 asb2m10

well, i don't think that printing values to the Pd-console is especially useful apart from debugging. so i'm really talking about making those values in the patch.

but yes, if [jsusfx~]'s purpose is debugging scripts, and [jxrt~] is the object proper, i'm fine with putting that functionality there.

regarding the [slider( message, i'm not entirely sure whether a pull approach is always sufficient. i think it would be best if the user can decide whether they want to be notified of new changes or whether they want to query the current state (or both).

umlaeute avatar Mar 04 '16 22:03 umlaeute

I doubt that on Reaper the slider update trigger is done on the dsp thread. There seems to be a low priority thread that updates everything at each ~100ms.

I'm not against the push approach; it's just that I'm not convinced yet to do this on the dsp thread. Sliders in native EEL2 are difficult to track because it's just machine code. We need to do a delta at each end of dsp buffer cycle and I find this ... overwhelming for something that is not often used. Maybe external thread like in reaper ...

asb2m10 avatar Mar 05 '16 04:03 asb2m10