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