@Christoph-Hart Check at this, it appears that the glitch isn't from createPath but within the buffer itself.
Here I use getReadBuffer/getResizedBuffer with a sinus and you can see the spectral trace of the first harmonic as we should, plus the oscillo trace of the sine as a glitch at the same time. This means the buffer sometimes contains both sets of data so it is probably not clean as it should.
Another issue -> the data are spread only on the first half of the buffer (for instance the full spectrum goes from 0 to 128 in a 256 length resized buffer (or full read buffer), the remaining are zeros)
When using createPath, it isn't the sine that we see as a glitch, but it might be the imaginary part
The problem might not be a thread access issue after all...
Below I generated two spikes (20Hz & 20kHz) + noise to demonstrate the buffer is going up to SR instead of 20kHz. Maybe a remaining of the real + imaginary part that necessitates doubling the Nyquist length? That isn't as bad as the glitch though because it is easy to limit the drawing to 20kHz...
@Christoph-Hart - cool... well done...how does Daves fix for dynamic assignment of modualtors seem? I would really like that in there too... well actually I need that in there really...hint hint.. and he's already done the work... smiley face, sugar on top.. etc. etc. <fawning complements assumed here>......
@callybeat The problem I had was with the knob regulating the intensity of the LFO that in the module goes from 0 to 1. It worked fine inside hise but not when I exported it. Doing it as the Parce from Colombia suggested, I got it 🙂
I'm exploring script fx and for effects plugin projects I think it's the best.
Thank you very much