Can you emulate a joystick?

knalle's icon

I want to have Max/MSP outputting a movement on a joystick-axis.
So can you trick windows (XP) to thinking a joystick is plugged in (soit can be used with games or other pieces of software accepting joystick input).

It will need like a driver emulating a joystick right?

Trum's icon

Not sure if Max is able to output the information I think Hi is definatly a one way thing, I'm not sure if you could do that with Junxion from Steim (i've been looking into its possibilities this week) Other than that, I wouldnt know how you could do it- since computers dont have joystick ports any more- you couldnt do things that way.

Good luck with your search.
T

knalle's icon

I have found a way - though not tested it.

Max/MSP MIDI out --> MIDI Yoke --> PIE (Programmable Input Editor) --> PPJoy (and its joystick driver)

I dunno if there is much lag this way around, but I think I'm going to try it.

wippen's icon

Max/MSP MIDI out --> MIDI Yoke --> PIE (Programmable Input Editor) --> PPJoy (and its joystick driver)

Sounds feasable, but complicates things. How about an "emulateJoystick" object sending messages (such as "MM_JOY1BUTTONDOWN") to the OS? I've written these for the mouse, keyboard and filesystem; seems pretty straightforward...

knalle's icon

yeah that would probalby work a lot quicker. Also I've heard mixed results with MIDI Yoke on XP - I don't know how to send those joystick messages.

Could you give me an example of how to, for instance, send a button on the joystick being pressed?

TIA

yacine's icon

as Dayton wrote, Ppjoy is definitly the tool to use.
I did that joystick emulation once.
Ppjoy comes with a serial to joystick converter, so you don't need to write an object with the C
library that also come with it. then send data with the [serial] object from another computer.
that's how I did it.

//yac

knalle's icon

yeah leaving the midi out of this sounds like a good idea. Im currently looking into some serial cable loopback driver, so I won't need to PCs for this.

Any other suggestions on how to do this are most welcome!

knalle's icon

hmm PIE isnt accepting midi input.. I can get maxmsp to catch midiout from PIE with no problems.

I need another way, for getting the stuff into PIE - or directly send the joystick commands to windows.
I have only just started on C - so I'm no experienced programmer.

So any help would be great!