Node-Red and MODEP

I’ve been playing with node-red for a while and created this dashboard that can be used with MODEP. This dashboard provides the following:

  • Shows current pedalboard (with image)
  • Button to display available snapshots
  • Ability to select a snapshot
  • Ability to list all pedalboards, regardless if they are in a bank or not
  • Ability to select and load a pedalboard
  • Ability to show system information which includes CPU Temp, Model and Manufacturer of the device, the network interface being used by the device and the IP addresses associated with each network interface. Just noticed that the model and manufacturer doesn’t show on my RPi5.

To install:

  • Ensure node-red is installed. I can’t remember if it’s installed by default on the Blokas Bookworm image or not. To install: apt-get install nodered
  • Open a command prompt on the PI and start node-red.
  • Open a browser to the node-red editor: i.e. patchbox.local:1880. Note that the default is to not secure node-red by user/password. Once you set this up I highly recommend securing your node-red install. Securing Node-RED : Node-RED
  • Import the attached node-red dashboard Json file. Hint: in node-red click the 3 horizontal bars and select “Import”. You will get notification about missing components. Install the packages listed below.

Install these packages:

  • @flowfuse/node-red-dashboard
  • @ralphwetzel/node-red-systeminformation
  • node-red-node-base64
  • node-red-node-ui-table

Once you have the packages installed you should click the red “Deploy” button and do a full deploy. Then point your browser to http://patchbox.local:1880/dashboard
MODEPDashboard.zip (10.6 KB)

4 Likes

This is fantastic!
Ive used NodeRed in my smart home setup, i didnt even know it was included included in the setup.
This offers great promise for creating a great GUI for a touchscreen in a custom build box.
Its been a while since ive played with my pisound (been distracted building a portable studio ha ha) but ill be trying this soon.

Sounds great! Could you post a screenshot of how the dashboard looks like? :slight_smile:

@Giedrius great suggestion! Here they are:

First up is the Current Pedalboard. Note the “Snapshots” button at the bottom. The pedalboard image doesn’t scale well yet (not all of the pedalboard is displayed). I need to look into this.

Clicking the 3 horizontal bars gives you the popout menu:

Here’s the Snapshots menu which can also be accessed by clicking the “Snapshots” button the current pedalboard page. Clicking on a snapshot will load that snapshot for the current pedalboard:

Next up is the pedalboard list. Note that I chose to show all of them since I typically don’t use the bank feature in my setup. Clicking on an item in the list will load that pedalboard.

And lastly the system information. My Pi5 with active cooler is running at a comfortable 43 degrees.

There you have it!

3 Likes

@jtemple967 I just got around to trying it. Everything seems to work on the Patchbox OS and MODEP installation.
Interestingly enough while the dashboard does load in my Bullseye with MOD binaries installation, none of the features seem to work. The only thing that works is the CPU temperature, and also the device info, which strangely doesn’t show up in Patchbox OS.

A request for the next version: Could you add an XRUN monitor? Maybe right next to the CPU temperature display.

@KAOSS can you be more specific, which features don’t work? Sounds like you could load a dashboard though

Patchbox OS Bookworm and MODEP:
Features that work flawlessly: Current Pedalboard image and name, Snapshots list, System Information (doesn’t show Model and Manufacturer, but rest works).
Pedalboard List tab showed the list of pedalboards once (when I made the post), but it hasn’t worked since then.

RPi OS Bullseye and MOD source-compiled binaries:
Dashboard loads. But no screenshot or pedalboard name in Current Pedalboard. “No data available” in Snapshots and Pedalboards List tabs. System Information works properly and shows all the data.

@KAOSS can you send me some screenshots of the pages that aren’t working in a private message? I will have some suggestions on what to look at next once I see it in action.

@jtemple967 I added a CPU usage monitor in the System Information panel.
Requires:

MODEPDashboard_CPUusage.zip (10.5 KB)

1 Like

Thats awesome! I’m going to give it a try.

Hey all!

