Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve input precision for midi #23

Open
nathanleiby opened this issue Nov 7, 2024 · 0 comments
Open

Improve input precision for midi #23

nathanleiby opened this issue Nov 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nathanleiby
Copy link
Owner

Want to capture the EXACT timing of the midi note for use in timing.

Today, or timing is flattened to the nearest Macroquad game frame.

The UserHit model should include real ClockTime and (computed from that) corresponding beat.. this way we can determine "age" of a beat and expire it if needed (from looping perspective). Currently, UserHit is just re-using Voices as its data model

By capturing raw timing of midi vs frame (midi is not captured in game thread), it should be possible to determine how far off it is. compare midi time vs frame start time to compute a lag. I've built a prototype of this approach here: https://github.com/nathanleiby/input-timing


Could Macroquad itself support high precision input? This could help for Keyboard intput, too.

@nathanleiby nathanleiby added the enhancement New feature or request label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

1 participant