I’m trying to solve this simple thing (i was thinking it was simple)
I have an audio input and I want to activate and stop a video when the audio analysis is over X like play with the first clap and stop with the second clap. I’m trying to use the flipflop but seems it doesn’t work
Have you tried a toggle?
yes but it follows the audio level. I’m trying to activate the player with a first clap and the video plays then it stops on a second clap. If no second clap the video stops and seek to the start position.
Since we have no idea what you tried, and where it goes wrong, it is hard to help.
Well, the clap is a certain frequency (range) and a certain volume.
So use FFT, get the slices that represent your clap, avarage that out (use Mean) and than use a > (bigger than) for your thresshold, use a togedge to make it a bang, use a toggle for the player, and set the player to not loop.
Help us help you.
I partially solved the problem, through Audioanalysis I connect a FlipFlop if the sound value is over a certain amount then simply a Change to stop when the video is at the end.
Now I’m trying to replicate the second clap making the same thing but inverted. If I solve I’ll publish the patch. BTW it’s a simple if then routine but the input is not constant and this was the issue to solve.
claponclapoff.v4p (4.9 kB)
this can even be simplified. classic use case for TogEdge:
claponclapoff simple.v4p (6.1 kB)