I have had some success.
tl:dr Extract jac/mod-host settings from
/var/modep/pedalboards, set up
mod-host effects and all the jack piping between then have my pedal driver own a jack client and just adjust the system:… jack pipes.
I gave up talking to the Modep process. After finding it took ~500ms to use
modep-ctrl I did spend some time hacking around the
tomahawk based server to talk to it directly (that is not through the web stack).
This was not fun, I am no fan of
python, and fun is the point, partly. I looked closely at the way it interacted with the
/var/modep/pedslboard/ files, and it was doing a lot I did not need (I am not using midi). So I did a swerve away from that and wrote a perl script to read those files and collect the settings for
jack. Set up
mod-host and the
jack connections between the
mod-host effects. Leaving just the I/O connections (involving
jack pipes of starting with “system:”)
Writing a programme that reads the definitions of the
jackI/O, connect to
jack and disconnect/connect what is needed to switch pedalboards was very disappointing. Took ~200ms. Really? Why is Jack so slow…
Turns out it takes about 200ms to initialise a
jack client. (Aside: Really Jack? What are you thinking? I have not opened the box and looked in, much, so I do not know what you are doing when you initialise a client, but 200ms???)
So now I have integrated the
jack client into my pedal driver and I am achieving 5 to 50 ms regularly. I can switch pedals without any audible click.
I will post the code to github soon. Some corners to shave etcetera.
It would be nice if I could make this play nicer with
modep. Currently when I start my process I shut down
The next step might be to let modep set up all the pedal boards (I have to modify it to not ever take them down unless they are edited) and switch the jack inputs only. I have been following the path of least resistance to getting to the goal of having a set of digital effects that I can design in
modep and run with a pedal.
There will be a better way - but good enough is good enough, then I make it better.