CCs with 'Sign Magnitude'

jcotton

2016-05-27 15:41:27

I have a MIDI controller that emits value 1 when turned clockwise, and value 65 when turned anticlockwise.

Logic's Controller Assignments window converts this into continuous 0-127 values using the 'Sign Magnitude' format setting. No problem.

However I want to use the same controller with another app (RME totalmix) which doesn't have a 'Sign Magnitude' option - and expects to see absolute values incoming. Currently the faders I'm controlling just flip between value 1 and value 65 (predictably enough!).

Is there a way to use MT to convert incoming Sign Magnitude into absolute values 0-127? Any ideas appreciated.

Thanks - Jon

DvlsAdvct

2016-05-31 15:35:40

hi Jon

Yes, this is 100% doable. You'd create a translator with two rules, one for the knob at 1, and one for the knob at 65, and use a global variable to count in each direction. It would look like:

Code: Select all

Translator 1; Relative to Absolute
Incoming: MIDI Message
CC#30 [i]Just using this as an example, obviously replace with the CC message from your controller[/i]
Variable: any, replace with variable pp
Rules
if pp==0x1 then g0=g0-1
if pp==0x65 then g0=g0+1
if g0<0 then g0=0
if g0>127 then g0=127
Outgoing: MIDI Message
CC#30
Variable: any, replace with g0
That should do it.

Jared