Thursday, January 30, 2020

Using the Mod Devices guitar effects interface on Raspberry Pi 4


My last post was about getting my Boss GT-1 guitar effects floorboard to work in Linux. The reason I wanted to do this was to couple it with a Raspberry Pi to create a more configurable effect chain using LV2 plugins.

Once I had audio working, I installed Guitarix, an open-source guitar effects stack for Linux, and I was quickly off to the races. Guitarix works really well, but the interface is designed for desktop use - not ideal for my needs.

I had been aware of Mod Devices for a while, with their Mod Duo multi-effects hardware pedals built on top of Linux. They have added a slick, web-based pedalboard interface running on top of LV2 plugins. It is primarily designed for their hardware devices, but the project is open source.

The folks over at blokas.io have a project called MODEP, which provides a custom Raspberry Pi image for running the Mod Devices interface. Unfortunately, it currently does not work on Raspberry Pi 4, which is what I have.

So, I went straight to the Mod Devices GitHub and built it myself. It turned out to be pretty straightforward, and I was up and running after about a half an hour of tinkering. I'm going to try to outline what I did here in case anyone else wants to give it a try:

Get Jack running with audio capture and playback - there is plenty of information out there on this

Get the Mod software from GitHub:
  git clone --depth 1 https://github.com/moddevices/mod-host
  git clone --depth 1 https://github.com/moddevices/mod-ui
Install the tools you need to build the mod software. You'll need at least:
sudo apt-get install virtualenv python3-pip python3-dev git build-essential libasound2-dev libjack-jackd2-dev liblilv-dev libjpeg-dev zlib1g-dev
Build mod-host from the mod-host directory:
make
sudo make install
cd mod-ui
make
sudo make install
Make sure Jack is running, and start mod-host:
mod-host -n -p 5555 -f 5556
In another shell, build mod-ui from the mod-ui directory:
virtualenv modui-env
source modui-env/bin/activate
pip3 install -r requirements.txt
make -C utils
Run mod-ui from the mod-ui directory (you will also need to do "source modui-env/bin/activate" first if you did not just do it in the above build step):
export MOD_DEV_HOST=0
export MOD_DEV_ENVIRONMENT=1
export MOD_APP=1
export MOD_LIVE_ISO=1
python3 ./server.py
The mod-ui web server should now be running on port 8888. To access it, find out the IP address of your Raspberry Pi, and go to:
http://YOUR-PI-IP:8888/
You should see the Mod pedalboard interface. It should load whatever LV2 plugins you have in /usr/lib/lv2 with a generic look. In my case, I had Guitarix installed and all of its plugins were there and ready to be used.

The Mod folks have custom UI overlays for most popular plugins. You can grab them here:
git clone --depth 1 https://github.com/moddevices/mod-lv2-data
Look in the "plugins" and "plugins-fixed" sub-folders for your plugins. If you copy a plugin folder over your existing plugin in /usr/lib/lv2, you will install the custom UI for the plugin.

My Pi 4 has no trouble at all running a decently complex guitar effect stack, complete with multiple pedals and pre-amp and cabinet simulation, all at very low latency.

6 comments:

  1. Could I follow these instructions to install the Pedalboard software on my Ubuntu Studio desktop, or are they specifically for the RPi? I tried Modep on my Pi2 but it didn't play with my FastTrackPro nicely.

    ReplyDelete
    Replies
    1. Nothing here should be specific to the Pi - it should work fine on other Linux boxes.

      Delete
  2. Thanks, I gave it a go but I can't get past the first MAKE for some reason - it can't find the Jack or "lilv-0" packages (Jack is running). I've no real experience of this Linux stuff so have no idea how to fix it! (I'm on Ubuntu Studio LTS 18.05, so maybe too old now? It failed to get one of the launchpad items too.)

    ReplyDelete
    Replies
    1. It is possible that the dependencies have changed. Make sure that you installed the necessary support packages, though (the "sudo apt-get install ..." line from the instructions above).

      Delete
  3. Yes, that seems the problem 'apt-get update' returns the following error:
    "E: The repository 'http://ppa.launchpad.net/rncbc/bionic/ubuntu bionic InRelease' is no longer signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default."
    I guess I'm too late to the party?

    ReplyDelete
    Replies
    1. Yeah - it sounds like you have more general issues that need to be resolved.

      Delete