Guide: How to use Rubberband for pitch shifting in JUCE

I’m making this post because it took me a few hours to figure out how to use the Rubberband pitch-shifter with JUCE and I thought it’d be nice to have a little guide for other beginners.

  1. I’d just download the repo as a zip from Github
    a. You can build it pretty easily by opening \otherbuilds\rubberband-library.vcxproj and building in Visual Studio
    b. Now you should have a rubberband-library.lib file under rubberband-default\otherbuilds\x64\Debug\rubberband-library.lib
  2. You need to link the library and headers in the Projucer
    a. Under the exporters section, press Visual Studio 2022 (or whatever), and under external libraries to link add the path to your rubberband-library.lib
    b. Under Debug/Release there should be a field for the header search paths, here you should link to \rubberband-default\rubberband
    c. Also in case it isn’t clear, you need to include where rubberband-default is located in each path

Now you should be able to #include <RubberBandStretcher.h>

It’s not so easy to work with the library. There’s some official notes here and the documentation is also here. I have a class that I’ll put here when I fix some issues.

1 Like

Did you choose the Desktop development with C++ workload in Visual Studio Installer?

I have Desktop and .NET but not sure which are actually necessary.

I got syntax error while following your instruction:

What is the code screenshot you shared? And I’m not sure about the Android exporter, maybe there’s some differences to get that working.

1 Like