Closed shiibe closed 2 years ago
Thanks for the contribution! Looks good to me. Thanks for the videos too. None of us have specialized Taiko controllers as far as I know, so we're not able to check this ourselves. Worst case scenario we can just revert or make it a toggle or adjustable.
@Poliwrath Yeah I think adding a toggle for it would be good (like "Enable Analog Input Emulation" or something). Even the option to adjust the min/max values from the UI could be nice. I can try it out and create another PR if necessary.
I'm going to do some more testing just to make sure there aren't any issues, but so far so good!
Thanks for merging 😄
Shouldn't be necessary unless there's issues with the current values. Thanks again.
This PR adds a function to randomly generate a value for input sensitivity of the drum. Since the arcade controller is analog, the game uses the raw values to determine a cooldown period. In it's current implementation, the input value sent by OpenParrot is 0xFFFF. Since the value is always the same, the game disregards notes that are close to one another. This is noticeable on drum rolls (especially if you're using a Taiko Force Lv5 controller):
https://user-images.githubusercontent.com/82057235/147324214-8dafac14-bb11-45d3-9e44-231c9b5c63d5.mp4
I added a function to randomly generate a value when a key is pressed. After a bit of testing I found the sweet spot that randomly generates values between ~40 to ~90 in the I/O Test menu:
https://user-images.githubusercontent.com/82057235/147324335-225eb8c5-756e-4c47-a506-be86ef6fe925.mp4
Which results in faster input (~30 more hits in the same roll):
https://user-images.githubusercontent.com/82057235/147324359-6b27f767-2e0a-4333-958c-2faa4d942fbd.mp4
I'm new to C++ so if this implementation seems sloppy, please let me know!