keyboard

internal polyphonic midi keyboard
Author: Remco van der Most
License: BSD
Github: sss/midi/keyboard.axo

Inlets

None

Outlets

None

Parameters

bin12 b12

Attributes

spinner channel

spinner oct

Declaration
int i;
bool gate[12];
Control Rate
for (i = 0; i < 12; i++) {
  if (((param_b12 >> i) & 1) && (!gate[i])) {
    PatchMidiInHandler(MIDI_DEVICE_INTERNAL, 0,
                       MIDI_NOTE_ON + (attr_channel - 1), i + attr_oct * 12,
                       1 << 6);
    gate[i] = (param_b12 >> i) & 1;
  }

  else if ((!((param_b12 >> i) & 1)) && (gate[i])) {
    PatchMidiInHandler(MIDI_DEVICE_INTERNAL, 0,
                       MIDI_NOTE_OFF + (attr_channel - 1), i + attr_oct * 12,
                       1 << 6);
    gate[i] = (param_b12 >> i) & 1;
  }
}

Privacy

© 2024 Zrna Research