Time Stretching
-
@d-healey said in Time Stretching:
I think for now this is beyond my C++ level. I'll come back to it again at some point unless someone else implements it first (pleeeeaaaassseeee!!!) :D
Thanks for giving this a go, David! This is indeed an attractive feature for hise! Can't wait for this to work. My C++ is much worse than yours, but perhaps not this guys:
The Audio Programmer - "Implementing a TimeStretching Library (RubberBand)":
https://youtu.be/XhmM8HZj7aU?t=1721
(It's a live stream, so watch in 1.5x speed :) , not sure it gives you more insight than you got cause it's for JUCE. Perhaps the Hise part is more difficult)
-
@andioak Ah thanks, I'll check it out!
-
@d-healey I know somebody is working on it and has already implemented a node with rubberband so yes it‘s definitely possible and not too difficult to pull off.
-
I think I'm making some progress with this, thanks to the video @andioak posted.
However inside HISE, after I've successfully compiled my node, I'm not able to see it in the scriptnode workspace or in the Hardcoded Master FX. It tells me it can't find the dll. Any ideas?
Edit: If I remove this
std::unique_ptr<RubberBandStretcher> rb;
from my node it will show up in HISE. I don't know why though, or what to use instead. -
@Christoph-Hart What data is in data and how do I access it?
template <typename T> void processFrame(T& data) { }
-
//processFrame is the audiobuffer 1 sample at a time: template <typename T> void processFrame(T& data) { for (auto& sample: data) { sample *= .5; // Volume @ 50% // do other stuff } } //you can also do it this way (the method directly above processFrame): template <typename T> void process(T& data) { static constexpr int NumChannels = getFixChannelAmount(); // Cast the dynamic channel data to a fixed channel amount auto& fixData = data.template as<ProcessData<NumChannels>>(); int numSamples = data.getNumSamples(); //data also has some of its own methods you can call, like getNumSamples() for (auto ch : data) { dyn<float> channel = data.toChannelData(ch); for (auto& sample : channel) //For each sample, same as processFrame { sample *= .5; // 50% volume } } //now we don't really need this stuff, since we did it manually: /* // Create a FrameProcessor object auto fd = fixData.toFrameData(); while (fd.next()) { // Forward to frame processing processFrame(fd.toSpan()); } */ }
-
@iamlamprey Thanks! How did you figure it out? Any idea why my node won't show up in HISE?
-
@Christoph-Hart If you're really interested, I could arrange something with zPlane.
-
@clevername27 Elastique would be a good addition! We'd still need Rubberband as a baseline because the other algorithms don't have compatible licenses.
-
@d-healey Hit me up if you want to discuss further. That goes for any other commercial music software company, as well. It appears I'll be using HISE here, so I'm now invested.
-
-
-
@d-healey said in Time Stretching:
@iamlamprey Any idea why my node won't show up in HISE?
If it compiles okay, and doesn't show up in HISE it means there's an error in the code somewhere that the compiler didn't pick up, or you haven't linked the library(s) properly
-
@iamlamprey Now I don't feel so bad :p I'm trying to copy what the audio programmer does in the video but he's working directly with JUCE audio buffers. Do we have any access to them within the process function?
-
@d-healey check out this thread:
https://forum.hise.audio/topic/6585/block-based-processing-in-third-party-node/
-
@iamlamprey Thanks, that got me a little further :)
@Christoph-Hart Any idea why my node won't show up in HISE?
-
@Christoph-Hart I have it working in Windows, but it still won't show up on my Debian machine. The DLL compiles successfully but it won't show up in the node list and I see this in the hardcoded fx
-
Aha I solved it.
I was linking against my distro's rubberband library. I had to compile it myself and link against that instead.actually looks like I can use my distro's library, if I move it into the src folder and point the auto generated jucer project to it. -
@d-healey There's also a Rubberband build configuration where you don't need to link against a prebuilt library and it builds it from the source files directly. I used this method and just threw the entire Rubberband library into
ThirdPartyCode/src/Rubberband
... -
@Christoph-Hart Is that a configuration on the HISE side or within the custom node?