Sliderpack rectangle? (Piano roll?)
-
Hi people, anyone have any clue on how to archive this? I need to make each slider to show only the top line. or a custom SVG on that position?
Is for some kind of piano roll -
@hisefilo I'd use a panel that draws based on the slider pack values
-
@d-healey why not laf?
-
definitely laf:
HiseSnippet 1152.3ocsV0uahaDDecR7oKzdU8ptG.K9KnhyEHoomTUUCAB8nW9.ExEcUQnnM1K38xxtVqWBPqt2l9.12f1YrwXmKzT.oRT.Oe4827amY2oqV4whhTZh0tWNKjQr9R6dyjlflATtjzoEw5qrOkFYXZmDUGMKjFEw7IVVa+KnBqc2gD+4u94inBpzikohPtRw8XmvGwMYZ6d363BQapO6R9nbdu+gc7TxlJgZLfmssqRBod2QGxNihtskMw5YG6yMJcOC0vh.eNR4OqWfZhLw+q3Q7aELTnFoG7hRTSZFvE9cSy0HBwZmtYY91IY9qrOk6yWnOiA95XCNYQjmCr15ofTs0.RV4fzNIP5k187z7PSlEDOegcGIrgLfBTcdnj3KYql11MUfGRi6H5cr1ZPXQDkNnZ0JNvWk+wBE.5Nx3bOU6fL8MB5.mexIMVOMCRoSTdTwIJ0cMj9sYLQILtTuc0rgbr3n8XomgqjkJ5qoS5I39LcWvoif+GpUik9Eq3LH0ogUbT29wxE9iB6NzMhYR1xKA5bucXh.rJfsAPcxELOSrIJfmD0OLDtgMJePHBdPPUbp4ho6mVKn2VPiBN+dlVPmsBfO4mH2IbSPCQX.8yvVbTtbjZi3lYk+2Sv0ClWvGFXZJ3d2cBWxVQVdYTFFdrwo0Rv5z5I+Nat7LPt9FPjWxlZ5pBGGthfy.9uzhfqgB2pIXAopqq2G1Y2ueVJzPvGJY93Bt3Mk4eEmhFUXLeUbESBjSn5jTYso15HvV.1Z8gVqRPgnyqiQz8TwX1YJ8Hpf+6L+xNeaVhsWeHR7OnULRIXtgZnvojQi8u3BWN1N12NEdqKhqJFGpcVds0R0NIu15oZCxqcu9NemS88cqFu.449oUblUwYREmf9ojW5AECQBXTnRBBkJlswWqXYjbdzIHojN7NRYTGk7LkgctrTLoV3SEb9bSCFrTaHHzJgfoWpY7FF8SEXI43Q2xf1y3MjENBGA+vy0e1pcttWBmjyQkrijaNOjMWtsR3imWiO+3aAHyIU79f4HDfhI91fuY9sAYLLgCunWXmixIwoAwx1BuQ0mZnDqqsOXeW3ysMZ35N33VviW0E95swxGgx+JJeuKJ2Bkee2T+eaaPdvGP4fExt+FJKazfPdemV3hLGt.xgrIjoMbjzrZwtGt+O4xrcsawhtCZAi8cd8Bw54qQxMESr2AI1L7gygGlv8MAnveBIb.CatQoc.oQzoYyV7lCgt6vdPqFX1FZCgwPdz0svE8J+wBp4g29ii4L2.T57fqb6jddd9wfViQBp9jiDrpP7k1c4FufkiwsVBFgsq+Ov37Aodg8wCF.GZjAvcra+gMcpo+ik+B0XCWN7TpQywxiyFOpGb3qGCVcojIhvxgsvFqD4po8F8XR+Xg+F9L2XMT1ZtwZoFgJIOs5Fuj1QbTsmGqAvjLdxzcgQjAYmrtO6pPE1HXpwa77vz+00HjkGS8MHl81fX1eCh462fXNXCh4G1fXdySFCNvdiwF0nj1APQ2iiOmxx5XIEprhqBI+C.cSw63
-
@DanH said in Sliderpack rectangle? (Piano roll?):
@d-healey why not laf?
Because I left my brain in a different room :p
-
@Christoph-Hart this is awesome!!! will try to figure out what have you done. But this is it!!! : Thank mate!!!!!
-
@Christoph-Hart out of interest how would you make this work if the sliderpack has negative values as well - currently the line will disappear at the maximum negative value.
-
@DanH Just move
h
above and subtract it from the total heightpack_laf.registerFunction("drawLinearSlider", function(g, obj) { g.setColour(obj.itemColour2); var h = obj.area[3] / 24.0; obj.area[1] = (1.0 - obj.valueNormalized) * (obj.area[3] - h); var x = obj.area[0]; var y = obj.area[1]; var w = obj.area[2]; g.fillRect([x, y, w, h]); });
-
will try to figure out what have you done.
I've created the template functions for LAF (by right click on the slider pack and choose "Create local LAF for selection" and then I hacked around for 30 seconds...