PedalPi - PluginsManager - Model - Lv2¶
Lv2EffectBuilder¶
-
class
pluginsmanager.model.lv2.lv2_effect_builder.
Lv2EffectBuilder
(plugins_json=None)[source]¶ Generates lv2 audio plugins instance (as
Lv2Effect
object).Note
In the current implementation, the data plugins are persisted in plugins.json.
Parameters: plugins_json (Path) – Plugins json path file -
build
(lv2_uri)[source]¶ Returns a new
Lv2Effect
by the valid lv2_uriParameters: lv2_uri (string) – Return Lv2Effect: Effect created
-
lv2_plugins_data
()[source]¶ Generates a file with all plugins data info. It uses the lilvlib library.
PluginsManager can manage lv2 audio plugins through previously obtained metadata from the lv2 audio plugins descriptor files.
To speed up usage, data has been pre-generated and loaded into this piped packet. This avoids a dependency installation in order to obtain the metadata.
However, this measure makes it not possible to manage audio plugins that were not included in the list.
To work around this problem, this method - using the lilvlib library - can get the information from the audio plugins. You can use this data to generate a file containing the settings:
>>> builder = Lv2EffectBuilder() >>> plugins_data = builder.lv2_plugins_data() >>> import json >>> with open('plugins.json', 'w') as outfile: >>> json.dump(plugins_data, outfile)
The next time you instantiate this class, you can pass the configuration file:
>>> builder = Lv2EffectBuilder(os.path.abspath('plugins.json'))
Or, if you want to load the data without having to create a new instance of this class:
>>> builder.reload(builder.lv2_plugins_data())
Warning
To use this method, it is necessary that the system has the lilv in a version equal to or greater than 0.22.0. Many linux systems currently have previous versions on their package lists, so you need to compile them manually.
In order to ease the work, Pedal Pi has compiled lilv for some versions of linux. You can get the list of .deb packages in https://github.com/PedalPi/lilvlib/releases.
# Example wget https://github.com/PedalPi/lilvlib/releases/download/v1.0.0/python3-lilv_0.22.1.git20160613_amd64.deb sudo dpkg -i python3-lilv_0.22.1+git20160613_amd64.deb
If the architecture of your computer is not contemplated, moddevices provided a script to generate the package. Go to https://github.com/moddevices/lilvlib to get the script in its most up-to-date version.
Return list: lv2 audio plugins metadata
-
plugins_json_file
= '/home/docs/checkouts/readthedocs.org/user_builds/pedalpi-pluginsmanager/checkouts/v0.5.1/pluginsmanager/model/lv2/plugins.json'¶ Informs the path of the plugins.json file. This file contains the lv2 plugins metadata info
-
Lv2Effect¶
-
class
pluginsmanager.model.lv2.lv2_effect.
Lv2Effect
(plugin)[source]¶ Representation of a Lv2 audio plugin instance.
For general effect use, see
Effect
class documentation.It’s possible obtains the
Lv2Plugin
information:>>> reverb <Lv2Effect object as 'Calf Reverb' active at 0x7f60effb09e8> >>> reverb.plugin <Lv2Plugin object as Calf Reverb at 0x7f60effb9940>
Parameters: plugin (Lv2Plugin) –
Lv2Input¶
-
class
pluginsmanager.model.lv2.lv2_input.
Lv2Input
(effect, effect_input)[source]¶ Representation of a Lv2 input audio port instance.
For general input use, see
Input
class documentation.Parameters:
Lv2Output¶
-
class
pluginsmanager.model.lv2.lv2_output.
Lv2Output
(effect, effect_output)[source]¶ Representation of a Lv2 output audio port instance.
For general input use, see
Output
class documentation.Parameters: