2022-02-07 15:41:27 +01:00
|
|
|
# pbc
|
|
|
|
|
|
|
|
pedal board control
|
|
|
|
|
|
|
|
## description
|
|
|
|
|
2022-02-08 14:38:21 +01:00
|
|
|
control your MODEP pedalboard(s) via http requests
|
|
|
|
|
|
|
|
## api
|
|
|
|
|
2022-02-10 20:52:02 +01:00
|
|
|
### info
|
|
|
|
| url | GET | POST |
|
|
|
|
| - | - | - |
|
|
|
|
| /info | get information about the host | |
|
|
|
|
|
2022-02-08 14:38:21 +01:00
|
|
|
### banks
|
|
|
|
| url | GET | POST |
|
|
|
|
| - | - | - |
|
|
|
|
| /banks | get available banks | |
|
|
|
|
| /banks/`id` | get bank by `id` | |
|
|
|
|
|
|
|
|
### pedalboards
|
|
|
|
| url | GET | POST |
|
|
|
|
| - | - | - |
|
|
|
|
| /pedalboards | list available pedalboards | |
|
|
|
|
| /pedalboards/default | get default pedalboard | |
|
|
|
|
| /pedalboards/current | get current pedalboard | |
|
|
|
|
| /pedalboards/`id` | get pedalboard by `id` | switch to pedalboard by `id` |
|
|
|
|
|
|
|
|
### pedals
|
|
|
|
| url | GET | POST |
|
2022-02-08 14:39:46 +01:00
|
|
|
| - | - | - |
|
2022-02-08 14:38:21 +01:00
|
|
|
| /pedals | get the current pedalboard's pedals | |
|
2022-02-08 14:51:58 +01:00
|
|
|
| /pedals/`id` | get the current pedalboard's pedal by `id` | set values of current pedalboard's pedal by `id` |
|
2022-02-08 14:38:21 +01:00
|
|
|
|
|
|
|
**note:**
|
|
|
|
to set a value for a pedal POST arguments **must** contain the parameters `id` and `value` where `id` is the id of one of the pedal's controls.
|
|
|
|
|
|
|
|
**example - turn bypass on/off:**
|
|
|
|
`curl localhost:3000/pedals/1`
|
|
|
|
```
|
|
|
|
{"id":1,"name":"ZamComp","controls":[{"id":0,"name":"att","value":"10.000000"},{"id":1,"name":"rel","value":"80.000000"},{"id":2,"name":"kn","value":"0.000000"},{"id":3,"name":"rat","value":"4.000000"},{"id":4,"name":"thr","value":"0.000000"},{"id":5,"name":"mak","value":"0.000000"},{"id":6,"name":"slew","value":"1.000000"},{"id":7,"name":"sidech","value":"0.000000"},{"id":8,"name":":bypass","value":1,"midi":{"channel":0,"controller":0}}]}
|
|
|
|
```
|
|
|
|
in this case the pedal's bypass is turned on and has the id "8"; now let's turn if off:
|
2022-03-11 16:06:28 +01:00
|
|
|
`curl -X POST -d "id=8" -d "value=127" localhost:3000/pedals/1`
|
2022-02-08 14:38:21 +01:00
|
|
|
|
|
|
|
**only pedal controls with midi bindings can be controlled!**
|
2022-03-11 16:06:28 +01:00
|
|
|
|
|
|
|
### bypass
|
|
|
|
| url | GET | POST |
|
|
|
|
| - | - | - |
|
|
|
|
| /bypass | | toggle full bypass (switch to default pedalboard / back to last used pedalboard) |
|
|
|
|
| /bypass/`id` | | toggle bypass of a pedal by `id` |
|