Skip to main content

Pythonic management of LV2 audio plugins with mod-host.

Project description

Build Status Documentation Status Code coverage

Pythonic management of LV2 audio plugins with mod-host.

Python Package Index:
Apache License 2.0


Plugin Manager has dependencies that must be installed before installing the library. Among the dependencies are lv2ls to check the installed audio plugins and PortAudio for information on the audio interfaces through PyAudio.

On Debian-based systems, run:

sudo apt-get install -y portaudio19-dev python-all-dev lilv-utils --no-install-recommends

Of course, for PluginsManager to manage Lv2 audio plugins, it is necessary that they have installed audio plugins to be managed. The Guitarix and Calf Studio projects provide some audio plugins. To install them:

pip install PedalPi-PluginsManager



Other examples are in the examples folder in the repository.

This examples uses Calf and Guitarix audio plugins.

Download and install mod-host. For more information, check the ModHost section.

Start audio process

# In this example, is starting a Zoom g3 series audio interface
jackd -R -P70 -t2000 -dalsa -dhw:Series -p256 -n3 -r44100 -s &


from pluginsmanager.banks_manager import BanksManager
from import ModHost

from import Bank
from pluginsmanager.model.pedalboard import Pedalboard
from pluginsmanager.model.connection import Connection

from pluginsmanager.model.lv2.lv2_effect_builder import Lv2EffectBuilder

from pluginsmanager.model.system.system_effect import SystemEffect

Creating a bank

# BanksManager manager the banks
manager = BanksManager()

bank = Bank('Bank 1')

Connecting with mod_host. Is necessary that the mod_host process already running

mod_host = ModHost('localhost')

Creating pedalboard

pedalboard = Pedalboard('Rocksmith')
# or
# bank.pedalboards.append(pedalboard)

Loads pedalboard. All changes in pedalboard are reproduced in mod_host

mod_host.pedalboard = pedalboard

Add effects in the pedalboard

builder = Lv2EffectBuilder()

reverb ='')
fuzz ='')
reverb2 ='')

# or
# pedalboard.effects.append(reverb2)

For obtains automatically the sound card inputs and outputs, use SystemEffectBuilder. It requires a JackClient instance, that uses JACK-Client.

from pluginsmanager.jack.jack_client import JackClient
client = JackClient()

from pluginsmanager.model.system.system_effect_builder import SystemEffectBuilder
sys_effect = SystemEffectBuilder(client).build()

For manual input and output sound card definition, use:

sys_effect = SystemEffect('system', ['capture_1', 'capture_2'], ['playback_1', 'playback_2'])


NOT ADD sys_effect in any Pedalboard


pedalboard.connect(sys_effect.outputs[0], reverb.inputs[0])

pedalboard.connect(reverb.outputs[0], fuzz.inputs[0])
pedalboard.connect(reverb.outputs[1], fuzz.inputs[0])
pedalboard.connect(fuzz.outputs[0], reverb2.inputs[0])
pedalboard.connect(reverb.outputs[0], reverb2.inputs[0])

pedalboard.connect(reverb2.outputs[0], sys_effect.inputs[0])
pedalboard.connect(reverb2.outputs[0], sys_effect.inputs[1])

Connecting using ConnectionList:

pedalboard.connections.append(Connection(sys_effect.outputs[0], reverb.inputs[0]))

pedalboard.connections.append(Connection(reverb.outputs[0], fuzz.inputs[0]))
pedalboard.connections.append(Connection(reverb.outputs[1], fuzz.inputs[0]))
pedalboard.connections.append(Connection(fuzz.outputs[0], reverb2.inputs[0]))
pedalboard.connections.append(Connection(reverb.outputs[0], reverb2.inputs[0]))

pedalboard.connections.append(Connection(reverb2.outputs[0], sys_effect.inputs[0]))
pedalboard.connections.append(Connection(reverb2.outputs[0], sys_effect.inputs[1]))

Set effect status (enable/disable bypass) and param value

# or
# = not

fuzz.params[0].value = fuzz.params[0].minimum / fuzz.params[0].maximum

Removing effects and connections:


for connection in list(pedalboard.connections):
    # or

for effect in list(pedalboard.effects):
# or
# for index in reversed(range(len(pedalboard.effects))):
    # del pedalboard.effects[index]


ModHost is an observer (see UpdatesObserver). It is informed about all changes that occur in some model instance (BanksManager, Bank, Pedalboard, Effect, Param, …), allowing it to communicate with the mod-host process transparently.

It is possible to create observers! Some ideas are:

  • Allow the use of other hosts (such as Carla);
  • Automatically persist changes;
  • Automatically update a human-machine interface (such as LEDs and displays that inform the state of the effects).

How to implement and the list of Observers implemented by this library can be accessed in the Observer section.



Execute make help for see the options

Generate documentation

This project uses Sphinx + Read the Docs.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PedalPi-PluginsManager, version 0.8.0
Filename, size File type Python version Upload date Hashes
Filename, size PedalPi_PluginsManager-0.8.0-py3-none-any.whl (324.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size PedalPi-PluginsManager-0.8.0.tar.gz (269.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page