You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first of all, thank you for developing this useful library. One thing is unclear to me though. I want to calculate the spectral rolloff from audio samples represented as float[] with individual samples in range <-1; 1>. After calculating the MagnitudeSpectrum using Fft object, how do I know which frequencies to pass into the Rolloff method, as the same-named parameter? Is there any way to retrieve this information from the Fft object somehow? I was not able to find anything like it. This is the code i have so far:
var signal = new DiscreteSignal(sampleRate, samples);
var fftSize = MathUtils.NextPowerOfTwo(signal.Length);
var fft = new Fft(fftSize);
var spectrum = fft.MagnitudeSpectrum(signal);
var frequencies = ??
var rolloff = NWaves.Features.Spectral.Rolloff(spectrum.Samples, frequencies);
But what should I pass as the "frequencies" here?
Thank you for any help, appreciate it!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, first of all, thank you for developing this useful library. One thing is unclear to me though. I want to calculate the spectral rolloff from audio samples represented as float[] with individual samples in range <-1; 1>. After calculating the MagnitudeSpectrum using Fft object, how do I know which frequencies to pass into the Rolloff method, as the same-named parameter? Is there any way to retrieve this information from the Fft object somehow? I was not able to find anything like it. This is the code i have so far:
But what should I pass as the "frequencies" here?
Thank you for any help, appreciate it!
Beta Was this translation helpful? Give feedback.
All reactions