1
0
Fork
You've already forked 120Pedal
0
Guitar effects pedal that runs on a Raspberry Pi. Can use LV2 effects or any effect with Jack audio I/O
  • Rust 63.1%
  • Perl 25%
  • HTML 6.5%
  • Shell 5.4%
Find a file
2026年01月07日 11:57:14 +13:00
.github/workflows Cleanup whitespace 2025年08月23日 14:52:47 +12:00
archive Tidy up unneeded files 2025年06月06日 10:08:45 +12:00
basic-pure-data-audio-effects @a42be33a84 Add latest basic-pure-data-audio-effects commits 2025年08月20日 09:28:44 +12:00
examples Improve the algorithm for killing a process 2025年08月23日 14:52:58 +12:00
gui In the GUI hide the mouse pointer 2026年01月07日 11:57:14 +13:00
midi_driver Add mono effects 2025年08月23日 14:53:56 +12:00
mod-host @23ce7dd1f0 Update version of mod-host 2025年05月10日 11:38:50 +12:00
mono Add mono effects 2025年08月23日 14:53:56 +12:00
pd Run chorus effect using command line 2025年08月20日 09:28:30 +12:00
pedal_state Use and to access the state file 2025年08月02日 09:31:45 +12:00
PEDALS Cleanup whitespace 2025年08月23日 14:52:47 +12:00
Presentation FInal version of presentation 2025年08月13日 20:30:35 +12:00
system_files Switch user to patch 2025年01月06日 11:52:48 +13:00
.gitignore Update ignore 2025年12月21日 16:59:10 +13:00
.gitmodules Added basic-pure-data-audio-effects as a submodule 2025年08月18日 17:18:24 +12:00
52Pi_case.jpg Presentation about pedal 2025年07月05日 12:11:01 +12:00
BlockDiagramme.svg Presentation about pedal 2025年07月05日 12:11:01 +12:00
cfgEffects Add mono pedals 2025年08月23日 14:52:58 +12:00
CheapSoundCard.jpg Presentation about pedal 2025年07月05日 12:11:01 +12:00
CigarBox.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
Focursite.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
getLV2 Improve debugging messages 2025年07月29日 10:42:27 +12:00
gibson.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
GUI.png Add a mute button to the GUI 2025年07月05日 12:11:08 +12:00
jack_audio_pipes Display Jack audio connections 2025年06月16日 10:24:46 +12:00
lpx_colour_demo.pl Maintain a pedal state file 2025年06月06日 14:31:40 +12:00
MIDI_Pedal_software.svg Presentation about pedal 2025年07月05日 12:11:01 +12:00
Mod_UI_ScreenShot.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
PD_Mixer.jpg Presentation about pedal 2025年07月05日 12:11:01 +12:00
Peavy.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
PedalSetUp.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
PIsound.jpg Presentation about pedal 2025年07月05日 12:11:01 +12:00
qzn3t_mixer_4_1.pd Rearrange the position of patches in Pure Data mixer 2025年10月23日 15:01:09 +13:00
qzn3t_mixer_4_1_internal.pd Improve stderr output 2025年07月27日 16:20:57 +12:00
README.md Update README 2026年01月07日 11:51:30 +13:00
ScreenShotGui.png Presentation about pedal 2025年07月05日 12:11:01 +12:00
SevenInchScreenn.jpg Presentation about pedal 2025年07月05日 12:11:01 +12:00
SINCO.png Documenting SICO pedal 2025年04月20日 20:54:54 +12:00
under-construction.png Under construction icon 2024年12月28日 10:51:18 +13:00

120Pedal - MIDI Guitar Pedal Controller 🎸

under construction

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.

GUI Screenshot

Key Features

  • 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-host and mod-ui
  • MIDI controller configuration
  • GUI for setting audio levels of each effect
    • Includes a mute switch

System Requirements

  • 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

Installation

  • Download Patchbox OS
  • Ensure the sound card is connected before installing the OS
  • Place the file /ssh on 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-starting

For 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 dnsmasq

Optional: Remove Telemetry

Patchbox OS includes opt-out telemetry. To remove:

sudo apt purge blokas-telemetry

Other distributions

To 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

Software Setup

  1. 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
  1. Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.profile

Configuration

Creating a Desktop shortcut

Create 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

Auto-login for patch

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-session is the sessin to run for autologin. The file must exist in /usr/share/xsessions/
    • E.g: autologin-session=LXDE implies the file /usr/share/xsessions/LXDE.desktop exists
    • You may need to create it. It can be a link to an existing file
  • auologin-user is the user that will be logged in automatically
[Seat:*]
autologin-session=LXDE
autologin-user=patch

sudo systemctl restart lightdm

Auto-starting the GUI

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.desktop

Jack Audio Setup

If not using Patchbox OS (that takes care of this):

  1. Identify your audio interface:
aplay -l | grep "Your Interface Name"
  1. 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
  1. Enable Jack:
sudo systemctl start jackd
sudo systemctl enable jackd

mod-host Setup

Patchbox 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 5555

mod-ui Installation

If 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.py

Access the interface at http://<your-pi-ip>:8888 (Not HTTPS)

If using Patchbox OS access the interface at http://<your-pi-ip> (Not HTTPS)

Setting Up Pedals

  1. 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
  1. Configure your pedal setups in the PEDALS/ directory (see PEDALS/README.md)

  2. For LV2 simulators:

./getLV2 # Reads mod-ui pedal configurations
./cfgEffects # Sets up LV2 simulators and Jack connections

TODO: Make some pedals

TODO: Making pedals documentation

MIDI Pedal Configuration

The MIDI pedal is driven with three components:

  1. A reader: read_midi that connects to the device and outputs the MIDI data on its STDOUT
  2. A translator: translate_midi that reads MIDI on its STDIN and writes (translated) MIDI on its STDOUT
  3. An actor: jack_midi that reads MIDI on its STDIN and sets up Jack audio pipes

Example: SINCO MIDI Pedal

SINCO pedal

  1. Read MIDI Input:
read_midi SINCO
  1. Translate MIDI Commands:
translate_midi examples/sinco.cfg
  1. Control Jack Connections:
jack_midi examples/midi_jack.cfg

Pipeline Example

(export PATH=$PATH:$(pwd)/midi_driver/target/release
read_midi SINCO | translate_midi examples/sinco.cfg | jack_midi examples/sas_house.cfg)

Pedal Configuration Files

Example pedal definition (PEDALS/lost_world):

system:capture_1 effect_14:in
effect_13:Out1 system:playback_1

Troubleshooting

  • 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)

Non-LV2 Effects

Mono Effects

In the directory mono/ See the README in that file for description of how they work

Pure Data

  • Sub module: basic-pure-data-audio-effects

Backing up

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