added scriptable FFT
-
@christoph-hart said in added scriptable FFT:
it will burn the CPU
Wait till you see my analog tape dsp :grinning_squinting_face:
-
@d-healey Yes that's more in the ballpark. However it would require an inverse FFT so that you can do (in pseudo code):
for(chunk in signal) { forwardTransform(chunk); doSomeStuffInFrequencyDomain(); inverseTransform(chunk); }
However I gotta admit I have never used the inverse transform (all FFT application I did until now only needed to analyse the frequency domain) so maybe I need a bit input of someone who is a bit more proficient in this area. A quick googling revealed this website which contains some basic information, but let me know if you know better resources:
https://www.dsprelated.com/freebooks/sasp/Overlap_Add_Decomposition.html
-
@christoph-hart as for a non-real time decimation of a buffer, it should work right? Just in order to get something better than than one sample every X samples…
This is not related to displaying the buffer, which works great btw thanks to you :) -
@ustk said in added scriptable FFT:
Just in order to get something better than than one sample every X samples…
Ah, you're still in the waveform drawing stuff? Not sure if the FFT is seriously overkill for this task. Have you tried other interpolation algorithms? The next best thing is linear interpolation which should be good enough (it's good enough for the sample playback lol).
-
@christoph-hart no no as I said this is not for drawing, this one is for computational stuff.
Actually I am taking a sample every X samples to decimate before a correlation function, and it works. But I'd like a more precise decimation model…What I found online always uses an fft, but the formulas are too complex for me to translate into code. Although I'm sure it's a trivial operation, I'm just not used to fft…
I imagine this requires an inverse fft too though
-
This post is deleted! -
What about a resynthesis module? :D
-
@d-healey with the results I got from DDSP I'm surprised more developers aren't looking into resynthesis more... we'd never have to sample a round robin again
-
@iamlamprey It would be nice if we never had to sample anything again.
-
@iamlamprey
What's DDSP?Nevermind it's more googleable than I thought. -
@christoph-hart Yep :) The style-transfer is particularly appealing, I wouldn't be surprised if you can legally train it with other people's sample libraries since it's 100% synthesis.
Not a lawyer but ;)
-
@Christoph-Hart I thought I'd have a go at this fft thing. Following your instructions above and the docs I load a sample from the sampler into a buffer. If I uncomment the
process
line in this script HISE will just crash.const var Sampler1 = Synth.getSampler("Sampler1"); reg sound = Sampler1.createSelection(".*")[0]; const buf = sound.loadIntoBufferArray(); const fft = Engine.createFFT(); fft.setEnableSpectrum2D(true); fft.setWindowType(fft.BlackmanHarris); fft.setMagnitudeFunction(function(data, offset) { var max = 0.0; for(s in data) { max = Math.max(max, s); } Console.print("The max value at " + offset + " is " + Engine.getDecibelsForGainFactor(max)); }, true); fft.prepare(1024, 2); //fft.process(buf);
-
@d-healey Bump