mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
add OSC trim control
This commit is contained in:
parent
5f7cee5bfe
commit
1e5be9ebfd
2 changed files with 21 additions and 1 deletions
|
|
@ -370,6 +370,8 @@ OSC::register_callbacks()
|
|||
REGISTER_CALLBACK (serv, "/ardour/routes/recenable", "ii", route_recenable);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/gainabs", "if", route_set_gain_abs);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/gaindB", "if", route_set_gain_dB);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/trimabs", "if", route_set_trim_abs);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/trimdB", "if", route_set_trim_dB);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/pan_stereo_position", "if", route_set_pan_stereo_position);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/pan_stereo_width", "if", route_set_pan_stereo_width);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/plugin/parameter", "iiif", route_plugin_parameter);
|
||||
|
|
@ -861,18 +863,32 @@ OSC::route_set_gain_abs (int rid, float level)
|
|||
|
||||
int
|
||||
OSC::route_set_gain_dB (int rid, float dB)
|
||||
{
|
||||
return route_set_gain_abs (rid, dB_to_coefficient (dB));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
OSC::route_set_trim_abs (int rid, float level)
|
||||
{
|
||||
if (!session) return -1;
|
||||
|
||||
boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
|
||||
|
||||
if (r) {
|
||||
r->set_gain (dB_to_coefficient (dB), this);
|
||||
r->set_trim (level, this);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
OSC::route_set_trim_dB (int rid, float dB)
|
||||
{
|
||||
return route_set_trim_abs(rid, dB_to_coefficient (dB));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
OSC::route_set_pan_stereo_position (int rid, float pos)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -216,6 +216,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||
PATH_CALLBACK2(route_recenable,i,i);
|
||||
PATH_CALLBACK2(route_set_gain_abs,i,f);
|
||||
PATH_CALLBACK2(route_set_gain_dB,i,f);
|
||||
PATH_CALLBACK2(route_set_trim_abs,i,f);
|
||||
PATH_CALLBACK2(route_set_trim_dB,i,f);
|
||||
PATH_CALLBACK2(route_set_pan_stereo_position,i,f);
|
||||
PATH_CALLBACK2(route_set_pan_stereo_width,i,f);
|
||||
PATH_CALLBACK3(route_set_send_gain_abs,i,i,f);
|
||||
|
|
@ -228,6 +230,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||
int route_recenable (int rid, int yn);
|
||||
int route_set_gain_abs (int rid, float level);
|
||||
int route_set_gain_dB (int rid, float dB);
|
||||
int route_set_trim_abs (int rid, float level);
|
||||
int route_set_trim_dB (int rid, float dB);
|
||||
int route_set_pan_stereo_position (int rid, float left_right_fraction);
|
||||
int route_set_pan_stereo_width (int rid, float percent);
|
||||
int route_set_send_gain_abs (int rid, int sid, float val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue