Help for LV2 plugin building

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
oakwood
Established Member
Posts: 14
Joined: Mon Nov 28, 2022 2:52 pm
Has thanked: 4 times
Been thanked: 1 time

Help for LV2 plugin building

Post by oakwood »

Hello to all!

I am giving a try to the idea of "learning how to build plugins".

I have some (old) experience with c programming, and extended experience with Python programming.

About digital audio, I am rather inexperienced (I started to use Ardour recently), and also my experience with Linux is limited (I have been a Mac user for long time).

After some reading and experimenting in Ardour with different plugins formats, I thought to start with LV2.

I found the LV2 tutorial, which has some "basic plugins examples", and I hope that this is a good way to start learning, since it has some relatively short code, richly commented and explained.

However, I am stuck because I don't understand how to actually build a "working plugin" from the source code provided, so to load it and try it in Ardour.

I started with the eg-amp.lv2 plugin, the simplest.

I see that in the meson.build file there is no

Code: Select all

project()

function, and I believe that this is why if I run:

Code: Select all

meson setup builddir

in the plugin folder, I got the

Code: Select all

First statement must be a call to project

error.

I think this is ok, because this is not supposed to be the "first level meson.build file", and indeed I have seen the

Code: Select all

project('lv2', ['c'], ... 

function in the first level folder of the whole lv2 gitlab page.

So I assumed that it was correct to just add

Code: Select all

project('amp', ['c'])

as first line in the meson.build file in the plugin folder.
I have done so, and I have tried again with

Code: Select all

meson setup builddir

This time I have another error:

meson.build:10:0: ERROR: Unknown variable "c_suppressions"

:(

My intuition tells me that this is saying that I miss some librariy/header/needed-file in my system.

Is this correct?

And what is it, that I need to install?

And, more importantly, where should I read, to understand what libraries are needed, for a given plugin source code to be successfully built/compiled ?

Please let me know if I am doing something wrong, if I have taken some wrong direction, or any other input that you see useful!

Thanks in advance!

tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Help for LV2 plugin building

Post by tramp »

Hi and welcome in the linux world. :)

Your question here is more related to the meson build system then anything about lv2 plugin programming.
When you start the build from top level everything should work as expected.

When you would start to play with simple LV2 plugs, check out this one.
https://github.com/x42/property_example.lv2

It use a plain makefile for build and have proper documentation in the source files itself.

On the road again.
oakwood
Established Member
Posts: 14
Joined: Mon Nov 28, 2022 2:52 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Help for LV2 plugin building

Post by oakwood »

Thanks a lot, tramp, it looks very useful material, I will study it!

Post Reply