Forum

    • Register
    • Login
    • Search
    • Categories

    Connecting Rubberband Library for use in HISE

    C++ Development
    3
    9
    130
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • langermarc19
      langermarc19 last edited by

      Hi everyone. I've been trying to get the rubberband time stretching library working within a HISE project to create a custom Scriptnode node which involves some time stretching.

      I created a new node template using "Create C++ third party node template",
      cloned the rubberband library (github link) into ProjectFolder/DspNetworks/ThirdParty/src. Then I built the rubberband libraries using meson, as instructed in the README included in the rubberband repository.

      However when I try to either 1) Build the new node inside XCode (after exporting from the AutoGeneratedProjucerFile)
      or
      2) choose to "Compile DSP networks as dll" I get a bunch of "undefined symbol" linker errors from such as

       Undefined symbols for architecture x86_64
      > Symbol: RubberBand::RubberBandStretcher::setTimeRatio(double)
      
      

      I know that typically this happens when a function in a .cpp file isn't scoped correctly, but both the node file and the rubberband functionality are all header-only and so I don't think that's the problem here.

      Any help appreciated! Spent a lot of time trying to solve this already.

      Christoph Hart 1 Reply Last reply Reply Quote 1
      • Christoph Hart
        Christoph Hart @langermarc19 last edited by

        @langermarc19 did you link the compiled rubberband libraries?

        Christoph Hart langermarc19 2 Replies Last reply Reply Quote 0
        • Christoph Hart
          Christoph Hart @Christoph Hart last edited by

          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).

          P langermarc19 2 Replies Last reply Reply Quote 0
          • P
            parabuh @Christoph Hart last edited by

            @Christoph-Hart maybe you are able to do some guide how to use 3rd party libs from scratch in hise? I was able to import some free libs but then I don't know how to use them in hise.

            Christoph Hart 1 Reply Last reply Reply Quote 0
            • Christoph Hart
              Christoph Hart @parabuh last edited by

              @parabuh The C++ template is somewhat of a guide as it gives you all methods you need to implement, the rest (how to actually call your library methods) is specific to every library.

              Using it in HISE is as simple as exporting the DLL then it will show up as node (or item in the Hardcoded FX modules) the next time you start HISE.

              1 Reply Last reply Reply Quote 1
              • langermarc19
                langermarc19 @Christoph Hart last edited by langermarc19

                @Christoph-Hart I attempted to do this by adding a path to the compiled rubberband.dylib in the "external libraries to link" section of the auto generated projucer file, and my node contains a #include to the header where the API methods are declared. Let's see what happens when I include the .cpp....

                1 Reply Last reply Reply Quote 0
                • langermarc19
                  langermarc19 @Christoph Hart last edited by

                  @Christoph-Hart this resulted in an error:

                  Reference to 'Point' is ambiguous
                  

                  seemingly because there is a juce::Point<ValueType> class and also a macOS defined Point class. I'm going to dig deeper into what's actually happening when I'm building/linking these libraries. This is at the edge of my C++ experience.

                  Christoph Hart 1 Reply Last reply Reply Quote 0
                  • Christoph Hart
                    Christoph Hart @langermarc19 last edited by

                    @langermarc19 You might need to swap the order of includes so that the rubber band library is included before the JuceHeader.h file

                    https://forum.juce.com/t/reference-to-point-is-ambiguous/24884/8

                    langermarc19 1 Reply Last reply Reply Quote 0
                    • langermarc19
                      langermarc19 @Christoph Hart last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      21
                      Online

                      982
                      Users

                      6.6k
                      Topics

                      60.7k
                      Posts