Is it possible to read audio before playing it?
Alright, so this is a bit odd, but essentially what I am trying to do is play an audio clip and create events based on the audio (beat detection). Simple enough.
The problem is that I want the events to trigger a second or so before the beat hits, so that there is a visual on the screen just before the audio "hits".
Is there a way to play the audio, read it, then play it for the audio listener?
Alternatively, is there a "positive lookahead" type of functionality that I can use with audio?
The only solution I can currently think of is playing the audio twice, once to process it with the beat detection, and offset another to play through the audio source shortly after the first audio is played through the beat detection plugin.
Any thoughts, suggestions, or resources for studying or learning more about this are greatly appreciated.