diff options
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/OSCClientSender.cpp | 113 | ||||
-rw-r--r-- | src/libs/engine/OSCEngineReceiver.cpp | 209 | ||||
-rw-r--r-- | src/libs/engine/OSCEngineReceiver.h | 3 | ||||
-rw-r--r-- | src/libs/engine/OSCResponder.cpp | 4 |
4 files changed, 153 insertions, 176 deletions
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index a1f82fd5..e8eb9d05 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -89,10 +89,15 @@ OSCClientSender::transfer_end() * \n\n */ + +/** \page client_osc_namespace + * \n + * <h2>Control Band</h2> + */ /** \page client_osc_namespace - * <p> \b /om/response - Respond to a user command + * <p> \b /ingen/response - Respond to a user command * \arg \b response-id (int) - Request ID this is a response to * \arg \b success (boolean int) - Whether response is affirmative or an error * \arg \b message (string) - Error message (natural language text) @@ -104,7 +109,7 @@ OSCClientSender::response(int32_t id, bool success, string msg) if (!_enabled) return; - if (lo_send(_address, "/om/response", "iis", id, success ? 1 : 0, msg.c_str()) < 0) { + if (lo_send(_address, "/ingen/response", "iis", id, success ? 1 : 0, msg.c_str()) < 0) { cerr << "Unable to send response " << id << "! (" << lo_address_errstr(_address) << ")" << endl; } @@ -113,13 +118,13 @@ OSCClientSender::response(int32_t id, bool success, string msg) /** \page client_osc_namespace * \n - * <h3>Notification Band</h3> + * <h2>Notification Band</h2> */ + /** \page client_osc_namespace - * <p> \b /om/error - Notification that an error has occurred - * \arg \b message (string) - Error message (natural language text) - * + * <p> \b /ingen/error - Notification that an error has occurred + * \arg \b message (string) - Error message (natural language text) \n\n * \li This is for notification of errors that aren't a direct response to a * user command, ie "unexpected" errors.</p> \n \n */ @@ -129,23 +134,23 @@ OSCClientSender::error(string msg) if (!_enabled) return; - lo_send(_address, "/om/error", "s", msg.c_str()); + lo_send(_address, "/ingen/error", "s", msg.c_str()); } /** \page client_osc_namespace - * <p> \b /om/num_plugins - * \arg \b num (int) - Number of plugins engine has loaded + * <p> \b /ingen/num_plugins + * \arg \b num (int) - Number of plugins engine has loaded\n\n * \li This is sent before sending the list of plugins, so the client is aware - * of how many plugins (/om/plugin messages) to expect.</p> \n \n + * of how many plugins (/ingen/plugin messages) to expect.</p> \n \n */ /** \page client_osc_namespace - * <p> \b /om/num_plugins - * \arg \b num (int) - Number of plugins engine has loaded + * <p> \b /ingen/num_plugins + * \arg \b num (int) - Number of plugins engine has loaded\n\n * \li This is sent before sending the list of plugins, so the client is aware - * of how many plugins (/om/plugin messages) to expect.</p> \n \n + * of how many plugins (/ingen/plugin messages) to expect.</p> \n \n */ void OSCClientSender::num_plugins(uint32_t num) @@ -155,12 +160,12 @@ OSCClientSender::num_plugins(uint32_t num) lo_message m = lo_message_new(); lo_message_add_int32(m, num); - lo_send_message(_address, "/om/num_plugins", m); + lo_send_message(_address, "/ingen/num_plugins", m); } /** \page client_osc_namespace - * <p> \b /om/plugin - Notification of the existance of a plugin + * <p> \b /ingen/plugin - Notification of the existance of a plugin * \arg \b type (string) - Type if plugin ("LADSPA", "DSSI", or "Internal") * \arg \b uri (string) - URI of the plugin (see engine namespace documentation) \n * \arg \b lib-name (string) - Name of shared library plugin resides in (ie "cmt.so") @@ -184,7 +189,7 @@ OSCClientSender::plugins() list<lo_message> msgs; lo_message_add_int32(m, plugs.size()); - lo_bundle_add_message(b, "/om/num_plugins", m); + lo_bundle_add_message(b, "/ingen/num_plugins", m); msgs.push_back(m); for (list<Plugin*>::const_iterator j = plugs.begin(); j != plugs.end(); ++j) { @@ -195,7 +200,7 @@ OSCClientSender::plugins() lo_message_add_string(m, plugin->uri().c_str()); lo_message_add_string(m, plugin->plug_label().c_str()); lo_message_add_string(m, plugin->name().c_str()); - lo_bundle_add_message(b, "/om/plugin", m); + lo_bundle_add_message(b, "/ingen/plugin", m); msgs.push_back(m); if (lo_bundle_length(b) > 1024) { lo_send_bundle(_address, b); @@ -218,14 +223,14 @@ OSCClientSender::plugins() */ /** \page client_osc_namespace - * <p> \b /om/new_node - Notification of a new node's creation. + * <p> \b /ingen/new_node - Notification of a new node's creation. * \arg \b plug-uri (string) - URI of the plugin new node is an instance of * \arg \b path (string) - Path of the new node * \arg \b polyphonic (integer-boolean) - Node is polyphonic (1 = yes, 0 = no) - * \arg \b num-ports (integer) - Number of ports (number of new_port messages to expect) + * \arg \b num-ports (integer) - Number of ports (number of new_port messages to expect)\n\n * \li New nodes are sent as a bundle. The first message in the bundle will be - * this one (/om/new_node), followed by a series of /om/new_port commands, - * followed by /om/new_node_end. </p> \n \n + * this one (/ingen/new_node), followed by a series of /ingen/new_port commands, + * followed by /ingen/new_node_end. </p> \n \n */ void OSCClientSender::new_node(string plugin_uri, string node_path, @@ -237,7 +242,7 @@ void OSCClientSender::new_node(string plugin_uri, //cerr << "Sending node " << node_path << endl; - lo_send(_address, "/om/new_node", "ssii", plugin_uri.c_str(), + lo_send(_address, "/ingen/new_node", "ssii", plugin_uri.c_str(), node_path.c_str(), is_polyphonic ? 1 : 0, num_ports); #if 0 /* @@ -253,7 +258,7 @@ void OSCClientSender::new_node(string plugin_uri, lo_message_add_int32(m, is_polyphonic ? 1 : 0); lo_message_add_int32(m, num_ports); - lo_bundle_add_message(b, "/om/new_node", m); + lo_bundle_add_message(b, "/ingen/new_node", m); msgs.push_back(m); */ @@ -277,7 +282,7 @@ void OSCClientSender::new_node(string plugin_uri, lo_message_add_float(m, info->default_val()); lo_message_add_float(m, info->min_val()); lo_message_add_float(m, info->max_val()); - lo_bundle_add_message(b, "/om/new_port", m); + lo_bundle_add_message(b, "/ingen/new_port", m); msgs.push_back(m); // If the bundle is getting very large, send it and start @@ -290,7 +295,7 @@ void OSCClientSender::new_node(string plugin_uri, } */ /*m = lo_message_new(); - //lo_bundle_add_message(b, "/om/new_node_end", m); + //lo_bundle_add_message(b, "/ingen/new_node_end", m); //msgs.push_back(m); lo_send_bundle(_address, b); @@ -329,7 +334,7 @@ void OSCClientSender::new_node(string plugin_uri, /** \page client_osc_namespace - * <p> \b /om/new_port - Notification of a new port's creation. + * <p> \b /ingen/new_port - Notification of a new port's creation. * \arg \b path (string) - Path of new port * \arg \b data-type (string) - Type of port (ingen:audio, ingen:control, or ingen:midi) * \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1) @@ -352,7 +357,7 @@ OSCClientSender::new_port(string path, //PortInfo* info = port->port_info(); - lo_send(_address, "/om/new_port", "ssi", path.c_str(), data_type.c_str(), is_output); + lo_send(_address, "/ingen/new_port", "ssi", path.c_str(), data_type.c_str(), is_output); // Send metadata /*const map<string, string>& data = port->metadata(); @@ -362,7 +367,7 @@ OSCClientSender::new_port(string path, /** \page client_osc_namespace - * <p> \b /om/destroyed - Notification an object has been destroyed + * <p> \b /ingen/destroyed - Notification an object has been destroyed * \arg \b path (string) - Path of object (which no longer exists) </p> \n \n */ void @@ -373,12 +378,12 @@ OSCClientSender::object_destroyed(string path) assert(path != "/"); - lo_send(_address, "/om/destroyed", "s", path.c_str()); + lo_send(_address, "/ingen/destroyed", "s", path.c_str()); } /** \page client_osc_namespace - * <p> \b /om/patch_cleared - Notification a patch has been cleared (all children destroyed) + * <p> \b /ingen/patch_cleared - Notification a patch has been cleared (all children destroyed) * \arg \b path (string) - Path of patch (which is now empty)</p> \n \n */ void @@ -387,12 +392,12 @@ OSCClientSender::patch_cleared(string patch_path) if (!_enabled) return; - lo_send(_address, "/om/patch_cleared", "s", patch_path.c_str()); + lo_send(_address, "/ingen/patch_cleared", "s", patch_path.c_str()); } /** \page client_osc_namespace - * <p> \b /om/patch_enabled - Notification a patch's DSP processing has been enabled. + * <p> \b /ingen/patch_enabled - Notification a patch's DSP processing has been enabled. * \arg \b path (string) - Path of enabled patch</p> \n \n */ void @@ -401,12 +406,12 @@ OSCClientSender::patch_enabled(string patch_path) if (!_enabled) return; - lo_send(_address, "/om/patch_enabled", "s", patch_path.c_str()); + lo_send(_address, "/ingen/patch_enabled", "s", patch_path.c_str()); } /** \page client_osc_namespace - * <p> \b /om/patch_disabled - Notification a patch's DSP processing has been disabled. + * <p> \b /ingen/patch_disabled - Notification a patch's DSP processing has been disabled. * \arg \b path (string) - Path of disabled patch</p> \n \n */ void @@ -415,12 +420,12 @@ OSCClientSender::patch_disabled(string patch_path) if (!_enabled) return; - lo_send(_address, "/om/patch_disabled", "s", patch_path.c_str()); + lo_send(_address, "/ingen/patch_disabled", "s", patch_path.c_str()); } /** \page client_osc_namespace - * <p> \b /om/new_connection - Notification a new connection has been made. + * <p> \b /ingen/new_connection - Notification a new connection has been made. * \arg \b src-path (string) - Path of the source port * \arg \b dst-path (string) - Path of the destination port</p> \n \n */ @@ -430,12 +435,12 @@ OSCClientSender::connection(string src_port_path, string dst_port_path) if (!_enabled) return; - lo_send(_address, "/om/new_connection", "ss", src_port_path.c_str(), dst_port_path.c_str()); + lo_send(_address, "/ingen/new_connection", "ss", src_port_path.c_str(), dst_port_path.c_str()); } /** \page client_osc_namespace - * <p> \b /om/disconnection - Notification a connection has been unmade. + * <p> \b /ingen/disconnection - Notification a connection has been unmade. * \arg \b src-path (string) - Path of the source port * \arg \b dst-path (string) - Path of the destination port</p> \n \n */ @@ -445,12 +450,12 @@ OSCClientSender::disconnection(string src_port_path, string dst_port_path) if (!_enabled) return; - lo_send(_address, "/om/disconnection", "ss", src_port_path.c_str(), dst_port_path.c_str()); + lo_send(_address, "/ingen/disconnection", "ss", src_port_path.c_str(), dst_port_path.c_str()); } /** \page client_osc_namespace - * <p> \b /om/metadata/update - Notification of a piece of metadata. + * <p> \b /ingen/metadata_update - Notification of a piece of metadata. * \arg \b path (string) - Path of the object associated with metadata (can be a node, patch, or port) * \arg \b key (string) * \arg \b value (string)</p> \n \n @@ -465,12 +470,12 @@ OSCClientSender::metadata_update(string path, string key, Atom value) lo_message_add_string(m, path.c_str()); lo_message_add_string(m, key.c_str()); Raul::AtomLiblo::lo_message_add_atom(m, value); - lo_send_message(_address, "/om/metadata/update", m); + lo_send_message(_address, "/ingen/metadata_update", m); } /** \page client_osc_namespace - * <p> \b /om/control_change - Notification the value of a port has changed + * <p> \b /ingen/control_change - Notification the value of a port has changed * \arg \b path (string) - Path of port * \arg \b value (float) - New value of port * @@ -483,14 +488,14 @@ OSCClientSender::control_change(string port_path, float value) if (!_enabled) return; - lo_send(_address, "/om/control_change", "sf", port_path.c_str(), value); + lo_send(_address, "/ingen/control_change", "sf", port_path.c_str(), value); } /** \page client_osc_namespace - * <p> \b /om/plugin - Notification of the existance of a plugin - * \arg \b type (string) - Type if plugin ("LADSPA", "DSSI", or "Internal")</p> \n \n - * \arg \b uri (string) - Type if plugin ("LADSPA", "DSSI", or "Internal")</p> \n \n + * <p> \b /ingen/plugin - Notification of the existance of a plugin + * \arg \b type (string) - Type of plugin ("LADSPA", "DSSI", or "Internal") + * \arg \b uri (string) - Type of plugin ("LADSPA", "DSSI", or "Internal") * \arg \b name (string) - Descriptive human-readable name of plugin (ie "ADSR Envelope") */ void @@ -505,14 +510,14 @@ OSCClientSender::new_plugin(string uri, string type_uri, string name) lo_message_add_string(m, name.c_str()); //if (_transfer) - // lo_bundle_add_message(_transfer, "/om/plugin", m); + // lo_bundle_add_message(_transfer, "/ingen/plugin", m); //else - lo_send_message(_address, "/om/plugin", m); + lo_send_message(_address, "/ingen/plugin", m); } /** \page client_osc_namespace - * <p> \b /om/new_patch - Notification of a new patch + * <p> \b /ingen/new_patch - Notification of a new patch * \arg \b path (string) - Path of new patch * \arg \b poly (int) - Polyphony of new patch (\em not a boolean like new_node) </p> \n \n */ @@ -522,7 +527,7 @@ OSCClientSender::new_patch(string path, uint32_t poly) if (!_enabled) return; - lo_send(_address, "/om/new_patch", "si", path.c_str(), poly); + lo_send(_address, "/ingen/new_patch", "si", path.c_str(), poly); /* if (p->process()) @@ -538,7 +543,7 @@ OSCClientSender::new_patch(string path, uint32_t poly) /** \page client_osc_namespace - * <p> \b /om/object_renamed - Notification of an object's renaming + * <p> \b /ingen/object_renamed - Notification of an object's renaming * \arg \b old-path (string) - Old path of object * \arg \b new-path (string) - New path of object </p> \n \n */ @@ -548,7 +553,7 @@ OSCClientSender::object_renamed(string old_path, string new_path) if (!_enabled) return; - lo_send(_address, "/om/object_renamed", "ss", old_path.c_str(), new_path.c_str()); + lo_send(_address, "/ingen/object_renamed", "ss", old_path.c_str(), new_path.c_str()); } @@ -560,7 +565,7 @@ OSCClientSender::program_add(string node_path, uint32_t bank, uint32_t program, if (!_enabled) return; - lo_send(_address, "/om/program_add", "siis", + lo_send(_address, "/ingen/program_add", "siis", node_path.c_str(), bank, program, name.c_str()); } @@ -571,7 +576,7 @@ OSCClientSender::program_remove(string node_path, uint32_t bank, uint32_t progra if (!_enabled) return; - lo_send(_address, "/om/program_remove", "sii", + lo_send(_address, "/ingen/program_remove", "sii", node_path.c_str(), bank, program); } diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index 8b1ea85f..218af3c5 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -44,7 +44,7 @@ using Shared::ClientKey; * * <p>All commands on this page are in the "control band". If a client needs to * know about the state of the engine, it must listen to the "notification band". - * See the "Client OSC Namespace Documentation" for details. + * See the "Client OSC Namespace Documentation" for details.</p>\n\n */ @@ -74,47 +74,43 @@ OSCEngineReceiver::OSCEngineReceiver(SharedPtr<Engine> engine, size_t queue_size lo_server_add_method(_server, NULL, NULL, set_response_address_cb, this); // Commands - lo_server_add_method(_server, "/om/ping", "i", ping_cb, this); - lo_server_add_method(_server, "/om/ping_slow", "i", ping_slow_cb, this); - lo_server_add_method(_server, "/om/engine/quit", "i", quit_cb, this); - //lo_server_add_method(_server, "/om/engine/register_client", "is", register_client_cb, this); - lo_server_add_method(_server, "/om/engine/register_client", "i", register_client_cb, this); - lo_server_add_method(_server, "/om/engine/unregister_client", "i", unregister_client_cb, this); - lo_server_add_method(_server, "/om/engine/load_plugins", "i", load_plugins_cb, this); - lo_server_add_method(_server, "/om/engine/activate", "i", engine_activate_cb, this); - lo_server_add_method(_server, "/om/engine/deactivate", "i", engine_deactivate_cb, this); - lo_server_add_method(_server, "/om/synth/create_patch", "isi", create_patch_cb, this); - lo_server_add_method(_server, "/om/synth/enable_patch", "is", enable_patch_cb, this); - lo_server_add_method(_server, "/om/synth/disable_patch", "is", disable_patch_cb, this); - lo_server_add_method(_server, "/om/synth/clear_patch", "is", clear_patch_cb, this); - lo_server_add_method(_server, "/om/synth/create_port", "issi", create_port_cb, this); - lo_server_add_method(_server, "/om/synth/create_node", "issssi", create_node_cb, this); - lo_server_add_method(_server, "/om/synth/create_node", "issi", create_node_by_uri_cb, this); - lo_server_add_method(_server, "/om/synth/destroy", "is", destroy_cb, this); - lo_server_add_method(_server, "/om/synth/rename", "iss", rename_cb, this); - lo_server_add_method(_server, "/om/synth/connect", "iss", connect_cb, this); - lo_server_add_method(_server, "/om/synth/disconnect", "iss", disconnect_cb, this); - lo_server_add_method(_server, "/om/synth/disconnect_all", "is", disconnect_all_cb, this); - lo_server_add_method(_server, "/om/synth/set_port_value", "isf", set_port_value_cb, this); - lo_server_add_method(_server, "/om/synth/set_port_value", "isif", set_port_value_voice_cb, this); - lo_server_add_method(_server, "/om/synth/set_port_value_slow", "isf", set_port_value_slow_cb, this); - lo_server_add_method(_server, "/om/synth/note_on", "isii", note_on_cb, this); - lo_server_add_method(_server, "/om/synth/note_off", "isi", note_off_cb, this); - lo_server_add_method(_server, "/om/synth/all_notes_off", "isi", all_notes_off_cb, this); - lo_server_add_method(_server, "/om/synth/midi_learn", "is", midi_learn_cb, this); -#ifdef HAVE_LASH - lo_server_add_method(_server, "/om/lash/restore_finished", "i", lash_restore_done_cb, this); -#endif - - lo_server_add_method(_server, "/om/metadata/request", "isss", metadata_get_cb, this); - lo_server_add_method(_server, "/om/metadata/set", NULL, metadata_set_cb, this); - + lo_server_add_method(_server, "/ingen/ping", "i", ping_cb, this); + lo_server_add_method(_server, "/ingen/ping_queued", "i", ping_slow_cb, this); + lo_server_add_method(_server, "/ingen/quit", "i", quit_cb, this); + //lo_server_add_method(_server, "/ingen/register_client", "is", register_client_cb, this); + lo_server_add_method(_server, "/ingen/register_client", "i", register_client_cb, this); + lo_server_add_method(_server, "/ingen/unregister_client", "i", unregister_client_cb, this); + lo_server_add_method(_server, "/ingen/load_plugins", "i", load_plugins_cb, this); + lo_server_add_method(_server, "/ingen/activate", "i", engine_activate_cb, this); + lo_server_add_method(_server, "/ingen/deactivate", "i", engine_deactivate_cb, this); + lo_server_add_method(_server, "/ingen/create_patch", "isi", create_patch_cb, this); + lo_server_add_method(_server, "/ingen/enable_patch", "is", enable_patch_cb, this); + lo_server_add_method(_server, "/ingen/disable_patch", "is", disable_patch_cb, this); + lo_server_add_method(_server, "/ingen/clear_patch", "is", clear_patch_cb, this); + lo_server_add_method(_server, "/ingen/create_port", "issi", create_port_cb, this); + lo_server_add_method(_server, "/ingen/create_node", "issssi", create_node_cb, this); + lo_server_add_method(_server, "/ingen/create_node", "issi", create_node_by_uri_cb, this); + lo_server_add_method(_server, "/ingen/destroy", "is", destroy_cb, this); + lo_server_add_method(_server, "/ingen/rename", "iss", rename_cb, this); + lo_server_add_method(_server, "/ingen/connect", "iss", connect_cb, this); + lo_server_add_method(_server, "/ingen/disconnect", "iss", disconnect_cb, this); + lo_server_add_method(_server, "/ingen/disconnect_all", "is", disconnect_all_cb, this); + lo_server_add_method(_server, "/ingen/set_port_value", "isf", set_port_value_cb, this); + lo_server_add_method(_server, "/ingen/set_port_value", "isif", set_port_value_voice_cb, this); + lo_server_add_method(_server, "/ingen/set_port_value_queued", "isf", set_port_value_slow_cb, this); + lo_server_add_method(_server, "/ingen/note_on", "isii", note_on_cb, this); + lo_server_add_method(_server, "/ingen/note_off", "isi", note_off_cb, this); + lo_server_add_method(_server, "/ingen/all_notes_off", "isi", all_notes_off_cb, this); + lo_server_add_method(_server, "/ingen/midi_learn", "is", midi_learn_cb, this); + lo_server_add_method(_server, "/ingen/set_metadata", NULL, metadata_set_cb, this); + // Queries - lo_server_add_method(_server, "/om/request/plugin", "is", request_plugin_cb, this); - lo_server_add_method(_server, "/om/request/object", "is", request_object_cb, this); - lo_server_add_method(_server, "/om/request/port_value", "is", request_port_value_cb, this); - lo_server_add_method(_server, "/om/request/plugins", "i", request_plugins_cb, this); - lo_server_add_method(_server, "/om/request/all_objects", "i", request_all_objects_cb, this); + lo_server_add_method(_server, "/ingen/request_metadata", "iss", metadata_get_cb, this); + lo_server_add_method(_server, "/ingen/request_plugin", "is", request_plugin_cb, this); + lo_server_add_method(_server, "/ingen/request_object", "is", request_object_cb, this); + lo_server_add_method(_server, "/ingen/request_port_value", "is", request_port_value_cb, this); + lo_server_add_method(_server, "/ingen/request_plugins", "i", request_plugins_cb, this); + lo_server_add_method(_server, "/ingen/request_all_objects", "i", request_all_objects_cb, this); // DSSI support @@ -274,7 +270,7 @@ OSCEngineReceiver::error_cb(int num, const char* msg, const char* path) /** \page engine_osc_namespace - * <p> \b /om/ping - Immediately sends a successful response to the given response id. + * <p> \b /ingen/ping - Immediately sends a successful response to the given response id. * \arg \b response-id (integer) </p> \n \n */ int @@ -286,11 +282,11 @@ OSCEngineReceiver::_ping_cb(const char* path, const char* types, lo_arg** argv, /** \page engine_osc_namespace - * <p> \b /om/ping_slow - Sends response after going through the ("slow") event queue. + * <p> \b /ingen/ping_queued - Sends response after going through the event queue. * \arg \b response-id (integer) * - * \li See the documentation for /om/synth/set_port_value_slow for an explanation of how - * this differs from /om/ping. This is useful to send after sending a large cluster of + * \li See the documentation for /ingen/set_port_value_queued for an explanation of how + * this differs from /ingen/ping. This is useful to send after sending a large cluster of * events as a sentinel and wait on it's response, to know when the events are all * finished processing.</p> \n \n */ @@ -303,7 +299,7 @@ OSCEngineReceiver::_ping_slow_cb(const char* path, const char* types, lo_arg** a /** \page engine_osc_namespace - * <p> \b /om/engine/quit - Terminates the engine. + * <p> \b /ingen/quit - Terminates the engine. * \arg \b response-id (integer) * * \li Note that there is NO order guarantees with this command at all. You could @@ -313,22 +309,20 @@ OSCEngineReceiver::_ping_slow_cb(const char* path, const char* types, lo_arg** a int OSCEngineReceiver::_quit_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - quit(); return 0; } /** \page engine_osc_namespace - * <p> \b /om/engine/register_client - Registers a new client with the engine - * \arg \b response-id (integer) - * - * The incoming address will be used for the new registered client. If you - * want to register a different specific address, use the URL version. + * <p> \b /ingen/register_client - Registers a new client with the engine + * \arg \b response-id (integer) \n\n + * \li The incoming address will be used for the new registered client. If you + * want to register a different specific address, use the URL version. </p> \n \n */ int OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - lo_address addr = lo_message_get_source(msg); + lo_address addr = lo_message_get_source(msg); char* const url = lo_address_get_url(addr); SharedPtr<ClientInterface> client(new OSCClientSender((const char*)url)); @@ -340,13 +334,13 @@ OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_a /** \page engine_osc_namespace - * <p> \b /om/engine/unregister_client - Unregisters a client + * <p> \b /ingen/unregister_client - Unregisters a client * \arg \b response-id (integer) </p> \n \n */ int OSCEngineReceiver::_unregister_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - lo_address addr = lo_message_get_source(msg); + lo_address addr = lo_message_get_source(msg); char* url = lo_address_get_url(addr); unregister_client(ClientKey(ClientKey::OSC_URL, url)); @@ -357,7 +351,7 @@ OSCEngineReceiver::_unregister_client_cb(const char* path, const char* types, lo /** \page engine_osc_namespace - * <p> \b /om/engine/load_plugins - Locates all available plugins, making them available for use. + * <p> \b /ingen/load_plugins - Locates all available plugins, making them available for use. * \arg \b response-id (integer) </p> \n \n */ int @@ -369,7 +363,7 @@ OSCEngineReceiver::_load_plugins_cb(const char* path, const char* types, lo_arg* /** \page engine_osc_namespace - * <p> \b /om/engine/activate - Activate the engine (MIDI, audio, everything) + * <p> \b /ingen/activate - Activate the engine (MIDI, audio, everything) * \arg \b response-id (integer) </p> * * \li Note that you <b>must</b> send this message first if you want the engine to do @@ -384,7 +378,7 @@ OSCEngineReceiver::_engine_activate_cb(const char* path, const char* types, lo_a /** \page engine_osc_namespace - * <p> \b /om/engine/deactivate - Deactivate the engine completely. + * <p> \b /ingen/deactivate - Deactivate the engine completely. * \arg \b response-id (integer) </p> \n \n */ int @@ -396,7 +390,7 @@ OSCEngineReceiver::_engine_deactivate_cb(const char* path, const char* types, lo /** \page engine_osc_namespace - * <p> \b /om/synth/create_patch - Creates a new, empty, toplevel patch. + * <p> \b /ingen/create_patch - Creates a new, empty, toplevel patch. * \arg \b response-id (integer) * \arg \b patch-path (string) - Patch path (complete, ie /master/parent/new_patch) * \arg \b poly (integer) - Patch's (internal) polyphony </p> \n \n @@ -413,7 +407,7 @@ OSCEngineReceiver::_create_patch_cb(const char* path, const char* types, lo_arg* /** \page engine_osc_namespace - * <p> \b /om/synth/rename - Rename an Object (only Nodes, for now) + * <p> \b /ingen/rename - Rename an Object (only Nodes, for now) * \arg \b response-id (integer) * \arg \b path - Object's path * \arg \b name - New name for object </p> \n \n @@ -430,9 +424,9 @@ OSCEngineReceiver::_rename_cb(const char* path, const char* types, lo_arg** argv /** \page engine_osc_namespace - * <p> \b /om/synth/enable_patch - Enable DSP processing of a patch + * <p> \b /ingen/enable_patch - Enable DSP processing of a patch * \arg \b response-id (integer) - * \arg \b patch-path - Patch's path + * \arg \b patch-path - Patch's path </p> \n \n */ int OSCEngineReceiver::_enable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -445,9 +439,9 @@ OSCEngineReceiver::_enable_patch_cb(const char* path, const char* types, lo_arg* /** \page engine_osc_namespace - * <p> \b /om/synth/disable_patch - Disable DSP processing of a patch + * <p> \b /ingen/disable_patch - Disable DSP processing of a patch * \arg \b response-id (integer) - * \arg \b patch-path - Patch's path + * \arg \b patch-path - Patch's path </p> \n \n */ int OSCEngineReceiver::_disable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -460,9 +454,9 @@ OSCEngineReceiver::_disable_patch_cb(const char* path, const char* types, lo_arg /** \page engine_osc_namespace - * <p> \b /om/synth/clear_patch - Remove all nodes from a patch + * <p> \b /ingen/clear_patch - Remove all nodes from a patch * \arg \b response-id (integer) - * \arg \b patch-path - Patch's path + * \arg \b patch-path - Patch's path </p> \n \n */ int OSCEngineReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -475,7 +469,7 @@ OSCEngineReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** /** \page engine_osc_namespace - * <p> \b /om/synth/create_port - Add a port into a given patch (load a plugin by URI) + * <p> \b /ingen/create_port - Add a port into a given patch (load a plugin by URI) * \arg \b response-id (integer) * \arg \b path (string) - Full path of the new port (ie. /patch2/subpatch/newport) * \arg \b data-type (string) - Data type for port to contain ("ingen:audio", "ingen:control", or "ingen:midi") @@ -493,7 +487,7 @@ OSCEngineReceiver::_create_port_cb(const char* path, const char* types, lo_arg** } /** \page engine_osc_namespace - * <p> \b /om/synth/create_node - Add a node into a given patch (load a plugin by URI) + * <p> \b /ingen/create_node - Add a node into a given patch (load a plugin by URI) * \arg \b response-id (integer) * \arg \b node-path (string) - Full path of the new node (ie. /patch2/subpatch/newnode) * \arg \b plug-uri (string) - URI of the plugin to load @@ -514,7 +508,7 @@ OSCEngineReceiver::_create_node_by_uri_cb(const char* path, const char* types, l /** \page engine_osc_namespace - * <p> \b /om/synth/create_node - Add a node into a given patch (load a plugin by libname, label) \b DEPRECATED + * <p> \b /ingen/create_node - Add a node into a given patch (load a plugin by libname, label) \b DEPRECATED * \arg \b response-id (integer) * \arg \b node-path (string) - Full path of the new node (ie. /patch2/subpatch/newnode) * \arg \b type (string) - Plugin type ("LADSPA" or "Internal") @@ -541,7 +535,7 @@ OSCEngineReceiver::_create_node_cb(const char* path, const char* types, lo_arg** /** \page engine_osc_namespace - * <p> \b /om/synth/destroy - Removes (destroys) a Patch or a Node + * <p> \b /ingen/destroy - Removes (destroys) a Patch or a Node * \arg \b response-id (integer) * \arg \b node-path (string) - Full path of the object </p> \n \n */ @@ -556,7 +550,7 @@ OSCEngineReceiver::_destroy_cb(const char* path, const char* types, lo_arg** arg /** \page engine_osc_namespace - * <p> \b /om/synth/connect - Connects two ports (must be in the same patch) + * <p> \b /ingen/connect - Connects two ports (must be in the same patch) * \arg \b response-id (integer) * \arg \b src-port-path (string) - Full path of source port * \arg \b dst-port-path (string) - Full path of destination port </p> \n \n @@ -573,7 +567,7 @@ OSCEngineReceiver::_connect_cb(const char* path, const char* types, lo_arg** arg /** \page engine_osc_namespace - * <p> \b /om/synth/disconnect - Disconnects two ports. + * <p> \b /ingen/disconnect - Disconnects two ports. * \arg \b response-id (integer) * \arg \b src-port-path (string) - Full path of source port * \arg \b dst-port-path (string) - Full path of destination port </p> \n \n @@ -590,7 +584,7 @@ OSCEngineReceiver::_disconnect_cb(const char* path, const char* types, lo_arg** /** \page engine_osc_namespace - * <p> \b /om/synth/disconnect_all - Disconnect all connections to/from a node. + * <p> \b /ingen/disconnect_all - Disconnect all connections to/from a node. * \arg \b response-id (integer) * \arg \b node-path (string) - Full path of node. </p> \n \n */ @@ -605,7 +599,7 @@ OSCEngineReceiver::_disconnect_all_cb(const char* path, const char* types, lo_ar /** \page engine_osc_namespace - * <p> \b /om/synth/set_port_value - Sets the value of a port for all voices (both AR and CR) + * <p> \b /ingen/set_port_value - Sets the value of a port for all voices (both AR and CR) * \arg \b response-id (integer) * \arg \b port-path (string) - Name of port * \arg \b value (float) - Value to set port to @@ -622,7 +616,7 @@ OSCEngineReceiver::_set_port_value_cb(const char* path, const char* types, lo_ar /** \page engine_osc_namespace - * <p> \b /om/synth/set_port_value - Sets the value of a port for a specific voice (both AR and CR) + * <p> \b /ingen/set_port_value - Sets the value of a port for a specific voice (both AR and CR) * \arg \b response-id (integer) * \arg \b port-path (string) - Name of port * \arg \b voice (integer) - Voice to set port value for @@ -641,14 +635,14 @@ OSCEngineReceiver::_set_port_value_voice_cb(const char* path, const char* types, /** \page engine_osc_namespace - * <p> \b /om/synth/set_port_value_slow - Sets the value of a port for all voices (as a QueuedEvent) + * <p> \b /ingen/set_port_value_queued - Sets the value of a port for all voices (as a QueuedEvent) * \arg \b response-id (integer) * \arg \b port-path (string) - Name of port * \arg \b value (float) - Value to set port to * * \li This version exists so you can send it immediately after a QueuedEvent it may depend on (ie a * node creation) and be sure it happens after the event (a normal set_port_value could beat the - * slow event and arrive out of order). </p> \n \n + * queued event and arrive out of order). </p> \n \n */ int OSCEngineReceiver::_set_port_value_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -662,7 +656,7 @@ OSCEngineReceiver::_set_port_value_slow_cb(const char* path, const char* types, /** \page engine_osc_namespace - * <p> \b /om/synth/note_on - Triggers a note-on, just as if it came from MIDI + * <p> \b /ingen/note_on - Triggers a note-on, just as if it came from MIDI * \arg \b response-id (integer) * \arg \b node-path (string) - Patch of Node to trigger (must be a trigger or note node) * \arg \b note-num (int) - MIDI style note number (0-127) @@ -684,7 +678,7 @@ OSCEngineReceiver::_note_on_cb(const char* path, const char* types, lo_arg** arg /** \page engine_osc_namespace - * <p> \b /om/synth/note_off - Triggers a note-off, just as if it came from MIDI + * <p> \b /ingen/note_off - Triggers a note-off, just as if it came from MIDI * \arg \b response-id (integer) * \arg \b node-path (string) - Patch of Node to trigger (must be a trigger or note node) * \arg \b note-num (int) - MIDI style note number (0-127)</p> \n \n @@ -704,7 +698,7 @@ OSCEngineReceiver::_note_off_cb(const char* path, const char* types, lo_arg** ar /** \page engine_osc_namespace - * <p> \b /om/synth/all_notes_off - Triggers a note-off for all voices, just as if it came from MIDI + * <p> \b /ingen/all_notes_off - Triggers a note-off for all voices, just as if it came from MIDI * \arg \b response-id (integer) * \arg \b patch-path (string) - Patch of patch to send event to </p> \n \n */ @@ -722,7 +716,7 @@ OSCEngineReceiver::_all_notes_off_cb(const char* path, const char* types, lo_arg /** \page engine_osc_namespace - * <p> \b /om/synth/midi_learn - Initiate MIDI learn for a given (MIDI Control) Node + * <p> \b /ingen/midi_learn - Initiate MIDI learn for a given (MIDI Control) Node * \arg \b response-id (integer) * \arg \b node-path (string) - Patch of the Node that should learn the next MIDI event. * @@ -742,26 +736,12 @@ OSCEngineReceiver::_midi_learn_cb(const char* path, const char* types, lo_arg** } -#ifdef HAVE_LASH /** \page engine_osc_namespace - * <p> \b /om/lash/restore_done - Notify LASH restoring is finished and connections can be made. - * \arg \b response-id (integer) - */ -int -OSCEngineReceiver::_lash_restore_done_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) -{ - lash_restore_done(); - return 0; -} -#endif // HAVE_LASH - - -/** \page engine_osc_namespace - * <p> \b /om/metadata/set - Sets a piece of metadata, associated with a synth-space object (node, etc) + * <p> \b /ingen/set_metadata - Sets a piece of metadata, associated with a synth-space object (node, etc) * \arg \b response-id (integer) * \arg \b object-path (string) - Full path of object to associate metadata with * \arg \b key (string) - Key (index) for new piece of metadata - * \arg \b value (string) - Value of new piece of metadata + * \arg \b value (string) - Value of new piece of metadata </p> \n \n */ int OSCEngineReceiver::_metadata_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -781,7 +761,7 @@ OSCEngineReceiver::_metadata_set_cb(const char* path, const char* types, lo_arg* /** \page engine_osc_namespace - * <p> \b /om/metadata/responder - Requests the engine send a piece of metadata, associated with a synth-space object (node, etc) + * <p> \b /ingen/request_metadata - Requests the engine send a piece of metadata, associated with a synth-space object (node, etc) * \arg \b response-id (integer) * \arg \b object-path (string) - Full path of object metadata is associated with * \arg \b key (string) - Key (index) for piece of metadata @@ -808,11 +788,10 @@ OSCEngineReceiver::_metadata_get_cb(const char* path, const char* types, lo_arg* /** \page engine_osc_namespace - * <p> \b /om/responder/plugin - Requests the engine send the value of a port. + * <p> \b /ingen/request_plugin - Requests the engine send the value of a port. * \arg \b response-id (integer) - * \arg \b port-path (string) - Full path of port to send the value of </p> \n \n - * - * \li Reply will be sent to client registered with the source address of this message.</p> \n \n + * \arg \b port-path (string) - Full path of port to send the value of \n\n + * \li Reply will be sent to client registered with the source address of this message.</p>\n\n */ int OSCEngineReceiver::_request_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -826,11 +805,10 @@ OSCEngineReceiver::_request_plugin_cb(const char* path, const char* types, lo_ar /** \page engine_osc_namespace - * <p> \b /om/responder/object - Requests the engine send the value of a port. + * <p> \b /ingen/request_object - Requests the engine send the value of a port. * \arg \b response-id (integer) - * \arg \b port-path (string) - Full path of port to send the value of </p> \n \n - * - * \li Reply will be sent to client registered with the source address of this message.</p> \n \n + * \arg \b port-path (string) - Full path of port to send the value of \n\n + * \li Reply will be sent to client registered with the source address of this message.</p>\n\n */ int OSCEngineReceiver::_request_object_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -844,11 +822,10 @@ OSCEngineReceiver::_request_object_cb(const char* path, const char* types, lo_ar /** \page engine_osc_namespace - * <p> \b /om/responder/port_value - Requests the engine send the value of a port. + * <p> \b /ingen/request_port_value - Requests the engine send the value of a port. * \arg \b response-id (integer) - * \arg \b port-path (string) - Full path of port to send the value of </p> \n \n - * - * \li Reply will be sent to client registered with the source address of this message.</p> \n \n + * \arg \b port-path (string) - Full path of port to send the value of \n\n + * \li Reply will be sent to client registered with the source address of this message.</p>\n\n */ int OSCEngineReceiver::_request_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -861,10 +838,9 @@ OSCEngineReceiver::_request_port_value_cb(const char* path, const char* types, l /** \page engine_osc_namespace - * <p> \b /om/responder/plugins - Requests the engine send a list of all known plugins. - * \arg \b response-id (integer) - * - * \li Reply will be sent to client registered with the source address of this message.</p> \n \n + * <p> \b /ingen/request_plugins - Requests the engine send a list of all known plugins. + * \arg \b response-id (integer) \n\n + * \li Reply will be sent to client registered with the source address of this message.</p>\n\n */ int OSCEngineReceiver::_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) @@ -875,9 +851,8 @@ OSCEngineReceiver::_request_plugins_cb(const char* path, const char* types, lo_a /** \page engine_osc_namespace - * <p> \b /om/responder/all_objects - Requests the engine send information about \em all objects (patches, nodes, etc) - * \arg \b response-id (integer) - * + * <p> \b /ingen/request_all_objects - Requests the engine send information about \em all objects (patches, nodes, etc) + * \arg \b response-id (integer)\n\n * \li Reply will be sent to client registered with the source address of this message.</p> \n \n */ int diff --git a/src/libs/engine/OSCEngineReceiver.h b/src/libs/engine/OSCEngineReceiver.h index 62e854e3..15fae6cd 100644 --- a/src/libs/engine/OSCEngineReceiver.h +++ b/src/libs/engine/OSCEngineReceiver.h @@ -113,9 +113,6 @@ private: #ifdef HAVE_DSSI LO_HANDLER(dssi); #endif -#ifdef HAVE_LASH - LO_HANDLER(lash_restore_done); -#endif const char* const _port; lo_server _server; diff --git a/src/libs/engine/OSCResponder.cpp b/src/libs/engine/OSCResponder.cpp index b1fd90de..dcec4641 100644 --- a/src/libs/engine/OSCResponder.cpp +++ b/src/libs/engine/OSCResponder.cpp @@ -62,7 +62,7 @@ OSCResponder::respond_ok() _addr = lo_address_new_from_url(_url); //cerr << "OK " << _id << endl; - if (lo_send(_addr, "/om/response", "iis", _id, 1, "") < 0) { + if (lo_send(_addr, "/ingen/response", "iis", _id, 1, "") < 0) { cerr << "Unable to send response " << _id << "! (" << lo_address_errstr(_addr) << ")" << endl; } @@ -79,7 +79,7 @@ OSCResponder::respond_error(const string& msg) _addr = lo_address_new_from_url(_url); //cerr << "ERR " << _id << endl; - if (lo_send(_addr, "/om/response", "iis",_id, 0, msg.c_str()) < 0) { + if (lo_send(_addr, "/ingen/response", "iis",_id, 0, msg.c_str()) < 0) { cerr << "Unable to send response " << _id << "! (" << lo_address_errstr(_addr) << endl; } |