suffix on Panel Slider
-
Re: label suffix?
I was playing around with the Script Panel Slider snippet on gitHub
HiseSnippet 1878.3ocsX01abTCDd2ztHR.pnR7E3St4Cn8JWudWoEpZTDsMIENfzdhzV.UUg7squ6r5t1m75MIWQ4+L+CfG68881DJQzSQWNOdlwOy3YF6wSTx.VRhT43t4yWsj439wdGsRnWr2BJW3LdeG2q4cHMQyTjLROd0RZRBKzw08Jeugf6lW0w94u9tGSinh.VEIGmWJ4ArelGy0UTm7vehGE8DZH6473Zbe2GNNPJ1SFISAdth2Pmkzf2PmydJ0v1FdNtevAgbsTcjlpYINtW8wxvUGsPdhHi+WxS3SiXlAibNBJJi7SjQgFDan5r2BdT3jB6NwAZYRkW3JYdgOy6PdHujdk23SsSPpjnt+vcilv6JMf2n5vaXM30AjbqAoqlAoq6cTfhuTWMiAOej2XA1blQgauNTx30YiO+Zd6IAGB8fX5aXOQgAkR3O5NC6SvW81Yqs1hKh3BFYVpHPykBRfhAy3kr.XQ+jPN0Wfsg9jS6SV0aq+bKB9DICnQjS3gyYZxtjhUhFFNgJXQ0kXGq.1uJXKgYLlkLklyR.xh+wid1SykIS+Dx1P45Ea+.x8G1ufzBFe9BcSZIziYiESTLnTLynxInQQxS1CeOEwRIXps2Khie0m7CxiQT8WR1WQmOmKlucoLLAEaSlM5elQUBHjVkxrydVcCIyvGDR0zAKqY+YdtIT8B+NX2X1HbR+KxTMb39ENb+48rrUX5DxsuMQufmPve5ELRhlpzDEMjSEk7bLUkMwylMKwtKbmA2amxoavGUE77Ev3EH9ALNbvnZblyvuZ72XxQCFRtEz0PxMaHWGpFv7PDaQRRULxJYJwtKXg7R3CtQIiFiI2aMHHBt1B2SC0M23gxpB3m8ujAmrfqY85dsw92I1EiKDXCMfqftqosYnXyAQQ7kIL+WMbvWeSKLvNg0T860mbNDu66DwWeNvBwbAoQHNvhMgTESi3ukEBGcTJi3yQFFMIaVEULmY1lC4ylwTHFhLC4CX4FLXTuFaQwPtcIEXveaLd6dM2Eiom1jE5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Gdn4IHpblNVPW+QFbdw38QMlBUAsV0DInsO6XbQkrVl2zaeVxazxkVdiWJEFL3t46zBeJ7HteFVxUE+v1JJD+Clj+3FYMhVmR81PMzcyo2rKTG2uv675B0oUymlE2pk0eQfO06PYnoXdyGnv7pL4Sf3fFuJfoyeyAEqp6P+e6UKdWg308lv0AK5FiazAFwd86CLl+VOeh2Anoq.cE.up2S9s2OOriSVS+ywolJtIB6oowGg6WGvLmtf3PSdn6FlLlrwCMiMd.bBencveiO4SNpH3vL4nhIchoAJ4ejWxz7ZRenkBvjv9PZa5cnYLYT6jKGmXD18GAAMU0ZBdmKqfe8kUv6dYE7dWVA+lKqfe6kUv6+uKnopviR0x3rzFGmCmbfsXnq6A1xF1nUm+QlRUxK
and I was wondering if there's a way of adding the suffix to the value readout. I know you can do this with knobs [knob.get("suffix")], but is there any way to retrieve this from the parameter to which the knob is then assigned?
I can hard code the a concatenated string to the readout but then I'll have to make a script variant for each suffix type?
Here's my version of it:
HiseSnippet 2778.3ocyZs0bSbjEdjsEExYS1js3o7TG8vVifAYIANPgKWAek3MXvExvRVWtnZMSqQcXTOplK1VP4+R6+or+.1ZeZek8b5dtOirENFVTAxZ59bN824zmacKwNKfIrXVuwWvmLgEnoUawC7bMY99tdZ0Zb3zILsZ+o58mJBFs0HJWns21Z09y0eEyLv0iz2gaw7z1b5DpuOyRqVsEeBRTsFKoIe8e9oMoNTgIKcHMsW4xMYOkOlGjN5AO9W3NN6RsXGxGmg56+38LcEa453FB.Zw5czlPMeK0l8LJR1B00pcicr3.X5GPCX9Z0VZSWqo8G4dpPQ+q397ANL7gtZ8AAoFdWWGKDw3nZaMh6Xkn39fYXoLlgEUlgaUeetEOY7Tyw2JmfjxQV6QsExCuEyAutYgWmLvqBHUKCjVRAouqdeSO9jfzYP77U02SDv7FRAydVnnnUq1+p9Vt.Ahf1iouksqG7PBC5c60wf.u0ZskWlKLcBsX5MUa2+hvcvATAyo8u42DmeXnvLf6JHthm4FvdtPu0xue4FKe9x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PKNp2pFjeriA4d32VxpGu1Es0bHxyltmU.aX5nWfYpYVu.RwCGBvgoKW.CRO3ekbK93KRmkaLfalKWApeeZpt4HaWYm7tEjWQu57VnyqvdUV02EN8mdyM73TmlFjGLmVm4XqtBaEt0rgC2Vvrjad5k7jMxqBQoMNRZOOpCzaf5ScS9TujOcuiOtZtaZBgedLqlWFd5OhZ4d5bApFMleLkr9Ejy6gC1qrVOhb0qEWPnf5p5VBD5QPPTmiKSvKfd0BwKV.SZlJpyK4cUvABuaExSoCXNkBfcvQOvE6MAW0XKBlbuSoN.xXcV6xbH69vOudjo7hPrYqY3PFqux8+jG5l8gdYe3Zy4bNvG3ad8.uFM9D35BE.tbW1Y5wdevIsfeYg1cOeV2c09tPG3wWqV5kWwfS0DDeAVo4m4CUy.8CBMpxrxzMd9r3XsR7t7xz.PxELLFWRhTB44IsgSXOUDWCuPw5LMFedE.C7OruPTk+txrf1PvuoMRnO1Y.bZMaWAzDBJFnifISb8BxKBLtFmc6XNWmjtxuFBsuaW4UgjN3utVdIbIPxW98ovOgGLMxxMf5CGVyUjwXJuEupAV+L7uNjnoCdoZEteNnA1B2pWqKDj4uDuLpdNKwJEW+ONEGOqZzEV5f+dcfCSisKldJaoR2pBjwNM1YQd4OR5zqxa5NUnEFEMEFEuMyVWldrmMHVVFma4lue7QYggkJjedFAe1Dj+Ck7yKnmEbjiMfij2laheQYhjR0OVpwqWQMprVktC4Dc4zbna8nqRnRRCEN72BdlLIoFI2RKkL.1HGRg988fZzgA3cP5nl1U3LsRgwEDFj4DNYPlLFQYoHtpQCveuNYFcXDPwuOjpsCQXauwiYPjd.yYp9baIj3MR+giQXay77itzD4WpWBPlwZaJ2prJsfmWJeVgb0p6sIJkMLy4v+WtAfnW5SsYOBnBONUfLRHyuCGHXnz2.TleZUPsK4u8J7md04Zoe8TB1Y6xcX3285+CvZsktH
-
@alobassmann Use laf to style a slider rather than making one from a panel, unless you really need it to be a panel.
-
@alobassmann Module's parameters don't have an accessible suffix, and as you noticed, neither panels have a suffix property.
In your case I would go for something like this:inline function createVectorKnob(name, suffix, x, y) { Content.setPropertiesFromJSON(name, { "width": 80, "height": 100, "saveInPreset": 1, "allowCallbacks": "Clicks, Hover & Dragging", "enableMidiLearn": true }); widget.data.suffix = suffix; // later in paint routine, use this.data.suffix instead of just the suffix var you made } const var ScriptPanel = createVectorKnob("VectorKnob", "ms", 20, 10);
-
@alobassmann Well, @d-healey just went to the most important point to begin with...