chaosparrot / parrot.py

Computer interaction using audio and speechrecognition
MIT License
139 stars 36 forks source link

Holding down keys/buttons using continuous sounds #39

Open M-o-o opened 1 year ago

M-o-o commented 1 year ago

Currently, there doesn't seem to be a good way to hold down a button using a continuous sound. I'd like continuous detections to trigger a start event and an end event, as well as (or instead of, using a pattern parameter) repeated detect events. This could be used easily with keyDown/keyUp or mouseDown/mouseUp. Another thing that could help with this would be something like a mix between 'times' and 'continual_threshold', where a sound would only "stop" after not being detected for certain number of frames. That way, short detection misses or other sounds would not trigger a release, while still allowing different sounds to follow each other.