Rockband drums (joystick) as a drum controller


#41

That script will handle the installation ok, but we still the issue that the jack config is not persistent.
It can set it after boot with qjackctl, but it get over written each time.

Where is Jackd run in the zynthian boot process, is there a config file I can modify?


#42

ok, so I adde following to /etc/rc.local to start it on boot

rbdrums2midi -c 9

then qjackctl, save configuration in patchbay:

Then set persistence in the qjackctl setup tab:

image

how do i run the patch without running qtjackctl ?


#43

can you just use the jack_connect utility in your rc.local script? Use jack_lsp to list out the available ports


#44

awesome cheers,

jack_connect “a2j:Game Drumkit Client [128] (capture): Game Drumkit port 2” “ZynMidiRouter:main_in”

  • works from command line, but not from rc.local, is zynthian over writing it somehow ?
    I take it Zynthian start applications somewhere other than rc.local ?

#45

Maybe helps specifying full path to jack_connect in rc.local.


#46

unfortunately it did not help


#47

how is it a way to make joystick as midi control data buttons to move the preset e faster as in the link : http://www.genovation.com/midipatch.htm


#48

We really want to bolt this in to the system the same way we do everything else.

We need to add systemd support and include some way of configuring ( config file ) the port that it appears on. Althou’ qjackctl is great for seeing what is going on it will end up fighting the zynthian systemd based infrastructure which is systemd based.

In answer to my own question above:

CMake is a system to generate make files based on the platform (i.e. CMake is cross platform) which you can then make using the generated makefiles. While make is you directly writing makefile for a specific platform that you are working with. If your product is crossplatform, then CMake is a better choice.


#49

I think, perhaps that link is 404.


#50

Gotcha, I will research the systemd approach instead…

from: https://www.devdungeon.com/content/creating-systemd-service-files

create a service file under /etc/systemd/system/

[Unit]
Description=My rbdrum2midi Service
After=network.target

[Service]
Type=simple

User=root
Environment=HOME=/root
Environment=PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/zynthian/zynthian-sys/sbin
WorkingDirectory=/zynthian/

ExecStart= /usr/local/bin/rbdrum2midi -r 38 -y 40 -b 45 -g 41 -ycy 46 -bcy 49 -gcy 51 -ob 36 -c 9
ExecStartPost= /usr/bin/jack_connect “a2j:Game Drumkit Client [128] (capture): Game Drumkit port 2” “ZynMidiRouter:main_in”

Restart=on-failure

[Install]
WantedBy=multi-user.target

rbdrum2midi_daemon.service (618 Bytes)

systemctl start, should start it … but it doesn’t seem to like the paths?

root@zynthian:~# systemctl status rbdrums2midi_daemon.service
● rbdrums2midi_daemon.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)


#51

Anyone familure with systemd got any ideas?

both commands:
/usr/local/bin/rbdrum2midi -r 38 -y 40 -b 45 -g 41 -ycy 46 -bcy 49 -gcy 51 -ob 36 -c 9
/usr/bin/jack_connect “a2j:Game Drumkit Client [128] (capture): Game Drumkit port 2” “ZynMidiRouter:main_in”

function independently, but something failed in the service?


#52

Does it have the proper requirements like USB components in place (requires etc)?


#53

ok this seems to e working:

split into two files + corrected paths

rbdrum2midi_daemon.service (641 Bytes)
rbjackroute_daemon.service (703 Bytes)

This works when I run manually using systctrl start rbdrum2midi_daemon , but does not appear to start on boot.

(USB device is plugged in for boot)

Perhaps I need to delay its start?


#54

systemd isn’t so much about delays but dependencies. I suspect it requires some other service to be loaded before it will start as a service.

If you do systemctl status you get to see the whole tree so if you manually start up your services you should see what they are dependent on with the status command.

And you have enabled the service …?

Enabling and Disabling Services

The above commands are useful for starting or stopping commands during the current session. To tell systemd to start services automatically at boot, you must enable them.
To start a service at boot, use the enable command:

sudo systemctl enable application.service

#55

looks like the jack routing service was coning up to fast (before the rbdrum2midi daemon had created the port)

adding ExecStartPre=/bin/sleep 10
to the rbjackroute daemon seams to have done it