Hello, I am playing around with the new DSP modules from JUCE 6. I am trying to set the maxDelayTime using the explicit constructor of the DelayLine class, but with no avail. I don’t understand how to instantiate a templated explicit constructor.
I am doing this in a processorChain. I’ve never used an explicit constructor before, so the concept is a bit foggy. Couple that with instantiation within a processor chain as well as a templated type and I’m totally confused.
I am committed to JUCE 6 and I know I could accomplish this without the new DelayLine class, so I am really only interested in figuring this particular situation out.
dsp::ProcessorChain<dsp::DelayLine<float>,dsp::Panner<float>> chain;
// to reset the maximum delay time,
// assign a new instance of the DelayLine at the chain position 0
chain.get<0>() = dsp::DelayLine<float>(10 * 44100);
Hey guys, sorry for dragging up an old thread, but I’m having issues with this myself. I’ve only just started looking into the JUCE DSP classes, so be gentle!
I can easily and quickly create a dsp::DelayLine object and use it accordingly, but all attempts to use one within a dsp::ProcessChain have thwarted me. With a non chained dsp::DelayLine object I can process my signal as simple as this:
What are the values of inputBlock.getNumChannels() and writePos.size()? That should give you a clue what’s going on.
Your prepareToPlay looks a bit suspicious. If you assign a new delayline like that, it will no longer be “prepared”. Does it work if you assign the new delayline before calling fxChain.prepare(spec)?
Suspicious indeed. It will work if I assign the new delay line before call prepare, so long as I also grab the newly assigned delay and call its setDelay() method:
So I guess this is a solution, but surely there is an easier way of adding a adding a dsp::DelayLine to a dsp::ProcessorChain? Can I not set the initial delay line when I declare my chain:
As far as I was able to gather, there is no way. IMHO the whole ProcessorChain is unwieldy to use and inflexible and one might just as well not bother using it. (It is claimed by some people using it might result in performance optimizations, but I haven’t seen any concrete benchmark data about that.)
Thanks @xenakios, if you haven’t figured out a way to do this, then I’ve no hope whatsoever! Not using it is not that big a deal as I’m using an AudioprocessorGraph anyway, so I can quickly set up signal chains there. Just so I’m clear, your criticism is directed at the dsp::ProcessorChain rather than the bulk of the DSP classes themselves?
Right, I am this case criticizing only the ProcessorChain. Some of the DSP module classes are quite useful, but it’s just in some cases a pain to attempt to use them with the ProcessorChain. (And there are problems also with the ProcessorDuplicator.)