Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 44 pluginsmanager v0.7.0 #47

Open
wants to merge 11 commits into
base: version-0.4.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ python:
sudo: required

install:
- sudo apt-get update
- sudo apt-get install -y portaudio19-dev python-all-dev --no-install-recommends
- sudo apt-get install -y lilv-utils calf-plugins guitarix --no-install-recommends
- sudo apt-get install -y libavahi-compat-libdnssd1 --no-install-recommends
- pip3 install coveralls
- pip3 install git+https://github.com/depl0y/pybonjour-python3
- pip3 install zeroconf
- python3 setup.py develop
- make install-develop-requirements
- make install-tests-requirements
- python setup.py develop

script:
- lv2ls
- coverage3 run --source=webservice wstest/config.py test
- make test

after_success:
- 'bash <(curl -s https://codecov.io/bash)'
- bash <(curl -s https://codecov.io/bash)

jobs:
include:
- stage: doc
script:
- make install-docs-requirements
- make docs
19 changes: 16 additions & 3 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
Version 0.4.0 - released mm/dd/18
=================================

- Issue #45 - Add Makefile
- Issue #44 - Update libraries

- PluginsManager v0.4.0? -> v0.7.0
- Application v0.2.0 -> v0.4.0

Version 0.3.0 - released 05/31/17
=================================
- Issues #31 - Using logging instead print
- Issues #26 - Implemented secure close ([Application issue 29](https://github.com/PedalPi/Application/issues/29) version 0.3.0)
- Issues #27 - Rename zeroconf device name

- Issue #31 - Using logging instead print
- Issue #26 - Implemented secure close ([Application issue 29](https://github.com/PedalPi/Application/issues/29) version 0.3.0)
- Issue #27 - Rename zeroconf device name
- Improve Component Data documentation
- Fix '#' problem when request plugin data
- Issue #40 - Add support for plugins manager v0.5.0 and Application v0.3.0

- Now using PluginsManager notification implementation (``with observer:``)

- Issue #37 - Banks swap -> Bank move

Version 0.2.0 - released 05/13/17
=================================

- Initial release
19 changes: 11 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The registration must occur before application initialization (``application.sta
application = Application(path_data="data/", address='localhost')

from webservice.webservice import WebService
application.register(WebService(application, port))
application.register(WebService(application, port=3000))

2. Initialization of the web server
+++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -122,7 +122,7 @@ look like the following code:
application = Application(path_data="data/", address='localhost')

from webservice.webservice import WebService
application.register(WebService(application, port))
application.register(WebService(application, port=3000))

application.start()

Expand Down Expand Up @@ -163,17 +163,20 @@ Maintenance
Documentation
*************

Is necessary to install `nodejs`_.

.. _nodejs: https://nodejs.org/en/

.. code-block:: bash

# Installing dependencies
npm install -g aglio
make install-docs-requirements

# Generate doc
cd docs/
aglio -i documentation.apib --theme-variables streak --theme-template triple -o index.html
make docs

# View documentation
firefox index.html
make docs-see

Test
****
Expand All @@ -185,5 +188,5 @@ Test

coverage3 run --source=webservice wstest/config.py test
coverage3 report
coverage3 html
firefox htmlcov/index.html
make test-details

18 changes: 14 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@
{
"<span class="hljs-attribute">connections</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>": <span class="hljs-value">{
"<span class="hljs-attribute">index</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">effect</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
Expand All @@ -535,6 +536,7 @@
</span>}
</span>},
{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>": <span class="hljs-value">{
"<span class="hljs-attribute">index</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">symbol</span>": <span class="hljs-value"><span class="hljs-string">"playback_1"</span>
Expand Down Expand Up @@ -854,6 +856,7 @@
</dd><dt>param_index</dt><dd><code>number</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>0</span></span><p>Param position in effect params list</p>
</dd></dl></div></div></div><hr class="split"><div class="middle"><section id="effect-connections-management" class="resource-group"><h2 class="group-heading">Effect connections management <a href="#effect-connections-management" class="permalink">&para;</a></h2><p>Connect and disconnect effects.</p>
</section></div><div class="middle"><div id="effect-connections-management-manages-by-key" class="resource"><h3 class="resource-heading">Manages by key <a href="#effect-connections-management-manages-by-key" class="permalink">&para;</a></h3></div></div><div class="right"><div class="definition"><span class="method post">POST</span>&nbsp;<span class="uri"><span class="hostname">http://pedalpi.local:3000/v1</span>/bank/<span class="hljs-attribute" title="bank_index">1</span>/pedalboard/<span class="hljs-attribute" title="pedalboard_index">3</span>/connect</span></div><div class="tabs"><div class="example-names"><span>Requests</span><span class="tab-button">example 1</span><span class="tab-button">example 2</span></div><div class="tab"><div><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=UTF-8</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">output</span>": <span class="hljs-value">{
"<span class="hljs-attribute">effect</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">symbol</span>": <span class="hljs-value"><span class="hljs-string">"out"</span></span>,
Expand All @@ -864,6 +867,7 @@
"<span class="hljs-attribute">index</span>": <span class="hljs-value"><span class="hljs-number">1</span>
</span>}
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="tabs"><div class="example-names"><span>Responses</span><span class="tab-button">200</span></div><div class="tab"><div><div class="inner"><div class="description text-muted">This response has no content.</div><div style="height: 1px;"></div></div></div></div></div></div><div class="tab"><div><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=UTF-8</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">output</span>": <span class="hljs-value">{
"<span class="hljs-attribute">effect</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">symbol</span>": <span class="hljs-value"><span class="hljs-string">"out"</span></span>,
Expand Down Expand Up @@ -1081,6 +1085,7 @@ <h4 id="header-notification-">Notification <code>on_current_pedalboard_changed</
"<span class="hljs-attribute">name</span>":<span class="hljs-value"><span class="hljs-string">"hehueuhes ea"</span></span>,
"<span class="hljs-attribute">connections</span>":<span class="hljs-value">[
{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>":<span class="hljs-value">{
"<span class="hljs-attribute">effect</span>":<span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">symbol</span>":<span class="hljs-value"><span class="hljs-string">"in_l"</span></span>,
Expand All @@ -1092,6 +1097,7 @@ <h4 id="header-notification-">Notification <code>on_current_pedalboard_changed</
</span>}
</span>},
{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>":<span class="hljs-value">{
"<span class="hljs-attribute">symbol</span>":<span class="hljs-value"><span class="hljs-string">"playback_1"</span></span>,
"<span class="hljs-attribute">index</span>":<span class="hljs-value"><span class="hljs-number">0</span>
Expand Down Expand Up @@ -1124,8 +1130,9 @@ <h4 id="header-notification--1">Notification <code>on_bank_updated</code> <a cla
"<span class="hljs-attribute">type</span>":<span class="hljs-value"><span class="hljs-string">"BANK"</span></span>,
"<span class="hljs-attribute">updateType</span>":<span class="hljs-value"><span class="hljs-string">"DELETED"</span></span>,
"<span class="hljs-attribute">bank</span>":<span class="hljs-value"><span class="hljs-number">3</span></span>,
"<span class="hljs-attribute">value</span>":<span class="hljs-value">{
"<span class="hljs-attribute">value</span>": <span class="hljs-value">{
"<span class="hljs-attribute">name</span>":<span class="hljs-value"><span class="hljs-string">"My bank"</span></span>,
"<span class="hljs-attribute">index</span>":<span class="hljs-value"><span class="hljs-number">3</span></span>,
"<span class="hljs-attribute">pedalboards</span>":<span class="hljs-value">[
{
"<span class="hljs-attribute">data</span>":<span class="hljs-value">{
Expand All @@ -1137,6 +1144,7 @@ <h4 id="header-notification--1">Notification <code>on_bank_updated</code> <a cla
"<span class="hljs-attribute">name</span>":<span class="hljs-value"><span class="hljs-string">"Empty pedalboard"</span></span>,
"<span class="hljs-attribute">connections</span>":<span class="hljs-value">[
{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>":<span class="hljs-value">{
"<span class="hljs-attribute">symbol</span>":<span class="hljs-value"><span class="hljs-string">"playback_1"</span></span>,
"<span class="hljs-attribute">index</span>":<span class="hljs-value"><span class="hljs-number">0</span>
Expand All @@ -1148,8 +1156,7 @@ <h4 id="header-notification--1">Notification <code>on_bank_updated</code> <a cla
</span>}
]
</span>}
]</span>,
"<span class="hljs-attribute">index</span>":<span class="hljs-value"><span class="hljs-number">3</span>
]
</span>}
</span>}</code></pre>
</li>
Expand Down Expand Up @@ -1187,6 +1194,7 @@ <h4 id="header-notification--2">Notification <code>on_pedalboard_updated</code>
"<span class="hljs-attribute">name</span>":<span class="hljs-value"><span class="hljs-string">"Guitar hero"</span></span>,
"<span class="hljs-attribute">connections</span>":<span class="hljs-value">[
{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>":<span class="hljs-value">{
"<span class="hljs-attribute">symbol</span>":<span class="hljs-value"><span class="hljs-string">"playback_1"</span></span>,
"<span class="hljs-attribute">index</span>":<span class="hljs-value"><span class="hljs-number">0</span>
Expand Down Expand Up @@ -1594,6 +1602,7 @@ <h4 id="header-notification--6">Notification <code>on_connection_updated</code>
"<span class="hljs-attribute">bank</span>":<span class="hljs-value"><span class="hljs-number">2</span></span>,
"<span class="hljs-attribute">pedalboard</span>":<span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">value</span>":<span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>":<span class="hljs-value">{
"<span class="hljs-attribute">effect</span>":<span class="hljs-value"><span class="hljs-number">3</span></span>,
"<span class="hljs-attribute">symbol</span>":<span class="hljs-value"><span class="hljs-string">"in1"</span></span>,
Expand All @@ -1615,6 +1624,7 @@ <h4 id="header-notification--6">Notification <code>on_connection_updated</code>
"<span class="hljs-attribute">bank</span>":<span class="hljs-value"><span class="hljs-number">2</span></span>,
"<span class="hljs-attribute">pedalboard</span>":<span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">value</span>":<span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"audio"</span></span>,
"<span class="hljs-attribute">input</span>":<span class="hljs-value">{
"<span class="hljs-attribute">effect</span>":<span class="hljs-value"><span class="hljs-number">2</span></span>,
"<span class="hljs-attribute">symbol</span>":<span class="hljs-value"><span class="hljs-string">"in_l"</span></span>,
Expand All @@ -1628,7 +1638,7 @@ <h4 id="header-notification--6">Notification <code>on_connection_updated</code>
</span>}</code></pre>
</li>
</ul>
</section></div><div class="middle"><p style="text-align: center;" class="text-muted">Generated by&nbsp;<a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a>&nbsp;on 28 May 2017</p></div></div></div></div><script>/* eslint-env browser */
</section></div><div class="middle"><p style="text-align: center;" class="text-muted">Generated by&nbsp;<a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a>&nbsp;on 12 Mar 2018</p></div></div></div></div><script>/* eslint-env browser */
/* eslint quotes: [2, "single"] */
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion docs/section/bank_get.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"index": 1, "pedalboards": [{"connections": [{"input": {"index": 0, "effect": 0, "symbol": "in"}, "output": {"index": 0, "symbol": "capture_1"}}, {"input": {"index": 0, "symbol": "playback_1"}, "output": {"index": 1, "effect": 0, "symbol": "out"}}], "data": {"pedalpi-apk": {"effectPositions": [{"y": 91.4995002746582, "x": 159.74801635742188}]}}, "effects": [{"active": true, "plugin": "http://drobilla.net/plugins/fomp/cs_chorus1", "technology": "lv2", "params": [{"index": 2, "value": 7.5, "minimum": 0.0, "maximum": 30.0, "symbol": "delay"}, {"index": 3, "value": 0.20000000298023224, "minimum": 0.003000000026077032, "maximum": 10.0, "symbol": "mod_freq_1"}, {"index": 4, "value": 2.5, "minimum": 0.0, "maximum": 10.0, "symbol": "mod_amp_1"}, {"index": 5, "value": 0.800000011920929, "minimum": 0.009999999776482582, "maximum": 30.0, "symbol": "mod_freq_2"}, {"index": 6, "value": 0.75, "minimum": 0.0, "maximum": 3.0, "symbol": "mod_amp_2"}]}], "name": "Empty pedalboard"}], "name": "My awesome bank"}
{"index": 1, "pedalboards": [{"connections": [{"type": "audio", "input": {"index": 0, "effect": 0, "symbol": "in"}, "output": {"index": 0, "symbol": "capture_1"}}, {"type": "audio", "input": {"index": 0, "symbol": "playback_1"}, "output": {"index": 1, "effect": 0, "symbol": "out"}}], "data": {"pedalpi-apk": {"effectPositions": [{"y": 91.4995002746582, "x": 159.74801635742188}]}}, "effects": [{"active": true, "plugin": "http://drobilla.net/plugins/fomp/cs_chorus1", "technology": "lv2", "params": [{"index": 2, "value": 7.5, "minimum": 0.0, "maximum": 30.0, "symbol": "delay"}, {"index": 3, "value": 0.20000000298023224, "minimum": 0.003000000026077032, "maximum": 10.0, "symbol": "mod_freq_1"}, {"index": 4, "value": 2.5, "minimum": 0.0, "maximum": 10.0, "symbol": "mod_amp_1"}, {"index": 5, "value": 0.800000011920929, "minimum": 0.009999999776482582, "maximum": 30.0, "symbol": "mod_freq_2"}, {"index": 6, "value": 0.75, "minimum": 0.0, "maximum": 3.0, "symbol": "mod_amp_2"}]}], "name": "Empty pedalboard"}], "name": "My awesome bank"}
4 changes: 2 additions & 2 deletions docs/section/connection.apib
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Add a new connection between pedalboards
+ Request (application/json; charset=UTF-8)
+ Body

{"output":{"effect":0,"symbol":"out","index":1},"input":{"symbol":"playback_2","index":1}}
{"type": "audio", "output":{"effect":0,"symbol":"out","index":1},"input":{"symbol":"playback_2","index":1}}
+ Response 200

+ Request (application/json; charset=UTF-8)
+ Body

{"output":{"effect":0,"symbol":"out","index":1},"input":{"effect":1,"symbol":"in_l","index":0}}
{"type": "audio", "output":{"effect":0,"symbol":"out","index":1},"input":{"effect":1,"symbol":"in_l","index":0}}
+ Response 200

### Disconnect effects [PUT]
Expand Down
7 changes: 4 additions & 3 deletions docs/section/websocket-examples/on_bank_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"type":"BANK",
"updateType":"DELETED",
"bank":3,
"value":{
"value": {
"name":"My bank",
"index":3,
"pedalboards":[
{
"data":{
Expand All @@ -15,6 +16,7 @@
"name":"Empty pedalboard",
"connections":[
{
"type": "audio",
"input":{
"symbol":"playback_1",
"index":0
Expand All @@ -26,7 +28,6 @@
}
]
}
],
"index":3
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"bank":2,
"pedalboard":0,
"value":{
"type": "audio",
"input":{
"effect":3,
"symbol":"in1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"bank":2,
"pedalboard":0,
"value":{
"type": "audio",
"input":{
"effect":2,
"symbol":"in_l",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"name":"hehueuhes ea",
"connections":[
{
"type": "audio",
"input":{
"effect":0,
"symbol":"in_l",
Expand All @@ -104,6 +105,7 @@
}
},
{
"type": "audio",
"input":{
"symbol":"playback_1",
"index":0
Expand Down
1 change: 1 addition & 0 deletions docs/section/websocket-examples/on_pedalboard_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"name":"Guitar hero",
"connections":[
{
"type": "audio",
"input":{
"symbol":"playback_1",
"index":0
Expand Down
Loading