Complex controller mappings; scripted parameter setting based on I2C or other external device

Dear all, I’d like to build a pedal version of the typical DJ build/release effects found e.g. in the Pioneer RMX-500/1000 devices, but for use as master effect in a live band setting. For this purpose, I imagine I’d assemble a processing chain from various plugins, and control various effect parameters using an expression pedal (build) and a momentary button (release) in a yet-to-be-determined way. The controller pedal (on stage) would be connected to the RPi audio processing box (in the rack) via I2C or RS485 over cat5 cable.

The typical usage sequence will look like this:
1: disable effects; wait until pedal returned to heel position
2: pedal pushed toeward: effect settings gradually ramped up
3: button push (all the way toe position): vinyl/tape brake effect
4: button release: goto 1

So this will require some basic scripting for the switching functionality (release button: disable fx; pedal back: enable fx) and the pedal as a “macro knob” that simultaneously controls various different effect parameters with individual nonlinear curves.
Am I right in assuming that this would best be implemented directly using mod-host? So I would write a script that reads out the I2C devices (potentiometer, button) and maps the values to controller values that are then transmitted to the processing patch via socket commands?

If anyone has a better recommendation, I’ll happily take it. Has anyone got any experience controlling MODEP / mod-host parameters in nontrivial ways outside of MIDI input, using custom scripts? Then I look forward to hearing from you.


There’s multiple ways how to go about this - there’s a handful of web API’s in the mod-ui that can be useful, the source code is the best documentation: mod-ui/mod/ at modep-1.13-ps · BlokasLabs/mod-ui · GitHub

Here’s a script that’s using the web APIs: modep-btn-scripts/ at master · BlokasLabs/modep-btn-scripts · GitHub

Then there’s a bunch of commands that you can use with mod-host that the mod-ui uses: mod-host/src/mod-host.c at master · BlokasLabs/mod-host · GitHub

Probably the mod-ui can’t be running at the same time as you’re exercising these commands.

As mod-host is hosting LV2 plugins, you could try and use LILV library to access the same plugins from your own scripts or process and make changes to them.

Finally, you could host the plugins by your own process, without relying on MOD stuff at all. :slight_smile: