Difference between revisions of "Adding LV2 plugins"

From ZynthianWiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
So lets pick up the bits and pieces . . .
+
So lets pick up the bits and pieces!
  
GUI Method . .
+
==Enabling LV2 plugins with the webconf GUI==
  
[[File:5aa1443936d6975679d92eb5cafb42a792a1142a.png|800px]]
+
[[File:5aa1443936d6975679d92eb5cafb42a792a1142a.png|600px|right]]
  
....
+
From your browser, access the zynthian's webconf tool and open the "Software->LV2 plugins" panel. Search the plugin you want to enable, check it and save.
  
 +
<br clear=all>
  
[[File:A654c4082097355ec19df5e05b2aa0ec31c7d0bd.png|800px]]
+
[[File:A654c4082097355ec19df5e05b2aa0ec31c7d0bd.png|600px|right]]
  
So we choose a new effect . . .
+
[[File:18a38ae4efc0c74b72e793ff0619e05604675df1.png|600px|right]]
  
[[File:18a38ae4efc0c74b72e793ff0619e05604675df1.png|800px]]
+
After that, the plugin will be available from the zynthian's UI. You can add it on a synth engine's chain or create an independent FX chain.
  
and there we have our new effect Stereo DJ X-Fade . . .
+
<br clear=all>
  
with the parameters . . .
+
[[File:A612ffab406fc88d2fb550ac71e39f5ec4b0d8e8.png|600px|right]]
  
[[File:A612ffab406fc88d2fb550ac71e39f5ec4b0d8e8.png|800px]]
+
and we have our new effect Stereo DJ X-Fade, with its controls
  
 +
<br clear=all>
  
Command Line Method ( Historic) . ..
+
==Installing a plugin from its source code using the CLI (Command Line Interface)==
  
A Putty connection to the relevant machine . . .
+
First you need a ssh (putty) connection to the zynthian:
  
 
[[File:12546f27f90cd35123b556871f9d3bd6af821f5b.png|800px]]
 
[[File:12546f27f90cd35123b556871f9d3bd6af821f5b.png|800px]]
  
For those, that words like git have little meaning, Wikipedia says
+
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. . .
+
 
 +
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.
 
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).
+
One needs a suite of programms loaded on your machine to access the git repository and these are run by either the command line using the word git and a list of parameters, or a GUI, perhaps for instance, built into an Interactive Development Environment (An iDE).
  
so
+
So the line described in the page pointed to by the weblink in the definition of the lv2 plugin:
the line described in the page pointed to by the weblink in the definition of the lv2 plugin . . . .
 
  
so
+
cd /zynthian/zynthian-sw/plugins
git clone git://github.com/x42/xfade.lv2.git
+
git clone git://github.com/x42/xfade.lv2.git
  
will copy the recognised structure defined at this site . . .
+
will get a copy of the source code for xfade.lv2 project, being x42 the author.
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.
+
 
 +
I’ve opened the clone dialog to show how this can be picked up from the site itiself at github. Github, which surprise, is a hosting place for git repositories.
  
 
[[File:5e8350578ef1d03da0aa2396e74e6bddd6a3112c.png|800px]]
 
[[File:5e8350578ef1d03da0aa2396e74e6bddd6a3112c.png|800px]]
  
We can now use the cd command to move into the directory that the git clone command has magically created for us.
+
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 the zynthian.
  
and we can see that the files structure from the repo has been ‘cloned’ to our directory in root.
+
  cd xfade.lv2
 +
  ls
  
 
[[File:324d0b65919661ebd3463b6dcf816141a24f4d98.png|800px]]
 
[[File:324d0b65919661ebd3463b6dcf816141a24f4d98.png|800px]]
So onwards . . . .
 
  
the next instruction on the readme page is . . .
+
The next instruction on the readme page is:
  
make
+
make
  
so what’s going on here. . . ?
+
what’s going on here? Wikipedia says:
  
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.
+
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 . . .
+
so what is this doing? Well the cloned repo contains the source code for the plugin:
  
xfade.c
+
xfade.c
  
