Skip to content

Features/lv2groups #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Conversation

sejerpz
Copy link

@sejerpz sejerpz commented Aug 20, 2025

What is?

This is a first (partial) implementation of lv2 port groups extensions for mod-ui:

https://forum.mod.audio/t/support-in-mod-ui-for-lv2-port-group-extension/12798

It involve only the effect settings dialog and nothing more.

Why

Sometimes find the right control in the settings effect dialog is difficult.

The feature has some valuable pros and cons.

Pros:

  • Better control grouping and a more user friendly UX in particular for mixer style plugins

Cons:

  • In order to support port groups the ttl of every plugin should be edited
  • The specification doesn't allow customizionation of labels in order to have a label when the host supports groups and a different one when not. This renders useless the group name for any pratical case.

Example screenshots

Mixer before:

immagine

Mixer after:

immagine

Code Notes

Ttl files

In the example-port-group-ttls folder I added some files with added port group annotations, these file should be copied on the relevant bundle directories in order to test the patch.

CPP backend

I tried various approaches and in the end I decided to load and cache groups while reading plugin ports.

A first implementation was loading all the groups defined in advance and then associate every group with the right plugin port, but I didn't like it because lilv doesn't allow to query nodes using partial wildcard on a subject so for each plugin I had to iterate over all the world group to match the right one: a waste of resource.

I think that I got all the memory management right, but a review from a more expert cpp developer is very welcome.

Python

Nothing special there, just bindings updates to the cpp structure involved

HTML / JS

My approach was to move the port group logic on the client side in order to spare some cpu cycles from the python server.

The code I'm talking is here: html/js/host.js row 374

The other relevant changes are in the css and settings templates:

  • I used mustaches conditional syntax to add the relevant port group classes on the knob & enumerated controls
  • I create a css class .mod-group-item-title in order customize all the title easly

In the end I really don't get all the structure and details of this part of mod ui, but the solution seam to work well.

@sejerpz sejerpz changed the title Features/lv2groups (draft) Features/lv2groups Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants