HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. the red_1
    T
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 0

    the red_1

    @the red_1

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    the red_1 Unfollow Follow

    Latest posts made by the red_1

    • SNEX Distortion parameter not responding to ScriptFX knob connection

      i’m working on a DSP project in HISE and I’ve run into a problem I’d like to ask your help with.
      Capture d'écran 2025-11-07 181125.png Capture d'écran 2025-11-07 181420.png
      I have created a SNEX node (dsp_disto) in a “SNEX Shaper” block, with an internal parameter (knob) inside the SNEX node that works correctly — when I turn that knob, the distortion effect responds as intended.
      However, I also created a GUI knob in script_fx1 (knob ID = “1”) and wired it to the SNEX node’s parameter (knob ID = “0”). The wiring shows up correctly in the connection graph, but when I turn the script-FX knob the effect does not respond — the SNEX knob works, but the external GUI knob does not trigger the processing change.

      I suspect the issue might be how the SNEX node is receiving the parameter from the external knob (perhaps through setParameter<0>(…) or other template method). I looked through the HISE forums (for example “Linking parameters to SNEX” discussion) and I saw there are subtle requirements for correctly binding external parameters to SNEX.

      Would you be willing to take a look at the relevant parts of my SNEX code and wiring and perhaps point out what I might be missing? I can provide the SNEX code, screenshots of the wiring in HISE, and any additional details. I greatly appreciate any hints or suggestions you might have.

      Many thanks in advance for your time and help — it would mean a lot.

      SNEX CODE :

      template struct dsp_disto
      {
      SNEX_NODE(dsp_disto);

      float parameter0 = 0.0f;      
      float smoothedValue = 0.0f;  
      
      float getSample(float input)
      {
          float drive = 1.0f + parameter0 * 19.0f;
          float x = input * drive;
          float y = Math.tanh(x);
          return y;
      }
      
      
      template <int P> void setParameter(double v)
      {
          if (P == 0)
              parameter0 = (float)v;
      }
      
      template <typename T> void process(T& data)
      {
      
          smoothedValue += (parameter0 - smoothedValue) * 0.01f;
      
          for (auto ch : data)
          {
              for (auto& s : data.toChannelData(ch))
                  s = getSample(s);
          }
      }
      
      template <typename T> void processFrame(T& data)
      {
          smoothedValue += (parameter0 - smoothedValue) * 0.01f;
      
          for (auto& s : data)
              s = getSample(s);
      }
      
      void reset() {}
      void prepare(PrepareSpecs ps) {}
      void setExternalData(const ExternalData& d, int index) {}
      

      };

      posted in General Questions
      T
      the red_1