Hi all. Some time ago I was fiddling with John Woo Park's Dualshock-to-Supercollider work and ended up with a supercollider snippet to send that data to Tidal. It's been a while, no idea if it still works, but I remember having fun with it.
Word of advice: sending /ctrl
to tidal means some response latency depending on your setup. If you just want to control external synth params, routing it directly via SC seems best.
s.waitForBoot {
~tidalctrl = NetAddr.new("localhost", 6010);
// Connect Dualshock
HID.findAvailable;
if (HID.findBy(1356, 2508).size > 0, {
~dualshock = HID.open(1356, 2508);
// Send DualShock input to Tidal
~senddskey = { |...args|
~keyname = args[0];
// (~keyname + " " + args[2]).postln;
~tidalctrl.sendMsg("/ctrl", ~keyname, args[2]);
};
// Forward Dualshock Input to appropriate inputs
~dskey = { |n, keyname| HIDFunc.element({ |...args| ~senddskey.value(keyname, *args)}, [n]); };
~dskey.value(0,"joylx");
~dskey.value(1,"joyly");
~dskey.value(2,"joyrx");
~dskey.value(3,"joyry");
~dskey.value(4,"triangle");
~dskey.value(5,"square");
~dskey.value(6,"cross");
~dskey.value(7,"circle");
});
}