Best way to script a widget

  • Hey all,

    I'm curious what the "proper" way to script control of a widget in the interface that is controlling a module's parameter.

    Here's the situation: in the main interface, I'm using mutliple instances of dial widgets to control different module parameters for effects and whatnot. In turn, I am scripting via onController() to set the values of those widgets based on input from MIDI data coming from a hardware controller.

    Widgets are connected to their designated modulation targets via the processorId and parameterId in the property editor. When using the mouse to control the widgets, they work as expected. However, when scripting their value changes, their linked modulation targets are not changed.

    Currently, I'm additionally forced to script value changes in onController() directly to the modulation targets in the modules themselves. But this seems inefficient, and is certainly undesirable from a readability standpoint. Is there a better way to do this?

    Thanks for reading 🙂


  • @amounra Don't use on controller, use MIDI learn.

  • @d-healey Thanks for the recommendation, but that's simply not an option in this case. Is it simply not possible to do this from scripting?

    Here's another case where this paradigm simply doesn't work:

    I'm trying to create a single button that can reset all sub-modules to their original, default state. This is convenient for development, but also will be necessary for the end user so they can reset certain aspects of the plugin after they've made possibly catastrophic or confusing accidental changes. My understanding is that there's no way to connect functions of a sub-script to a higher level script in order that they can be triggered by the main IF through to the subscripts. So, I've created button in a script processor of the main container. In addition, I've created reset buttons for each of my sub-containers in the main container, linked them via processorId/parameterId to buttons inside those sub-containers that trigger the reset functions (this is for resetting bank specific callback definitions, etc). If I press any of the individual reset buttons in the main container, they trigger the reset functions in their corresponding sub-container as they should. BUT, there seems to be no good way to create a "master button", have it's setControlCallback() trigger the buttons in that same container to call their siblings to call their corresponding sub-functions.

    This is all very confusing to me. I understand that it's necessary to do things in HISE in a certain way, but some of this seems so "backwards"....any help is appreciated.

  • I'm not sure I fully understand, there seems to be two different issues here.

    One is you want to control knobs with CC, the simplest way is using MIDI learn, why is that not suitable for your use case?

    The second issue is you want buttons of one script to control the buttons of other scripts (I think). Could you provide a minimal snippet that demonstrates the issue you're having as simply as possible so I have a better understanding?

  • In the outer container, there are three buttons. The first one is meant to relay to the second two, which are connected to buttons in the sub-containers. Pressing any button except for the main "ResetAll" button has the desired effect, i.e. to reset the SliderPacks in the sub-containers. Try moving the slider packs ('Data') and then hitting the resetAll button....

    Thanks for looking!

    HiseSnippet 1287.3oc6Y80SabDDeOauTvEpBQ8s9xo7.XTnFaWRZqnQwfAprZfXESPU8kzi6Vauh618zdqAbi36R+nzOR8aP6r2+s4vwbIEgR8gvb6ryL6uY1cm4GPGA2j34wEHskNYjKAosLt6HlbPqAFTFp89HsuA+FhGQ1wPX3PjDwqnryor9mP7jn8F4Z34QrPZZE+YkAZKUB4+72ubOCaClIIQDBcJmZRdE0gJSj1o4uPssOzvhbB0Ik1a2rsIm0hayGBfqHtFx0v7bi9jiMTpU.izV3.KpjK5JMjDOjVo83Vi5NfeIKP+SodzyrIpA0QcAGEH9PtskBwp2QsFPss5DkD7PfS6jjRJFjR9Z7QTKZr7jTyi7mPOwhz4CsBSCd0yI7zRAuRAvaUbWSA0UlLiBaKiOBfYvLigqPQE5TDCIXOo9EFBc+s3css0egdKNSRXxp8IxVbGWNCFT4IQJ7jM1YkxSXmxBXsHh5S27D8lpWZLidoguWB9hxrAQ58FxLkTNSmyh.rRcA2thYja1DVR6gjMVo76WorN7DoYU3GmplpRMkiimJA1IZTOaMZLgFWGBvzKQHfZYXaeFbhtxMfZPTs0VF1d7M0ubvHcKNwistTWNf5oeIWb9K0CdmQtfHzgjjmtI3OhUU34lYCgZANg+aDA+l4gvr.r3dbaRUWAER0qGZRs0iBzs1xW80VK1AikuJecbbNd9ZxvMEVTtNi72GvhT6wGykjWyprQ42WdoxWWVexo50Ky4BW.ahHyoU0gDSyvJrgNmQDQIvHEgKjieiu7rci2L3rdJE4r1Lp70tj3wAQZjjZn3.Lsnj3JsT+vIC0RDcyxLnv6ePAmhgpCuI8K27Ugka1anTxYHJTToLN5HLxOk.UwWHplOZFreU7DGbhcSoOF2zHC27116aHMTERCCQHrcIBIUsgosO4BnCUPY0kv6S7NWxc8yAgm4g83YIKbERCq8LX4Fod4KCverKV3NjHtJF8+UuliRBk0Z5Fse0FL7w3DaBKv6F0vVM+WD33bBiFofwu6MavnwTgwM6hA8R4VCsMji2fUwpHbB3N3XMxZq1+7nxQoYcbG55VKytt0y55vLB2UwcnRyAYi2BYfW3b3+03MjCyJ3C50iXJS.aI7g+ZdIrjOnr3svvb4TGd+TPozcloTpU7ijBYVgrVoOSnPlQQkrHRVnvjDImNAtIH+opGeqFnlLjl2sPw6CyuaBlMia25iQjKCJf83hJJXReQscn+z16Pe5SinLodT.TYUWapEQrqrMyhbUE5l5TfSjRgqiXAN0LxTHFlhU3bpO2qTeJLCbNh5nMEdOgLFdbnwAmT5.6v9NXArOgjP6wZZfoVJIvu3c8mWM94Gao9ri+26lSdLElIdLQgTROeT0z870allEwhyRzk3plm0br9eCHz9CRU6tcSufaRN7grTxeTSGiT.ZwldRhaW5enxY35UqMmRw+enT7F9PIk0+HCofpXZe7PmtPKcSBfDFiX6otGUPcELXbM0XUloKgY4O3efmvIqGcoSMY8nIuizVZLm1xCRZKMlBsEzbZK2KzVlSZ4ycRKIk0dvQbo9mLhK+o4bhKyIt7vm3x8wZ3XXJ3uyLnVgp27h9Rf3l4+OmaI7Qpw5w+cbw3ZvIcGfxv6LMUo6uExOYaSibXy2kCa1NG17rbXyyygMeeNr4GlpMJ1Z6NTxcBtJBB5bfeANMsCXFvIY+S8n+E.KbOUr

  • I see what the problem is. To trigger the action of another widget you need to use the .changed() command.

    So your reset all function will look like this:


  • Awesome 🙂 I haven't tried it out yet, but I'm sure that'll do it....thanks!! That solves some problems!


Log in to reply