fb 8 ccs

visual feedback of table data for bidirectional midi-controllers (f.i. novation launchpad,livid base). 8 elements of a table are mapped to midi-cc's.
Author: Robert Schirmer
License: BSD
Github: rbrt/old/fb 8 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

bool32.tgl enable ctrl feedback

Attributes

combo device

spinner channel

objref table

Declaration
int32_t map[8];
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;

// set cc's
if (inlet_active || param_active) {
  {
    if (i == 8)
      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