The {{#controls}} Mustache loop in icon.html is populated from modgui:port declarations in modgui.ttl. Currently it exposes three
fields per entry:
┌────────────┬────────────┐
│ Variable │ Source │
├────────────┼────────────┤
│ {{symbol}} │ lv2:symbol │
├────────────┼────────────┤
│ {{name}} │ lv2:name │
├────────────┼────────────┤
│ {{index}} │ lv2:index │
└────────────┴────────────┘
For plugins using patch:writable parameters, knobs must use mod-role="input-parameter" with mod-parameter-uri set to the full parameter
URI (e.g. https://surge-synth-team.org//plugins/Surge_XT_Chorus:fx_parm_0). Because {{symbol}} only gives the short local name
(fx_parm_0) and not the full URI, there is no way to write a generic template that works for these plugins. Knob entries must be
hardcoded per-effect with their full URIs.
Proposed addition
Add {{uri}} to the {{#controls}} context, populated by cross-referencing each lv2:symbol from modgui:port against effect.parameters to
find the matching full URI.
This would allow a single portable template:
{{#controls}}
{{/controls}}
Why this matters
JUCE's LV2 export — used by Surge XT, DISTRHO, and a growing number of plugins — uses patch:writable for all parameters. Without
{{uri}} in the template context, every JUCE-based plugin requires a hand-maintained icon.html with hardcoded URIs for each knob. This
makes skins fragile (URIs must be updated if the plugin URI changes) and prevents the SDK's generic template examples from being used
at all for this plugin class.
The change is additive and backward-compatible: plugins that don't use patch:writable would simply have {{uri}} be empty or absent,
with no effect on existing skins.
The {{#controls}} Mustache loop in icon.html is populated from modgui:port declarations in modgui.ttl. Currently it exposes three
fields per entry:
┌────────────┬────────────┐
│ Variable │ Source │
├────────────┼────────────┤
│ {{symbol}} │ lv2:symbol │
├────────────┼────────────┤
│ {{name}} │ lv2:name │
├────────────┼────────────┤
│ {{index}} │ lv2:index │
└────────────┴────────────┘
For plugins using patch:writable parameters, knobs must use mod-role="input-parameter" with mod-parameter-uri set to the full parameter
URI (e.g. https://surge-synth-team.org//plugins/Surge_XT_Chorus:fx_parm_0). Because {{symbol}} only gives the short local name
(fx_parm_0) and not the full URI, there is no way to write a generic template that works for these plugins. Knob entries must be
hardcoded per-effect with their full URIs.
Proposed addition
Add {{uri}} to the {{#controls}} context, populated by cross-referencing each lv2:symbol from modgui:port against effect.parameters to
find the matching full URI.
This would allow a single portable template:
{{#controls}}
Why this matters
JUCE's LV2 export — used by Surge XT, DISTRHO, and a growing number of plugins — uses patch:writable for all parameters. Without
{{uri}} in the template context, every JUCE-based plugin requires a hand-maintained icon.html with hardcoded URIs for each knob. This
makes skins fragile (URIs must be updated if the plugin URI changes) and prevents the SDK's generic template examples from being used
at all for this plugin class.
The change is additive and backward-compatible: plugins that don't use patch:writable would simply have {{uri}} be empty or absent,
with no effect on existing skins.