# Vangelis doesn't honor LV2 ttl controller order

**URL:** <https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320>\
**Category:** Software\
**Tags:** lv2\
**Created:** [June 25, 2026, 1:16pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320 "2026-06-25T13:16:22Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 25, 2026, 1:16pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/1 "2026-06-25T13:16:22Z")

</div>

When I added my plugin to Vangelis, each time I restart zynthian the parameters appear in a different random order. They’re nicely ordered in the MyPlugin.lv2/dsp.ttl:

```auto
plug:_1_Bypassed
        a lv2:Parameter ;
        rdfs:label "Bypassed" ;
        rdfs:range atom:Float ;
        lv2:default 0 ;
        lv2:minimum 0 ;
        lv2:maximum 1 ;
        lv2:portProperty lv2:enumeration , lv2:toggled ;
        lv2:scalePoint [
                rdfs:label "Off" ;
                rdf:value 0 ;
        ], [
                rdfs:label "On" ;
                rdf:value 1 ;
        ] .

plug:_2_InputGain
        a lv2:Parameter ;
        rdfs:label "Input Gain" ;
        rdfs:range atom:Float ;
        lv2:default 1.07288e-06 ;
        lv2:minimum -72 ;
        lv2:maximum 36 .

```

Do I have to write a separate ttl file for Zynthian? Is there a better way in the plugin code to provide ordering hints? (Or could Zynthian sort them?)

Note that I’m using JUCE with Projucer, so I’m not writing the dsp.ttl by hand, but the parameters are correctly ordered and the IDs are sortable.

---

<div class="post-metadata">

**Author:** ![hannesmenzel](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hannesmenzel/32/13014_2.png) [@hannesmenzel](https://discourse.zynthian.org/u/hannesmenzel)\
**Post date:** [June 25, 2026, 1:24pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/2 "2026-06-25T13:24:23Z")

</div>

I tried to write down some things here. Look out for the term displayPriority:

> **[LV2 - ZynthianWiki](https://wiki.zynthian.org/index.php/LV2)**

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 25, 2026, 1:27pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/3 "2026-06-25T13:27:09Z")

</div>

Thanks. Just above, it says "If not edited further, LV2 parameters will be presented in a manner being sorted by their parameter ID "

Is this no longer true?

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 25, 2026, 2:37pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/4 "2026-06-25T14:37:53Z")

</div>

You must use DisplayPriority .

Regards

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 25, 2026, 3:31pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/5 "2026-06-25T15:31:46Z")

</div>

OK, I changed “in a manner being sorted by their parameter ID” to “in a random order.”

Really not possible to sort them? Won’t this affect existing plugins that don’t have z-specific ttl’s?

Hannesmenzel’s notes apply to groups. How do we order the parameters themselves, and assign them to groups?

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 25, 2026, 3:45pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/6 "2026-06-25T15:45:59Z")

</div>

