Brocessor HTTP API - AxelStrem/Bro-binary GitHub Wiki
General requests
For general requests use "target" : "global" or omit "target" entry altogether.
Starting/pausing playback
{
"target" : "global",
"command" : "play"
}
Refreshing buffers
Fixes all possible issues.
{
"target" : "global",
"command" : "refresh"
}
Loading patch
"command" : either "open" or "load"; A "path" to .bro file should be specified.
{
"target" : "global",
"command" : "load",
"path" : "D:/pathces/pad.bro"
}
Changing BPM
"value" is expected to be a positive integer that could fit into 30 bits.
{
"target" : "global",
"command" : "bpm",
"value" : "240"
}
Cycling through ASIO drivers
Use this N times in case the default ASIO driver (and N-1 following drivers) suck balls.
{
"target" : "global",
"command" : "asio_switch"
}
#Device-specific requests
For device handling use "target" : device_type. Supported device types:
- Synth
- Transform
- Mixer
- Filter
- Handle
- Delay
Set "index" to specify the target device. Indices are 0-based, default "index" is 0. If no specified device is present, request is silently ignored.
For every control you want to set, add an entry to "state" array:
{
"control" : "control_name",
"value" : "value"
}
##Synth
- "freq" - synth frequency. Expects frequency value.
- "amp" - synth amplitude. Expects amplitude value.
- "function" - waveform function. Expects expression.
{
"target" : "synth",
"index" : "3",
"state" : [
{
"control" : "amp",
"value" : "0.5"
},
{
"control" : "freq",
"value" : "0.15"
},
{
"control" : "function",
"value" : "sin(x^2)"
}
]
}
##Transform
- "amp_in" - input amplitude ( amplitude value ).
- "amp_out" - output amplitude ( amplitude value ).
- "function" - transform function ( expression ).
##Filter
- "function" - filter frequency response function ( expression ).
##Mixer Instead of "control", specify "in" and "out" (integers) to pick a volume knob:
{
"target" : "mixer",
"index" : "2",
"state" : [
{
"in" : "1",
"out" : "0",
"value" : "0.5"
},
{
"in" : "2",
"out" : "2",
"value" : "-2.0"
},
]
}
Both "in" and "out" can be omitted and will default to 0.