esqpanel.cpp: Improve the Panel, and add three more views, including a working keyboard. #14455
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The panel view is improved after re-measuring on a real keyboard. Colors have been changed a bit in order to improve contrast:
Three new views have been added:
The Full and Compact views also include a keyboard: the full 61 keys and a reduced 37 keys respectively.:
Here's a video
These work, tracking pointer events, and generate not just key-down events with velocity, but also per-key "pressure" or "aftertouch". Velocity is simulated by position of the click/touch; Pressure by movement of the pointer on the key while down. Both are also animated: Velocity is shown as a colour between blue (1) and green (127), Pressure between yellow (1) and red (127):
This is implemented using analog i/o ports, one for each key, setting the value to pass the key's velocity and pressure. I wasn't able to find a specific type of analog i/o port so I am currently using
IPT_PADDLE, which is probably not ideal, but it does work. I'd be delighted to use a more appropriate type, if there is one (or if I can relatively easily add one in a way that ).