Trying to figure out how to take advantage of a game controller to quickly send data to a running pattern. Started with a prof of concept one to keep it simple, but I’m stuck cause i can only use one of the controller’s sticks, left one. This below works, but how do i access the rest of the features/controls (the right stick, trigger buttons, d-pad, etc)? It’s my first time using HID stuff. Checked documentation but I could not figure it out, sorry if it’s supposed to be obvious.
MIDIClient.init;
~outport1 = 0; m = MIDIOut(~outport1);
~myhid = HID.open(121, 6172);
~k1 = 1; ~n1 = 4; Pdefn(\amp1, Pseq(Bjorklund(~k1, ~n1).postln, inf));
Pdef(\x, Pbind(\type, \midi, \chan, 0, \midicmd, \noteOn, \midiout, m, \midinote, 49, \dur, 0.12, \amp, Pdefn(\amp1))).play;
HIDdef.usage( \amp, { |value| ~k1 = value.linexp(0, 1, 1, 12); ~n1 = value.linlin(0, 1, 3, 20); Pdefn(\amp1, Pseq(Bjorklund(~k1, ~n1).postln, inf)) }, \X );
CHEERS!