Here is the setup i'm looking to do:

midi master -> special program
ddr pad -> special program
special program -> hydrogen

I've got a hardware midi device controlling the master tempo. aseqdump shows the tempo messages x times a second.

I want to either find or make a program so I can use a ddr pad (usb gamepad) and assign different timed midi patterns to the buttons, so for example:
if the program is configured for 4/4 time, when I hold down or toggle a button

if note 36 is a bass drum and 41 is a snare then you'd have a basic drum and snare beat when both buttons are held down or toggled, of course i'd like to be able to have multiple patterns bound per button as well

button one is set to play a quarter note midi note 36, then rest for the remaining 3 beats
1 - 36,quarter|rest,quarter|36,quarter|rest,quarter
2 - 41,eighth|rest,eighth|41,eighth|rest,eighth|41,eighth|rest,eighth|41,eighth|rest,eighth

Each pattern would describe one measure, and the flow of a live solo performance could easily be changed on the fly, leaving hands free to play guitar.

Anything out there like this, and I just don't know about it?

If I don't find anything I want to hack something together, so a primer on midi tempo sync, and how to program with it would be appreciated.

Thanks,
Nathanael