PedalPi - PluginsManager - Util¶
DictTuple¶
-
class
pluginsmanager.util.dict_tuple.
DictTuple
(elements, key_function)[source]¶ Dict tuple is a union with dicts and tuples. It’s possible obtains an element by index or by a key
The key is not been a int or long instance
Based in http://jfine-python-classes.readthedocs.io/en/latest/subclass-tuple.html
Parameters: - elements (iterable) – Elements for the tuple
- key_function (lambda) – Function mapper: it obtains an element and returns your key.
ModPedalboardConverter¶
-
class
pluginsmanager.util.mod_pedalboard_converter.
ModPedalboardConverter
(mod_ui_path, builder, ignore_errors=False)[source]¶ ModPedalboardConverter is a utility to convert MOD [1] pedalboards structure in plugins manager pedalboard.
For use, is necessary that the computer system contains the mod_ui with your codes compiled [2] and the pedalboard:
>>> path = Path('/home/user/git/mod/mod_ui/') >>> builder = Lv2EffectBuilder() >>> converter = ModPedalboardConverter(path, builder) >>> pedalboard_path = Path('/home/user/.pedalboards/pedalboard_name.pedalboard') >>> system_effect = SystemEffect('system', ['capture_1', 'capture_2'], ['playback_1', 'playback_2']) >>> pedalboard = converter.convert(pedalboard_path, system_effect)
ModPedalboardConverter can try discover the system_pedalboard by the pedalboard:
>>> path = Path('/home/user/git/mod/mod_ui/') >>> builder = Lv2EffectBuilder() >>> converter = ModPedalboardConverter(path, builder) >>> pedalboard_path = Path('/home/user/.pedalboards/pedalboard_name.pedalboard') >>> pedalboard = converter.convert(pedalboard_path)
If you needs only obtain the system effect:
>>> path = Path('/home/user/git/mod/mod_ui/') >>> builder = Lv2EffectBuilder() >>> converter = ModPedalboardConverter(path, builder) >>> pedalboard_path = Path('/home/user/.pedalboards/pedalboard_name.pedalboard') >>> pedalboard_info = converter.get_pedalboard_info(pedalboard_path) >>> system_effect = converter.discover_system_effect(pedalboard_info)
[1] MOD, an awesome music enterprise, create the mod-ui, a visual interface that enable create pedalboards in a simple way. [2] See the docs: https://github.com/moddevices/mod-ui#install Parameters: - mod_ui_path (Path) – path that mod_ui has in the computer.
- builder (Lv2EffectBuilder) – Builder for generate the lv2 effects
- ignore_errors (bool) – Ignore pedalboard problems like connections with undefined ports
-
__init__
(mod_ui_path, builder, ignore_errors=False)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
convert
(pedalboard_path, system_effect=None)[source]¶ Parameters: - pedalboard_path (Path) – Path that the pedalboard has been persisted. Generally is in format path/to/pedalboard/name.pedalboard
- system_effect (SystemEffect) – Effect that contains the audio interface outputs and inputs or None for auto discover
Return Pedalboard: Pedalboard loaded
PairsList¶
-
class
pluginsmanager.util.pairs_list.
PairsList
(similarity_key_function)[source]¶ Receives two lists and generates a result list of pairs of equal elements
Uses calculate method for generate list
Parameters: similarity_key_function – Function that receives a element and returns your identifier to do a mapping with elements from another list
PairsListResult¶
persistence_decoder¶
pluginsmanager.util.restriction_list.RestrictionList¶
-
class
pluginsmanager.util.restriction_list.
RestrictionList
[source]¶ List with validation when add a element
-
__contains__
(item)[source]¶ See
__contains__()
method
-
__delitem__
(sliced)[source]¶ See
__delitem__()
method
-
__getitem__
(index)[source]¶ See
__getitem__()
method
-
__iter__
()[source]¶ See
__iter__()
method
-
__repr__
()[source]¶ See
__repr__()
method
-
__setitem__
(index, val)[source]¶ See
__setitem__()
methodSwap doesn’t works:
>>> builder = Lv2EffectBuilder() >>> effects = EffectsList() >>> effects.append(builder.build('http://calf.sourceforge.net/plugins/Reverb')) >>> effects.append(builder.build('http://guitarix.sourceforge.net/plugins/gx_fuzzfacefm_#_fuzzfacefm_')) >>> effects[0], effects[1] = effects[1], effects[0] pluginsmanager.model.effects_list.AlreadyAddedError: The effect 'GxFuzzFaceFullerMod' already added
-
__str__
()[source]¶ See
__repr__()
method
-