I’d like to ask advise for a good approach on the following problem:
We have a very basic App using ofSoundStream to draw a wave on the screen, just like an oscilloscope. We now have to implement a trigger to get a “standing wave”. As the wave is complex we can not use zero crossings.
But the sound producing device actually gives out trigger peaks we can use. We just don’t understand how to implement it in the App.
Our only idea at the moment is to do it manually without the trigger device: to count the samples in the buffer, count the sample of one cycle of the sound producing device and use the difference as a starting point when getting the array of values (to be drawn) from the buffer. Of course this only works if everything is giving stable sample rates.
Is there a more elegant solution maybe? Even using the trigger signal we have?
Any help would be appreciated.
Thanks in advance!