Custom controls
-
@David-Healey Yep, that's exactly what I have. The invisible knob is the parameter and its control callback does panel.setValue(value); panel.repaint();. That half works - if the knob receives a value, the panel follows it.
The gap is on the write side, not the read side. I never drag the knob - I drag the panel, because I need handle-only dragging (move only when you grab the handle, not when you click the groove), which a normal slider can't do. So the panel intercepts the mouse and sets the knob's value from script. A real drag fires beginChangeGesture/endChangeGesture, and that's what tells the host to arm the parameter for automation read. A scripted setValue/changed doesn't fire it, so the host records my lane but never arms it - on playback it never sends the value back to the knob, the callback never runs, the panel never moves. A project reload fixes it because the host re-reads the parameter list.
So the knob->panel read path you're showing is already in place and fine. The only missing piece is that my value change comes from script rather than a drag, and there's no HISEScript API to emit the gesture.
-
-
@David-Healey said in Custom controls:
Oh I missed that, I'll check
I wonder if my best option is to simply modify HISE to give the slider a thumb-only mode (gate that Slider::mouseDown call in HiSlider on getPositionOfValue) and throw the stack away
-
@Morphoice Two way link is working here
HiseSnippet 1113.3ocsV8taiTCD2aaWnIvg3j3AXuJPZCTkaSu1xUcBQtl1dTcWaCjREe6vw1IqUcrWsq21FPmDOJ7Md83M.Faua1MsoEHhKeHIy++4YFOi6mpHrrLUJxq44SSXHuO1evToNtWLlKQGe.x6i7SvRl3bVlFs+zDbVFih77V8UFE7ZrFx94O+18wBrjvpXgPWn3D1a3S35JtIceMWHNBSYmymTS6s6dLQI6oDpb.Lq5GgRvjKwiYmhMpshO56vYwHuuzuy1cnQ6ryP1V6MJZWVzyhvih1dK7dC2it8Nr8XQzmuEiDg79fCobsJcfFqYYHu01WQmNHVcszEfK3Y7gBlgnCZ.DYG6iTBp4HZ3h5EyEz9kYoLD3k9U4rUc4rOy+DNkOieUt6SsBBprndBzak4g2pyAuN0gWTM3s.H4UCRq4fzi8GPR4I5JItZ4wRMKcDFpS0ghSWzJ+wp98TfFRc6I3KYGkBDyrHb2nnMCfuZ8hlMe5SeRPeSeQmlPYKSWPD7MAkNXLS2SMIQIAhvMbh2vX5+Q8c+qclQrTmpD8vBwPn2HTIcxJ3a7MWJ3RVvnbIQyUxfaoRHoLBaFbEVjyZ07Wa130R0Pa.tvvJzI3Ek7IwX4XFMD37tl0PSenHq+AUtFBXXY.CGa83XGbM8xgtexZecLWac631zT70uTvGKYzyY2nC0w7Ly42E+VaFTx3MJBVruJWRyBi.9aP.nmxnl7x6Lm2J3bhJOiMK0LCOrq.KrXhOJH7IVx1DAmbIi1pYiFoLcdpDPUilMtBmFbETQtMdB9pfNsB9hfNQPDaXEVkrLmHKq54oxNDaFrnfa++8VusRMGqYEi6VsshdvhccMVbstJgcqhcgfTVhot5p1077oJM6LYn0GfjfaKZznEJq.KBV5BEaFAl9PFFJymLjkV+DXTDtlO+rC+6e1Q8QaDWtulhJ4wRt9rDl79F3gJJXl4LEnBTUamx7IESYFH3TVJhCCS9PeaQ.YAb8kAne73CvZboa.OBQIgkp4lCf2ArqfkEtgWM7OfkcoVk.y8m0i.rcA8Qki1LULaLW22U8P2LKf+122cZEwntWyo53YL9cc2XFebb0dotpt7r9h7wbXhQJrxAF54xHP+m55xtvLS36Yt9jEblTLEMAWESzm2EcW39.4nJS+4apC2W0cBmREr9pLtoendZLSyRFv+Evw99Qs6fRlGytskq6WFsEeltMpu69CXykhlKv54WmYV5WHvfq56PL6Ij.dmV+QA+usi6eKDereetlDuXLtxBvHzO99.iEuL3Q9GNZDinq.3Z9G8SuedF.xsLZ7IXcJGpu9mlOY.r5gvfnKg6Gl4DdqXtQ6niLzlLv.ljZI9K3SgvNFZuBgcJEBcNjT0aIt4.l2drtkCfIosyqg+IF5fEL..5o4ukPl2U2wvsVVCe1xZ31Kqg6rrFt6xZ3WurF97+YCMuT8k4Z0D20FD5j9GZGX64cnDCcf1tUzeyxYUW1
-
@David-Healey using the knob's control callback for the read side is cleaner than the poll I was using, so thanks for that. But I think the reason it works for you and not me is the host. Nothing here emits beginChangeGesture/endChangeGesture - Knob1.changed() from script doesn't - and Cubase only arms a parameter for automation read once it has seen that gesture. Your host seems to arm on a plain edit, so the round-trip fires; in Cubase the lane is written but never armed, so the read is never sent back and onKnob1Control never runs (until a project reload). So I think your test actually pins it on Cubase's gesture requirement rather than the link logic.
-
@Morphoice Did you test my snippet?
-
@David-Healey at it. If this works in Cubase I'm gonna cry
-
@David-Healey Confirmed in your own snippet: if I write the automation by moving the knob from script (panel -> Knob1.setValue/changed) instead of dragging it, Cubase records the lane but won't read it back on playback until I reload the project.
-
@Morphoice Which OS? I'm going to try this
-
@David-Healey I'm on MAC
-
@Morphoice I'm not sure why, because I don't really know Cubase, but the panel is able to read/write automation in my test, even though I didn't set it as a plugin parameter in my snippet.

Edit: Aha, in the xml I see this
<Component type="ScriptPanel" id="Panel1" x="70" y="180" width="330" height="250" isPluginParameter="1" allowCallbacks="Clicks Only" max="10.0" -
@David-Healey I rewired a test slider in my plugin as a panel-as-parameter exactly like you did in your example, no change in Cubase. I'm attempting to patch HISE to have that handle click gated