THIS BARELY WORKS
A system to control simulated guitar pedals using a MIDI foot controller. Designed primarily for Raspberry Pi 4/5, it allows real-time switching of audio effects via Jack audio connections.
- Real-time audio routing (<100ms latency)
- Supports any effects simulator with Jack audio I/O
- Currently only mono effects are fully supported
- LV2 plugin integration via
mod-hostandmod-ui - MIDI controller configuration
- GUI for setting audio levels of each effect
- Includes a mute switch
- Raspberry Pi 4 or 5 (recommended)
- This will probably run an any computer using Linux. It was developed for and on a Raspberry Pi
- Debian 12 (Patchbox OS)
- Patchbox OS comes with the unessential but useful Modep software preinstalled.
- Compatible audio interface
- MIDI foot controller
- Download Patchbox OS
- Ensure the sound card is connected before installing the OS
- Place the file
/sshon the root partition - Patchbox OS default user/password is patch/blokaslabs
- Install with these settings:
- Select no additional modules during installation
- Configure your audio interface settings
- Post-installation:
sudo apt update
sudo apt upgrade
sudo apt install modep-mod-ui git curl build-essential
sudo systemctl disable modep-mod-ui # Prevent mod-ui from auto-startingFor getting the Hot Point to work (that you can set up using patchbox-config) it may be necessary to do:
sudo systemctl disable dnsmasq
sudo systemctl stop dnsmasqPatchbox OS includes opt-out telemetry. To remove:
sudo apt purge blokas-telemetryTo run LV2 simulators an LV2 host is required. The host mod-host is recommended.
It is a sub module of 120Pedal
It is possible to use Modep, and in particular, mod-ui, an Debian-12, (Debian-13 is unknown) but it is not trivial. Use this and follow the instructions in the README.md.
mod-ui will not play nicely with Patchstorage and it will not display the nice PNG images of pedals like it will if you install from Patchbox OS, but it is still very useful
- Install required packages:
sudo apt install dnsmasq git hostapd iw jackd2 libasound2-dev \
libjack-jackd2-dev liblilv-dev libreadline-dev libsdl2-dev \
libsdl2-image-dev lv2-dev pkg-config python3.11-dev libipc-run-perl \
libtry-tiny-perl -y- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.profileCreate the file: .local/share/applications/120Pedal.desktop
Contents
[Desktop Entry]
Name=120Pedal GUI
Exec=$HOME/120Pedal/gui/run.sh
Icon=$HOME/120Pedal/gui/120Pedal.svg
Terminal=false
Type=Application
Make executable: chmod a+x ~/.local/share/applications/120Pedal.desktop
Put on Desktop
cp ~/.local/share/applications/120Pedal.desktop ~/Desktop/
chmod +x ~/Desktop/120Pedal.desktop
Ensure patch is in group lightdm: sudo usermod -aG lightdm patch
In the [Seat:*] part of the file /etc/lightdm/lightdm.conf specify autologin-session and autologin-user
autologin-sessionis the sessin to run for autologin. The file must exist in/usr/share/xsessions/- E.g:
autologin-session=LXDEimplies the file/usr/share/xsessions/LXDE.desktopexists - You may need to create it. It can be a link to an existing file
- E.g:
auologin-useris the user that will be logged in automatically
[Seat:*]
autologin-session=LXDE
autologin-user=patch
sudo systemctl restart lightdm
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/120pedal.desktop <<EOF
[Desktop Entry]
Type=Application
Name=120Pedal
Exec=/bin/bash -c "sleep 5 && \${HOME}/120Pedal/gui/run.sh"
Comment=120Pedal Controller
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=10
EOF
chmod +x ~/.config/autostart/120pedal.desktopIf not using Patchbox OS (that takes care of this):
- Identify your audio interface:
aplay -l | grep "Your Interface Name"- Create
/etc/systemd/system/jackd.service:
[Unit]
Description=JACK Audio Connection Kit
After=sound.target
[Service]
ExecStart=/bin/sh -c 'CARD=$(aplay -l | grep -m1 "Your Interface" | cut -d" " -f2 | tr -d ":"); exec /usr/bin/jackd -d alsa -d hw:$CARD -r 48000 -p 128 -n 2'
Restart=always
User=your_username
Group=audio
LimitMEMLOCK=8589934592
LimitRTPRIO=89
Environment="XDG_RUNTIME_DIR=/run/user/$(id -u your_username)"
Environment="JACK_NO_AUDIO_RESERVATION=1"
[Install]
WantedBy=multi-user.target- Enable Jack:
sudo systemctl start jackd
sudo systemctl enable jackdPatchbox OS provides a version of mod-host but this uses a forked version
cd
git clone https://github.com/worikgh/mod-host.git
cd mod-host
make
./mod-host -n -p 5555If not using Patchbox OS
cd
git clone https://github.com/worikgh/mod-ui.git
cd mod-ui
python3 -m venv myenv
source myenv/bin/activate
pip3 install -r requirements.txt
# Apply necessary patches
find myenv/lib/python* -name httputil.py | xargs sed -i 's/collections.MutableMapping/collections.abc.MutableMapping/'
make -C utils
export MOD_DEV_ENVIRONMENT=0
python3 ./server.pyAccess the interface at http://<your-pi-ip>:8888 (Not HTTPS)
If using Patchbox OS access the interface at http://<your-pi-ip> (Not HTTPS)
- Clone the repository:
cd
git clone https://github.com/worikgh/120Pedal.git --recurse-submodules
cd 120Pedal/gui
cargo build --release
cd ../midi_driver
cargo build --release-
Configure your pedal setups in the
PEDALS/directory (see PEDALS/README.md) -
For LV2 simulators:
./getLV2 # Reads mod-ui pedal configurations
./cfgEffects # Sets up LV2 simulators and Jack connectionsTODO: Make some pedals
TODO: Making pedals documentation
The MIDI pedal is driven with three components:
- A reader:
read_midithat connects to the device and outputs the MIDI data on its STDOUT - A translator:
translate_midithat reads MIDI on its STDIN and writes (translated) MIDI on its STDOUT - An actor:
jack_midithat reads MIDI on its STDIN and sets up Jack audio pipes
- Read MIDI Input:
read_midi SINCO- Translate MIDI Commands:
translate_midi examples/sinco.cfg- Control Jack Connections:
jack_midi examples/midi_jack.cfg(export PATH=$PATH:$(pwd)/midi_driver/target/release
read_midi SINCO | translate_midi examples/sinco.cfg | jack_midi examples/sas_house.cfg)Example pedal definition (PEDALS/lost_world):
system:capture_1 effect_14:in
effect_13:Out1 system:playback_1
- Ensure Jack is running before starting mod-host
- Verify your audio interface is properly detected
- Check MIDI device permissions
- Using SSH log into the Pi and
tail /tmp/gui.log(TODO: Integrate with systemd logging)
In the directory mono/
See the README in that file for description of how they work
- Sub module:
basic-pure-data-audio-effects
Incomplete section
To back up the state of 120Pedal
- Modep:
tar cfz /tmp/modep.tgz /var/modep/ - 120Pedal:
tar cfz /tmp/pedals.tgz /home/patch/120Pedal/PEDALS/
Copy the files /tmp/modep.tgz and /tmp/pedals.tgz to a safe place


