TabSel
2016-08-23 19:14:47
I've got a Behringer CMD PL-1. The unit has 8 endless encoders which send values of 0x41 when dialing clockwise, or 0x3f when dialing counter cw, no matter how fast I dial. The only thing changing on slower/faster dialing is the time stamp difference of midi events.
I now want to have these encoders "accelerating" depending on how fast I dial.
I got it working with a timer which is fired @ 20ms intervals, however, this seems to put quite some stress on the cpu. I got around it, by only firing the timer if "necessary", however, as long as I dial an encoder the timer needs to be fired, there's the cpu stress...
So, my idea to work around this is this: I measure the time difference between two subsequent midi cc events for a dedicated encoder and calculate an accelerated value depending on the delta, so no need for timers.
However, I can't seem to get the time stamp of a midi event, can I?
I now want to have these encoders "accelerating" depending on how fast I dial.
I got it working with a timer which is fired @ 20ms intervals, however, this seems to put quite some stress on the cpu. I got around it, by only firing the timer if "necessary", however, as long as I dial an encoder the timer needs to be fired, there's the cpu stress...
So, my idea to work around this is this: I measure the time difference between two subsequent midi cc events for a dedicated encoder and calculate an accelerated value depending on the delta, so no need for timers.
However, I can't seem to get the time stamp of a midi event, can I?