is there a pd patch around that converts joystick signals (i.e. flight simulator joysticks) to midi?
and if not, woud it be easy to make such a patch?
-
Joystick to midi patch
-
try [hid], if it's a usb joystick.
any technology distinguishable from magic
is insufficiently advanced. -
i'm quite a noob when it comes to pd. could you tell me what to do? should i install the driver off the joystick to use? what goes into the input of [hid]? i don't get the object very well.
-
Make the hid object, rightclick the object and select help.
Now you're seeing the possible things with the hid object.
Press print (under refresh and close somewhere in the middle).
All the connected devices using hid will be printed in the console. The joystick must be somewhere in this list.
If there is no other joystick connected I think an open joystick message might work. Press it in the open device object if confused.
If you activate the big green toggle you can read out the parameters of the device. Now you can hook these parameters up with noteout or ctlout messages for the midi part.Hope this is of any help.
I did the same with a mouse some days ago, but now I'm looking for a way to disable the normal commands of the mouse (right click is a midi message for ableton live but it also behaves as a mouse, kind off a problem cause there's also another mouse connected that must behave as a normal mouse. Still trying to figure that one out) -
I've been trying to do this too, but I can't seem to get [hid] to work. I noticed that when I open the help patch, I get:
error: [hid] open /dev/input/event0 failed
error: [hid] can not open device 0
info: open 0
info: device 0Is that normal?
-
send it a [print( like zero suggested. You should get a list of all available devices. Find the joystick in that list, it'll say something like:
device 4: logitech USB joystick
issue a [open 4( or whatever. You can see all this in the help file for [hid].
any technology distinguishable from magic
is insufficiently advanced. -
So if I get nothing on [print(, hid doesn't recognize my device? I have a Nyko Airflo game controller that shows up in Ubuntu's device manager, but when I send a [print( to hid, it comes up blank for "supported events" and "detected."
-
oh yeah, unless you run as root, Ubuntu isn't going to give pd the access to the device list. Hey, it prevents exploits, but it's inconvenient for pd. if you run "sudo pd" then you should get your device list.
any technology distinguishable from magic
is insufficiently advanced. -
Ah, thanks! Didn't know I had to run as root.