Midi Channel Filter

Hi MODEP crowd!

First of all let me thank you for all the effort that’s been made. This is one fantastic piece of gear.

I recently managed to get modep running on a raspi 3B+. There is only one thing missing for my use case: I’d like to have different generators respond to different MIDI channels.

Now on the MOD DUO there seems to be a “Midi Channel Filter” plugin that does just that. https://pedalboards.moddevices.com/plugins/aHR0cDovL2dhcmV1cy5vcmcvb3NzL2x2Mi9taWRpZmlsdGVyI2NoYW5uZWxmaWx0ZXI=

I assume it would belong into the “utilities” category wich doesn’t contain anything when I start the browser-based configurator.

My question is: is there a way for a non-linux kind of person to get this plugin into my MODEP system?

Unfortunately I am not familiar with compiling or excessive command line editing and am hoping for an easy procedure like copying a file or directory.

All the best
Florian

Hello, this one should already be available. Try searching for it by name in the UI.

Thanks a lot!:grinning:
I found it via the search bar :+1:

1 Like

Seems the Midi Utility section is empty, but the plugins are there. Poking around, (and with zero lv2 plugin knowledge!) i’m wondering whether theres a mismatch with the plugin .ttl files where they state: lv2:MIDIPlugin type that’s not being registered by mod-ui???
Happy to be corrected, even happier for a fix :wink: but keen to populate that Midi Utiliy section!! Modep is worth it for the midi ultities alone! Aware you can do a search so all is not lost!

To add, running localhost/effect/list shows the MIDI filters Category[]. i.e. empty.

Looks like there are 47 Plugins without a category. These appear to be some ZamAudio, OpenAV, Freaked, Mayank and most of the x42 (midifilter) plugins.

Anyone know what files need changing and what to, to get these into suitable categories?
Cheers.

I’ve looked into this briefly before, here are my findings:

The type should be ‘MIDIPlugin’, but for some reason, parsing it was disabled by this commit (line 885), can’t really think of why so. Also a lot of plugins must be updated with the correct category, as they tend to be in ‘Utility’ category, so it seems like some effort scattered around many places is necessary to make ‘MIDI Utility’ category to work.

1 Like

This can be fixed in the mod-ui client. Ugly, but it works :see_no_evil:

Following will put MIDI plugins to the MIDI category and unknown plugins to a new category called Other.

Modifiy /usr/share/mod/html/index.html and add following lines to the div called plugin-results-wrapper:

<div id="plugin-results-wrapper">
  (...)

  <div id="effect-content-MIDIPlugin" class="plugins-wrapper"></div>

  (...)

  <div id="effect-content-Other" class="plugins-wrapper"></div>

  (...)

</div>

and add following li’s to the js-category-tabs ul:

<ul class="clearfix js-category-tabs">

  (...)
  
  <li id="effect-tab-MIDIPlugin">MIDI</li>

  (...)

  <li id="effect-tab-Other">Other</li>

  (...)

</ul>

In /usr/share/mod/html/js/effects.js modify the function renderNextPlugin thats embedded in the showPlugins function to:

function renderNextPlugin(c) {
            if (self.data('showPluginsRenderId') != currentRenderId) {
                // another render is in place, stop this one
                if (callback) { callback() }
                return
            }

            if (renderedIndex >= pluginCount) {
                // if we get here it means we finished rendering
                self.effectBox('calculateNavigation')

                if (self.data('showPluginsRenderId') == currentRenderId) {
                    // no other renders in queue, take the chance and reset the id
                    self.data('showPluginsRenderId', 0)
                }
                if (callback) { callback() }
                return
            }

            plugin   = plugins[renderedIndex]
            category = plugin.category[0]

            self.effectBox('renderPlugin', plugin, self.find('#effect-content-All'))

            if (FAVORITES.indexOf(plugin.uri) >= 0) {
                self.effectBox('renderPlugin', plugin, self.find('#effect-content-Favorites'))
            }

            if(!category){
              category = (plugin.label.match(/MIDI/gi) || plugin.name.match(/MIDI/gi)) ? "MIDIPlugin" : "Other";
            }

            if (category && category != 'All') {
                self.effectBox('renderPlugin', plugin, self.find('#effect-content-' + category))
            }

            renderedIndex += 1

            c = c || 0;
            if (c < 20) renderNextPlugin(c+1);
            else setTimeout(renderNextPlugin, 1);
        }

Don’t know how to highlight code, so put this:

            if(!category){
              category = (plugin.label.match(/MIDI/gi) || plugin.name.match(/MIDI/gi)) ? "MIDIPlugin" : "Other";
            }

before:

            if (category && category != 'All') {
                self.effectBox('renderPlugin', plugin, self.find('#effect-content-' + category))
            }
1 Like