HISE Logo Forum
    • Categories
    • Register
    • Login

    Wrap modulation value

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 355 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.
    • ustkU
      ustk
      last edited by

      @Christoph-Hart What would be the way to wrap a mod value once it's hitting the max or min of a parameter, if any?

      I've made an infinite parameter that makes its associated to wrap the value once reaching max, and it's working nicely in the DSP.
      But what about the modulation matrix in this context?

      Hise made me an F5 dude, browser just suffers...

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @ustk
        last edited by ustk

        My answer might just live in the Modulation range, but I can't seem to make it doing anything different than the default behaviour.

        First question -> is this even possible with a standard parameter? (aka not a Matrix Modulator one)

        I'm trying to set the properties below to limit the mod range with MM.setMatrixModulationProperties(properties);

        const var properties = {
          SelectableSources: true,
          DefaultInitValues: {
            SET1: {
              Intensity: 1.5,
              Mode: "Bipolar",
              IsNormalized: false
            }
          },
          RangeProperties: {
            SET1: {
        		InputRange:
        		{
        			min: 0.0,
        			max: 3.0,
        			middlePosition: 1.5,
        			stepSize: 0.0,
                	Inverted: false
        		},
        		OutputRange:
        		{
        			min: 0.3333, // shouldn't this restrict the range?
        			max: 0.6667,
        			middlePosition: 0.5,
        			stepSize: 0.0,
                	Inverted: false
        		},
        		mode: "Linear",
        		UseMidPositionAsZero: true
        	}
          }
        };
        

        The UI knob properties are matching the above ones.

        Also, the doc object example looks a bit different
        (mode & UseMidPositionAsZero are not at the same place compared to MM.getMatrixModulationProperties())

        mod.setMatrixProperties({
        	InputRange: // defines the range of the UI knob
        	{
        		min: 0.0,
        		max: 1.0,
        		middlePosition: 0.5,
        		mode: "NormalizedPercentage",
        		stepSize: 0.0,
        	},
        	OutputRange: // defines the range of the scaled modulation output signal
        	{
        		min: 0.0,
        		max: 1.0,
        		middlePosition: 0.5,
        		stepSize: 0.0,
        		UseMidPositionAsZero: false
        	}
        });
        

        Hise made me an F5 dude, browser just suffers...

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

          @ustk I don't fully understand what you're after but there is no defined consistent out of bounds range behaviour for the modulators, as it depends on the target parameter (eg. panning get's truncated, but gain & pitch can be extended to the max values of the engine).

          ustkU 3 Replies Last reply Reply Quote 0
          • ustkU
            ustk @Christoph Hart
            last edited by ustk

            @Christoph-Hart Thanks.

            Since I understand I cannot wrap the modulation, nor exceed the bounds, my idea is:

            • for an end value of 0-1, set a 0-3 knob without mapping but from 1 to 2 (so the 0-1 is just offset to 1-2 inside the 0-3 knob)
            • modulate the 0-3 knob, with the OutputRange set to 0.333 - 0.667 so no matter where you push the modulation, it will (should) never exceed the 0-3 range (because the value will always be between 1 and 2)
            • Then in the DSP, it will be easy to map this 0-3 value+mod back to 0-1, with wrapping as a cherry on the top

            But the properties to limit the OutputRange aren't working for simple parameters...

            How does it sound? Feasible?

            0              1              2              3
            |--------------|--------------|--------------| <- knob range
                           |--------------|                <- useful value inside knob, will be converted in DSP to 0-1
            |--------------------------------------------| <- total modulation range,
                            <-------------2------------->     will be wrapped in the
            <-------------1------------->                     0-1 domain in DSP
            

            Hise made me an F5 dude, browser just suffers...

            1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @Christoph Hart
              last edited by ustk

              @Christoph-Hart said in Wrap modulation value:

              @ustk I don't fully understand what you're after but there is no defined consistent out of bounds range behaviour for the modulators, as it depends on the target parameter (eg. panning get's truncated, but gain & pitch can be extended to the max values of the engine).

              So in the end, do you mean a 0-1 UI knob could theoretically modulate a -1 to 2 DSP knob?
              I tried but failed...

              Here the UI knob is 0-1, mod intensity to full
              ModBound.gif

              Hise made me an F5 dude, browser just suffers...

              1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @Christoph Hart
                last edited by

                @Christoph-Hart Since InputRange and OutputRange only work with Matrix Modulators, I'm just stuck on how to set the modulation range of a ScriptFX parameter...
                In fact, just being able to limit the Intensity would fix my problem

                Hise made me an F5 dude, browser just suffers...

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

                19

                Online

                1.9k

                Users

                12.5k

                Topics

                108.8k

                Posts