Firmware-72 Function-001

From I-CubeX Wiki
Jump to: navigation, search

LOOKUP (1, 01h)

Each value captured by an analog sensor input of the USB-microDig can be translated to another value by using a lookup table. This allows for linearization of sensor values or could do exactly the reverse by translating the sensor values in a non-linear fashion. The lookup table entries can be set with the TABLE ENTRY command, and read using the SEND TABLE ENTRY and SEND TABLE commands. Each table contains 1024 14-bit values stored as 2048 8-bit bytes and sent as 2048 7-bit bytes. Even though the non-volatile memory can store 16-bit values, only 14-bits are made accessible with the TABLE ENTRY command and since analog sensor values have 10-bit resolution (ie. 0..1023 range) internally in the USB-microDig, it’s only useful to store 10-bit values. Hence the table entries should be in the range 0..1023 to span the full range of a channel voice MIDI message value, whether it is 0..127 such as in control-change MIDI messages or 0..16383 in pitch-bend messages.

The LOOKUP function has the following parameter values FP1 and FP2 that can be set with the FUNCTION command:

FP1

000yyyyy: yyyyy = [0..31]; Table number

FP2

0m00yyyy: yyyy: 0; No smoothing
yyyy: [1..15]; Smoothing factor
m = 0; Monitor off
m = 1; Monitor on

When the monitor is enabled, the sensor value is output as a separate MIDI message after the smoothing function (if enabled) but before being processed as configured by the EDIT CONFIG command. The MIDI message is the same as set by the EDIT CONFIG command but, if note or controller messages are used, the note or controller number is incremented by one. If another MIDI message is used the MIDI channel is incremented by one.

Tables can be made using software downloadable from our website. The software includes the following tables:

1: BendMicro;
2: BendMini;
3: BendShort;
4: ReachClose;
5: ReachFar;
6: TapTile;
7: Touch;
8: TouchMicro-03;
9: TouchMicro-05;
10: TouchMicro-10;
11: TouchMini;
12: TouchStrip;

Example:

In order to use the ReachClose sensor on the 1st input with the ReachClose lookup table, set the 1th sensor input to use lookup table 4, the following message should be sent:

240, 125, 0 {DEV}, 8 {FUNCTION}, 0 {input number}, 0 {device address (ignored)}, 1 {lookup method}, 4 {table number}, 247 (F0h, 7Dh, 00h, 08h, 00h, 01h, 04h, F7h)