Well this is a kick in the nuts: VST2 plug-ins

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

mr.ardour wrote: Wed Apr 28, 2021 11:19 pm
Dewdman42 wrote: Wed Apr 28, 2021 10:31 pm If the industry wants to adopt some other complicated future tech like LV2 or whatever.
LV2 is NOT complicated. The presence of Turtle to declare the plugin metadata, and for that matter the very idea of metadata about the plugin stored in a separate file from the shared object throws people off. The actual coding side of an LV2 plugin is at least as simple as a VST2 plugin.
Since VST 2 is pretty much the lingua franca of plugins, is there a VST 2 to LV2 guide somewhere?
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

[DELETED]
Last edited by OBSOLETE160530 on Sun Oct 08, 2023 3:56 pm, edited 1 time in total.

Post

falkTX wrote: Wed Apr 28, 2021 11:51 pm To give an actual example, this is a fully-working amplifier/gain plugin, as part of the LV2 examples:
https://github.com/lv2/lv2/blob/master/ ... .lv2/amp.c
If you strip out all the comments, it is just a few lines of code.
Thanks! Unfortunately, the classic "gain" plugs are far too simple as they don't show how to handle MIDI input for instruments.

Turtle may be ugly, but tucking all those silly setter/getter sorts of calls in there is really helpful. It's the one part of VST I never understood. There's already a struct, why not put the rest of the data in there as well, either directly or by pointer?

Also, looking at the code, I just wish C would let me stick a method in my struct! It would obviate the need for all those ugly parentheses and function pointers. But that's a diatribe for another forum. :lol:
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

syntonica wrote: Thu Apr 29, 2021 12:36 am Thanks! Unfortunately, the classic "gain" plugs are far too simple as they don't show how to handle MIDI input for instruments.
there are also examples for handling midi:

https://github.com/lv2/lv2/tree/master/ ... fifths.lv2
https://github.com/lv2/lv2/blob/master/ ... digate.lv2

and more:

https://github.com/lv2/lv2/tree/master/plugins
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

[DELETED]
Last edited by OBSOLETE160530 on Sun Oct 08, 2023 3:56 pm, edited 1 time in total.

Post

Music Engineer wrote: Thu Apr 29, 2021 12:45 am
syntonica wrote: Thu Apr 29, 2021 12:36 am Thanks! Unfortunately, the classic "gain" plugs are far too simple as they don't show how to handle MIDI input for instruments.
there are also examples for handling midi:

https://github.com/lv2/lv2/tree/master/ ... fifths.lv2
https://github.com/lv2/lv2/blob/master/ ... digate.lv2

and more:

https://github.com/lv2/lv2/tree/master/plugins
Awesome! Thanks, ME!

All of this should get me settled to see if LV2 is worth pursuing, if I can write a VST/AU wrapper around it.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

[DELETED]
Last edited by OBSOLETE160530 on Sun Oct 08, 2023 3:56 pm, edited 2 times in total.

Post

I think there are Windows and Mac users here that wish there was a simple kickstart project example that we can start from with LV2. The installation guide and these examples are linux based. Frankly, I don't know how to use these. What is "./waf configure --prefix=/foo" and the rest...

Do I need, msys for win? cygwin or some thing like that? how do you use LV2 in Windows? Is there a step by step guide. Or preferably, can I use it in VC++ ?
www.solostuff.net
The 3rd law of thermo-dynamics states that: the 2nd law has two meanings, one of them is strictly wrong, the other is massively misunderstood.

Post

[DELETED]
Last edited by OBSOLETE160530 on Sun Oct 08, 2023 3:55 pm, edited 1 time in total.

Post

S0lo wrote: Thu Apr 29, 2021 1:00 am The installation guide and these examples are linux based. Frankly, I don't know how to use these. What is "./waf configure --prefix=/foo" and the rest...
waf is a cross-platform build tool written in python. it follows the somewhat-sort-of conventional approach for similar tools that breaks the build process down into:
  • configure
  • build
  • install
The configure step discovers things about the build system, and sets up for the next step. You do not have to use waf to build an LV2 plugin. It's just one of many possible command-line-centric tools available.

These sorts of tools (cmake, meson etc. would be other examples) are used in cross-platform development (which us linuxheads tend to do more of) because using a particular IDE isn't generally portable, and frequently cannot be automated for CI and related tasks.
Do I need, msys for win? cygwin or some thing like that? how do you use LV2 in Windows? Is there a step by step guide. Or preferably, can I use it in VC++ ?
LV2 in its most basic form is just a header file. The documentation at lv2plug.in explains much more.

