HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. griffinboy
    3. Posts
    • Profile
    • Following 8
    • Followers 7
    • Topics 110
    • Posts 861
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Drift.... and how to design it....

      @Lindon

      I went over the top and fully modelled VCO drift a while ago including the interactions between voices.

      You can collect pitch draft data from synths by holding a seriously long note, and then running the file through praat and creating a csv of pitch values. Then use python scripts to organize and clean it up.
      You can then use Matlab or python to analyze the data and figure out how to get a match.

      ... Or just use the values as a LUT
      Real analog oscillators have a kind of vibrato as well as slow drift. And they also have moments where they quite suddenly bend out of tune.

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: ScriptNode Band Splitters - Control Frequencies?

      @Lindon

      When compiled? I've had problems where changing the cutoff doesn't work

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: ScriptNode Band Splitters - Control Frequencies?

      @Lindon

      Linkritz filters I assumed

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Roadmap to HISE 5

      @Christoph-Hart

      I will send you the node if I can't find the cause.
      I haven't had any luck yet, I'm going to download a few builds of hise and see where it went wrong.
      I'm getting inconsistent behavior.

      It may be tricky for you to troubleshoot my node, I doubt you want to sift through that code! It's a whole WT engine, 10 headers.

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: ScriptNode Band Splitters - Control Frequencies?

      @DanH

      I'm not sure if it's possible without latency if you want the bands to sum perfectly. Maybe if using convolution / FIR?

      You can try measure the latency of the filters I've not actually tested it, I assume there to be additional latency but I may have been mistaken.

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: ScriptNode Band Splitters - Control Frequencies?

      @griffinboy

      https://1drv.ms/u/c/6c19b197e5968b36/ESv7Pm8TL7FDqO6I521nz4UBp-jlUb6w0fVZpwXutzk_aA?e=zho87t

      C++ Multiband split.

      These filters *may" have some latency (linear phase). But I haven't checked yet to see if that's true.
      (Should be easy to check just run two sine generators at once: one with Multiband splitters on it, one without. Then check for phase cancellation between the two sines)

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: ScriptNode Band Splitters - Control Frequencies?

      @DanH

      Oh, that's been an issue for a while (over a year). I've been using c++ splitters instead, I'll post them here

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Roadmap to HISE 5

      @griffinboy

      @Christoph-Hart

      Check this out!

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Roadmap to HISE 5

      @griffinboy

      Okay I've replicated the issue. When compiling dsp networks as .dll in the new version of Hise (latest commit) something is wrong. My c++ oscillator aliases.

      Wheras, when I compile in an older version of Hise
      (HISE-6583025bbac9d7b4524de97e095dd2b85c6fd5be)
      The node works as expected without any audio issues. It allows me to load this .dll in both builds of Hise. Which is odd too since there is a version mismatch.

      I'm making a video one sec -

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Roadmap to HISE 5

      @griffinboy

      *edit

      The issue suddenly disappeared after clearing all the modules in the hise project and recompiling networks. I compiled the networks in an old build of Hise, then when opening the new build, everything was fixed. I have no clue at all what happened there. Maybe there was some issue caused by using an old hise project with a new version of Hise.

      I was a few months behind after all.
      How strange, sorry can't replicate the issue now!

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Roadmap to HISE 5

      @Christoph-Hart

      Fantastic thank you looking forward to it.

      I've just tested out the latest branch, it's exciting.
      There is a disturbing issue I've found though, where one of my c++ synthesiser engines now aliases horribly, where it didn't in a previous version of Hise. I'm investigating it now. Strangely, a simple c++ sine synth doesn't have the same issue, I'm hoping I can track down what is the matter.

      I'm rolling back Hise so that I can compare with an older build.
      Maybe nothing is wrong with Hise, and it's due to some other mistake I've made. I'm hoping that's the case.

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Roadmap to HISE 5

      @Christoph-Hart

      LFOs for custom parameters seems to be broken. The LFOs do nothing.

      4511291c-ff24-4c6d-882e-fcf5400097c6-image.png

      Does it work differently now?

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Synth Group Unison - Instant Update to voice count change

      @Christoph-Hart

      Thanks for the examples! Thanks for taking the time.
      The goal was to have identical behavior to the synth group unison in order to match with other hise modules behavior wise, I'll have a look

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Synth Group Unison - Instant Update to voice count change

      @Christoph-Hart

      Thank you Christoph!
      I'll wait to see

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Synth Group Unison - Instant Update to voice count change

      @Christoph-Hart

      When you place a [hardcoded custom c++ node synth]
      inside a synth group, the synth group unison will correctly create the additional voices needed for the unison, but of course the detune will have no effect since it is not received in the c++ node.

      Is there a way to propagate / receive the unison detune value inside the c++ node? I assume it's some kind of polyphonic modulation applied to each voice.

      This is in the interest of integrating custom sound generators with Hise, in a more skin tight fashion.

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Monitor changes inside Scriptfx - the correct method? (broadcasters listeners)

      @ustk

      GCs are the only way to send an array into a node, unless you encode it as audio or other.

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Monitor changes inside Scriptfx - the correct method? (broadcasters listeners)

      @ustk

      Nice thanks for posting the working answer

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Monitor changes inside Scriptfx - the correct method? (broadcasters listeners)

      @ustk

      Christoph wrote an example for exactly that somewhere... I wonder where it was I'm not sure, search for global cable posts!

      That template above has a version of it. Use GPT to untangle my comments itll understand mostly what I was writing there

      posted in General Questions
      griffinboyG
      griffinboy
    • RE: Monitor changes inside Scriptfx - the correct method? (broadcasters listeners)

      @ustk

      Global cables can be used.

      
      // Griffin_Node.h
      // -----------------------------------------------------------------------------
      
      #pragma once
      #include <JuceHeader.h>
      
      //#include "src/.h"
      //#include "src/.h"
      //#include "src/.h"
      //#include "src/.h"
      
      //#include "src/Utils_DelayInterpolation.h"
      //#include "src/Utils_General.h"
      //#include "src/Utils_XSimd.h"
      
      namespace project
      {
      
          #ifndef M_PI
          #define M_PI 3.14159265358979323846
          #endif
      
          using namespace juce;
          using namespace hise;
          using namespace scriptnode;
      
      
          /*
              Griffin_Node
              -----------
              Description of entire program + specs
          */
      
      
          /*
      
          // Global Cable Example (communicate arbitrary data to Hise)
          enum class GlobalCables
          {
              dataCable = 0
          };
          using cable_manager_t = routing::global_cable_cpp_manager<SN_GLOBAL_CABLE(-389806413)>;
      
          // Template the node with this
          template <int NV> struct Griffin_Node: public data::base,
                                          public cable_manager_t
      {
      
          // In c++ we can then:    
          // create a json object
          hise::JSONObject obj;
          // write values into the JSON object
          obj["thingies"] = [0,1,2,3,4];
          // send the object back to HISE
          this->sendDataToGlobalCable<GlobalCables::dataCable>(obj);
          // thus we can send any type of data to Hise
      
          // then in Hise we can do:
          const var rm = Engine.getGlobalRoutingManager();
          const var cableName = rm.getCable("cableName");
          cableName.registerDataCallback(function(data)
          {
              Console.print("DATA: " + trace(data));
          });
          
      
          */
      
      
          // pre C++20
          // You cannot change the way this node is templated
          template <int NV>
          // name
          struct Griffin_Node : public data::base
          {          // name
              SNEX_NODE(Griffin_Node);
      
              struct MetadataClass
              {              // name
                  SN_NODE_ID("Griffin_Node");
              };
      
              // name
              Griffin_Node()
              {
                  // Callback for global cables
                  // (from HISE to your C++ node, this is the way to register callbacks).
                  //this->registerDataCallback<GlobalCables::dataCable>([](const var& funky)
                  //{
                  //    jassertfalse;
                  //});
              }
      
      
              //==============================================================================
              // Node Properties 
              //==============================================================================
      
              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; }
      
              // Add external data slots to the node UI
              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;
      
      
              /*
                  AudioEffect
                  -----------
                  Description
              */
      
              class AudioEffect
              {
              public:
                  AudioEffect(float initiaParam = 5000.0f)
                  {
                      localParam = initiaParam;
                  }
      
                  // Initialize the effect if needed
                  void prepare(double sampleRate)
                  {
      
                  }
      
                  // Process a block of samples
                  inline void process(float* samples, int numSamples)
                  {
                      // Iterate over the samples
                      for (int i = 0; i < numSamples; ++i)
                      {
      
                      }
                  }
      
                  // Update the parameters
                  inline void updateParam1(float newParam)
                  {
                      localParam = newParam;
                  }
      
              private:
                  float localParam;
              };
      
      
              /*
                  Main Node
                  -----------
                  Description
              */
      
              // Initialize the effect
              void prepare(PrepareSpecs specs)
              {
                  float sampleRate = specs.sampleRate;
                  float numChannels = specs.numChannels;
      
                  // Initialize both effects (does nothing by default)
                  leftChannelEffect.prepare(sampleRate);
                  rightChannelEffect.prepare(sampleRate);
              }
      
              // Reset (called when the plugin is reloaded)
              void reset() {}
      
              // Process audio blocks (audio enters the node here)
              template <typename PD>
              inline void process(PD& d)
              {
                  auto& fix = d.template as<ProcessData<2>>();
                  auto  blk = fix.toAudioBlock();
                  float* L = blk.getChannelPointer(0);
                  float* R = blk.getChannelPointer(1);
                  int    n = d.getNumSamples();
      
                  // Process each channel separately through their own audioEffect instance
                  leftChannelEffect.process(L, n);
                  rightChannelEffect.process(R, n);
              }
      
              /*
                  Parameter Handling
                  -----------
                  Description
              */
      
              // Update parameters
              template <int P>
              inline void setParameter(double v)
              {
                  if (P == 0) {
                      leftChannelEffect.updateParam1(static_cast<float>(v));
                      rightChannelEffect.updateParam1(static_cast<float>(v));
                  }
                  if (P == 1) {
                      // Do something with value (v)
                  }
      
              }
      
              // Create GUI parameters
              void createParameters(ParameterDataList& data)
              {
                  {
                      parameter::data p("Param", { 0.0, 1.0, 0.01 });
                      registerCallback<0>(p);
                      p.setDefaultValue(5000.0);
                      data.add(std::move(p));
                  }
                  {
                      parameter::data p("Param2", { 0.0, 1.0, 0.01 });
                      registerCallback<0>(p);
                      p.setDefaultValue(5000.0);
                      data.add(std::move(p));
                  }
      
              }
      
              // When this header file gets run for the first time, setParameter gets called with the default knob values
      
      
              /*
                  External Data
                  -----------
                  Description
              */
      
              // span<dyn<float>, NUM_CHANNELS> externalBuffer;
      
              void setExternalData(const ExternalData& ed, int index)
              {
                  /*
      
                  if(data.isNotEmpty())
                  {
          
                      // ExternalData data = ed;
          
                      // float audioSampleRate = data.sampleRate;
                      // float audioNumChannels = data.numChannels;
                      // float audioNumSamples = data.numSamples;
          
                      // ed.referBlockTo(externalBuffer[0], 0);
                      // ed.referBlockTo(externalBuffer[1], 1);
      
                      // Alternatively convert the data to the juce::AudioSampleBuffer class
                      // auto buffer = data.toAudioSampleBuffer();
          
                  }
      
                  */
              }
      
              /*
                  Hise Event
                  -----------
                  Description
              */
      
              void handleHiseEvent(HiseEvent& e)
              {
                  /*
      
                  if (e.isNoteOn())
                  {
                      float note = e.getNoteNumber();
                  }
      
                  */
              }
      
      
              /*
                  Modulation Output
                  -----------
                  To enable, set isModNode() to true)
              */
      
              // ModValue modOut;
      
             // bool handleModulation(double& value)
             // {
                 // return modOut.getChangedValue(value);
             // }
      
              // Use this to call handleModulation
              // modOut.setModValueIfChanged( set mod to something );
      
              //==============================================================================
              // Unused Functions (Required by compiler)
              //==============================================================================
      
              SN_EMPTY_PROCESS_FRAME;
      
            	//SN_EMPTY_HANDLE_EVENT;
            	//SN_EMPTY_SET_EXTERNAL_DATA;
              //SN_EMPTY_CREATE_PARAM;
      
          private:
              AudioEffect leftChannelEffect;
              AudioEffect rightChannelEffect;
          };
      }
      
      
      posted in General Questions
      griffinboyG
      griffinboy