HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. Dan Korneff
    3. Posts
    • Profile
    • Following 1
    • Followers 6
    • Topics 194
    • Posts 2,653
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Default Oversampling Filter

      @tomekslesicki is selectable in the oversampling node.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Plugin processing no sound...

      @Adam_G the issue I was having seemed to be related to how gestures were implemented. There's a proposed fix from Christoph on github that works for me.
      I'm not sure if it's related to the issues you guys are having, but might be in the same area since the parameters were overhuled recently.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: How I tell an instance of a ScriptSynth to load a particular DSP network?

      @Christoph-Hart yup. But I really just wanna compile my C++ node with 60 parameters and toss it in a hardcoded FX 😀

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: How I tell an instance of a ScriptSynth to load a particular DSP network?

      @d-healey said in How I tell an instance of a ScriptSynth to load a particular DSP network?:

      That's a work of art

      And that's not even a complex arrangement yet 😆

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: How I tell an instance of a ScriptSynth to load a particular DSP network?

      @Christoph-Hart Even with folded nodes, I have an onslaught of knobs at the top of the container.

      1000009653.jpg

      Luckily, I have a monitor just for the DSP network.

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: How I tell an instance of a ScriptSynth to load a particular DSP network?

      @Orvillain Those are almost ALL custom C++ nodes. I just need a ton of parameters exposed for tweaking

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: How I tell an instance of a ScriptSynth to load a particular DSP network?

      @d-healey Am I the only one that ends up with networks like this?

      Screenshot 2025-06-24 150119.png

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: How I tell an instance of a ScriptSynth to load a particular DSP network?

      @Christoph-Hart said in How I tell an instance of a ScriptSynth to load a particular DSP network?:

      Consider it a good thing that this missing feature nudges you towards using hardcoded FX modules :)

      Only if it nudges you towards increasing the parameter limit for hardcoded effects. 😉
      Some of my basic nodes can have 40-50 parameters.

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: The big bug tier list

      @Christoph-Hart excellent. I'll give it a try now.

      posted in Bug Reports
      Dan KorneffD
      Dan Korneff
    • RE: Sticky knobs

      Is this an IPP thing? Appears to be related to drawing the impulse waveform.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Slider issue

      @pcs800 it looks like you aren't dividing the frames into the correct vertical pixel height.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Plugin processing no sound...

      @ustk said in Plugin processing no sound...:

      isPluginParameter

      There's definitely something going on with this. It's affecting automation in the latest version, so I can only imagine it's causing other issues as well. Hopefully I can investigate tonight

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Running a shell script

      @tomekslesicki said in Running a shell script:

      it still opens in XCode here becuase it's set as the default app for .sh files.

      Ahh.. I see. Well, you have 2 options with that. #1 is to change the extension.
      I think the .command will automatically open terminal.

      The other option is to use tell application "Terminal" which would activate the Terminal and run your script:
      https://superuser.com/questions/195633/applescript-to-open-a-new-terminal-window-in-current-space

      I haven't done that before, but here's what GPT says:

      Force Terminal to launch and execute the script by explicitly passing the shell command to Terminal.app:
      
      #!/bin/zsh
      osascript <<EOF
      tell application "Terminal"
          activate
          do script "zsh '${PWD}/DeletePlugin.sh'"
      end tell
      EOF
      
      This launches Terminal, activates it, and runs your script using zsh, ignoring file type associations
      
      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: Running a shell script

      @tomekslesicki Use the .sh extension and then chmod +x on the file so it's executable.

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: Running a shell script

      @tomekslesicki I think something like this:

      #!/bin/zsh
      osascript <<EOF
      do shell script "rm -rf '/Library/Audio/Plug-Ins/Components/Plugin.component'; rm -rf '/Library/Audio/Plug-Ins/VST3/Plugin.vst3'" with administrator privileges
      EOF
      
      killall Terminal
      
      

      with administrator privileges will pop up the password dialog

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: Running a shell script

      What about using an AppleScript instead? This will pop up the MacOS system dialog to enter a password.

      posted in Scripting
      Dan KorneffD
      Dan Korneff
    • RE: How to get CPU serial number using HISE?

      @CatABC You have to enable this setting in projucer and rebuild HISE:
      proID.png

      Now HISE will use the new code to gather system IDs.

      Then you need to set JUCE_USE_BETTER_MACHINE_IDS=1 in your project so the exported plugin references the correct system ID.

      Screenshot 2025-06-11 080150.png

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: C++ Third Party node SliderPack, Span & sfloat

      @ustk Using jmap was just the quickest way to show how it works. You'll want to use interpolation for sure.
      As for the counter, a single instance should work fine... unless you're channels are updating at drastically different times.

      posted in C++ Development
      Dan KorneffD
      Dan Korneff
    • RE: C++ Third Party node SliderPack, Span & sfloat

      @ustk @Christoph-Hart @griffinboy I think something like this? Beware, I didn't listen to the example waveshaper and the constant DC offset will probably not be nice to your speakers:

      // ==================================| Third Party Node with Crossfaded Waveshaper |==================================
      
      // 1. Maintain two tables: `oldCurve` contains the currently active shape; `newCurve` is
      //    regenerated when the user tweaks the curve parameter.
      // 2. On parameter change, rebuild `newCurve` and reset `fadeCounter` to 0 to start a crossfade.
      // 3. During the next `FadeSamples` (64) samples, blend outputs from both tables using a
      //    linearly increasing alpha. This avoids abrupt jumps and eliminates zipper noise.
      // 4. After the crossfade completes, copy `newCurve` into `oldCurve` and continue normal
      //    processing until the next tweak.
      //
      // Configuration:
      // • `TableSize` controls the resolution of each lookup table (1024 samples).
      // • `FadeSamples` defines the crossfade length (default: 64 samples).
      // • `mapSampleToCurve()` can be replaced with any shaping function (tanh, polynomial, etc.)
      //
      // Usage:
      // • Adjust the “Curve” parameter at runtime.
      // • Increase `FadeSamples` for a longer, smoother transition or decrease for faster response.
      
      #pragma once
      #include <JuceHeader.h>
      
      namespace project
      {
      using namespace juce;
      using namespace hise;
      using namespace scriptnode;
      
      // ==========================| The node class with all required callbacks |==========================
      
      template <int NV> struct CrossfadeBufferExample : public data::base
      {
          // Metadata Definitions ------------------------------------------------------------------------
          SNEX_NODE(CrossfadeBufferExample);
          struct MetadataClass { SN_NODE_ID("CrossfadeBufferExample"); };
      
          // Polyphony / tail / silence handling
          static constexpr bool isModNode()            { return false; }
          static constexpr bool isPolyphonic()         { return NV > 1; }
          static constexpr bool hasTail()              { return false; }
          static constexpr bool isSuspendedOnSilence() { return false; }
          static constexpr int  getFixChannelAmount()  { return 2; }
      
          // Define the amount and types of external data slots you want to use
          static constexpr int NumTables        = 0;
          static constexpr int NumSliderPacks   = 0;
          static constexpr int NumAudioFiles    = 0;
          static constexpr int NumFilters       = 0;
          static constexpr int NumDisplayBuffers = 0;
      
          // DSP tables and crossfade state
          static constexpr int TableSize    = 1024;
          static constexpr int FadeSamples  = 64;
          float oldCurve[TableSize];
          float newCurve[TableSize];
          int   fadeCounter = FadeSamples;
          float fadeInc     = 1.0f / FadeSamples;
      
          // Prepare: initialize lookup tables
          void prepare(PrepareSpecs specs)
          {
              float initShape = 0.5f;
              for (int i = 0; i < TableSize; ++i)
              {
                  float x = i / float(TableSize - 1);
                  oldCurve[i] = newCurve[i] = mapSampleToCurve(x, initShape);
              }
              fadeCounter = FadeSamples;
          }
      
          void reset() {}
          void handleHiseEvent(HiseEvent& e) {}
      
          // Frame processing
          template <typename T> void process(T& data)
          {
              static constexpr int NumChannels = getFixChannelAmount();
              auto& fixData = data.template as<ProcessData<NumChannels>>();
              auto fd = fixData.toFrameData();
              while (fd.next())
                  processFrame(fd.toSpan());
          }
      
          template <typename SpanType> void processFrame(SpanType& frame)
          {
              for (int ch = 0; ch < getFixChannelAmount(); ++ch)
              {
                  // normalize input [ -1,1 ] -> [0,1]
                  float in = (frame[ch] * 0.5f) + 0.5f;
                  in = jlimit(0.0f, 1.0f, in);
      
                  float out;
                  if (fadeCounter < FadeSamples)
                  {
                      float idx   = in * (TableSize - 1);
                      int   i0    = int(idx);
                      float frac  = idx - i0;
                      float vOld  = jmap(frac, oldCurve[i0], oldCurve[i0 + 1]);
                      float vNew  = jmap(frac, newCurve[i0], newCurve[i0 + 1]);
                      float alpha = fadeCounter * fadeInc;
                      out = jmap(alpha, vOld, vNew);
      
                      if (++fadeCounter == FadeSamples)
                          memcpy(oldCurve, newCurve, sizeof(newCurve));
                  }
                  else
                  {
                      float idx  = in * (TableSize - 1);
                      int   i0   = int(idx);
                      float frac = idx - i0;
                      out = jmap(frac, oldCurve[i0], oldCurve[i0 + 1]);
                  }
      
                  // back to [-1,1]
                  frame[ch] = (out * 2.0f) - 1.0f;
              }
          }
      
          // Curve mapping function
          float mapSampleToCurve(float x, float curveShape)
          {
              float drive = jmap(curveShape, 1.0f, 10.0f);
              return std::tanh((x * 2.0f - 1.0f) * drive);
          }
      
          // Handle parameter changes
          template <int P> void setParameter(double v)
          {
              if constexpr (P == 0)
              {
                  for (int i = 0; i < TableSize; ++i)
                  {
                      float x = i / float(TableSize - 1);
                      newCurve[i] = mapSampleToCurve(x, float(v));
                  }
                  fadeCounter = 0;
              }
          }
      
          void createParameters(ParameterDataList& data)
          {
              // Curve shape parameter
              parameter::data p("Curve", { 0.0, 1.0 });
              registerCallback<0>(p);
              p.setDefaultValue(0.5);
              data.add(std::move(p));
          }
      };
      } // namespace project
      
      
      posted in C++ Development
      Dan KorneffD
      Dan Korneff
    • RE: The big bug tier list

      Automation bug added here:

      Link Preview Image
      Previous automation data overwritten on playback when Read/Write automation enabled · Issue #749 · christophhart/HISE

      Description: When Read/Write automation is enabled on the plugin, any previously recorded automation data is overwritten during playback. Haven't confirmed the commit that breaks yet. Steps to Reproduce: Load your host (e.g. Logic, Cubas...

      favicon

      GitHub (github.com)

      posted in Bug Reports
      Dan KorneffD
      Dan Korneff