Hi,
which could be an appropriate way to get MOD cpu load from inside a plugin?
And can I modify volumes and gains of MOD’s mixer from inside a plugin?
And can I access MOD’s tuner data from inside a plugin?
Maybe I can use alsa library?
There’s some example I can find?
There is a difference between CPU load and DSP load. On the Duo the return value of jack_cpu_load might be interesting to you. This value is not handed to plug-ins by the plug-in host. Can you describe a use-case where it would be needed?
This is not an “appropriate way”. You would need to circumvent the host and control the alsa mixer.
MOD uses the gxtuner code from the Guitarix project. The code is open so you could use it in a different way (that the LICENCE allows).
One start to learn LV2 programming is read e.g. this: http://lv2plug.in/book/, get code of simple plug-ins, study it and maybe ask questions on the LV2 IRC channel. For prototyping plug-ins I can also recommend FAUST (also see my slides here https://github.com/jkbd/noise).
I’m curious what you are actually up to?
Best,
Jakob
I’m intrested in CPU (or maybe DSP) load in this sense: if it’s over a certain level, let’s say 60%, my plugin chooses a simplified algorithm.
So, is there an unappropriate way?
MOD’s HardwareBypass plugin uses alsa controls in order to activate hardware bypass.
I have to change an instrument during the show and I’ve not enough time to enter manually DUO’s menu: how could I modify from software a channel’s stage and fine gain?
Yes, I saw it, but I wonder if using DUO’s tuner without plug in the chain another plugin maybe I can save some cpu ressource (and a little space on my desktop, my patch is already a bit messy…).
Tuner should dialog with a lite midi pedalboard I’ve built. It can show tuner’s messages on a led strip.
You are interested in DSP load. It is possible to have XRUNs without the CPU being at 100%. Adaptive plug-ins could make a pedal board unpredictable in regards to XRUNs.
Yes, this is exactly what I would like to do!
But I’m looking for a way to set gain stage and fine gain with alsa controls.
In HardwareBypass plugin I find:
For what I understand “Left True-Bypass” let me find the mixer simple element which controls hardware bypass function.
Now, how can I find the mixer simple element which controls gain stage and fine gain?
A side effect is, for example, when I load a plugin which manipulate my settings for gain stage and fine gain, then load a other preset, which then, wouldn’t work as expected.
Side-effect-free would be if the plug-in only knows about the host. The host is capable to do everything the plug-in needs. Also the host can try to manage shared resources.
If you have 2 plug-ins, they don’t know about each others existence. If these two operate ALSA they operate on shared memory in some abstract way. Hopefully the operating system and ALSA make sure nothing crashes. For sure the plug-in host can not help here.
Thanks @brummer for your example, and thanks @Jakob for your explainations!
Now my problem is to compile the code: all alsa-mixer functions have undefined references.
I’m working on Docker mpb, I tryed to install the proper libasound2 with apt-get but I get this error:
The following packages have unmet dependencies:
libasound2 : Depends: libasound2-data (>= 1.1.0-0ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
@Guido
Have you checked out the makefile for the mod-bypass for how to link against alsa
you shouldn’t need to install libasound by yourself on the plugin builder, in opposite, that will only leads to more issues when you try to run your plugin.