> [@jofemodo](#):
>
> You must use DisplayPriority .

Use this, please.  
DisplayPriority is the way. All LV2 hosts, including zynthian, would honor DisplayPriority.

---

<div class="post-metadata">

**Author:** ![hannesmenzel](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hannesmenzel/32/13014_2.png) [@hannesmenzel](https://discourse.zynthian.org/u/hannesmenzel)\
**Post date:** [June 26, 2026, 8:50am UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/8 "2026-06-26T08:50:28Z")

</div>

> [@jlearman](#):
>
> Hannesmenzel’s notes apply to groups

It applies to both. Groups are ordered first, then parameters with the same group. Assigning parameters to groups is described in the wiki, ch. 3.2.2 / 3.2.3

> [@jlearman](#):
>
> Really not possible to sort them? Won’t this affect existing plugins that don’t have z-specific ttl’s?

I can imagine it would be possible to sort by param ID, I would even like to say it used to default to that. DisplayPrioruty anyhow isn’t zynthian specific, its part of lv2 port properties:

> **[displayPriority - LV2 Port Properties](https://lv2plug.in/ns/ext/port-props#displayPriority)**
>
> A priority ranking this port in importance to its plugin.

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 26, 2026, 10:51am UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/9 "2026-06-26T10:51:47Z")

</div>

Right, I added the priorities. But some existing plugins might now get re-ordered randomly.

---

<div class="post-metadata">

**Author:** ![hannesmenzel](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hannesmenzel/32/13014_2.png) [@hannesmenzel](https://discourse.zynthian.org/u/hannesmenzel)\
**Post date:** [June 26, 2026, 11:16am UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/10 "2026-06-26T11:16:07Z")

</div>

> [@jlearman](#):
>
> OK, I changed “in a manner being sorted by their parameter ID” to “in a random order.”

By the way, I think in your ttl your control parameters don’t even have an index. In fact, only your audio ports have the ID. So that might be the reason they’re not ordered. I’m pretty sure my own plugin compiled with the DPF framework automatically introduced the index and it ordered it accordingly. Could you please review this in order to review your wiki changes?

```auto
plug:_2_InputGain
	lv2:displayPriority 190 ;
	a lv2:Parameter ;
	rdfs:label "Input Gain" ;
	rdfs:range atom:Float ;
	lv2:default 1.07288e-06 ;
	lv2:minimum -72 ;
	lv2:maximum 36 .

```

```auto
a lv2:OutputPort , lv2:AudioPort ;
		lv2:index 2 ; // output port ID
		lv2:symbol "audio_out_1" ;
		lv2:name "Audio Out 1" ;
		pg:group plug:output_group_1 ;
		lv2:designation <http://lv2plug.in/ns/ext/port-groups#left> ;

```

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 26, 2026, 7:44pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/11 "2026-06-26T19:44:23Z")

</div>

OK, I’ll look into it. My ttl file was created by JUCE, so I’d have to do a feature request to JUCE to add these indexes. But thanks for pointing them out. If it turns out as we both expect, I’d change the text to “sorted by index if present, or random order” or something like that.

(I’m currently postprocessing what Projucer creates to add the priorities.)

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 26, 2026, 7:45pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/12 "2026-06-26T19:45:50Z")

</div>

What does your lv2:Parameter entry look like?

---

<div class="post-metadata">

**Author:** ![hannesmenzel](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hannesmenzel/32/13014_2.png) [@hannesmenzel](https://discourse.zynthian.org/u/hannesmenzel)\
**Post date:** [June 26, 2026, 10:08pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/13 "2026-06-26T22:08:48Z")

</div>

You can have a look right here:

> **[Release AutoLeveler 0.1.2 beta · johannesmenzel/SRPlugins](https://github.com/johannesmenzel/SRPlugins/releases/tag/zynthian_lv2)**
>
> AutoLeveler is an lv2 plugin to use with a Zynthian device. Automatically level down audio signals according to peak and rms threshold. Use on chains or master chain.

Or you can have a look as some best practice examples here:

> **[zynthian-data/lv2-custom at vangelis · zynthian/zynthian-data](https://github.com/zynthian/zynthian-data/tree/vangelis/lv2-custom)**
>
> vangelis/lv2-custom

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 27, 2026, 3:41pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/14 "2026-06-27T15:41:57Z")

</div>

I’ve been going thru the rabit hole and this is how LV2 parameters are sorted in zynthian:

- First, “Control Ports” are parsed and ordered by index.
- Then “Property Parameters” are appended after “Control Ports”. Parsed like this:

```auto
for control in world.find_nodes(plugin.get_uri(), world.ns.patch.writable, None):
    # some code

```

```
LV2 docs say:

```

> The `LilvNodes*` collection returned by `lilv_world_find_nodes` is **undefined and completely unordered**

- Then, the full list is sorted using the “DisplayPriority” property. Like this:

`zctrl_dict = dict(sorted(zctrl_dict.items(), key=lambda item: item[1].display_priority, reverse=True))`

“DisplayPriority” is set to 0 by default, so ordering by it should not alter the “initial order” if “DisplayPriority” is not explicitly set.

So, if your plugin uses Control Ports, they would be sorted by “index”, then by “DisplayPriority”  
If your plugin uses “Property Parameters” (JUCE), they would be sorted by “DisplayPriority” only.

Please, tell me if this is not the observed behaviour and i would investigate.

Regards,

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 27, 2026, 3:47pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/15 "2026-06-27T15:47:39Z")

</div>

That’s not the observable behavior. At least, not quite.

Without the priority lines, every time I restart zynthian I get a different order. There may be things that are consistent, but I haven’t noticed them. (That is, they might be always grouped together into the same pages, but pages shown in random order.)

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 27, 2026, 4:01pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/16 "2026-06-27T16:01:51Z")

</div>

Sorry, i just modified my last post. Please, read again 😉

---

<div class="post-metadata">

**Author:** ![jlearman](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jlearman](https://discourse.zynthian.org/u/jlearman)\
**Post date:** [June 28, 2026, 5:07pm UTC](https://discourse.zynthian.org/t/vangelis-doesnt-honor-lv2-ttl-controller-order/13320/17 "2026-06-28T17:07:57Z")

</div>

OK, that makes sense. It’d be hard to summarize, though!

Perhaps:

> Controls organized by Control Port are ordered by index and then sorted by DisplayPriority.  
> Controls listed under Property Parameters are randomly ordered and then sorted by DisplayPriority.

I think that gives anyone adding a plugin enough information to know where to look and what to do. But it omits any mention of the groups, which might complicate things, and I don’t want to guess how that factors in.
