Hey guys,
at the moment Iam working on a rythm game in VR which uses a beat detection algorithm. If a beat is found the player should hit the drums. At the moment that’s really hard, so I’m trying to implement as system as in e.g. Guitar Hero, where spheres lerp in 5 seconds to the drums and you kind of see that there is a beat incoming.
My idea was to play the song muted and process it with the algorithm to spawn the cubes. 5 seconds later the same song starts to play in another audio source, which means the spheres should arrive at the exact time you here the beat.
At the moment Iam using
float[ ] spectrum = AudioListener.GetSpectrumData (SIZE, 0, FFTWindow.Hamming);
to get the needed Spectrum Data.
Unfortunately I can only get the data of the AudioListener meaning all loud Sources in my scene. I need it the ther way round, get the data of my muted source and ignore the playing song. Is there a way?