Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated MIDI input handling and user interface. added features and fixed a couple issues #113

Open
wants to merge 7 commits into
base: phazerville
Choose a base branch
from
19 changes: 18 additions & 1 deletion software/src/APP_HEMISPHERE.h
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,32 @@ class HemisphereManager : public HSApplication {
switch (HS::frame.MIDIState.function[chan]) {
case HEM_MIDI_CC_OUT:
case HEM_MIDI_NOTE_OUT:
case HEM_MIDI_NOTE_POLY2_OUT:
case HEM_MIDI_NOTE_POLY3_OUT:
case HEM_MIDI_NOTE_POLY4_OUT:
case HEM_MIDI_NOTE_MIN_OUT:
case HEM_MIDI_NOTE_MAX_OUT:
case HEM_MIDI_NOTE_PEDAL_OUT:
case HEM_MIDI_NOTE_INV_OUT:
case HEM_MIDI_VEL_OUT:
case HEM_MIDI_AT_OUT:
case HEM_MIDI_VEL2_OUT:
case HEM_MIDI_VEL3_OUT:
case HEM_MIDI_VEL4_OUT:
case HEM_MIDI_AT_CHAN_OUT:
case HEM_MIDI_AT_KEY1_OUT:
case HEM_MIDI_AT_KEY2_OUT:
case HEM_MIDI_AT_KEY3_OUT:
case HEM_MIDI_AT_KEY4_OUT:
case HEM_MIDI_PB_OUT:
HS::frame.inputs[chan] += HS::frame.MIDIState.outputs[chan];
break;
case HEM_MIDI_GATE_OUT:
case HEM_MIDI_GATE_INV_OUT:
HS::frame.gate_high[chan] |= (HS::frame.MIDIState.outputs[chan] > (12 << 7));
break;
case HEM_MIDI_TRIG_OUT:
case HEM_MIDI_TRIG_1ST_OUT:
case HEM_MIDI_TRIG_ALWAYS_OUT:
case HEM_MIDI_CLOCK_OUT:
case HEM_MIDI_START_OUT:
HS::frame.clocked[chan] |= HS::frame.MIDIState.trigout_q[chan];
Expand Down
2 changes: 1 addition & 1 deletion software/src/APP_MIDI.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ class CaptainMIDI : public SystemExclusiveHandler, public HSApplication,
}
}

if (message == HEM_MIDI_AFTERTOUCH && in_fn == MIDI_IN_AFTERTOUCH && in_ch == channel) {
if (message == HEM_MIDI_AFTERTOUCH_CHANNEL && in_fn == MIDI_IN_AFTERTOUCH && in_ch == channel) {
// Send aftertouch to CV
Out(ch, Proportion(data1, 127, HSAPPLICATION_5V));
UpdateLog(1, ch, 3, in_ch, data1, data2);
Expand Down
21 changes: 19 additions & 2 deletions software/src/APP_QUADRANTS.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,32 @@ class QuadAppletManager : public HSApplication {
switch (HS::frame.MIDIState.function[chan]) {
case HEM_MIDI_CC_OUT:
case HEM_MIDI_NOTE_OUT:
case HEM_MIDI_NOTE_POLY2_OUT:
case HEM_MIDI_NOTE_POLY3_OUT:
case HEM_MIDI_NOTE_POLY4_OUT:
case HEM_MIDI_NOTE_MIN_OUT:
case HEM_MIDI_NOTE_MAX_OUT:
case HEM_MIDI_NOTE_PEDAL_OUT:
case HEM_MIDI_NOTE_INV_OUT:
case HEM_MIDI_VEL_OUT:
case HEM_MIDI_AT_OUT:
case HEM_MIDI_VEL2_OUT:
case HEM_MIDI_VEL3_OUT:
case HEM_MIDI_VEL4_OUT:
case HEM_MIDI_AT_CHAN_OUT:
case HEM_MIDI_AT_KEY1_OUT:
case HEM_MIDI_AT_KEY2_OUT:
case HEM_MIDI_AT_KEY3_OUT:
case HEM_MIDI_AT_KEY4_OUT:
case HEM_MIDI_PB_OUT:
HS::frame.inputs[chan] += HS::frame.MIDIState.outputs[chan];
break;
case HEM_MIDI_GATE_OUT:
case HEM_MIDI_GATE_INV_OUT:
HS::frame.gate_high[chan] |= (HS::frame.MIDIState.outputs[chan] > (12 << 7));
break;
case HEM_MIDI_TRIG_OUT:
case HEM_MIDI_TRIG_1ST_OUT:
case HEM_MIDI_TRIG_ALWAYS_OUT:
case HEM_MIDI_CLOCK_OUT:
case HEM_MIDI_START_OUT:
HS::frame.clocked[chan] |= HS::frame.MIDIState.trigout_q[chan];
Expand Down Expand Up @@ -1060,7 +1077,7 @@ class QuadAppletManager : public HSApplication {
const char * cursor_mode_name[3] = { "modal", "modal+wrap" };
gfxPrint(1, 35, "Cursor: ");
gfxPrint(cursor_mode_name[HS::cursor_wrap]);

switch (config_cursor) {
case TRIG_LENGTH:
gfxCursor(80, 23, 24);
Expand Down
Loading