Spectral Analyser / Ever made one?
-
@Chazrox Scriptnode is not necessary if you don't go real time, so Chris's example has already (almost) what you need.
Ok you want to display an FFT, but from what source? sampler? internal AF? user drag/drop AF?
You must start here, then it'll only be a matter of getting a reference of that AF and feed the buffer.Here's a starting point
inline function onButton1Control(component, value) { if (value) { FileSystem.browse(FileSystem.Desktop, false, "", function(result) { arrayOfBuffers = result.loadAsAudioFile(); // do fft with this array of buffers }); } }; Content.getComponent("Button1").setControlCallback(onButton1Control);
-
@ustk Thank You
Im going to script a custom drop panel that will feed an audio file into an audio player. Atleast thats what I think I should do? Then run your script either in a button or inline my DROP script to run automatically. Am I right so far with using an AudioPlayer for that?..because I know we can just read the file AND load the audio file for auditioning at the same time, right?
-
@Chazrox no need for a audio player for a simple playback you can just use Engine.playBuffer()
-
@Chazrox Yeah AFs in Hise can be fetched from anywhere, AudioPlayer, Scriptnode, Sampler, etc...
The methods can differ but I imagine there are some examples in the doc and the snippet browser -
@Christoph-Hart hmm! I def have some reading to do. This is exciting. Anything you can recommend I read in documentation?
@ustk speaking of 'methods' im investigating and got these...
{ "normalise": Method, "toCharString": Method, "detectPitch": Method, "indexOfPeak": Method, "toBase64": Method, "fromBase64": Method, "getMagnitude": Method, "getRMSLevel": Method, "trim": Method, "getPeakRange": Method }
All new to me but looks promising!
I have no idea what "Method" is referring to tho. Never seen this before.
-
@Chazrox start from here:
-
@Christoph-Hart Thanks! Reading that now.
-
Sorry if this is an irrelevant question, but how can we use this with online processing?
For example, online pitch detection?
-
@resonant i'd like to know that too haha.
-
@resonant do you already know how to do offline analyzing?
-
@Chazrox said in Spectral Analyser / Ever made one?:
@resonant do you already know how to do offline analyzing?
No I donโt know how to do that. But Iโd really like to know real time spectral processing with Hise.
-