Connecting Rubberband Library for use in HISE
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)
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.
@langermarc19 did you link the compiled rubberband libraries?
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).
@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.
@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.
langermarc19 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....
@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.
@langermarc19 You might need to swap the order of includes so that the rubber band library is included before the JuceHeader.h file
This post is deleted!