fb 16 ccs

visual feedback of table data for bidirectional midi-controllers (f.i. novation launchpad,livid base). 16 elements of a table are mapped to midi-cc's.
Author: Robert Schirmer
License: BSD
Github: rbrt/old/fb 16 ccs.axo

Inlets

int32 offset in the table

bool32 active

Outlets

None

Parameters

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

int32.mini map the step to midi notes

bool32.tgl enable ctrl feedback

Attributes

combo device

spinner channel

objref table

Declaration
int32_t map[16];
int i;
int ii;
int32_t vt;
Control Rate
map[0] = param_i0;
map[1] = param_i1;
map[2] = param_i2;
map[3] = param_i3;
map[4] = param_i4;
map[5] = param_i5;
map[6] = param_i6;
map[7] = param_i7;
map[8] = param_i8;
map[9] = param_i9;
map[10] = param_i10;
map[11] = param_i11;
map[12] = param_i12;
map[13] = param_i13;
map[14] = param_i14;
map[15] = param_i15;

// set cc's
if (inlet_active || param_active) {
  {
    if (i == 16)
      i = 0;
    vt = attr_table.array[__USAT((inlet_offset + i), attr_table.LENGTHPOW)]
         << attr_table.GAIN;
    {
      ii += 1;
      if (ii == 30) {
        MidiSend3((midi_device_t)attr_device,
                  MIDI_CONTROL_CHANGE + (attr_channel - 1), map[i],
                  __USAT(vt >> 20, 7));
        ii = 0;
        i += 1;
      }
    }
  }
}

Privacy

© 2024 Zrna Research