Hi, Mackie VPOTs send the following messages
B0 1i XX
Where i is the VPOT Number 0-7
XX is the value where the value of the bits are
So 4X will also be a negative value and 0x will also be a positive value. Consider it a "direction" bit.
The value VV VVVV will be a value of 0-63 0x00 to 0x3F in how far the movement is. Typically it is seldem more than 7
On top of that, GrandMA does not understand CC so you will have to convert to note with velocity and GrandMA will require absolute (not relative) movement, so each knob will need a separate global variable. I assume you will want to be moving faders with GrandMA for PC.
So first we need to get the relative value movement and add it to the last known value that is stored in a variable and then convert the CC to and outgoing note with a fixed velocity. Something like the below should work but I'm not at a PC where I can try it now.
This would be for the first V-POT only.
incoming :B0 10 qq (Or CC MIDI CH 1 CC 16 any value set to qq)
// Note value 0x10 in is C16 decimal
// This will determine how far we turned the knob
// This will determine the direction
// Make the value it negative by multiplying by -1
if tt==0x40 then rr=rr*-1
// Add or subtract from last known value (ga is the global variable we use here)
// Velocity cannot be less than 0
if ga<0 then ga=0
// Velocity cannot be more than 127
if ga>127 then ga==127
Outgoing: 90 00 qq (or Note on MIDI CH 1 note 0 value qq)
// Again each knob will need it's own global variable.
I hope this helps! Again, no way to test this right now because I'm on a Chromebook right now but I'm pretty sure I got it right.
Bome Customer Care
Also available for paid consulting services: email@example.com