raysan5 / raylib

A simple and easy-to-use library to enjoy videogames programming
http://www.raylib.com
zlib License
21.8k stars 2.21k forks source link

[request] USB Module #1405

Closed carlsmith closed 3 years ago

carlsmith commented 3 years ago

I'd like to request including a low-level USB module that allows direct USB communication, rather than wrapping HID profiles (similar to the Web USB API).

Personally, I'd like to make audio software for Launchpads, DJ controllers et cetera, but a USB library would open up support for many different kinds of peripheral, from game related stuff (like the various Rock Band / DJ Hero style controllers) to industrial equipment, scientific instruments and household appliances (where raylib is especially well-suited to prototyping).

As modern computers usually lack any kind of parallel or serial ports, even peripherals like Nintendo Zappers and Super Scopes would almost always use USB with some kind of adapter in practice. So, in a sense, this is a request for a novel peripherals module.

masterex1000 commented 3 years ago

If by "low-level" usb library you mean being able to write code to directly communicate with usb devices, that would require you to write a driver, which is a whole other thing.

But Luckily, If your just worried about Launchpads and DJ controllers, They usually just use midi for communication. I know for a fact the launchpads do, and also that most usb-dj controllers do to.

So I'm guessing you really just need a way to communicate with midi devices

carlsmith commented 3 years ago

Hi, @masterex1000. A lot of the devices only support MIDI over USB, though many do support plain MIDI as well. To be fair, I should have put more effort into the actual request. I've updated it to make it clearer what I'm asking for.

raysan5 commented 3 years ago

@carlsmith I'm afraid this module is out-of-scope at this moment for raylib. My recommendation is combining raylib with some other USB library that offers that functionality.

carlsmith commented 3 years ago

@raysan5, I'm happy to use an external library for my own projects. I just thought a USB module might be worth proposing. Thanks for considering it.

P.S. I haven't forgotten about the wiki. I've just been busy.