HISE Logo Forum
    • Categories
    • Register
    • Login

    ScriptNode - controlling two values with centre and spread knobs

    Scheduled Pinned Locked Moved Presets / Scripts / Ideas
    3 Posts 2 Posters 219 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LindonL
      Lindon
      last edited by Lindon

      So I had a situation where the UI has a LOT of controls on it - and these were set up in pairs....so 4 pairs in my case - so 8 controls.

      I wanted to slim down the UI - so each of these pairs used a single value input - but this value was itself shifted plus and minus by an amount of "spread"

      So I would end up with 4 knobs setting the "default" value of each pair - and a single knob to set up the offsets, so 5 knobs down from 8...

      Whilst I could manage all of this in the onController callback I wanted to have it managed for me in scriptnode...

      It took me a little while to figure it out (and I'm always interested in better solutions), so in case anyone else is looking for this sort of thing here's an example of just this controlling part...

      HiseSnippet 1406.3oc6Y0DaaTDEdVGOIwlVnUpRbgC9.BkJUhhgRAIPxIwIoXAI0pNDUwkpI6NodjmclkcGmDWnRbfCbgyndiKbCwAtwo1CbCIDBwADWPHtwobiiv6syZuqicbcLIMEUbjh24MuYeeue9dyrqqGpc4QQ5PhSgM6DvINmi1nixzrZSlPQpsBw4YoqyhL7vRVQK2IfEEw8HNNSccTfSg7j3OGTYYljob4ohHjszBW96J7ElTo0W7cDR4ZLO9lB+LZe0Eq4pUU0Rca.OSQWfDvbawtCeCFpVNJwY5U8DFcXCCyvi.cVV60oQS8dJq9aIhDaK43fxjFvMxJlTsoP5UuquFQHN4qm54SY87KQWW3I5IOMBbg3IJkthrw.mbiBRkOFPxICjxagzEoMbCEAlzYP77LzZJHgrCCB0YghUWhyCoU0fBJy79rV70BgA8VvbWagEtRI3eW9M2osx0HzpRZ0FZC+Fp4tbwOrXgh2qXoCO0N6Lz4PyDpkRd3PmFytgiZgyoZ6uMO7Jk1kIay6oH398GSmd7hotVuNihZUMkvbi.dx30zROLVgWOXFfjD1fqduZqvLLLojHCzKfGZDHbbV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Clw8zG8JAG6GyXvh1d9ai32zxX5ujEm.+8ihyP+7X5uoOv1wvm6cXwgulk05V9r32B1j8Nqeb7N67Ytg5amzgCiOyFKA5snh+gcvS8.iKUlrqMxRw2rFwW3ItsqK9Rce4xDxvWyqLAq4Umf0b0IXMu1DrlqMAq40mf07FibM3u2URaGrbDDTe03hKGmUUrsk18lH+CnGEirA
      

      HISE Development for hire.
      www.channelrobot.com

      Matt_SFM 1 Reply Last reply Reply Quote 0
      • Matt_SFM
        Matt_SF @Lindon
        last edited by

        @Lindon I'm trying things theses days... Download the project folder because it contains SNEX scripts. With this you'll be sure to use the correct ranges when spreading :

        SNEX ModSpread

        Develop branch
        Win10 & VS17 / Ventura & Xcode 14. 3

        Matt_SFM 1 Reply Last reply Reply Quote 0
        • Matt_SFM
          Matt_SF @Matt_SF
          last edited by

          @Christoph-Hart BTW, is it possible for a SNEX node to have more than one modulation output ? I used the code you provided some time ago :

          	bool handleModulation(double& v)
          	{
          		v = something;
          	
          		return true;
          	}
          

          Develop branch
          Win10 & VS17 / Ventura & Xcode 14. 3

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          9

          Online

          1.7k

          Users

          11.8k

          Topics

          103.2k

          Posts