just added hid/gamepad support... only have a 14 button gamepad here to test with but seems to work well. for most purposes a hid device is treated just like a midi controller. quick example that maps my start and select buttons to cue+play in traktor:
Code:
open_midi_device("traktor", "traktor", "Traktor to MM", "MM to Traktor")
open_hid_device("gp", "gamepad", "USB Gamepad")
toggle("gp", "start", 0, ON, OFF, "traktor", "play_a")
button("gp", "select", 0, ON, OFF, "traktor", "cue_a")
creating the hid devices files is a bit more fun than midi ones, tho i have created a hidlearn.exe and hiddump.exe to help. "fader" type controls need a manual edit atm afterwards. this is the config for my gamepad, which afaik should work on most. will just need to add in some extra lines to make it work on a gamepad with more controls:
Code:
--
-- direction buttons act as faders even on digital gamepads
--
add_hid_control("left_right", "fader", 3, 0xff)
add_hid_control("up_down", "fader", 4, 0xff)
--
-- bit masks for the rest of the buttons
--
add_hid_control("select", "button", 6, 0x10)
add_hid_control("start", "button", 6, 0x20)
add_hid_control("button1", "button", 5, 0x10)
add_hid_control("button2", "button", 5, 0x20)
add_hid_control("button3", "button", 5, 0x40)
add_hid_control("button4", "button", 5, 0x80)
--
-- the 4 buttons on the back of a gamepad
--
add_hid_control("left1", "button", 6, 0x01)
add_hid_control("right1", "button", 6, 0x02)
add_hid_control("left2", "button", 6, 0x04)
add_hid_control("right2", "button", 6, 0x08)
edit: anyone with a 16 button gamepad could then ofc just use the builtin mdimasher normal or 4banks mode midifighter emulation... from basically a 3 line config file
Bookmarks