Adding LV2 plugins

From ZynthianWiki
Revision as of 14:02, 16 March 2020 by Wyleu (Talk | contribs)

Jump to: navigation, search

So lets pick up the bits and pieces . . .


A Putty connection to the relevant machine . . .

12546f27f90cd35123b556871f9d3bd6af821f5b.png

For those, that words like git have little meaning, Wikipedia says Git is a distributed version-control system for tracking changes in source code during software development. . .

It accesses where teams & oneself keep stuff when developing code. It’s also where one can easily grab the project at various points in it’s history, which is very helpful. I’ve known people who keep audio collections under git. It does its job very well but it has a certain surrounding mythology for the infrequent user.

One needs a suite of programmes loaded on your machine to access the git repository and these are run by either the command line using the word git . . with a command and parameters, or a GUI, perhaps for instance, built into an Interactive Development Environment (An iDE).

so the line described in the page pointed to by the weblink in the definition of the lv2 plugin . . . .

so git clone git://github.com/x42/xfade.lv2.git

will copy the recognised structure defined at this site . . . which is:- I’ve opened the clone dialog to show how this can be picked up from the site itiself… at github which surprise, surprise is a place for git repositories to hang out.

5e8350578ef1d03da0aa2396e74e6bddd6a3112c.png

We can now use the cd command to move into the directory that the git clone command has magically created for us.

and we can see that the files structure from the repo has been ‘cloned’ to our directory in root.

324d0b65919661ebd3463b6dcf816141a24f4d98.png So onwards . . . .

the next instruction on the readme page is . . .

make

so what’s going on here. . . ?

Wikipedia :- Make is a build automation tool that automatically builds executable programs and libraries from source code by reading files called Makefiles which specify how to derive the target program.

so what is this doing? Well the cloned repo contains a description of the code . . .

xfade.c

Which actually does the work . . .

But this programme needs to be connected or linked to the machine it will run on and this is where make comes in. it makes sure that the details are all up to date and choose the versions of code libraries on the machine that will be used.

there is a file with various possible names Makefile in this case: https://github.com/x42/xfade.lv2/blob/master/Makefile for those that like the gore . . .

so after make . . . .

25cb1cb627ba8171efb5b37645ee432ebb1f31cc.png

we can see some response and notice it’s now built a directory called build

which contains two text files and an .so file

98daf55da5d9cbac45bd48d325bec4291164c13f.png

the so file An .so file is a compiled library file. It stands for “Shared Object” and is analogous to a Windows DLL.

So we have descriptions of the lv2 setup and a programming plug & socket ( .so file) to allow the programme to connect to the bits and pieces it needs. . .

sudo make install PREFIX=/usr

well sudo is the magic invocation that allows you to take on poweruser status to modify files in the structure that would normally be blocked from you. Now in the zynthian we run with root power all the time, so we can do this anyway but the sudo does no harm . . . so we are running the next command as superuser, and the next command is

sudo make install PREFIX=/usr

so we are running make again but with the install command which is actually defined in the Makefile, and a specific setting of a parameter called prefix with a specific value

302e0da4a6d703c82f1a0f9ec056b7cc40f191c8.png

and just checking we can see the file that the make install has created.

4381ef17152ef986569c39c24a4cea208f8cd882.png

notice these are owned by root, which is why the sudo would have been needed.

so from the Is there a guide to installing custom LV2 plugins somewhere? we get @Baggypants

ssh on to the zynth, git clone the repo. install any dependencies Run make, to compile the LV2, copy the <somename>.lv2 directory into /zynthian/zynthian-my-plugins/lv2/ . reboot enable the plugin in the webconf and checking it seems to be there . . . :smiley: ( I’m not sure how but hey …!)

5462d5a420793e0322476de3c61469ecdbe4d6e8.png

and there it is in the lv2 menu in webconf . . .

5aa1443936d6975679d92eb5cafb42a792a1142a.png

layer_menu layer_menu 1360×768 24.6 KB So we choose a new effect . . .

engine_menu engine_menu 1360×768 49.9 KB and there we have our new effect Stereo DJ X-Fade . . .

with the parameters . . .

parameter_menu parameter_menu 1360×768 20.2 KB sadly the encoder for A A+B B only selects those values not a gradual fade… . . . But this is probably because I now realise it’s a stereo input device so has 4 inputs that ar being mapped to 2 so that might well explain it…

smiley: