Change MIDI velocity implementation to allow direct control of velocity value (#9940)

* Initial changes to expose "real" MIDI velocity

* Change MI_VELU and MI_VELD to fit new logic

* Apply cleanups from fauxpark's review

my bad on the errant whitespace and else {} placements

* Slight changes to MI_VELD to match values when velocity is falling to when it is rising

* Add keycode MI_VEL_0

* Update compute_velocity() to handle MI_VEL_0

* Store velocity as 7 bits to hard cap value at 127
This commit is contained in:
jakobkg 2020-09-20 03:13:45 +02:00 committed by James Young
parent 73d20754bb
commit bf84d35117
No known key found for this signature in database
GPG key ID: 8E1085BF6FCFBD74
3 changed files with 21 additions and 9 deletions

View file

@ -35,7 +35,7 @@ typedef union {
struct {
uint8_t octave : 4;
int8_t transpose : 4;
uint8_t velocity : 4;
uint8_t velocity : 7;
uint8_t channel : 4;
uint8_t modulation_interval : 4;
};