Forum
    • Categories
    • Register
    • Login
    1. Home
    2. Orvillain
    3. Posts
    • Profile
    • Following 1
    • Followers 0
    • Topics 91
    • Posts 690
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Wavetable creation

      @dannytaurus Do you know whether the mode used is resynthesis or resample?? Coz I tried the drag and drop thing, and the resulting wavetables did not sound great. Not as good as the ones I made in the resample mode inside Wavetable Creator.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Wavetable Synthesiser Preset Link to Combo Box

      Use this as a control callback on the menu:

          inline function populateSynthSoundMenu(component, value)
          {
              local wavetables = Engine.getWavetableList();
      
              if (!isDefined(wavetables) || wavetables.length == 0)
                  return;
      
              component.set("items", JoinItems(wavetables));
          }
      

      You'll also need this helper:

          inline function JoinItems(sa)
          {
              local s = "";
      
              for (i = 0; i < sa.length; i++)
              {
                  s += sa[i];
      
                  if (i < sa.length - 1)
                      s += "\n";
              }
      
              return s;
          }
      

      It means that each time you click the menu, it will update itself with the latest wavetable list.

      Now each one of these can be resolved from the menu in one of two ways.

      1. Use the menu 'value' to get the index of it in the list - indexes starting from 1.
      2. Use the '.getItemText()' function on the menu component, to get the actual text.

      Option 1 can be used directly with the LoadedBankIndex parameter. I don't know how that would slot into your project, but in principle this is how you'd do it.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Best practice for stepped frequency parameters in SVF EQ

      @the-red_1 Right click your Script FX1 module and use one of those "copy reference" functions... there's usually one or two that pop up depending on what type of module is loaded.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Wavetable creation

      @DanSound You should set the root note of your file to the same root note played when sampling the source. That will cure your transpose issue.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Is there a way to pickup host transport messages directly within a custom node??
      #pragma once
      #include <JuceHeader.h>
      
      namespace project
      {
      using namespace juce;
      using namespace hise;
      using namespace scriptnode;
      using namespace snex;
      
      /**
          Smallest possible BPM listener example.
          Demonstrates:
          - TempoListener registration
          - tempoChanged() callback
          - BPM flowing into the audio graph
      */
      struct MinimalBPMListener : public data::base,
                                  public hise::TempoListener
      {
          SNEX_NODE(MinimalBPMListener);
          struct MetadataClass { SN_NODE_ID("MinimalBPMListener"); };
      
          static constexpr bool isModNode()            { return true;  }
          static constexpr bool isPolyphonic()         { return false; }
          static constexpr bool hasTail()              { return false; }
          static constexpr bool isSuspendedOnSilence() { return false; }
          static constexpr int  getFixChannelAmount()  { return 1; }
      
          // --- Tempo sync ---
          hise::DllBoundaryTempoSyncer* tempoSyncer = nullptr;
          double bpm = 120.0;
      
          // Exposed modulation value
          double lastOut = 120.0;
      
          // --- TempoListener ---
          void tempoChanged(double newTempo) override
          {
              bpm = newTempo;
              lastOut = bpm; // make it observable
          }
      
          // --- Lifecycle ---
          void prepare(PrepareSpecs specs)
          {
              if (tempoSyncer == nullptr && specs.voiceIndex != nullptr)
              {
                  tempoSyncer = specs.voiceIndex->getTempoSyncer();
                  if (tempoSyncer != nullptr)
                      tempoSyncer->registerItem(this);
              }
      
              // Initialize output
              lastOut = bpm;
          }
      
          void reset() {}
      
          ~MinimalBPMListener() override
          {
              if (tempoSyncer != nullptr)
              {
                  tempoSyncer->deregisterItem(this);
                  tempoSyncer = nullptr;
              }
          }
      
          // --- 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())
                  fd.toSpan()[0] = (float)lastOut;
          }
      
          int handleModulation(double& value)
          {
              value = lastOut;
              return 1;
          }
      
          void setExternalData(const ExternalData&, int) {}
      };
      
      }
      
      

      This is a minimal example of how to get your custom C++ node to listen to the host BPM. Code above doesn't actually DO anything with the BPM information. But it proves the concept.

      posted in C++ Development
      OrvillainO
      Orvillain
    • RE: Wavetable creation

      TBH, and certainly IMO.... Wavetable creation is not as optimized or fluid as it could be. The wavetable creator often crashes for no discernable reason, and the resynthesis modes do not sound as good as the resample mode does - when it works.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: How do I remove or mask out sections of a path?

      @dannytaurus Pretty similar to my fix above too. I just wanted a LAF solution rather than another panel hierarchy!

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: How do I remove or mask out sections of a path?

      Oh... wait... I get it.... tweak the draw area for the vertical fix, and draw coloured boxes over the edges to mask it all out.

                  laf.registerFunction("drawAnalyserPath", function(g, obj)
                  {
                      var a = obj.area;
                      var stroke = 2.0;
                      var pad = 2;
                      var a2 = [ a[0], a[1] + pad, a[2], a[3] - 2*pad ];
      
                      g.setColour(UIColours.modLFOLine);
                      g.drawPath(obj.path, a2, stroke);
      
                      var cover = 4;
                      g.setColour(UIColours.modPanelBackground);
                      g.fillRect([a[0] - cover, a[1] - 1, cover * 2, a[3] + 2]);
                      g.fillRect([a[0] + a[2] - cover, a[1] - 1, cover * 2, a[3] + 2]);
                  });
      
      posted in General Questions
      OrvillainO
      Orvillain
    • How do I remove or mask out sections of a path?
      namespace UILFOPlotter
      {
          
          const lfoPlotters = [
              Content.getComponent("PlotterLFO1"),
              Content.getComponent("PlotterLFO2"),
              Content.getComponent("PlotterLFO3")
          ];
      
          reg laf = undefined;
      
          inline function init()
          {
              laf = UILAF.ids.LFOPlotter;
      
              if (laf != undefined)
              {
                  laf.registerFunction("drawAnalyserBackground", function(g, obj)
                  {
                      g.fillAll(UIColours.modPanelBackground);
                  });
      
                  laf.registerFunction("drawAnalyserGrid", function(g, obj)
                  {
                      
                  });
      
                  laf.registerFunction("drawAnalyserPath", function(g, obj)
                  {
                      g.setColour(UIColours.modLFOLine);
                      
                      // draw the analyser path as a stroked line instead of a filled area
                      g.drawPath(obj.path, obj.area, 2.0);
                  });
              }
      
              for (plotter in lfoPlotters)
              {
                  plotter.setLocalLookAndFeel(laf);
                  plotter.set("itemColour3", 0);
                  plotter.set("bgColour", 0);
                  plotter.set("itemColour", 0);
                  plotter.set("itemColour2", 0);
                  plotter.set("textColour", 0);
              }
          }
      }
      

      960accb5-7fa3-47e6-9448-f4b2deac736d-image.png

      I have a floating tile set to plot the output of an LFO. I am setting up a look and feel and I'm registering the drawAnalyserPath function. As you can see it is working, but the drawn path has two issues:

      1 - It draws too far on the vertical axis; meaning my line gets clipped by the bounding box of the panel.
      2 - It draws the, presumably zero, data points at the far left and far right edges of the panel.

      How can I fix these two issues?

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Crash when loading files into Wavetable Creator (Resample Mode)

      @Christoph-Hart

      I'm still getting a crash when loading files into the wavetable creator and resample mode. It doesn't seem to happen when I use one of the other resynthesis modes.

      >	HISE Debug.exe!juce::MemoryBlock::MemoryBlock(const juce::MemoryBlock & other) Line 42	C++
       	HISE Debug.exe!hise::getMemoryBlockFromWavetableData(const juce::ValueTree & v, int channelIndex) Line 1324	C++
       	HISE Debug.exe!hise::WavetableSound::WavetableSound(const juce::ValueTree & wavetableData, hise::Processor * parent) Line 1357	C++
       	HISE Debug.exe!hise::SampleMapToWavetableConverter::rebuildPreviewBuffersInternal() Line 712	C++
       	HISE Debug.exe!hise::SampleMapToWavetableConverter::refreshCurrentWavetable(bool forceReanalysis) Line 1597	C++
       	HISE Debug.exe!hise::SampleMapToWavetableConverter::setCurrentIndex(int index, juce::NotificationType n) Line 1637	C++
       	HISE Debug.exe!hise::SampleMapToWavetableConverter::parseSampleMap(const juce::ValueTree & sampleMapTree) Line 854	C++
       	HISE Debug.exe!hise::WavetableConverterDialog::loadSampleMap::__l2::<lambda>() Line 787	C++
       	[External Code]	
       	HISE Debug.exe!hise::WavetableConverterDialog::run::__l2::<lambda>(std::function<void __cdecl(void)> & f) Line 942	C++
       	[External Code]	
       	HISE Debug.exe!hise::LockfreeQueue<std::function<void __cdecl(void)>>::callForEveryElementInQueue(const std::function<bool __cdecl(std::function<void __cdecl(void)> &)> & f) Line 1316	C++
       	HISE Debug.exe!hise::WavetableConverterDialog::run() Line 936	C++
       	HISE Debug.exe!hise::DialogWindowWithBackgroundThread::LoadingThread::run() Line 397	C++
       	HISE Debug.exe!juce::Thread::threadEntryPoint() Line 96	C++
       	HISE Debug.exe!juce::juce_threadEntryPoint(void * userData) Line 118	C++
       	HISE Debug.exe!juce::threadEntryProc(void * userData) Line 66	C++
       	HISE Debug.exe!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97	C++
       	[External Code]	
      
      

      That's the debugger callstack in VS2022. The main error I get is Exception thrown: read access violation.
      other was nullptr.

      It makes no difference as to whether I use a SampleMap in a sampler, or I drag and drop the sample directly into the creator.

      Is this anything you know about or could investigate??

      posted in Bug Reports
      OrvillainO
      Orvillain
    • RE: Modulation Matrix FX plugin crashes in DAW

      @resonant

      My project is setup for this:

      HISE_NUM_SCRIPTNODE_FX_MODS=32
      HISE_NUM_POLYPHONIC_SCRIPTNODE_FX_MODS=32
      NUM_HARDCODED_FX_MODS=32
      NUM_HARDCODED_POLY_FX_MODS=32
      ENABLE_ALL_PEAK_METERS=1
       JUCE_LOG_ASSERTIONS=1
      

      If you're going to be using hardcoded modulators, then you're definitely going to want to activate some of the mods. Saying that, I don't think having them set to zero would cause a crash. Would just cause modulation to not work.

      If you're using a hardcoded module, are you initialising the SlotFX properly when your plugin loads? I'm not 100% certain, but if you're not ensuring the slot actually has the effect and then you're trying to map modulation to it at any point, that could cause a null pointer and a crash.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Component search - how does it work?

      @Chazrox In the UI editor, the foldable panel on the left hand side that shows all of your added components. There's a search box at the top of it, but it is a bit ropey.

      posted in General Questions
      OrvillainO
      Orvillain
    • Component search - how does it work?

      Component search seems a bit iffy to me. If I search for something like "Engine1SamplerTabArea" then depending on what the names of my other components are ... I might end up with a load of stuff in the results that just isn't anything remotely to do with my original search term.

      How does it work?

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Modulation Matrix FX plugin crashes in DAW

      No crashes in my plugin no. If you're getting a crash, the initial idea I'd suggest is to check for deferenced or null pointers. Are you trying to access any variables, functions, or namespaces that exist when you're in HISE standalone, that might not exist in the compiled plugin??

      Using the Builder API can be a cause of plugin crashes too.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: CSS in production plugins?

      Hmmmm I started using it for the modulation matrix controller, but there were things I wanted to do that I couldn't, so I wrote my own script panel matrix controller using LAF instead.

      LAF is - I guess - a subset of the JUCE graphics API, so I'm more comfortable with LAF. CSS hasn't really fully clicked for me yet, if I'm honest. I've never needed it for anything else I've ever done, because none of it was web based and it was all Python, c++, JUCE, Lua, and C#.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Plotter with a thin line

      @David-Healey Oh weird. Must've deleted it somehow. Fixed.

      posted in Snippet Waiting Room
      OrvillainO
      Orvillain
    • Plotter with a thin line
      HiseSnippet 1768.3oc2Xs0biaaEFz1LSrSSaRZlN4g7.FOcxnsxUQxV1RNYxDYKa4U6JsRwR6tYaeXGHRPIDSBv.BIaMc1o8w9yK+Fxuf7Tdc6AjTRfwZscT1la7AYdtA7gCN2n6JENznHgDYsU+ogTj0evt2TtZT8QDFG07Dj0aY6H7EREMRgNdZHIJh5hrrV+LsBVatAJ94697iI9DtCcAKD5IBlCsEKfoVvsasGx78aPbo8YAFZWtVSGAuNrUiAvrtcQTHw4BxP5iHZ0VyFceRzHj0eyduJGP71sREJ06fhGVoh2AUbH6Rok2qb4AtjA6VspS08qTEY8Fm5xTBYOEAPOxZiiEtS6MRbIOYCdBKhMvmpIJg5A6bB6FBeW8QTyEUeDy2s6LuTDBYY2cgOa8De16a2l4xlyegu6chEfWXgoCzZsrva8LvqjI7JZ.uk.o0LfzFytF6KI7nPQDUlBE7BN3R3LPYtjiBDi4F2VeTseDnrzMhRz0A46Z2yQxBUKjjDv0jqnROBDLYBxDcQq88qYWW.ZvUEBHWPaHAh4Vja+hE2AC+buOcKHdJRgmPjXehG9yvyrxQRgyRKgCwukPbwQb2FTpeNvhs.EKHoCYQvx0XL2QwD7ba6JIWdDm3OEbcGCQkCkfWxc6cvdyTY3NXwfu5da8u1BCOCK3Aw3G46mq3UMZTJ9AV8Wn2g6vVblj8JV7MgiPjvmVP6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zLOPHTihmGLHS0HXV8vS4D3j6Zpe2QP..zrEFoOSoEXY6KZSzeJTccmbSgMGxERZRC7L0vFGoDAyN.Hqu2tT0hEx9Loi7nm15P8qGVOltH8AEOzP9Tm6WO+jKuxau5Kn61lFseBcohEOM+8C7GWIgNre9l485JNtbBcmxrGkeh24mlJu6E62Iu2f+wgo1eYiAeQ75mRe0fyNOuAdJ8.uGmeuprAoxeF7juvdMdX55e34bm7dmc7fTZ3GOS6Q8Tzvjoh+m1GTtvfp7tKNulOdU4Sh5T+ocdPdPoIU5M7qOqXm1Sa06v6epxc+5J29S5.ucR9SfW2Ow9C9hgO7vBnWeojqcGSI+ywg7yis0A++BkMd6nbdx1uRQ4MNX25+9dvtyEi0evZaBz3B9dU6GMNnGLOkCE1cNm5q+5bq0z0SRnKpoSFnh6FS.eR5KSEVRSakJrzLg+rrGADGo34NIewgNQ5Mi4.mad7+00MsaqowkPweEh4cY.LYzycbxtTWyvcWUC2aUMr7pZ39qpgGrpFVYUMr5sandv0iFC8xRRMQn1cOMoht07VnVqi9eJuzmhC
      

      This gives a plotter LAF like the following image:
      eed66c58-f35c-40be-bbcf-d4196f35a79c-image.png

      posted in Snippet Waiting Room
      OrvillainO
      Orvillain
    • RE: Delay / preloading when moving loop handles or toggling reverse on my custom sampler

      As far as I know, based on conversations with Christophe, this stuff is unavoidable. If you want any of these seamless start/end/loop/direction changes, you need to write a custom sampler from scratch in c++ or SNEX, and use it in scriptnode.

      posted in General Questions
      OrvillainO
      Orvillain
    • RE: Invalid use of incomplete type vSIMDType

      @David-Healey Well I don't know what else to tell you: https://forum.juce.com/t/int64-t-vs-juce-int64/45358

      As reported here - it is a typedef issue, specifically affecting Linux compiles.

      Actually, I might have that wrong. That thread is about juce:int_64.

      posted in Bug Reports
      OrvillainO
      Orvillain
    • RE: Invalid use of incomplete type vSIMDType

      @David-Healey said in Invalid use of incomplete type vSIMDType:

      @Orvillain said in Invalid use of incomplete type vSIMDType:

      I think this is a Linux compiler thing.

      Linux user here

      Yeah I know. You're getting the issue with the dev branch but not your fork right? Your error:

      ../../../../../hise/hi_streaming/../JUCE/modules/juce_dsp/containers/juce_SIMDRegister.h:85:11:
      error: invalid use of incomplete type ‘using juce::dsp::SIMDRegister<long long int>::NativeOps = struct juce::dsp::SIMDNativeOps<long long int>’
      {aka ‘struct juce::dsp::SIMDNativeOps<long long int>’}
      

      That is telling you that SIMDRegister/SIMDNativeOps is being used incorrectly. The only thing I can think of is that it is being called with long long int, which is correct for Windows and Mac... but on Linux I think it should be called with long int - not long long int.

      I'd check that line in your fork and dev branch and make sure it is the same, if you haven't already.

      posted in Bug Reports
      OrvillainO
      Orvillain