HISE Logo Forum
    • Categories
    • Register
    • Login

    bug: "ScriptedParameters"

    Scheduled Pinned Locked Moved Bug Reports
    7 Posts 3 Posters 1.8k 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.
    • S
      signe
      last edited by

      I found a bug concerning "ScriptedParameters". The following remote-control code does not work well (the second knob).

      function onControl(number, value)
      {
      	
      	switch(number)
      	{
      		case Knob1:
      		{
      			ScriptFX.setAttribute(ScriptFX.ScriptedParameters.Knob1, value);
      			break;
      		}
      		case Knob2:
      		{
      			ScriptFX.setAttribute(ScriptFX.ScriptedParameters.Knob2, value);
      			break;
      		}
      	};
      }  
      

      while the following does work well.

      function onControl(number, value)
      {
      	
      	switch(number)
      	{
      		case Knob1:
      		{
      			ScriptFX.setAttribute(0, value);
      			break;
      		}
      		case Knob2:
      		{
      			ScriptFX.setAttribute(1, value);
      			break;
      		}
      	};
      }
      
      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        That behaves I would expect. I'm not seeing ScriptedParameters in the API.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • S
          signe
          last edited by

          sorry, I can't figure out what you say. Do you mean the above example works well in your system?

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by

            I meant that there is no mention of a ScriptedParameters object in the API documentation so I would not expect your first example to work.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              I think I added the ScriptedParameters object before adding the properties directly so I don't use it anymore and it might be broken. What if you use ScriptFX.Knob2 directly?

              And are you sure the Knob2 is the second widget you are defining? What's your onInit callback?

              1 Reply Last reply Reply Quote 0
              • S
                signe
                last edited by

                The above example is one that was automatically generated using the widget command "connect module parameter". I set the Knob2 in Interface script & linked it to Script FX's Knob2.

                1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  I have plans for changing this wizard and add another way of connecting modules simply by adding the module ID and parameter ID to the JSON:

                  const var Knob = Content.addKnob("Knob", 62, 6);
                  // [JSON Knob]
                  Content.setPropertiesFromJSON("Knob", {
                    "width": 129,
                    "height": 47,
                    "processor": "LFO Modulator 2",
                    "parameter": "Frequency"
                  });
                  // [/JSON Knob]
                  

                  This is a far more stable and bug prone way to implement a simple parameter connection (the wizard has to do a lot of regex processing which can lead to a lot of edge cases).

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

                  25

                  Online

                  1.8k

                  Users

                  11.9k

                  Topics

                  104.0k

                  Posts