HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. iamlamprey
    3. Best
    • Profile
    • Following 0
    • Followers 0
    • Topics 10
    • Posts 39
    • Groups 0

    Posts

    Recent Best Controversial
    • [Tutorial] Real-Time Pitch Shifting with Rubberband

      Hello my old friends.

      Here's how to get realtime Pitch-Shifting working with the Rubberband Library.

      First, your project either needs to be GPL (open-source), or you need to pay the developers of Rubberband for a license (and Christoph!). Also this is just for Windows, I don't use or own a Mac so YMMV.

      First, there's some dependancy conflicts between JUCE and Rubberband. To fix, we have to open the file:

      HISE/hi_tools/simple_css/Renderer.h

      And replace EVERY instance of the Rectangle class with juce::Rectangle instead. I've tried the preprocessor flags and it didn't fix the problem, so I just ended up replacing everything manually. Don't use Find & Replace, there's some other "Rectangle" variables that you don't want to override, just go through manually and replace every Rectangle with the strictly type juce variant.

      I also replaced the copy variable in the Positioner class to rectangleCopy because I think this will also cause problems on Windows. Lines 333 and 336.

      Next, in your Projucer, add the preprocessor flag HI_ENABLE_CUSTOM_NODES=1.

      Okay, now we can build HISE. When it's done, open a project and hit Tools -> Create C++ Third Party Node Template. Name it anything.

      We'll also need to tell HISE where our Custom Nodes are stored, open HISE Settings -> Development -> Custom Node Path and point it to {*YourProjectName*}\DspNetworks\ThirdParty. Click "Save".

      We just created our Third Party node, but it won't do much good without the Rubberband Library.

      Navigate to that same folder in a File Browser, there should be a src folder, if there isn't, create it. Clone the Rubberband Repository into that folder.

      Open your custom node in any editor. Let's start with the includes, which go AFTER the JUCE one:

      // Original Code:
      #pragma once
      #include <JuceHeader.h>
      
      // What we're adding:
      #include "src/rubberband/single/RubberBandSingle.cpp"
      #include "src/rubberband/rubberband/RubberBandStretcher.h"
      

      Inside the primary node struct, declare a unique pointer to hold our RubberBandStretcher:

      // Original Code:
      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;
      
      // What we're adding:
      std::unique_ptr<RubberBand::RubberBandStretcher> rb;
      

      In the Prepare method, assign the RubberBandStretcher with the OptionProcessRealTime Option:

      void prepare(PrepareSpecs specs)
      {   
        rb = std::make_unique<RubberBand::RubberBandStretcher> (specs.sampleRate, specs.numChannels, RubberBand::RubberBandStretcher::Option::OptionProcessRealTime);
        rb->reset(); // not sure if this is necessary, but I don't think it hurts   
      }
      

      RubberBand uses Block-Based processing, not per-sample. So we'll use the process method, not the processFrame one:

      template <typename T> void process(T& data)
      {
        if (!rb) return; // safety check in case the rb object isn't constructed yet
      
        // "data" is given to us by HISE, it has multiple channels of audio values as Floats, as well as some utility functions:
        
        int numSamples = data.getNumSamples(); // the number of audio samples in the block
        auto ptrs = data.getRawDataPointers(); // RB expects Pointers, not just values
      
        rb->process(ptrs, numSamples, false); // This is the Pitch-Shifting Part
      
        // the "false" is just telling RB if we're using the last audio buffer, which we're not if it's realtime
      
        int available = rb->available(); // Checks to see if there is repitched audio available to return
      
        if (available >= numSamples)
        {
          // We have enough output, retrieve the repitched audio
          rb->retrieve(ptrs, numSamples);
        }     
      }
      

      Okay, we're almost there. We just need to tell the Pitch Shifter how much we want to shift the signal by. It uses a Frequency Ratio, so:

      1.0 = None
      0.5 = - Octave
      2.0 = + Octave
      

      If you'd prefer to have a Semitones-based control, I recommend using the conversion function in the ControlCallback of your UI element instead. It looks like this:

      // In the GUI Slider Control Callback
      // This assumes the Slider goes from -12 to +12, with a stepSize of 1.0
      
      inline function onknbPitchControl(component, value)
      {
        // bypass if semitones = 0 (save CPU & reduce latency)
        if (value == 0)
          pitchShifterFixed.setBypassed(true);
        else
          pitchShifterFixed.setBypassed(false);   
        
        // Calculate the FreqRatio from Semitone Values 
        local newPitch = Math.pow(2.0, value / 12.0);       
        pitchShifterFixed.setAttribute(pitchShifterFixed.FreqRatio, newPitch);
      };
      
      

      Either way, we need to connect our Custom Node's only Parameter to our RubberBand Object.

      In the createParameters method:

      void createParameters(ParameterDataList& data)
      {
        {
          // Create a parameter like this
          parameter::data p("FreqRatio", { 0.5, 2.0 }); // Between -1 Octave and +1 Octave
          // The template parameter (<0>) will be forwarded to setParameter<P>()
          registerCallback<0>(p);
          p.setDefaultValue(1.0);
          data.add(std::move(p));
        }
      }
      

      And finally, we connect the Parameter in the setParameters method:

      template <int P> void setParameter(double v)
      {
        if (P == 0) // This is our first paramater, if you add more, increment the index.
        {
          rb->setPitchScale(v); // passes the parameter value "v" to our pitch-shifter
        }
      }
      

      Okay, that's all the code we need.

      Now hit Export -> Compile DSP networks as dll.

      Assuming everything worked, you can now add a HardcodedMasterFX and load your pitch-shifter.

      Notes / Thoughts:

      1. I haven't tested this extensively, there might be other Includes that cause problems depending on your HISE installation.
      2. There's about 30-50ms Latency which is effectively unavoidable, the Pitch Shifter needs a window of a certain size in order to perform calculations.
      3. There might be other RubberBand::RubberBandStretcher::Option values that make it sound better for transients etc, I haven't tested them yet.
      4. Make sure your Parameter doesn't go to 0, as the Library uses it for dividing somewhere.

      Here's the full node, if you copy-paste it, make sure you rename it to whatever your node was or HISE won't find it:

      // ==================================| Third Party Node Template |==================================
      
      /*
      
      Don't forget, you have to replace every instance of Rectangle in HISE/hi_tools/simple_css/Renderer.h to juce::Rectangle
      
      And replace both "copy" variables in that same file with copyRectangle
      
      Then build HISE with HI_ENABLE_CUSTOM_NODES=1 preprocessor
      
      */
      
      #pragma once
      #include <JuceHeader.h>
      
      #include "src/rubberband/single/RubberBandSingle.cpp"
      #include "src/rubberband/rubberband/RubberBandStretcher.h"
      
      namespace project
      {
      using namespace juce;
      using namespace hise;
      using namespace scriptnode;
      
      // ==========================| The node class with all required callbacks |==========================
      
      template <int NV> struct rubberband: public data::base
      {
        // Metadata Definitions ------------------------------------------------------------------------
        
        SNEX_NODE(rubberband);
        
        struct MetadataClass
        {
          SN_NODE_ID("rubberband");
        };
        
        // set to true if you want this node to have a modulation dragger
        static constexpr bool isModNode() { return false; };
        static constexpr bool isPolyphonic() { return NV > 1; };
        // set to true if your node produces a tail
        static constexpr bool hasTail() { return false; };
        // set to true if your doesn't generate sound from silence and can be suspended when the input signal is silent
        static constexpr bool isSuspendedOnSilence() { return false; };
        // Undefine this method if you want a dynamic channel count
        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;
      
        // declare a unique_ptr to store our shifter
        std::unique_ptr<RubberBand::RubberBandStretcher> rb;
        
        // Scriptnode Callbacks ------------------------------------------------------------------------
        
        void prepare(PrepareSpecs specs)
        {   
          // assign the shifter to our pointer
          rb = std::make_unique<RubberBand::RubberBandStretcher> (specs.sampleRate, specs.numChannels, RubberBand::RubberBandStretcher::Option::OptionProcessRealTime);
          rb->reset(); // not sure if this is necessary, but I don't think it hurts   
        }
        
        void reset(){}    
        void handleHiseEvent(HiseEvent& e){}  
        
        template <typename T> void process(T& data)
        {
          if (!rb) return; // safety check in case the rb object isn't constructed yet
          
          int numSamples = data.getNumSamples();
          auto ptrs = data.getRawDataPointers(); // RB needs pointers
      
          rb->process(ptrs, numSamples, false); // 
      
          int available = rb->available();
      
          if (available >= numSamples)
          {
            // We have enough output, retrieve it directly
            rb->retrieve(ptrs, numSamples);
          }     
        }
        
        template <typename T> void processFrame(T& data){}
        
        int handleModulation(double& value)
        { 
          return 0;   
        }
        
        void setExternalData(const ExternalData& data, int index)
        {
          
        }
        // Parameter Functions -------------------------------------------------------------------------
        
        template <int P> void setParameter(double v)
        {
          if (P == 0)
          {
            if (!rb) return; // Safety check in case the Parameter is triggered before the rb object is constructed
            rb->setPitchScale(v); 
          }
          
        }
        
        void createParameters(ParameterDataList& data)
        {
          {
            // Create a parameter like this
            parameter::data p("FreqRatio", { 0.5, 2.0 });
            // The template parameter (<0>) will be forwarded to setParameter<P>()
            registerCallback<0>(p);
            p.setDefaultValue(1.0);
            data.add(std::move(p));
          }
        }
      };
      }
      
      posted in Blog Entries
      iamlampreyI
      iamlamprey
    • RE: So close to Rubberband-ing

      (laughs in thall)

      Writeup soon 🙂

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: So close to Rubberband-ing

      @d-healey The actual DSP in the third-party node is pretty simple, the main stuff was getting all of the includes to work together (and using the right class in RB that doesn't need 2 separate buffers)

      The RB time-stretching stuff might also be possible using this third-party node and just swapping a few things out, I don't want to give out false hope just yet but

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: So close to Rubberband-ing

      Progress! I have it compiling and "working" in Ableton, as long as I stick to ASIO and not MME (which means I can't record any clips just yet).

      MME / Windows Audio crashes instantly.

      posted in General Questions
      iamlampreyI
      iamlamprey
    • So close to Rubberband-ing

      Hello old friends.

      I have a real-time pitch-shifter working completely in HISE using Rubberband, but unfortunately it's throwing all kinds of strange errors when it comes time to export the .VST:

      0e5f6c96-61bf-4f36-9d6f-a2ec0a6bd182-image.png

      ChatGPT seems to think it has something to do with the Rubberband library using #include windows.h> before the JUCE stuff, which is causing clashes.

      Christoph also mentioned:

      @Christoph-Hart said in Connecting Rubberband Library for use in HISE:

      Just looked at their repo and it seems that they have a single .cpp file that you can add. Just include that in your node file and you should be good (you might have to adapt some Rubberband compiler flags to enable a single translation unit build).

      If anyone can help me finish this one, I'll post the full writeup for it on the forum 🙂

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: RE: Buffer.detectPitch()

      @resonant here you go:

      HiseSnippet 3990.3oc6as0aabbEdojWmXVm1j1ffh9zTl1ZJaYIRJYI6PqXYIQZIDcKhz1A0v0cH2gjSzxc1t6PIQmHfBz9Pdq8w9V+qje.o.AHuWfh9dg6u.2yYl8J0JYIk3f.TQCPs6Lm4b9lys4LyXtsmnMy2W3YjKeygtLibW0rwPGYuk6Q4NFqshQt2xTNvg4cSIyWdKikF5R88YVF4xM9CPRxckKYn97h6sD0l5zlE2jgwiD71r0484x3V2dwOhaaWmZwZx6mf5YWbs1BmkE1hA.bF2rjgKs8t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83+1+7dYhXnBDiSVWW4KOht1nxoDwH6QDeYUYQmEPGUdalfNYzZlfFx1eDP+h6cp.8u+msx2D3fznuP.aKzo6YD4K9ud9eNK0sp8yAxe6LT2vr4DT2X8z+.TceRf9Jl0bnPwIVmcb+hi22NQtvKiI1pbQxvKRFdQxvKRFdQxv85T9hjgWjL7hjgWjL7+ySF9iME9s411v2PtqzIEeOyfKPZpTzbzriivjuMoIG4zFGskjIMQFmNoIv8rNJivyewlQ8ROCupYe75y08j4gXn54ULgFK0DJUJ6bu1hHibQdCSMCds3X6ehurjPraep5vKOWW7UxyD+Gq6Dxu.XU8+lO0QH9dp2IOltGi7.lCyCOQ+xmvObku9z9CWw8T+CWQe8QM8nN9tB+zlEVedS7+1VIaDuOFXMR0k+jr8kETuL65E2qNLIybLMnxAdpStM7DcSb2DieR+dXN1i7N80zjf9Lt0fK855GGykNcWjwq3dW+g+USk5dWtRHFavwjd0fnTaLgIhwepYPzXXqocx2P3HBOq+XOfcXROd2trzIExZBceoj1d23Vd2E2gA41R5M+qVbcvKj5oVl77oKN6+tlxzd8yM0vkfQljuM1suWcyNwqWb7S00K9cNdO+W032MP46iKS66CYzm11S7r156fD8keSUKv71QUpvUL2.emT1XuQWME+Q27r1sSypiLvJm2ANy4cfyddG3sNuCbty6.m+7Nva+pGHtn08GHE80grPIYaWSWNYtvZugnCi+GTk9oS
      

      This is specifically for low guitar tunings (46hz) so it probably won't work well for the Sine Synth

      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: SlotFX (Hardcoded) Persistence?

      @Christoph-Hart said in SlotFX (Hardcoded) Persistence?:

      @iamlamprey you could add the module to the user preset state so it gets recalled correctly.

      Ah cool, I didn't know about this function, thank you.

      @Chazrox said in SlotFX (Hardcoded) Persistence?:

      @iamlamprey sorry to piggy back your post.

      No problem 🥳

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: FX plugin Dev needed

      @griffinboy said in FX plugin Dev needed:

      We just don't know what the steps are

      Most of it is very straightforward, the ugly duckling is Windows Codesigning, lots of shady companies that make it unnecessarily difficult and annoying

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: So close to Rubberband-ing

      Yeah the Rubberband license is pretty...

      ...flexible. 😎

      posted in General Questions
      iamlampreyI
      iamlamprey
    • [Tutorial] How to Reset Parametric EQ Nodes

      Since there's no API call to do it directly, you can create a blank Parametric EQ and export it as a Base64 String:

      First grab a clean EQ's state:

      const cleanState = myEQ.exportState();
      Console.print(cleanState); // copy the base64 from the console
      
      // then store it as a raw string:
      // (this can be an external .js file to keep everything neat)
      const cleanStateString = "180.3ocMNEsCBBCD6lDLw+F3WPDR7AMpy36S1EYIic31Pkud8.g6o1z1q8jmpwPf7fH85PGBhMoE89WX4SX+NPrNscn7LrcnSEBnFDhji8sUFaD8ANi.3qp5ZoSc29WWjTpMQxKipHxdR1R5AYC81w3zb3lIXXu+IRxRinL.JZLV8ok8D3+dg5iF2iCpn27gKiaVR89ZrnQ4bncZ.qfwnS7rkAIQmdh7kuYw7QtXVLeQD9AnwXTa";
      
      // Now use that to restore any Parametric EQ Module (or any effect really):
      // ideally in a button callback or something:
      
      inline function onButton1Control(component, value)
      {
      	if (!value)
      		return;
      
      	myBadEQ.restoreState(cleanStateString); // easy reset for any module
      };
      

      Here's a full snippet demonstrating it:

      HiseSnippet 2866.3oc0Yt7iibUEGt7LimjtCIYBj.QnnPQmHQO3Id55c4DkD+1se+1ss2Lodbsc0td3td3WihRqrHPDJHVwNjhPBIV.BV.QrAkAEjhXCKPhEr.Q9O.DHjX2vspxks691YXRKHRLK5Yt+tm647cO0sN04NcMSCIfkkgIVncasXB.KzWHbyE51iRMRPQGKeZrPOS3IBlBZ.aSEoWBbxKYBr.1XIWLQvxBHiEJzUy4ZZnctFl2e9audRAUAcIvFILrNFJRfRJZJ1aTqEunhpZVAYPKEssrlNddIC8TFpFNPrtZ3CvlHHMVXHnhfqYWIL1gBVivB8MCKIKRRISKQRChQAFPyyQPxMffjgilTfklFNGfiUfDKz0yHqX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Muo7W8Kgut9brWefuMHLGCg4XHLGa8Yiexs+m91rl4Sl8s7sAg4XneR4LL++yc.74QLzDjLMtij+sdca75Q8Tf6acue4G6Dtr6X7K3xtZJxJ2QR5rtBYgjW1ERcYWH8kcgLW1ExdYWH2kcg7+mWn6uJnDN1FZ9Wc.CqbsL9WyLzVuQf8uA9FDSAB
      
      posted in Blog Entries
      iamlampreyI
      iamlamprey