i’ve ordered a launch control, should arrive next week. in the meantime, here is an example of using the MIDI IN ops to create a ryk m185 style sequencer intended to be used with korg nanokontrol2 (but could be easily adapted for other controllers):
rykm185.txt (1.9 KB)
the scene assumes factory settings on nanokontrol (i’m on windows 10 and korg does not have a working editor for it). one improvement that could be made is making buttons latching so you get visual feedback on the controller itself - or you could just use the grid visualizer by going to the live screen and pressing alt-g once or twice.
- knobs control sequence notes
- faders control repetitions 1-8
-
S buttons select slides
-
M buttons mute steps
-
R buttons switch between 1/all
- start/stop control sequencer
-
<< >> control direction
- param knob controls speed
scene breakdown
#I
MI.$ 3 1
O.MIN 0; O.MAX 7; O.INC 1
Z 0
assign MIDI CC events to script 1
set up variable O to be used as the current step number
#1
J MI.CL
L 1 J: A MI.C; B MI.CC; $ 2
for every received MIDI CC event, store the controller number in A and the value in B and execute script 2
#2
IF && B == A 41: M.ACT 1; BRK
IF && B == A 42: M.ACT 0; BRK
IF && B == A 43: O.INC -1; BRK
IF && B == A 44: O.INC 1; BRK
SCRIPT 3
if controller number is 41 (play button) start the metro script
if it’s 42 (stop button), stop it
if it’s 43 (<<) change direction to reverse
if it’s 44 (>>) change direction to forward
#3
IF < A 24: SCRIPT 4; BRK
IF == B 0: BREAK
PN 1 - A 32 ! PN 1 - A 32
L 0 7: SCRIPT 5
if controller number is less than 24 (so either faders or knobs) call script 4 and exit.
at this point it should only be one of the buttons, in the default mapping buttons send CC 0 or 127, since they’re momentary we only want to react to when CC is not 0.
pattern bank 1 stores states of slides/mutes/repeats. whenever a button is pressed we flip it (using ! op). as buttons controller numbers start with 32 we subtract it so we can store everything in one pattern bank. script 5 will show current states using the grid visualizer.
#4
K ? > A 8 11 7
P A SCL 0 127 0 K B
script 4 is called when either knobs or faders were moved. we store their values in pattern bank 0 - for knobs (notes) we scale 0…127 CC range to 0…11 (one octave), for faders (repeats) we scale it to 0…7
#5
C * I 2
G.LED C 1 ? PN 1 I 15 4
G.LED C 3 ? PN 1 + 16 I 15 4
G.LED C 5 ? PN 1 + 32 I 15 4
use grid ops to visualize current states for slides/mutes/repeats
#7
G.REC 0 7 16 1 0 0
G.LED * D 2 7 15
DEL / M 2: G.REC 0 7 16 1 0 0
visualize current step - first clear the bottom row, then draw a dot and clear it again after each repeat
#8
D O; Z P D
SC.CV 1 N + 20 P + D 16
SC.CV.SLEW 1 ? PN 1 D V 1 0
Y PN 1 + D 32; X ! PN 1 + D 16
get the current step from O (which will increment/decrement) in D so we can use it multiple times. set Z to the number of repetitions for the current step. set CV (er-301 CV here) to the pitch of the current value, set the slew based on the slide state for the current step, Y is set if only one repeat and X is set if the step is not muted.
#M
M SCL 0 V 10 400 30 PRM
IF < Z 1: SCRIPT 8
IF X: SC.TR.P 1; SCRIPT 7
IF ! Y: X 0
Z - Z 1
use the param knob to determine the speed.
if no repetitions left, get the next step, otherwise check if it’s not muted and send a trigger. if only one repeat, set X to 0 so it won’t trigger any more for this step. finally, decrement repetitions.
video demo