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)
or
2) choose to "Compile DSP networks as dll" I get a bunch of "undefined symbol" linker errors from such asUndefined 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.
-
@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
https://forum.juce.com/t/reference-to-point-is-ambiguous/24884/8
-
This post is deleted! -
@langermarc19 Did you ever manage to get this working?
-
@DanH I got it slightly working but not really a while ago. However since Christoph implemented pitch/time stretching recently I haven't looked into it any further.
-
@d-healey is there pitch shifting? I'm not after time stretching for this product. I've used the Faust one but it's not quite good enough. It's for Scriptnode.
-
-
@d-healey Yep not what I'm after for this but thanks (unless it can be repurposed for SN?)
-
-
@d-healey so to be as clear as we can:
With time stretching on...
- I have a little tune in C Major, it lasts a bar, I pitch it up to E, and it still lasts a bar...?
-
@Lindon That's the idea
-
@d-healey so where are the pitch options? Can only see the timestretching options in the sampler voice settings
-
@DanH just enable timestretching and add a pitch modulator.
-
@Christoph-Hart Ok so this is like a breaking change if we want to add in time stretching to an existing project which also uses pitch modulations?