Post

S0lo wrote: Thu Apr 29, 2021 1:00 am I think there are Windows and Mac users here that wish there was a simple kickstart project example that we can start from with LV2. The installation guide and these examples are linux based. Frankly, I don't know how to use these. What is "./waf configure --prefix=/foo" and the rest...

Do I need, msys for win? cygwin or some thing like that? how do you use LV2 in Windows? Is there a step by step guide. Or preferably, can I use it in VC++ ?
I will say that it was almost trivial to build the basic examples from the LV2 distribution with just Python and VS2019 installed. There were some issues with the global build but I was able to build and install several of the plugins individually. They were incredibly simple, of course, with no U/I, but they loaded in Reaper.

All built from the command line, BTW. I only mention this because I expected it to be more work given the typical build process on Windows project builds that came from Linux. I was pleasantly surprised at how few external dependencies were required to get something going.
Last edited by ghettosynth on Thu Apr 29, 2021 5:26 am, edited 2 times in total.

Post

@mr.ardour and @falkTX

Thanks allot for the explanation!!. I surly need to try things and have a lot to learn

ghettosynth wrote: Thu Apr 29, 2021 1:51 am I will say that it was almost trivial to build the basic examples from the LV2 distribution with just Python and VS2019 installed. There were some issues with the global build but I was able to build and install several of the plugins individually. They were incredibly simple, of course, with no U/I, but they loaded in Reaper.

All built from the command line, BTW.
Ok so thats some clear way to start with. Thanks. falkTX mentioned that I may only need python too, so thats something to try.
www.solostuff.net
The 3rd law of thermo-dynamics states that: the 2nd law has two meanings, one of them is strictly wrong, the other is massively misunderstood.

Post

I may take a crack at a couple LV2 midi plugins to see how it goes. Kushview Element supports LV2 hosting...he removed it from the Mac/Win builds temporarily but its going back soon...kushview builds with waf too by the way on my Mac.

Anyway, I'd like to hear more about this lv2vst wrapper...what does that do exactly and would I need a VST2 license to use it?

Due to the fact that I can't get VST2 license and VST3 has particular midi problems that actually are a problem for what I want to do...I'm sorta stuck. I could try to do some LV2 stuff and just run the plugins inside Kushview element to use within LogicPro, Cubase, etc. Perhaps eventually BlueCatAudio would consider adding patchwork support for hosting LV2 also. Anyway it might be worth a little investigation at least to see what is possible.

I do think that right now, LV2 is the best candidate for a VST replacement. I don't think any of the big hosts will even consider adding support for it. unless VST goes away and Apple probably never will.
MacPro 5,1 12core x 3.46ghz-96gb MacOS 12.2 (opencore), X32+AES16e-50

Post

lkjb wrote: Wed Apr 28, 2021 5:46 pm
Thanks for the link. I'm almost surprised that Steinberg might actually have listened to concerns from developers.
I guess they did not want an all-out war with the VST developers. Still, I think there is value in trying to push LV2 forward, it is now clear that having all our eggs in the Steinberg basket is a dangerous situation, and the fact that vst3 is gpl-licensed does not change anything to that since most of us are writing closed-source plugins.

Post

mr.ardour wrote: Tue Apr 27, 2021 6:32 am
FigBug wrote: Tue Apr 27, 2021 2:58 am
milkmiruku wrote: Tue Apr 27, 2021 2:37 am https://lv2plug.in/gmpi.html
Plugins must not be expected to support dynamic sample rates. The sample rate must be set very early in the life of the plugin and not changed.
All looks sensible except this. Does that mean if the user changes their sample rate, you need to reload all the plugins?
Not reload. Reinstantiate. Totally different things. You don't unload/load the shared object(s) corresponding to the plugin (DLLs). You call a "teardown" method on the existing plugins, and then an "instantiate" method to recreate them all, with the same state as before (except for the new sample rate).

Real world workflows do not involve frequent sample rate changes.
But put this into actual scope of a reasonable plugin. Basic effect plugin only needs to reset internal buffer values to accomidate sample rate change. Synth may need to generate new data or load new data. The GUI may need to do something also to facilitate an intended display state based on the sample rate. Doing any more work in this regard would be inefficient. The buffers will dictate when the change occurs.

Post Reply

Return to “DSP and Plugin Development”