Certainly I can post a screenshot of the headless plugin.
You mean more generally how to get a plugin compiled on zynthian or specifically how to do this one? Because regarding the first question I would kind of stumble through the process how I copied @riban’s makefiles and the DPF example code.
Anything really. Ultimately we are trying to formalise a documentation style for these components. Just getting into the wiki and scratching something into the docs is of great benefit. It is, of course, another mark up language to mash in with all the others you’ve met along the way, but it will help people coming along behind.
My notch filter hasn’t moved along, but if we can start to structure the points below an LV2 object then structure will ( hopefully) emerge.
Parameter function definition seems an obvious one.
The more proscribed the outer stages of this process can become the more time people will get to concentrate on the juicy stuff in the middle.
Makefile is a demon that requires sacrifices to do anything. I am surprised it had lasted so long. I use it when I have to or when it is simple but there are easier to use build systems, like cmake.
Say, is the below path under /zynthian/… the default path for the prebuild installed plugin? Seems I now got a duplicate, the other one being my self built plugin:
Regenerating engines DB: engines ...
lilv_world_add_plugin(): warning: Duplicate plugin <https://github.com/johannesmenzel/SRPlugins/lv2-components/AutoLeveler>
lilv_world_add_plugin(): warning: ... found in file:///usr/lib/lv2/AutoLeveler.lv2/
lilv_world_add_plugin(): warning: ... and file:///zynthian/zynthian-plugins/lv2/AutoLeveler.lv2/ (ignored)
When we’re already talking that issue, what are zynthians (jalvs) lv2 search paths?
At the moment, when a sound is far too loud (snapshot did not save all settings) the first time it is not levelled so it reaches the speaker unfiltered.
Would it be possible to add a look-ahead of a few milliseconds (preferably adjustable) so even the first peak is levelled before it sounds?
I know this adds some latency, but I’m happy to pay that price.
Hi @HansR, thanks a lot for the feedback, and it is cool, that someone really considered to use it.
I see the problem. Personally I’d chose the lookahead solution as the last resort for several reasons.
I just started out with lv2 and don’t speak it fluently, a lookahead would require some adjustable audio buffers and the knowledge when, how and how often the plugin reports latency to the host in lv2/DPF.
Introducing latency in a musical instrument is critical.
The lookahead time must be longer than the smoothing time of the gain unit. Short latency and aprupt gain changes or vice versa.
There are some alternatives.
The alternatives in question:
First, the gain smoothing time is around 200 ms, which is quite long enough to be entitled to write “smooth leveling” to the description, but also equaling the duration of the spike you’re hearing. Maybe it should be shorter. Otherwise, the long smoothing time has the opposite effect in many cases: when applied gain is reset after parameter changes, the detector is already listening on the input while smoothly upleveling.
Good point with the non saving states. It should save the parameter values (does it?), but not the gain value. I didn’t think about that, because it’s actually a functional “runtime variable”. But it should be stored, and maybe it should also be a parameter.
The detection could at least “lookahead” within the current buffer, introducing no latency.
Fair enough. I have no idea if the things I ask are feasible. So far what you have done is pretty good.
Of course latency adds up, so it is logical the Zynthian basic latency is kept as low as possible. For this solution that does not apply (I believe it is agreed that AutoLeveler is not to be used in a live performance). For my case, everything below 20ms is acceptable.
Perhaps I’m asking too much, the current version works pretty well. As they say “The better is the enemy of the good”.
Your point is really valid. One of the problems is obviously the input gain, but I like to keep the upleveling function.
From my personal point of view 10 ms of latency are acceptable for live use, including the standard buffer size. I’ll have a look into the saving states solution and probably lowering the smoothing time.