I’ve got a new release of the MODEP Node-red dashboard! This update adds the ability to define and use up to 7 midi controls to turn on/off plugin parameters or control a variable knob or control within a plugin. I also added (from a suggestion from @KAOSS) a CPU usage monitor in the system information.

There’s a new option called “MIDI Configuration” where you can define the MIDI value and label for 6 switches and 1 slider:

The “Get Config” button is useful if you restarted node-red and need to refresh the configuration that is stored in node-red.

Right now I’ve limited the controls to 7 as that seems to fit well on my phone. I could easily add more if that seems to be something that more people want. You can also do it yourself too in node-red. Simply input a value and label for each and click “Update”. Then switch to the “MIDI Controller” option:

You can then slide the slider for whatever control you attached that MIDI value to or click the switch. Note that this controller is “stateless” as it doesn’t know if the plugins that you’re using are “on” or “off” when this page loads. I typically use MIDI to turn on things that are, by default, turned off. Like Chorus, distortion, etc.

And yes, you can “assign” a MIDI value to a MODEP plugin parameter with this MIDI controller, just like a physical controller!

If you’ve already imported this dashboard then you’ll want to delete whatever you have and re-import the attached file.
MODEPDashboard_v2.zip (9.3 KB)

And here’s a short video of me adjusting the Gain on the Cabinet Simulator, turning on/off the cabinet simulator, muting the tiny gain and turning on/off the alembic preamp.

Just be aware that right now you can only have one set of values/labels for each control so you do have to plan out how to use MIDI to control MODEP. At some point I might add the ability to have multiple “mappings”.

3 Likes

@jtemple967 Great work! This adds a lot of functionality without needing to have the browser window open, and gives me some ideas as well on further extending the dashboard’s functionality.
Seems like it requires node-red-contrib-midi prior to importing.

However, the MIDI Configuration doesn’t seem to be working for me. When I click on Update after creating a configuration, it’s not reflected in the MIDI Controller window. I looked at the terminal and this is the output:
[error] [file:80508435032c18c8] failed to write to file: Error: ENOENT: no such file or directory, open '/home/patch/noderedmodep/nrm.json'
Seems like it’s trying to point to the absolute path of the configuration file stored in your system.

I changed it to save a file in the current working directory instead using a relative path.
MODEPDashboard_v2_pathfix.zip (13.3 KB)

@KAOSS thanks for being a “tester”. :slight_smile:

I did forget to add that node-red-contrib-midi is a required package that must be installed prior to using the MIDI functionality.

As far as the error writing the configuration file, I fixed that issue in the attached file.

Enjoy!
MODEPDashboard_v2.zip (9.3 KB)

Now I’m getting this error:
[error] [file:80508435032c18c8] failed to create file: Error: EACCES: permission denied, mkdir '/home/patch/noderedmodep'

Okay, that must be due to the user that node-red is running under. I hesitate on putting that in the current working directory as I assume that is a directory in node-red itself.

For now, if you create the /home/patch/noderedmodep directory manually that should fix the problem.

I added a new functionality to the previous v2 Dashboard shared by @jtemple967, called “Live Control”. Here’s how this tab looks:

Explaining why and how it does things is will be a little long, so in case you’re not interested:
TL;DR: Gives you ability to change a few critical parameters quickly and letting their values persist across snapshot changes.

If you’d like to try it, here’s the file:
MODEPDashboard_v3.zip (14.2 KB)

Anyway, here’s some context:
Helix Native (HXN) is the main source of all my tones for my productions and general playing. So I was very happy to see that one of my favourite features from the Helix ecosystem is present in MODEP – Snapshots. MODEP has an edge because it allows all parameters to be controlled by snapshots, whereas HXN has a limit of 64 parameters only.

However, this becomes a hurdle in scenarios where you need to change parameters whose values you don’t require changing across snapshots. In such cases, the changes have to be saved in each snapshot individually. This is fine when I’m creating my pedalboards and am in a position to change things. But what if I’m on the stage and I need to adjust something, say my heavy snapshot’s volume, in comparison to the other snapshots?

