Gen~ and footswitches?

Hi all,

when I create plugins with gen~, parameters are only available as knobs, not as footswitches. How can I create a plugin that uses not only an on/off switch, but also a few more switches? What did I overlook?

Thanks, Hans

1 Like

You have to edit this part in Yourplugin_dsp.ttl file , in e.

a lv2:InputPort, lv2:ControlPort;
lv2:index 2;
lv2:symbol “yourswitchname”;
lv2:name “yourswitchname”;
lv2:minimum 0;
lv2:default 0;
lv2:maximum 1;
lv2:portProperty lv2:integer, lv2:toggled, mod:preferMomentaryOnByDefault ;

2 Likes

thanks! But where would I find it? It’s not in one of the files created when I use the MOD Watcher uploading plugins created in gen~. Any leads?

Thanks, Hans. Still looks like I’m getting there. ;-))

1 Like

Yes, Mod watcher is a bit limited… So you have to follow "the Additional features (advanced) " on the :
https://wiki.mod.audio/wiki/Max_gen~
but be careful, the page is not up to date, there are some tricks to make it work (at least for me…)
Here is my walkthrough (which works most of the times…):
- Compiling the plugin

First, download https://download.moddevices.com/releases/max-gen/max-gen-deploy_v6.tar.gz and extract it. Put it in your plugin folder.

  • Send an “exportcode” message to the gen~ object in your main Max-patcher to get the gen_exported.cpp and gen_exported.h files.

- !!! replace your plugin name with “gen_exported” (don’t know why, but otherwise it doesn’t work…)

  • Copy the gen_exported.cpp and gen_exported.h files into the extracted max-gen-deploy folder, and run ( using Terminal in OSX) :

$ cd /path/to/max-gen-deploy/

$ ./mod-build.sh

You’ll be asked for a plugin name, and after providing one the cloud should give you back a tar.gz file within a few minutes.

Editing the Plugin

  • Unzip the tar.gz file

  • Edit the .ttl file In Terminal :

$ nano

space + drag your .ttl file

The file opens in the nano editor. Look for the lines you want to edit.

(Basic Nano Usage)

  1. On the command prompt, type nano followed by the filename.
  2. Edit the file as required.
  3. Use the Ctrl-x command to save , hit yes or no Y/N and return (to exit the text editor)
  • Delete the original tar.gz file

  • Make a new tar.gz file:

$ tar -cvzf Plugin.lv2-dwarf.tar.gz Plugin.lv2

- Deploying the plugin

Make sure the MOD device is connected to your computer via USB before proceeding. Then run:

$ cd /path/to/max-gen-deploy/

$ ./mod-deploy.sh dwarf

Good luck…

2 Likes

Hello Hans,
I just added a tuto-video here, the method is a bit simpler, you don’t have to pass through the tar.gz file stuff. Hope it helps.

3 Likes

Ha, thanks - didn’t have time yet to test out your previous recommendation, so this comes right on time. ;-)))

also, music is nice on that thing!

Hans

Hi Zwabo,

haha, I got as far as to needing to wipe the device clean and start anew. ;-))))

I created a simple patch with one data buffer and two footswitches. The sardine box appears after the .ttl update, but it doesn’t have a name anymore, and can’t be inserted into the pedalboard. The inspector shows only one controller instead of two, and it’s still a knob.

Any idea what I should look for? The video seems pretty straight forward, thanks!

Hans

I know it happens to me sometimes too and I don’t know why…
Sometimes I even had to rename my Gen~ object and redo the ModwAtcher process…it’s a bit time consuming.
Go to plugin store and delete your plugin, try again. Make sure to delete your browser cache before loading your plugin. Try another browser…
Good luck

1 Like

that can happen when the ttl has a typo or missing prefix, leading to syntax errors when trying to parse it.

yes, typo!