Skip to content

Commit

Permalink
#3 - Doc lv2_effect, lv2_input, lv2_output, lv2_param
Browse files Browse the repository at this point in the history
  • Loading branch information
SrMouraSilva committed Nov 29, 2016
1 parent be233de commit 09865ed
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 8 deletions.
8 changes: 7 additions & 1 deletion docs/source/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ This page contains the model classes.
SystemOutput->Output;

Lv2Param->Param;
}

.. graphviz::

digraph classes {
graph [rankdir=TB];
node [shape=rect, style=filled, color="#298029", fontname=Sans, fontcolor="#ffffff", fontsize=10];

BanksManager->Bank [dir="forward", arrowhead="odiamond", arrowtail="normal"];
BanksManager->ObserverManager [dir="forward", arrowhead="none", arrowtail="normal"];
ObserverManager->UpdatesObserver [dir="forward", arrowhead="odiamond", arrowtail="normal"];
ModHost->UpdatesObserver
}


BanksManager
------------

Expand Down
10 changes: 8 additions & 2 deletions pluginsmanager/model/lv2/lv2_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ class Lv2Effect(Effect):
"""
Representation of a Lv2 audio plugin instance.
Effect contains a `active` status (off=bypass), a list of :class:`Param`,
a list of :class:`Input` and a list of :class:`Connection`
For general effect use, see :class:`Effect` class documentation.
It's possible obtains the :class:`Lv2Plugin` information::
>>> reverb
<Lv2Effect object as 'Calf Reverb' active at 0x7f60effb09e8>
>>> reverb.plugin
<Lv2Plugin object as Calf Reverb at 0x7f60effb9940>
:param Lv2Plugin plugin:
"""
Expand Down
2 changes: 1 addition & 1 deletion pluginsmanager/model/lv2/lv2_effect_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Lv2EffectBuilder(object):
"""
Generate lv2 audio plugins instance (as :class:`Lv2Effect` object).
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
Expand Down
10 changes: 10 additions & 0 deletions pluginsmanager/model/lv2/lv2_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@


class Lv2Input(Input):
"""
Representation of a Lv2 `input audio port`_ instance.
For general input use, see :class:`Input` class documentation.
.. _input audio port: http://lv2plug.in/ns/lv2core/#InputPort
:param Lv2Effect effect:
:param dict effect_input: *input audio port* json representation
"""

def __init__(self, effect, effect_input):
super(Lv2Input, self).__init__(effect)
Expand Down
11 changes: 11 additions & 0 deletions pluginsmanager/model/lv2/lv2_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@


class Lv2Output(Output):
"""
Representation of a Lv2 `output audio port`_ instance.
For general input use, see :class:`Output` class documentation.
.. _output audio port: http://lv2plug.in/ns/lv2core/#OutputPort
http://lv2plug.in/ns/lv2core/#Parameter
:param Lv2Effect effect:
:param dict effect_output: *output audio port* json representation
"""

def __init__(self, effect, effect_output):
super(Lv2Output, self).__init__(effect)
Expand Down
10 changes: 7 additions & 3 deletions pluginsmanager/model/lv2/lv2_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

class Lv2Param(Param):
"""
:class:`Param` is an object representation of an Lv2 Audio Plugin
Parameter
Representation of a Lv2 `input control port`_ instance.
:param param: Param value
For general input use, see :class:`Param` class documentation.
:param Lv2Effect effect:
:param dict param: *input control port* json representation
.. _input control port: http://lv2plug.in/ns/lv2core/#Parameter
"""

def __init__(self, effect, param):
Expand Down
5 changes: 5 additions & 0 deletions pluginsmanager/model/lv2/lv2_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ def __getitem__(self, key):

@property
def json(self):
"""
Json decodable representation of this plugin based in moddevices `lilvlib`_.
.. _lilvlib: https://github.com/moddevices/lilvlib
"""
return self._json

def __str__(self):
Expand Down
2 changes: 1 addition & 1 deletion pluginsmanager/util/dict_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DictTuple(tuple):
returns your key.
"""

def __new__(self, elements, key_function):
def __new__(cls, elements, key_function):
return tuple.__new__(DictTuple, tuple(elements))

def __init__(self, elements, key_function):
Expand Down

0 comments on commit 09865ed

Please sign in to comment.