mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
allow to set/change loop-range via OSC
This commit is contained in:
parent
aef6805114
commit
d00ab0221a
4 changed files with 17 additions and 0 deletions
|
|
@ -79,6 +79,20 @@ BasicUI::loop_toggle ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
BasicUI::loop_location (framepos_t start, framepos_t end)
|
||||||
|
{
|
||||||
|
Location* tll;
|
||||||
|
if ((tll = session->locations()->auto_loop_location()) == 0) {
|
||||||
|
Location* loc = new Location (*session, start, end, _("Loop"), Location::IsAutoLoop);
|
||||||
|
session->locations()->add (loc, true);
|
||||||
|
session->set_auto_loop_location (loc);
|
||||||
|
} else {
|
||||||
|
tll->set_hidden (false, this);
|
||||||
|
tll->set (start, end);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicUI::goto_start ()
|
BasicUI::goto_start ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ class LIBCONTROLCP_API BasicUI {
|
||||||
/* transport control */
|
/* transport control */
|
||||||
|
|
||||||
void loop_toggle ();
|
void loop_toggle ();
|
||||||
|
void loop_location (framepos_t start, framepos_t end);
|
||||||
void access_action ( std::string action_path );
|
void access_action ( std::string action_path );
|
||||||
static PBD::Signal2<void,std::string,std::string> AccessAction;
|
static PBD::Signal2<void,std::string,std::string> AccessAction;
|
||||||
void goto_start ();
|
void goto_start ();
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,7 @@ OSC::register_callbacks()
|
||||||
REGISTER_CALLBACK (serv, "/ardour/add_marker", "", add_marker);
|
REGISTER_CALLBACK (serv, "/ardour/add_marker", "", add_marker);
|
||||||
REGISTER_CALLBACK (serv, "/ardour/access_action", "s", access_action);
|
REGISTER_CALLBACK (serv, "/ardour/access_action", "s", access_action);
|
||||||
REGISTER_CALLBACK (serv, "/ardour/loop_toggle", "", loop_toggle);
|
REGISTER_CALLBACK (serv, "/ardour/loop_toggle", "", loop_toggle);
|
||||||
|
REGISTER_CALLBACK (serv, "/ardour/loop_location", "ii", loop_location);
|
||||||
REGISTER_CALLBACK (serv, "/ardour/goto_start", "", goto_start);
|
REGISTER_CALLBACK (serv, "/ardour/goto_start", "", goto_start);
|
||||||
REGISTER_CALLBACK (serv, "/ardour/goto_end", "", goto_end);
|
REGISTER_CALLBACK (serv, "/ardour/goto_end", "", goto_end);
|
||||||
REGISTER_CALLBACK (serv, "/ardour/rewind", "", rewind);
|
REGISTER_CALLBACK (serv, "/ardour/rewind", "", rewind);
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||||
}
|
}
|
||||||
|
|
||||||
PATH_CALLBACK2(locate,i,i);
|
PATH_CALLBACK2(locate,i,i);
|
||||||
|
PATH_CALLBACK2(loop_location,i,i);
|
||||||
PATH_CALLBACK2(route_mute,i,i);
|
PATH_CALLBACK2(route_mute,i,i);
|
||||||
PATH_CALLBACK2(route_solo,i,i);
|
PATH_CALLBACK2(route_solo,i,i);
|
||||||
PATH_CALLBACK2(route_recenable,i,i);
|
PATH_CALLBACK2(route_recenable,i,i);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue