added scriptable FFT
-
@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