/m8c-rpi4-module

A m8c-rpi4 module for Patchbox OS.

Primary LanguageShellCreative Commons Zero v1.0 UniversalCC0-1.0

M8C Module for Patchbox OS

Introduction

This is a module for Patchbox OS to autostart m8c-rpi4 on boot. There are three main benefits of using this module:

  • Automatically start the M8 Client on Raspberry Pi boot without having to resort to systemd or crontab, which simplifies the installation process;

  • Automatically connect the prefered MIDI devices, listed in the amidiminder.rules or amidiauto.conf configuration file;

  • Switch between different Patchbox OS modules such as MODEP, Orac or Pure Data, which will let you take full advantage of this audio oriented OS and use the Raspberry Pi for far more things than just running the M8C.

Please note that this project is not affiliated with Dirtywave and there is no guarantee or support from either the manufacturer or myself. You can use it at your own risk.

Install

To install this module, run the command below:

patchbox module install https://github.com/RowdyVoyeur/m8c-rpi4-module

The module expects to have m8c-rpi4 already installed at home/patch/m8c-rpi4 and the script to be executable by everyone. Please read the installation guide for mode details.

To activate the module, just run the following:

patchbox module activate m8c-rpi4-module

Alternatively, run patchbox, go to modules menu and select m8c-rpi4-module module.

MIDI Configuration

Patchbox OS 2024-04-04 (Bookworm ARM64 Debian)

In Patchbox OS 2024-04-04, amidiauto was deprecated in favour of amidiminder, which performs the same functions, but better.

You can customise your MIDI connections by editing the file amidiminder.rules:

  • After installing the module, enter the command below and follow the rules format to ensure your rules are valid:
sudo nano usr/local/patchbox-modules/imported/m8c-rpi4-module/amidiminder.rules
  • After adding your rules, you can check if they are legal with the following command:
amidiminder -C -f usr/local/patchbox-modules/imported/m8c-rpi4-module/amidiminder.rules
  • And, lastly, you need to restart the service:
sudo systemctl restart amidiminder

Patchbox OS 2022-05-17 (Bullseye Debian)

If you're using Patchbox OS 2022-05-17, you'll need to make a minor change to this module:

  • After installing the module, enter the following command to edit this file:
sudo nano usr/local/patchbox-modules/imported/m8c-rpi4-module/patchbox-module.json
  • Within the file, replace the following section:
{
"service": "amidiminder.service",
"config": "amidiminder.rules"
}
  • With this (be careful with spaces and commas):
{
"service": "amidiauto.service",
"config": "amidiauto.conf"
}

Now you can start customising your MIDI connections. The amidiauto.conf configuration file will tell the system which MIDI devices should be automatically connected on boot and what is their routing.

As you can see, in this configuration file, the MC-101 and M8 can both send and receive MIDI from each other, nanoKONTROL can send MIDI to M8 and other hardware and software is not allowed to automatically connect ports.

To customise the MIDI connections to your personal needs, you will have to edit the amidiauto.conf file with the following command:

sudo nano usr/local/patchbox-modules/imported/m8c-rpi4-module/amidiauto.conf

You should also visit this page to understand how things work and, if necessary, list all the connected MIDI devices to find their names with the following command:

aconnect -l

Deactivate and Uninstall

To deactivate the module, just run:

patchbox module deactivate

Alternatively, run patchbox, go to modules menu and select none module.

This module is installed in /usr/local/patchbox-modules/imported/, so if you wish to completely delete it run:

cd /
cd usr/local/patchbox-modules/imported
sudo rm -rf m8c-rpi4-module

Notes

This module has been tested with Patchbox OS 2022-05-17 (Bullseye Debian) and with Patchbox OS 2024-04-04 (Bookworm ARM64 Debian).

References

Learn more about patchbox modules

How to create patchbox modules

Complete reference guide of patchbox-module.json