Forum
    • Categories
    • Register
    • Login

    Exclude UI elements from updateConnectedComponentsFromModuleState()

    Scheduled Pinned Locked Moved Unsolved General Questions
    4 Posts 2 Posters 34 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.
    • Oli UllmannO
      Oli Ullmann
      last edited by

      Hey all! :-)

      Is there a way to exclude certain UI elements from UserPresetHandler.updateConnectedComponentsFromModuleState(), even if they are connected to a module via processorID / parameterId?

      Thanks,
      Oli

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

        @Oli-Ullmann yes, you can give it a list of properties to remove from the module state, if they are parameter IDs they will be static

        Oli UllmannO 1 Reply Last reply Reply Quote 0
        • Oli UllmannO
          Oli Ullmann @Christoph Hart
          last edited by Oli Ullmann

          @Christoph-Hart

          Okay, I'm a little lost. I tried the following:

          ph.updateConnectedComponentsFromModuleState([“rvsldAttackGlobalEnv1”]); <- The name of the slider

          ph.updateConnectedComponentsFromModuleState([rvsldAttackGlobalEnv1]); <- The slider as an object

          Both give me the following error message:
          argument amount mismatch: 1, Expected: 0

          Basically, I have a problem with the mod system here:
          I control the attack of an envelope with a slider via processorId/parameterId. The attack slider is saveInPreset and has a matrixTargetId. I have set an LFO as the modulation source for the slider.

          So I modulate the attack of the envelope with this LFO.

          When I load a preset, updateConnectedComponentsFromModuleState() is called in the postCallback. Not for the envelope. Its module status is not stored in the preset at all. I need this for other elements. However, since the slider is connected to the envelope via the processorID/parameterID, it is still updated. The problem here is the modulation. Apparently, the sequence is as follows:

          1. Preset is loaded (all UI elements with saveInPreset are loaded correctly)
          2. Modulation of the envelope attack by the LFO begins.
          3. Only now is the slider updated by updateConnectedComponentsFromModuleState(), which causes the slider to receive the incorrect, already modulated value of the envelope attack.

          I think one solution would be to control the attack of the envelope not via processorId / parameterId, but to do the whole thing manually in SliderControlCallback. Then the slider won't be updated. However, this is not a good solution in principle, as HISE's processorId / parameterId system can then no longer be used with sliders that are connected to module parameters via it and also are modulable via the matrixTargetId .

          That's why my idea was to exclude the attack slider from updateConnectedComponentsFromModuleState().

          Or do you have another idea?

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

            @Oli-Ullmann said in Exclude UI elements from updateConnectedComponentsFromModuleState():

            The attack slider is saveInPreset

            That's your problem. You're basically saving it twice. Just set saveInPreset to false and let the module state do its job. You can use this method

            https://docs.hise.dev/scripting/scripting-api/userpresethandler/index.html#updateconnectedcomponentsfrommodulestate

            to update all sliders after the preset has been loaded.

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

            12

            Online

            2.1k

            Users

            13.2k

            Topics

            114.7k

            Posts