Which actually does the work . . .
+
which actually does the work. But this programm needs to be compiled (converted to machine code) and linked (connected to the system 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.
  
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:
  
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 . . .
+
https://github.com/x42/xfade.lv2/blob/master/Makefile
  
so after make . . . .
+
for those that like the gore.
 +
 
 +
So after make:
  
 
[[File:25cb1cb627ba8171efb5b37645ee432ebb1f31cc.png|400px]]
 
[[File:25cb1cb627ba8171efb5b37645ee432ebb1f31cc.png|400px]]
  
we can see some response and notice it’s now built a directory called build
+
we can see some response and notice it’s now built a directory called build which contains two text files and an a .so file
 
 
which contains two text files and an .so file
 
  
 
[[File:98daf55da5d9cbac45bd48d325bec4291164c13f.png|400px]]
 
[[File:98daf55da5d9cbac45bd48d325bec4291164c13f.png|400px]]
  
the so file
+
the so file is a compiled library file. It stands for “Shared Object” and is analogous to a Windows DLL.
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 have descriptions of the lv2 setup and a programming plug & socket ( .so file) to allow the programm to connect to the bits and pieces it needs.
so we are running the next command as superuser, and the next command is
 
  
sudo make install PREFIX=/usr
+
make install
  
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
+
so we are running make again but with the install subcommand which is actually defined in the Makefile, and will copy the ready-to-run plugin files to the right system directories.
  
 
[[File:302e0da4a6d703c82f1a0f9ec056b7cc40f191c8.png|400px]]
 
[[File:302e0da4a6d703c82f1a0f9ec056b7cc40f191c8.png|400px]]
  
and just checking we can see the file that the make install has created.
+
this is just checking if we can see the files that the make install has installed on the system.
  
 
[[File:4381ef17152ef986569c39c24a4cea208f8cd882.png|400px]]
 
[[File:4381ef17152ef986569c39c24a4cea208f8cd882.png|400px]]
  
notice these are owned by root, which is why the sudo would have been needed.
+
The steps resumed:
  
so from the
+
* ssh on to the zynth,
Is there a guide to installing custom LV2 plugins somewhere?
+
* git clone the repo.
we get @Baggypants
+
* install any dependencies
 
+
* Run make, to compile the LV2,
ssh on to the zynth,
+
* copy the <somename>.lv2 directory into /zynthian/zynthian-my-plugins/lv2/
git clone the repo.
+
* reboot
install any dependencies
+
* enable the plugin in the webconf
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 …!)
 
  
 
[[File:5462d5a420793e0322476de3c61469ecdbe4d6e8.png|400px]]
 
[[File:5462d5a420793e0322476de3c61469ecdbe4d6e8.png|400px]]
  
and there it is in the lv2 menu in webconf . . .
+
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.
 
 
 
 
 
 
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:
+
;-)

Latest revision as of 18:28, 19 February 2021

So lets pick up the bits and pieces!

1 Enabling LV2 plugins with the webconf GUI

5aa1443936d6975679d92eb5cafb42a792a1142a.png

From your browser, access the zynthian's webconf tool and open the "Software->LV2 plugins" panel. Search the plugin you want to enable, check it and save.


A654c4082097355ec19df5e05b2aa0ec31c7d0bd.png
18a38ae4efc0c74b72e793ff0619e05604675df1.png

After that, the plugin will be available from the zynthian's UI. You can add it on a synth engine's chain or create an independent FX chain.


A612ffab406fc88d2fb550ac71e39f5ec4b0d8e8.png

and we have our new effect Stereo DJ X-Fade, with its controls


2 Installing a plugin from its source code using the CLI (Command Line Interface)

First you need a ssh (putty) connection to the zynthian:

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 programms loaded on your machine to access the git repository and these are run by either the command line using the word git and a list of 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:

cd /zynthian/zynthian-sw/plugins
git clone git://github.com/x42/xfade.lv2.git

will get a copy of the source code for xfade.lv2 project, being x42 the author.

I’ve opened the clone dialog to show how this can be picked up from the site itiself at github. Github, which surprise, is a hosting place for git repositories.

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 the zynthian.

 cd xfade.lv2
 ls

324d0b65919661ebd3463b6dcf816141a24f4d98.png

The next instruction on the readme page is:

make

what’s going on here? Wikipedia says:

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 the source code for the plugin:

xfade.c

which actually does the work. But this programm needs to be compiled (converted to machine code) and linked (connected to the system 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 a .so file

98daf55da5d9cbac45bd48d325bec4291164c13f.png

the 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 programm to connect to the bits and pieces it needs.

make install

so we are running make again but with the install subcommand which is actually defined in the Makefile, and will copy the ready-to-run plugin files to the right system directories.

302e0da4a6d703c82f1a0f9ec056b7cc40f191c8.png

this is just checking if we can see the files that the make install has installed on the system.

4381ef17152ef986569c39c24a4cea208f8cd882.png

The steps resumed:

  • 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

5462d5a420793e0322476de3c61469ecdbe4d6e8.png

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.

-)