Emulating a HUI - Can I convert Relative Knobs to Absolute?
Posted: 07 Aug 2014 02:51
Hello All, long time reader, first time poster.
I'm trying to get a HUI emulation on the Lemur working, so I can make a template to control Pro Tools. This should be possible, because the HUI just spits out regular old MIDI, and it's just a matter of knowing what messages to send out. I'm working off of this doc that someone made after reverse engineering the unit.
http://forum.cockos.com/showthread.php?t=101328
I got the faders working well, but I'm trying to get the endless encoders (the V-Pots) to work in a way that makes sense with the Lemur. The document linked above has this to say about the pots (the data shown here is midi information in hex code):
-----------------
V-Pots send its data using delta values.
Format: b0 4p vv
where p is the V-Pot number and vv is the delta value.
p can be anything from 0 to c. This is just a linear mapping of the
V-Pots from left to right. That means, when p equals c then the 'scroll'-
V-Pot has been operated.
vv denotes the delta value.
If vv>40 then delta=vv-40.
If vv<40 then delta=-vv.
vv never seems to equal 40.
I was able to obtain deltas as high as 2d (by turning the knobs real
fast).
----------------------
Ideally, I'd like to get the V-Pots so that they work in "absolute mode", where one position on the Lemur's knobs always corresponds to a particular pan position (for example), but I must admit that the level of programming needed to make that conversion is far beyond me.
Does anyone have any suggestions for how I should proceed? If a conversion from relative to absolute mode is impossible, how do I go about making an endless encoder with the information posted above?
I'm trying to get a HUI emulation on the Lemur working, so I can make a template to control Pro Tools. This should be possible, because the HUI just spits out regular old MIDI, and it's just a matter of knowing what messages to send out. I'm working off of this doc that someone made after reverse engineering the unit.
http://forum.cockos.com/showthread.php?t=101328
I got the faders working well, but I'm trying to get the endless encoders (the V-Pots) to work in a way that makes sense with the Lemur. The document linked above has this to say about the pots (the data shown here is midi information in hex code):
-----------------
V-Pots send its data using delta values.
Format: b0 4p vv
where p is the V-Pot number and vv is the delta value.
p can be anything from 0 to c. This is just a linear mapping of the
V-Pots from left to right. That means, when p equals c then the 'scroll'-
V-Pot has been operated.
vv denotes the delta value.
If vv>40 then delta=vv-40.
If vv<40 then delta=-vv.
vv never seems to equal 40.
I was able to obtain deltas as high as 2d (by turning the knobs real
fast).
----------------------
Ideally, I'd like to get the V-Pots so that they work in "absolute mode", where one position on the Lemur's knobs always corresponds to a particular pan position (for example), but I must admit that the level of programming needed to make that conversion is far beyond me.
Does anyone have any suggestions for how I should proceed? If a conversion from relative to absolute mode is impossible, how do I go about making an endless encoder with the information posted above?