Rework the processing of shift status, part 2. Removed the ? prefix, rules are now anyshift by default. The prefix 0^ now denotes a rule only active in unshifted state.
parent
4ceef9cbd9
commit
b7701e496b
|
@ -44,7 +44,7 @@ JACK_PORTS 2
|
||||||
|
|
||||||
# The APCmini's dedicated shift key is used to provide alternative functions
|
# The APCmini's dedicated shift key is used to provide alternative functions
|
||||||
# to some of the buttons and the faders.
|
# to some of the buttons and the faders.
|
||||||
?D8 SHIFT RELEASE SHIFT
|
D8 SHIFT RELEASE SHIFT
|
||||||
|
|
||||||
# transport (assigned to the topmost 5 "scene launch" buttons on the right)
|
# transport (assigned to the topmost 5 "scene launch" buttons on the right)
|
||||||
A#6 A7 # Stop
|
A#6 A7 # Stop
|
||||||
|
@ -140,7 +140,7 @@ CC53[] PB[129]-6
|
||||||
CC54[] PB[129]-7
|
CC54[] PB[129]-7
|
||||||
CC55[] PB[129]-8
|
CC55[] PB[129]-8
|
||||||
# master fader
|
# master fader
|
||||||
?CC56[] PB[129]-9
|
CC56[] PB[129]-9
|
||||||
|
|
||||||
# faders become encoders when shifted (CC16..CC23, incremental mode)
|
# faders become encoders when shifted (CC16..CC23, incremental mode)
|
||||||
^CC48= CC16~
|
^CC48= CC16~
|
||||||
|
@ -187,7 +187,7 @@ G#7 D7
|
||||||
# 1 yellow and 1 red LED seems to work reasonably well, but you might want to
|
# 1 yellow and 1 red LED seems to work reasonably well, but you might want to
|
||||||
# adjust the colors and the mapping of the meter values to your liking.
|
# adjust the colors and the mapping of the meter values to your liking.
|
||||||
|
|
||||||
?CP[16] C2{0,1} G#2{0:3,1} E3{0:6,1} C4{0:9,5} G#4{0:12,3}
|
CP[16] C2{0,1} G#2{0:3,1} E3{0:6,1} C4{0:9,5} G#4{0:12,3}
|
||||||
|
|
||||||
# NOTE: We only report the values as we receive them here, there's no
|
# NOTE: We only report the values as we receive them here, there's no
|
||||||
# automatic decay of the meters like with real Mackie hardware. Thus we
|
# automatic decay of the meters like with real Mackie hardware. Thus we
|
||||||
|
@ -195,7 +195,7 @@ G#7 D7
|
||||||
# does *not* do that automatically.) NB: We use CC0 as a macro here,
|
# does *not* do that automatically.) NB: We use CC0 as a macro here,
|
||||||
# hopefully this won't occur as real feedback?
|
# hopefully this won't occur as real feedback?
|
||||||
|
|
||||||
?CC0[1] $CP{0} $CP{16} $CP{32} $CP{48} $CP{64} $CP{80} $CP{96} $CP{112}
|
CC0[1] $CP{0} $CP{16} $CP{32} $CP{48} $CP{64} $CP{80} $CP{96} $CP{112}
|
||||||
|
|
||||||
# This decodes the least significant digit in the time display (CC69) to count
|
# This decodes the least significant digit in the time display (CC69) to count
|
||||||
# off time on the 4 bottommost scene launch buttons. Note that the digits are
|
# off time on the 4 bottommost scene launch buttons. Note that the digits are
|
||||||
|
@ -203,7 +203,7 @@ G#7 D7
|
||||||
# lists below to skip over all the non-digit characters at the beginning of
|
# lists below to skip over all the non-digit characters at the beginning of
|
||||||
# the ASCII table.
|
# the ASCII table.
|
||||||
|
|
||||||
?CC69[] F7{0:49,1,0} E7{0:50,1,0} Eb7{0:51,1,0} D7{0:52,1,0}
|
CC69[] F7{0:49,1,0} E7{0:50,1,0} Eb7{0:51,1,0} D7{0:52,1,0}
|
||||||
|
|
||||||
# no feedback for faders (faders aren't motorized)
|
# no feedback for faders (faders aren't motorized)
|
||||||
|
|
||||||
|
@ -211,42 +211,42 @@ G#7 D7
|
||||||
# mode, so that the (shifted) bank/channel left/right keys work as expected.
|
# mode, so that the (shifted) bank/channel left/right keys work as expected.
|
||||||
|
|
||||||
# rec: color = red (vel. 3)
|
# rec: color = red (vel. 3)
|
||||||
?C0 C0[3]
|
C0 C0[3]
|
||||||
?C#0 C#0[3]
|
C#0 C#0[3]
|
||||||
?D0 D0[3]
|
D0 D0[3]
|
||||||
?D#0 D#0[3]
|
D#0 D#0[3]
|
||||||
?E0 E0[3]
|
E0 E0[3]
|
||||||
?F0 F0[3]
|
F0 F0[3]
|
||||||
?F#0 F#0[3]
|
F#0 F#0[3]
|
||||||
?G0 G0[3]
|
G0 G0[3]
|
||||||
|
|
||||||
# solo: color = green (vel. 1)
|
# solo: color = green (vel. 1)
|
||||||
?G#0 G#0[1]
|
G#0 G#0[1]
|
||||||
?A0 A0[1]
|
A0 A0[1]
|
||||||
?A#0 A#0[1]
|
A#0 A#0[1]
|
||||||
?B0 B0[1]
|
B0 B0[1]
|
||||||
?C1 C1[1]
|
C1 C1[1]
|
||||||
?C#1 C#1[1]
|
C#1 C#1[1]
|
||||||
?D1 D1[1]
|
D1 D1[1]
|
||||||
?D#1 D#1[1]
|
D#1 D#1[1]
|
||||||
|
|
||||||
# mute: color = yellow (vel. 5)
|
# mute: color = yellow (vel. 5)
|
||||||
?E1 E1[5]
|
E1 E1[5]
|
||||||
?F1 F1[5]
|
F1 F1[5]
|
||||||
?F#1 F#1[5]
|
F#1 F#1[5]
|
||||||
?G1 G1[5]
|
G1 G1[5]
|
||||||
?G#1 G#1[5]
|
G#1 G#1[5]
|
||||||
?A1 A1[5]
|
A1 A1[5]
|
||||||
?A#1 A#1[5]
|
A#1 A#1[5]
|
||||||
?B1 B1[5]
|
B1 B1[5]
|
||||||
|
|
||||||
# select (will light up in red)
|
# select (will light up in red)
|
||||||
# NOTE: Ardour apparently doesn't update these when changing banks.
|
# NOTE: Ardour apparently doesn't update these when changing banks.
|
||||||
?C2 E5
|
C2 E5
|
||||||
?C#2 F5
|
C#2 F5
|
||||||
?D2 F#5
|
D2 F#5
|
||||||
?D#2 G5
|
D#2 G5
|
||||||
?E2 G#5
|
E2 G#5
|
||||||
?F2 A5
|
F2 A5
|
||||||
?F#2 A#5
|
F#2 A#5
|
||||||
?G2 B5
|
G2 B5
|
||||||
|
|
|
@ -24,7 +24,7 @@ SYSTEM_PASSTHROUGH # pass through MCP feedback
|
||||||
|
|
||||||
# We use the Mk3's dedicated SHIFT button as our primary shift key, to provide
|
# We use the Mk3's dedicated SHIFT button as our primary shift key, to provide
|
||||||
# alternative functions to some of the buttons and the faders.
|
# alternative functions to some of the buttons and the faders.
|
||||||
?F2 SHIFT ^F2 RELEASE SHIFT ^F2
|
F2 SHIFT ^F2 RELEASE SHIFT ^F2
|
||||||
|
|
||||||
# transport (assigned to the transport section on the bottom left)
|
# transport (assigned to the transport section on the bottom left)
|
||||||
F#5 A7 # Stop
|
F#5 A7 # Stop
|
||||||
|
@ -82,9 +82,9 @@ C2 E8 # Zoom
|
||||||
# buttons as additional shift keys. These are "Caps Lock"-style keys which
|
# buttons as additional shift keys. These are "Caps Lock"-style keys which
|
||||||
# stay on until pressed again.
|
# stay on until pressed again.
|
||||||
|
|
||||||
?F#4 SHIFT2 ^F#4
|
F#4 SHIFT2 ^F#4
|
||||||
?G4 SHIFT3 ^G4
|
G4 SHIFT3 ^G4
|
||||||
?G#4 SHIFT4 ^G#4
|
G#4 SHIFT4 ^G#4
|
||||||
|
|
||||||
# top row, unshifted: track select
|
# top row, unshifted: track select
|
||||||
G6 C2
|
G6 C2
|
||||||
|
@ -173,7 +173,7 @@ C3 PC6-10
|
||||||
C#3 PC7-10
|
C#3 PC7-10
|
||||||
|
|
||||||
# big encoder assigned to MCP jog wheel
|
# big encoder assigned to MCP jog wheel
|
||||||
?CC0~ CC60~
|
CC0~ CC60~
|
||||||
|
|
||||||
# encoders mapped to MCP channel faders
|
# encoders mapped to MCP channel faders
|
||||||
# (MC uses pitch bends here, use 129 as step size to get full range)
|
# (MC uses pitch bends here, use 129 as step size to get full range)
|
||||||
|
@ -229,8 +229,8 @@ C#7 D#5
|
||||||
F4 C#6
|
F4 C#6
|
||||||
|
|
||||||
# channel left/right keys
|
# channel left/right keys
|
||||||
?C4 E6
|
C4 E6
|
||||||
?C#4 A5
|
C#4 A5
|
||||||
|
|
||||||
# row above grid (track/pan/send/instr)
|
# row above grid (track/pan/send/instr)
|
||||||
E3 G#3
|
E3 G#3
|
||||||
|
@ -250,14 +250,14 @@ E8 C#2[4] D2[4] D#2[4] E2[4]
|
||||||
|
|
||||||
# select
|
# select
|
||||||
# NOTE: Ardour apparently doesn't update these when changing banks.
|
# NOTE: Ardour apparently doesn't update these when changing banks.
|
||||||
?C2 G6
|
C2 G6
|
||||||
?C#2 G#6
|
C#2 G#6
|
||||||
?D2 A6
|
D2 A6
|
||||||
?D#2 A#6
|
D#2 A#6
|
||||||
?E2 B6
|
E2 B6
|
||||||
?F2 C7
|
F2 C7
|
||||||
?F#2 C#7
|
F#2 C#7
|
||||||
?G2 D7
|
G2 D7
|
||||||
|
|
||||||
# no feedback for encoders, only touchstrip
|
# no feedback for encoders, only touchstrip
|
||||||
PB[128]{0}-9 CC9'
|
PB[128]{0}-9 CC9'
|
||||||
|
@ -267,35 +267,35 @@ PB[128]{0}-9 CC9'
|
||||||
|
|
||||||
# rec/solo/mute
|
# rec/solo/mute
|
||||||
|
|
||||||
?C0[] C0
|
C0[] C0
|
||||||
?C#0[] C#0
|
C#0[] C#0
|
||||||
?D0[] D0
|
D0[] D0
|
||||||
?D#0[] D#0
|
D#0[] D#0
|
||||||
?E0[] E0
|
E0[] E0
|
||||||
?F0[] F0
|
F0[] F0
|
||||||
?F#0[] F#0
|
F#0[] F#0
|
||||||
?G0[] G0
|
G0[] G0
|
||||||
|
|
||||||
?G#0[] G#0
|
G#0[] G#0
|
||||||
?A0[] A0
|
A0[] A0
|
||||||
?A#0[] A#0
|
A#0[] A#0
|
||||||
?B0[] B0
|
B0[] B0
|
||||||
?C1[] C1
|
C1[] C1
|
||||||
?C#1[] C#1
|
C#1[] C#1
|
||||||
?D1[] D1
|
D1[] D1
|
||||||
?D#1[] D#1
|
D#1[] D#1
|
||||||
|
|
||||||
?E1[] E1
|
E1[] E1
|
||||||
?F1[] F1
|
F1[] F1
|
||||||
?F#1[] F#1
|
F#1[] F#1
|
||||||
?G1[] G1
|
G1[] G1
|
||||||
?G#1[] G#1
|
G#1[] G#1
|
||||||
?A1[] A1
|
A1[] A1
|
||||||
?A#1[] A#1
|
A#1[] A#1
|
||||||
?B1[] B1
|
B1[] B1
|
||||||
|
|
||||||
# meter values
|
# meter values
|
||||||
?CP[] CP
|
CP[] CP
|
||||||
|
|
||||||
# NOTE: We only report the values as we receive them here, there's no
|
# NOTE: We only report the values as we receive them here, there's no
|
||||||
# automatic decay of the meters like with real Mackie hardware. Thus we
|
# automatic decay of the meters like with real Mackie hardware. Thus we
|
||||||
|
@ -303,16 +303,16 @@ PB[128]{0}-9 CC9'
|
||||||
# does *not* do that automatically.) NB: We use CC0 as a macro here,
|
# does *not* do that automatically.) NB: We use CC0 as a macro here,
|
||||||
# hopefully this won't occur as real feedback?
|
# hopefully this won't occur as real feedback?
|
||||||
|
|
||||||
?CC0[1] CP{0} CP{16} CP{32} CP{48} CP{64} CP{80} CP{96} CP{112}
|
CC0[1] CP{0} CP{16} CP{32} CP{48} CP{64} CP{80} CP{96} CP{112}
|
||||||
|
|
||||||
# timecode
|
# timecode
|
||||||
?CC64[] CC64
|
CC64[] CC64
|
||||||
?CC65[] CC65
|
CC65[] CC65
|
||||||
?CC66[] CC66
|
CC66[] CC66
|
||||||
?CC67[] CC67
|
CC67[] CC67
|
||||||
?CC68[] CC68
|
CC68[] CC68
|
||||||
?CC69[] CC69
|
CC69[] CC69
|
||||||
?CC70[] CC70
|
CC70[] CC70
|
||||||
?CC71[] CC71
|
CC71[] CC71
|
||||||
?CC72[] CC72
|
CC72[] CC72
|
||||||
?CC73[] CC73
|
CC73[] CC73
|
||||||
|
|
|
@ -1377,14 +1377,14 @@ start_translation(translation *tr, char *which_key)
|
||||||
int k = 0, offs = 0;
|
int k = 0, offs = 0;
|
||||||
if (isdigit(which_key[0]) && which_key[1] == '^') {
|
if (isdigit(which_key[0]) && which_key[1] == '^') {
|
||||||
offs = 2; k = which_key[0]-'0';
|
offs = 2; k = which_key[0]-'0';
|
||||||
if (k<1 || k>N_SHIFTS) {
|
if (k<0 || k>N_SHIFTS) {
|
||||||
fprintf(stderr, "invalid shift key: [%s]%s\n", current_translation, which_key);
|
fprintf(stderr, "invalid shift key: [%s]%s\n", current_translation, which_key);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else if (*which_key == '^') {
|
} else if (*which_key == '^') {
|
||||||
offs = k = 1;
|
offs = k = 1;
|
||||||
} else if ((anyshift = *which_key == '?')) {
|
} else {
|
||||||
offs = 1; k = 0;
|
anyshift = 1;
|
||||||
}
|
}
|
||||||
if (parse_midi(which_key+offs, buf, 1, 0, &status, &data, &step, &n_steps, &steps, &incr, &dir, &mod, &swap)) {
|
if (parse_midi(which_key+offs, buf, 1, 0, &status, &data, &step, &n_steps, &steps, &incr, &dir, &mod, &swap)) {
|
||||||
int chan = status & 0x0f;
|
int chan = status & 0x0f;
|
||||||
|
|
Loading…
Reference in New Issue