Re: More LV2 questions
Hermann Meyer <brummer--S0/[email protected]>
| Newsgroups | gmane.linux.audio.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 11.08.26 um 14:10 schrieb Fons Adriaensen: > Hello all, > > Some more questions on my way to grok LV2 > > 1. Should hosts echo parameter changes to the GUI if > the change came from the GUI ? > > Jalv doesn't, Ardour does. That can make continuous > changes (e.g. a fader) look erratic as the echo will > probably arrive when the widget has already moved > to the a new value. You should at least be prepared for such a behave and break the loop on your side. Remember, the host is the house keeper and the plug is the guest. > 2. Getting the sample rate in the GUI is complicated, > requiring the 'options' feature. This could have > been communicated to the GUI in the same way as > to the DSP part... Too simple ? > > And which is the correct one ? > > http://lv2plug.in/ns/ext/parameters#sampleRate > > or > > http://lv2plug.in/ns/ext/core#sampleRate > > Both jalv and Ardour use the 'parameter' one, > why does the other exist at all ? Save way to get it is a atom port, let your dsp part know that the GUI is up and running and ask it for all the states you need, for example, the SampleRate. Then you didn't relay on any host behave. > 3. A GUI may want to show an optional second window > (e.g. a frequency response). The only way to get > a meaningful title for such a window seems to be > to go through a lot of X11 magic to get the plugin > window's WM_NAME. Or is there a better way ? That is far from any way LV2 related. Use a toolkit to manage multiple windows from your plugin. There are a far couple of them out there, https://github.com/sjaehn/BWidgets https://github.com/x42/robtk https://github.com/brummer10/libxputty and when I remember right, you've written once a X11 toolkit yourself? > As the sample rate, this is such a basic requirement > for a plugin GUI that I wonder why this is not provided > with the initialisation parameters... > LV2 provide only a communication base between dsp -> host -> gui -> host -> dsp, but no GUI toolkit on it's own, and, LV2 itself didn't care what GUI toolkit you use, it just provide a communication protocol between host and plugin, that's all. If sample rate is such basic is debatable, others may say it is more important to know the buffer size were others may be more interested in the current sample position. However, as far I know either vst2/3 nor Clap providing a SampleRate (or any of the other stuff) to the GUI, you simply have to ask your dsp instance. In vst2/3 and clap you could ask directly, in LV2 you ask across the host, or request instance-access to ask your dsp instance directly. > TIA for any info ! > > Ciao, >