Patchbox on a PC?

Hello,
is it possible to install Patchbox OS on a regular laptop ?
And make Modep work that way?

Thanks for you answers!

The downloads offered on this site are compiled to an Arm processor and would not run on an x86 platform. That being said, you might be able to get them to compile on on x86 running Linux.

I would think the easiest thing would be to compile MODP for an existing x86 Linux distro. There are a couple of media-oriented distros for x86 you could try.

My $0.02 (Canadian),
John

You may build MODEP to run on a PC, here’s a little guide I just remembered I had written based on setting it up on a Virtual box image. :slight_smile:

It may be a bit out of date and it also installs only one plugin, the rest is an exercise for readers. :slight_smile: (refer to mod plugin builder repo or modep-debs)

MODEP setup

All commands should be written either when ssh’ed to the guest OS or in a terminal within the guest OS. Lines starting with ‘#’ indicate important notes and don’t need to be entered into the terminal.

Note about **nano**
nano is used to write text contents to files. After pasting snippets, press ‘ctrl+x’, then ‘y’ to save and exit.

When pasting scripts that start with #!, ensure it is the very first line!

General APT dependencies:

sudo apt install git jackd2 libjack-jackd2-dev libreadline-dev liblilv-dev python3-setuptools libasound2-dev python3-pip libjpeg-dev python3-pil python3-tornado

# Pick 'yes' for 'enable real time priority?'

# Remember git password:
git config --global credential.helper store

JACK

sudo nano /etc/systemd/system/jack.service

Paste these contents:

[Unit]
Description=JACK Server
After=sound.target

[Service]
LimitRTPRIO=95
LimitMEMLOCK=infinity
Environment=JACK_NO_AUDIO_RESERVATION=1
Environment=JACK_PROMISCUOUS_SERVER=jack
ExecStart=/etc/jackdrc
User=modep
Group=modep

[Install]
WantedBy=multi-user.target

Save & exit

sudo nano /etc/jackdrc

Paste these contents:

#!/bin/sh
# exec is used to 'morph' the shell interpreter process into jackd process, saving some system resources.
exec /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:0,0 -r 48000 -p 512 -n 3 -X seq -s -S

Execute:

sudo chmod +x /etc/jackdrc
sudo systemctl enable jack
sudo systemctl start jack
sudo systemctl status jack

It should show Jack service as running without any errors. If not, make sure there’s no empty lines at the top of /etc/jackdrc file.

Plugins

cd ~/work
git clone https://github.com/BlokasLabs/mod-distortion
cd mod-distortion
make
sudo make install INSTALL_PATH=/usr/modep/lv2

MOD HOST

cd ~/
mkdir work
cd work

git clone https://github.com/blokaslabs/mod-host
cd mod-host
nano utils/txt2cvar.py
# edit first line, change 'python' to 'python3'
make -j4
sudo make install

If you get error: '``help_msg``' undeclared (first use in this function) or similar error, edit utils/txt2cvar.py again, run make clean and continue from make -j4

sudo nano /etc/systemd/system/modep-mod-host.service

Paste:

[Unit]
Description=MOD-host
After=jack.service
BindsTo=jack.service

[Service]
LimitRTPRIO=95
LimitMEMLOCK=infinity
User=modep
Group=modep
Type=forking
Environment=JACK_PROMISCUOUS_SERVER=jack
Environment=LV2_PATH=/usr/modep/lv2
ExecStart=/usr/local/bin/mod-host -p 5555 -f 5556
Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target

Save & exit

sudo systemctl enable modep-mod-host
sudo systemctl start modep-mod-host
sudo systemctl status modep-mod-host

It should show that the service is running OK

MOD UI

cd ~/work
git clone https://github.com/blokaslabs/mod-ui
cd mod-ui

mkdir -p ~/.modep
make -C utils/
sudo pip3 install -e .



cd ~/work/mod-ui
nano start.sh

Paste contents:

#!/bin/bash

export RESTART_SERVICES=false

while test $# -gt 0; do
        case "$1" in
                -h|--help)
                        echo "start.sh [options]"
                        echo " "
                        echo "options:"
                        echo "-h, --help                show help"
                        echo "-r                        restart jack & mod-host"
                        exit 0
                        ;;
                -r)
                        shift
                        export RESTART_SERVICES=true
                        ;;
                *)
                        shift
                        ;;
        esac
done

wait_jack() {
        for i in {1..5}; do
                sleep 2
                if [ "$(jack_wait -c 2>/dev/null)" = "running" ]; then
                        return
                else
                        echo Still waiting for jack...
                        continue
                fi
        done
        echo Jack still not running!
        exit 1
}

export LV2_PATH=/usr/modep/lv2
export LV2_PLUGIN_DIR=/usr/modep/lv2
export LV2_PEDALBOARDS_DIR=/home/modep/.modep/pedalboards
export MOD_DEV_ENVIRONMENT=0
export MOD_DEVICE_WEBSERVER_PORT=8080
export MOD_LOG=1
export MOD_APP=1
export MOD_LIVE_ISO=0
export MOD_SYSTEM_OUTPUT=1
export MOD_DATA_DIR=/home/modep/.modep
export JACK_PROMISCUOUS_SERVER=jack
export MOD_HTML_DIR=/home/modep/work/mod-ui/html
export MOD_DEFAULT_PEDALBOARD=/home/modep/work/mod-ui/default.pedalboard

if $RESTART_SERVICES; then
        sudo systemctl stop modep-mod-host
        sudo systemctl restart jack
        echo Waiting for jack to start...
        wait_jack
        echo Done.
        sudo systemctl start modep-mod-host
fi

exec mod-ui

Save & exit

chmod +x start.sh

Running MODEP

To start MODEP:

cd ~/work/mod-ui
./start.sh

Open http://127.0.0.1:8080/ on host or guest OS.

To restart MODEP:

  1. Press Ctrl+C
  2. Run ./start.sh again

To restart Jack, MOD HOST and MODEP:

  1. Press Ctrl+C
  2. Run ./start.sh -r
1 Like

https://gitlab.com/blokaslabs/mod-ui this link not working

Sorry, it should have been https://github.com/blokaslabs/mod-ui :slight_smile: