Video Game controllers

I’d like to use cheap video game controllers like joysticks as external controllers for my limited school budget. I’ve read the section in the tutorial, but still don’t understand how I would use non-MIDI external controllers. Somehow I would need to change the joystick data coming from the USB into a MIDI signal and then send that to SonicPi? I would need to do this on both Macs and PCs.
Thanks for any advice!

I’ve used a ps3 controller with Sonic Pi see Rpi GPIO hardware as inputs/controllers - #3 by robin.newman
It may need updating as is an old project.
In some of the OSC calls and OSC port now 4560

Thanks Robin! I’ll take a look into your project.