This is where the Live Control comes in. It allows you to keep the values of a few specific parameters persistent across snapshot changes. For now, the controllers are mapped in a way that allow me to adjust the relative volume of the four snapshots and the 3 band EQ at the end of the chain of the pedalboard shown below:

image

The controls you see are assigned to specific MIDI CCs, which are mapped to the aforementioned parameters. When a pedalboard is loaded, it reads the snapshots.json file and gets the values of these specific parameters and sets the as default values. If you change these any of these values, they will send the corresponding MIDI CCs. If you turn on “Set values for this session?”, it will repeatedly send MIDI CCs with the values set by the controls. This will continue until you turn that toggle off. This way, parameters will keep their values across snapshot changes.

I do realise that this is indeed a very hacky solution, but it works for now! Maybe I’ll implement a cleaner solution at a later point of time :smile:. Open to suggestions on how else it can be done. I’ll probably try doing it by saving the changes to the snapshots file instead, but I’m happy with the way it works right now.

A few other things that I added:

  1. The “Sync pedalboard” button: To sync the parameter values if the pedalboard was changed from outside the dashboard. Doesn’t seem to be working very reliably as the request seems to get timed out.
  2. A “Reload” button in the Pedalboard List page. The default request for the list almost always gets timed out on my system, so spamming this button does the trick.
1 Like

@KAOSS you’ve jumped right in to the node-red world!!! Awesome!

You’re really heading in the same direction that I’m heading to: being able to control a subset of the parameters within your dashboard in a live setting without having to use the browser interface.

Just to be fair, this is what the official MOD devices try and achieve as well. So if you wanted to you could certainly look into buying one of their devices down the road. Right now they’re only offering the dwarf (looks like the duo may be discontinued): Dwarf - MOD Audio website

The other option is checking out what the folks over at https://www.treefallsound.com/ are doing. They have a similar device to the official MOD devices that allows you to change a subset of the parameters. I know they have a V3 of their device in the works but there hasn’t been an update for some time. Probably waiting for materials.

And of course you can keep digging further into the DIY world like you’re doing!

@jtemple967 yeah it’s been fun getting to learn node-red. I had no idea what it was before I saw this thread, so thank you for that!

I completely agree with that approach – having the ability to control key parameters in real-time without relying on the browser interface. Unfortunately the web UI doesn’t really work all that great on mobile devices, so quick adjustments are a pain. And the way snapshots work in MOD/MODEP is kind of a double-edged sword – hence the new tab I added.

I would love to have a MOD hardware device at some point. I do hope that they can stick around and are able to release more hardware units. Unfortunately the Dwarf is a bit underpowered nowadays, especially with the introduction of NAM to the platform.

I have indeed checked out the pi-Stomp project, and it certainly looks very interesting. Seems like they have tweaked the MOD sources in certain ways so that it works with their scripts for the LCD functionality. Would certainly be looking into those for the future of my project.

However, in my experience so far, the CPU usage with MODEP does seems to be more predictable and stays consistent. Whereas with the MOD software, the CPU meter jumps wildly (“swells”) and causes a lot more XRUNs. I do prefer their web UI slightly since it has a few more details. But with the node-red dashboard, I can keep track on a few of the important parameters like the CPU usage and temperature.

So it seems like I’ll be experimenting with both sources, and seeing which one is more stable and usable in a live setting. And I’ll try and keep experimenting with node-red to make this a more useful project.

@jtemple967 I found out why this wasn’t working. I looked at both the Blokas and the MOD sources on GItHub and they look quite different.

Here’s the MOD source:

And here’s the Blokas source:

As you can see, they’re quite different.

In this case, there’s was no function named PedalboardCurrent in the MOD source to get the current pedalboard info. Adding the relevant function definition as well as the URL to my local webserver.py file did the trick.

@KAOSS if you look at the Blokas Labs version of that file it does have PedalboardCurrent defined: