Xlinka / NeosPlus

NeosVR Plugin Extra Logix nodes and features
https://discord.gg/9QAaMtXwke
Other
29 stars 19 forks source link

Add FFTStream Component #20

Open DoubleStyx opened 1 year ago

DoubleStyx commented 1 year ago

Simple FFT implementation using C# directly or a C# wrapper around a C library. Would need to investigate a performant means of implementing this. I'm debating how the data should be pipelined. Perhaps the component receives a reference to an audio clip player and a window size and outputs the values through a ValueStream, which then can be used in a custom multi-driver that can drive various fields. Or perhaps there would be an option to specify a frequency to sample, returning the corresponding amplitude.

DoubleStyx commented 1 year ago

The component seems to work for the most part. However, I am getting an ArgumentOutOfRangeException every time I read from the AudioClip. I'm not sure why at this point. The component code can be found here.