jesse-scam / algorithmic-beat-mapping-unity

Real-time and Preprocessed Audio Analysis for Onset Detection (Beat Mapping) Using Spectral Flux
MIT License
138 stars 33 forks source link

No peak detection #2

Open sebglon opened 2 years ago

sebglon commented 2 years ago

I have used your SpectrazlFluxAnalyser and i don't understand why I have never peak

FLIX prunedSpectralFlux | spectralFlux| threshold|Window start time | window end time | window diff time | peak \
FLUX 0.002386421 | 0.415312 | 0.4129256 | 0.1013333 | 0.912 | 0.8106667 | False |
FLUX 0.1048805 | 0.5399711 | 0.4350906 | 0.1653333 | 0.976 | 0.8106667 | False |
FLUX 0.02164552 | 0.4550485 | 0.433403 | 0.208 | 0.01866667 | -0.1893333 | False |
FLUX 0.07093194 | 0.5028276 | 0.4318956 | 0.208 | 0.04 | -0.168 | False |
FLUX 0.3509955 | 0.8292332 | 0.4782377 | 0.3146667 | 0.1253333 | -0.1893333 | False |
FLUX 0.00860393 | 0.5118882 | 0.5032843 | 0.336 | 0.168 | -0.168 | False |
FLUX 0.09828925 | 0.6198775 | 0.5215883 | 0.464 | 0.2746667 | -0.1893333 | False |
FLUX 0.00403893 | 0.5217324 | 0.5176935 | 0.4853333 | 0.3173333 | -0.168 | False |
FLUX 0.1595938 | 0.6879836 | 0.5283898 | 0.5493333 | 0.36 | -0.1893333 | False |
FLUX 0.08826494 | 0.6299612 | 0.5416963 | 0.592 | 0.4026667 | -0.1893333 | False |
FLUX 0.07798195 | 0.6537804 | 0.5757985 | 0.6133333 | 0.424 | -0.1893333 | False |

And How I convert spectrum to Frequency Hertz?

jesse-scam commented 2 years ago

I'd need more information to debug. If you send me the audio file you're testing with I can take a look. Are you looking for peaks using realtime or preprocessed?

The algorithm is analyzing the full frequency spectrum. If you want to look at particular frequency bins, check the "Working with Frequencies" section here https://medium.com/giant-scam/algorithmic-beat-mapping-in-unity-real-time-audio-analysis-using-the-unity-api-6e9595823ce4