27 ControllableDescriptor::set (
const std::string& str)
29 string::size_type first_space = str.find_first_of (
" ");
31 if (first_space == string::npos) {
35 string front = str.substr (0, first_space);
36 string back = str.substr (first_space);
39 split (front, path,
'/');
41 if (path.size() < 2) {
46 split (back, rest,
' ');
48 if (rest.size() < 1) {
52 if (path[0] ==
"route" || path[0] ==
"rid") {
54 _top_level_type = RemoteControlID;
56 if (rest[0][0] ==
'B') {
58 _rid =
atoi (rest[0].substr (1));
59 }
else if (isdigit (rest[0][0])) {
61 _rid =
atoi (rest[0]);
66 }
else if (path[0] ==
"bus" || path[0] ==
"track") {
68 _top_level_type = NamedRoute;
69 _top_level_name = rest[0];
72 if (path[1] ==
"gain") {
75 }
else if (path[1] ==
"trim") {
78 }
else if (path[1] ==
"solo") {
81 }
else if (path[1] ==
"mute") {
84 }
else if (path[1] ==
"recenable") {
87 }
else if (path[1] ==
"balance") {
90 }
else if (path[1] ==
"panwidth") {
93 }
else if (path[1] ==
"pandirection") {
94 _subtype = PanDirection;
96 }
else if (path[1] ==
"plugin") {
97 if (path.size() == 3 && rest.size() == 3) {
98 if (path[2] ==
"parameter") {
99 _subtype = PluginParameter;
100 _target.push_back (
atoi (rest[1]));
101 _target.push_back (
atoi (rest[2]));
108 }
else if (path[1] ==
"send") {
110 if (path.size() == 3 && rest.size() == 2) {
111 if (path[2] ==
"gain") {
113 _target.push_back (
atoi (rest[1]));
126 ControllableDescriptor::rid()
const
129 return _rid + _bank_offset;
136 ControllableDescriptor::target (uint32_t n)
const
138 if (n < _target.size()) {
int atoi(const string &s)
LIBPBD_API void split(std::string, std::vector< std::string > &, char)
static void rest(PianoKeyboard *pk)
LIBARDOUR_API uint64_t Solo