IO Variants: 4
Variant: 1
None
frac32.bipolar Fractional bipolar value
frac32.positive Fractional unipolar value
combo device
spinner channel
spinner nrpn
char midi_nrpn_msb;
int32_t midi_nrpn;
char midi_value_msb;
int32_t midi_value_frac;
__attribute__((always_inline)) __STATIC_INLINE int
midi_device_test(midi_device_t dev, uint8_t port, int selected_dev,
uint8_t selected_port) {
if ((selected_dev == MIDI_DEVICE_OMNI) ||
(selected_dev == dev && selected_port == port))
return 1;
return 0;
}
midi_nrpn_msb = 0;
midi_nrpn = 0;
midi_value_msb = 0;
midi_value_frac = 0;
outlet_fb = (midi_value_frac << 1) - (1 << 27);
outlet_fp = midi_value_frac;
#ifndef MIDI_C_DATA_ENTRY_LSB
#define MIDI_C_DATA_ENTRY_LSB 38
#endif
if (midi_device_test(dev, port, attr_device) == 1 &&
status == (attr_channel - 1) | MIDI_CONTROL_CHANGE) {
if (data1 == MIDI_C_NONRPN_MSB) {
midi_nrpn_msb = data2;
} else if (data1 == MIDI_C_NONRPN_LSB) {
midi_nrpn = (midi_nrpn_msb << 7) | data2;
} else if (data1 == MIDI_C_DATA_ENTRY && midi_nrpn == attr_nrpn) {
midi_value_msb = data2;
midi_value_frac = midi_value_msb << 20;
} else if (data1 == MIDI_C_DATA_ENTRY_LSB && midi_nrpn == attr_nrpn) {
midi_value_frac = (midi_value_msb << 20) | (data2 << 13);
}
}
Variant: 2
None
frac32.bipolar Fractional bipolar value
frac32.positive Fractional unipolar value
int32.bipolar Integer bipolar 14 bit value
int32.positive Integer unipolar 14 bit value
int32.positive Integer 7 bit MSB value
int32.positive Integer 7 bit LSB value
bool32.pulse Pulse on MSB value changes
bool32.pulse Pulse on LSB value changes
combo device
spinner channel
spinner nrpn
char midi_nrpn_msb;
int32_t midi_nrpn;
char midi_value_msb;
char midi_value_lsb;
int32_t midi_value_int;
int32_t midi_value_frac;
int32_t midi_changed_msb;
int32_t midi_changed_lsb;
__attribute__((always_inline)) __STATIC_INLINE int
midi_device_test(midi_device_t dev, uint8_t port, int selected_dev,
uint8_t selected_port) {
if ((selected_dev == MIDI_DEVICE_OMNI) ||
(selected_dev == dev && selected_port == port))
return 1;
return 0;
}
midi_nrpn_msb = 0;
midi_nrpn = 0;
midi_value_msb = 0;
midi_value_lsb = 0;
midi_value_int = 0;
midi_value_frac = 0;
midi_changed_msb = 0;
midi_changed_lsb = 0;
outlet_fb = (midi_value_frac << 1) - (1 << 27);
outlet_fp = midi_value_frac;
outlet_ib = midi_value_int - (1 << 13);
outlet_ip = midi_value_int;
outlet_msb = midi_value_msb;
outlet_lsb = midi_value_lsb;
outlet_chmsb = midi_changed_msb;
outlet_chlsb = midi_changed_lsb;
midi_changed_msb = 0;
midi_changed_lsb = 0;
#ifndef MIDI_C_DATA_ENTRY_LSB
#define MIDI_C_DATA_ENTRY_LSB 38
#endif
if (midi_device_test(dev, port, attr_device) == 1 &&
status == (attr_channel - 1) | MIDI_CONTROL_CHANGE) {
if (data1 == MIDI_C_NONRPN_MSB) {
midi_nrpn_msb = data2;
} else if (data1 == MIDI_C_NONRPN_LSB) {
midi_nrpn = (midi_nrpn_msb << 7) | data2;
} else if (data1 == MIDI_C_DATA_ENTRY && midi_nrpn == attr_nrpn) {
midi_value_msb = data2;
midi_value_int = midi_value_msb << 7;
midi_value_frac = midi_value_int << 13;
midi_changed_msb = 1;
} else if (data1 == MIDI_C_DATA_ENTRY_LSB && midi_nrpn == attr_nrpn) {
midi_value_lsb = data2;
midi_value_int = (midi_value_msb << 7) | midi_value_lsb;
midi_value_frac = midi_value_int << 13;
midi_changed_lsb = 1;
}
}
Variant: 3
None
int32.bipolar Integer bipolar 14 bit value
int32.positive Integer unipolar 14 bit value
int32.positive Integer 7 bit MSB value
int32.positive Integer 7 bit LSB value
combo device
spinner channel
spinner nrpn
char midi_nrpn_msb;
int32_t midi_nrpn;
char midi_value_lsb;
char midi_value_msb;
int32_t midi_value_int;
__attribute__((always_inline)) __STATIC_INLINE int
midi_device_test(midi_device_t dev, uint8_t port, int selected_dev,
uint8_t selected_port) {
if ((selected_dev == MIDI_DEVICE_OMNI) ||
(selected_dev == dev && selected_port == port))
return 1;
return 0;
}
midi_nrpn_msb = 0;
midi_nrpn = 0;
midi_value_lsb = 0;
midi_value_msb = 0;
midi_value_int = 0;
outlet_ib = midi_value_int - (1 << 13);
outlet_ip = midi_value_int;
outlet_msb = midi_value_msb;
outlet_lsb = midi_value_lsb;
#ifndef MIDI_C_DATA_ENTRY_LSB
#define MIDI_C_DATA_ENTRY_LSB 38
#endif
if (midi_device_test(dev, port, attr_device) == 1 &&
status == (attr_channel - 1) | MIDI_CONTROL_CHANGE) {
if (data1 == MIDI_C_NONRPN_MSB) {
midi_nrpn_msb = data2;
} else if (data1 == MIDI_C_NONRPN_LSB) {
midi_nrpn = (midi_nrpn_msb << 7) | data2;
} else if (data1 == MIDI_C_DATA_ENTRY && midi_nrpn == attr_nrpn) {
midi_value_msb = data2;
midi_value_int = midi_value_msb << 7;
} else if (data1 == MIDI_C_DATA_ENTRY_LSB && midi_nrpn == attr_nrpn) {
midi_value_lsb = data2;
midi_value_int = (midi_value_msb << 7) | midi_value_lsb;
}
}
Variant: 4
None
frac32.positive Fractional unipolar value
int32.bipolar Integer bipolar 14 bit value
int32.positive Integer unipolar 14 bit value
int32.positive Integer 7 bit MSB value
int32.positive Integer 7 bit LSB value
int32.positive Parameter number
bool32.pulse Pulse on MSB value changes
bool32.pulse Pulse on LSB value changes
frac32.bipolar Fractional bipolar value
combo device
spinner channel
char midi_nrpn_msb;
int32_t midi_nrpn;
char midi_value_msb;
char midi_value_lsb;
int32_t midi_value_int;
int32_t midi_value_frac;
int32_t midi_changed_msb;
int32_t midi_changed_lsb;
__attribute__((always_inline)) __STATIC_INLINE int
midi_device_test(midi_device_t dev, uint8_t port, int selected_dev,
uint8_t selected_port) {
if ((selected_dev == MIDI_DEVICE_OMNI) ||
(selected_dev == dev && selected_port == port))
return 1;
return 0;
}
midi_nrpn_msb = 0;
midi_nrpn = 0;
midi_value_msb = 0;
midi_value_lsb = 0;
midi_value_int = 0;
midi_value_frac = 0;
midi_changed_msb = 0;
midi_changed_lsb = 0;
outlet_fb = (midi_value_frac << 1) - (1 << 27);
outlet_fp = midi_value_frac;
outlet_ib = midi_value_int - (1 << 13);
outlet_ip = midi_value_int;
outlet_msb = midi_value_msb;
outlet_lsb = midi_value_lsb;
outlet_nrpn = midi_nrpn;
outlet_chmsb = midi_changed_msb;
outlet_chlsb = midi_changed_lsb;
midi_changed_msb = 0;
midi_changed_lsb = 0;
#ifndef MIDI_C_DATA_ENTRY_LSB
#define MIDI_C_DATA_ENTRY_LSB 38
#endif
if (midi_device_test(dev, port, attr_device) == 1 &&
status == (attr_channel - 1) | MIDI_CONTROL_CHANGE) {
if (data1 == MIDI_C_NONRPN_MSB) {
midi_nrpn_msb = data2;
} else if (data1 == MIDI_C_NONRPN_LSB) {
midi_nrpn = (midi_nrpn_msb << 7) | data2;
} else if (data1 == MIDI_C_DATA_ENTRY) {
midi_value_msb = data2;
midi_value_int = midi_value_msb << 7;
midi_value_frac = midi_value_int << 13;
midi_changed_msb = 1;
} else if (data1 == MIDI_C_DATA_ENTRY_LSB) {
midi_value_lsb = data2;
midi_value_int = (midi_value_msb << 7) | midi_value_lsb;
midi_value_frac = midi_value_int << 13;
midi_changed_lsb = 1;
}
}