Control Your DAW With A Game Controller Using Xboxdrv.

Bring your custom casings, arduinos, raspberry pi's, axoloti's and other creative hardware projects

Moderators: MattKingUSA, khz

Post Reply
Jodax
Established Member
Posts: 6
Joined: Mon Jun 18, 2018 8:43 pm
Has thanked: 1 time
Been thanked: 1 time

Control Your DAW With A Game Controller Using Xboxdrv.

Post by Jodax »

I used to use a game controller to control Ardour. This 'should' work with any DAW or application that has keyboard shortcuts.

This was really handy when I was sitting with acoustic guitar in lap, in front of the mic, and clammed on a take. No more getting out of position, sitting the guitar down, walking across the room to reset. And I could hit record when I was ready...

Basically, install xboxdrv and then you setup the game controller to execute keyboard shortcuts like arm, record, stop, rewind, forward, undo, etc. You can even page_up and page_down to scroll between tracks.

the xboxdrv.ini for Ardour looked like this...

[xboxdrv]
evdev=/dev/input/event6
silent=true

[evdev-absmap]
ABS_X=x1
ABS_Y=y1
ABS_HAT0X=x2
ABS_HAT0Y=y2

[ui-axismap]
x1=REL_X:0
y1=REL_Y:-0
x2=KEY_LEFT:KEY_RIGHT
y2=KEY_DOWN:KEY_UP

[evdev-keymap]
BTN_TRIGGER=x
BTN_TOP=y
BTN_THUMB=a
BTN_THUMB2=b
BTN_PINKIE=rt
BTN_BASE2=rb
BTN_TOP2=lt
BTN_BASE=lb
BTN_BASE3=back
BTN_BASE4=start

[ui-buttonmap]
x=KEY_LEFTCTRL+KEY_LEFTALT+KEY_SPACE
y=KEY_LEFTCTRL+KEY_Z
a=KEY_LEFTCTRL+KEY_R
b=KEY_LEFTSHIFT+KEY_SPACE
rt=KEY_PAGEUP
rb=KEY_PAGEDOWN
lt=KEY_LEFTSHIFT+KEY_B
lb=KEY_LEFTALT+KEY_S
back=KEY_LEFTSHIFT
start=KEY_LEFTALT+KEY_M

User avatar
Linuxmusician01
Established Member
Posts: 1547
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: Control Your DAW With A Game Controller Using Xboxdrv.

Post by Linuxmusician01 »

Jodax wrote: Tue Mar 19, 2024 3:54 am

I used to use a game controller to control Ardour.

Which game controller?

Jodax
Established Member
Posts: 6
Joined: Mon Jun 18, 2018 8:43 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Control Your DAW With A Game Controller Using Xboxdrv.

Post by Jodax »

Linuxmusician01 wrote: Tue Mar 19, 2024 11:29 am
Jodax wrote: Tue Mar 19, 2024 3:54 am

I used to use a game controller to control Ardour.

Which game controller?

I have two and they both work, a Logitech and a Nyko. Both work with that same script listed above. Pretty sure that any 'windows' compatible USB PC game controller would work. The ones I had laying around were from the WinXP era, but you can still get them on amazon. Xboxdrv also works with Xbox and Xbox360 gamepads... so if you got an old one laying around, it's worth trying.

Looking now, the real problem might be that xboxdrv is deprecated on some distro's... although I did recently (last week) install it on a gentoo machine. I am sure a person resourceful enough to setup a Linux audio workstation could figure out an alternative, in a pinch.

EDIT: I have also used a tv remote control with a capture card to control apps the same way with Lirc in the past...

mcord
Established Member
Posts: 38
Joined: Mon Jul 03, 2023 10:32 am
Has thanked: 21 times
Been thanked: 8 times

Re: Control Your DAW With A Game Controller Using Xboxdrv.

Post by mcord »

An alternative solution is AntimicroX, which is still maintained. I use it regularly with my wireless Xbox 360 Controller and occasionally with my DualShock 4.

Post Reply