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

    Posts

    Recent Best Controversial
    • 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
    • RE: How to get CPU serial number using HISE?

      @CatABC I set the repo back to private.
      Here's a link to the files:
      https://hub.korneffaudio.com/index.php/s/M6kgXeaZ9BstR7Q
      This will replace the existing method with the new one. No need to keep the old one since it's flawed.

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

      @ps I'm getting some reports from beta testers that automation is bunked in Cubase. Gonna take a closer look this weekend.

      posted in Bug Reports
      Dan KorneffD
      Dan Korneff
    • RE: Simple ML neural network

      @Orvillain loadNAMModel is news to me. Haven't tinkered with it yet.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: machine learning to capture analog tech

      @Morphoice The basics are they are using ML models to analyze and replicate the behavior of analog equipment. They run various test signals through them and use the results to train a model that can predict how the device will respond to any input signal.
      The Kemper Profiler uses a different approach. They capture the full response of an amp or effect at different settings. It creates a snapshot of the device and builds a profile. This is closer to convolution than ML.
      The real problem you're going to run into with time-based dynamics (like a compressor with slow release) is the model will start to emphasize the non-linear behavior. The result of these ML compressors ends up sounding like saturators rather than compressors.
      I'm on the same path as @griffinboy where I'm focusing on making models of specific components and inserting them between other analog models.
      If you want to start tinkering with Neural models in HISE, here's a thread of my starting process:
      https://forum.hise.audio/topic/8701/simple-ml-neural-network/108?_=1748359797127
      @griffinboy also posted a thread about some details to the training scripts.
      I haven't had time to fully dig in for the last few months, but plan to soon.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Whitebox Packages - plugins changes into folders

      @parabuh said in Whitebox Packages - plugins changes into folders:

      If i set my username it works but i think it will not work on different machine.

      If you select "keep owner and group" when you add the file to Packages, it SHOULD use the owner/group of the logged in user who is installing. Try that.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Whitebox Packages - plugins changes into folders

      @parabuh I've found that this is 100% a permissions issue.
      In my setup, If I place a binary on my network share and create an installer via packages, the bundle will turn into a folder after install. If the binary is placed on my local machine and I create an installer, the result is a proper bundle.

      posted in General Questions
      Dan KorneffD
      Dan Korneff
    • RE: Bad CPU type in executable

      @Christoph-Hart said in Bad CPU type in executable:

      @d-healey file size is smaller but the real reason is I just forgot that people still use intel machines :)

      Any chance you can swap it out with the UB? Virtualization of ARM processors is still in the experimental phase.

      posted in Newbie League
      Dan KorneffD
      Dan Korneff
    • RE: Build failure when exporting plugin on OSX, xcbeautify: Bad CPU type in executable

      I'm seeing this in the latest version of HISE as well on multiple MacOS:

      batchCompileOSX: line 7: /HISE/tools/Projucer/xcbeautify: Bad CPU type in executable
      

      macOS 15.4.1 + Xcode 16.3
      macOS 13.7.5 + Xcode 15.4

      building from the autogenerated projucer file works as expected.

      posted in Newbie League
      Dan KorneffD
      Dan Korneff
    • RE: HEADS UP: Server.downloadFile() issue on macOS Sequoia - and a solution

      I think I've been here before:
      https://forum.hise.audio/topic/8742/how-to-debug-server-isonline

      The functions check google and amazon to see if they are reachable, but some macos systems have issues with http calls.
      I've updated the source to point to my https domain. I reasoned it wasn't important if they are online but unable to reach my server.

      posted in Bug Reports
      Dan KorneffD
      Dan Korneff
    • RE: In plugin help system

      @Christoph-Hart This new found magical power is intoxicating! 😳 😁

      posted in General Questions
      Dan KorneffD
      Dan Korneff