From af50ce8066ba9ce288d0724707f06e7a88b00f84 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 12 Oct 2008 19:58:33 +0000 Subject: Remove meaningless/non-LV2/kludgey 'event' 'midi' and 'osc' distinction. Expose event ports to jack midi, again. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1665 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/DeprecatedLoader.cpp | 4 +- src/common/interface/DataType.hpp | 3 +- src/engine/JackAudioDriver.cpp | 2 +- src/engine/OSCClientSender.cpp | 2 +- src/engine/OSCEngineReceiver.cpp | 2 +- src/engine/events/CreatePortEvent.cpp | 17 +- src/gui/PatchCanvas.cpp | 16 - src/gui/PatchCanvas.hpp | 4 - src/gui/ingen_gui.glade | 1046 ++++++++++++++++----------------- 9 files changed, 518 insertions(+), 578 deletions(-) diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp index 29172cee..6284d42c 100644 --- a/src/client/DeprecatedLoader.cpp +++ b/src/client/DeprecatedLoader.cpp @@ -470,10 +470,10 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr _engine->new_port(path, 0, "lv2:ControlPort", true); is_port = true; } else if (plugin_label == "midi_input") { - _engine->new_port(path, 0, "ingen:MIDIPort", false); + _engine->new_port(path, 0, "ingen:EventPort", false); is_port = true; } else if (plugin_label == "midi_output" ) { - _engine->new_port(path, 0, "ingen:MIDIPort", true); + _engine->new_port(path, 0, "ingen:EventPort", true); is_port = true; } else { cerr << "WARNING: Unknown internal plugin label \"" << plugin_label << "\"" << endl; diff --git a/src/common/interface/DataType.hpp b/src/common/interface/DataType.hpp index 1651e41d..52831e2a 100644 --- a/src/common/interface/DataType.hpp +++ b/src/common/interface/DataType.hpp @@ -47,8 +47,7 @@ public: _symbol = AUDIO; } else if (uri == type_uri(CONTROL)) { _symbol = CONTROL; - } else if (uri == type_uri(EVENT) - || (uri == "ingen:MIDIPort") || uri == "ingen:OSCPort" || uri == "lv2ev:EventPort") { + } else if (uri == type_uri(EVENT) || uri == "lv2ev:EventPort") { _symbol = EVENT; } } diff --git a/src/engine/JackAudioDriver.cpp b/src/engine/JackAudioDriver.cpp index f0c402d9..6ffca0da 100644 --- a/src/engine/JackAudioDriver.cpp +++ b/src/engine/JackAudioDriver.cpp @@ -176,7 +176,7 @@ JackAudioDriver::activate() #endif*/ } - if (!_engine.midi_driver()) + if (!_engine.midi_driver() || dynamic_cast(_engine.midi_driver())) _engine.set_midi_driver(new JackMidiDriver(_client)); } diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp index dca2e0ed..c71f7e6b 100644 --- a/src/engine/OSCClientSender.cpp +++ b/src/engine/OSCClientSender.cpp @@ -143,7 +143,7 @@ void OSCClientSender::new_node(const std::string& node_path, *

\b /ingen/new_port - Notification of a new port's creation. * \arg \b path (string) - Path of new port * \arg \b index (integer) - Index (or sort key) of port on parent - * \arg \b data-type (string) - Type of port (ingen:AudioPort, ingen:ControlPort, ingen:MIDIPort, or ingen:OSCPort) + * \arg \b data-type (string) - Type of port (ingen:AudioPort, ingen:ControlPort, ingen:EventPort) * \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1) * * \li Note that in the event of loading a patch, this message could be diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp index d9c8f7c2..c2df9601 100644 --- a/src/engine/OSCEngineReceiver.cpp +++ b/src/engine/OSCEngineReceiver.cpp @@ -456,7 +456,7 @@ OSCEngineReceiver::_set_polyphonic_cb(const char* path, const char* types, lo_ar *

\b /ingen/new_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) - Type of port (lv2:AudioPort, lv2:ControlPort, lv2ev:EventPort, ingen:MIDIPort, or ingen:OSCPort) + * \arg \b data-type (string) - Type of port (lv2:AudioPort, lv2:ControlPort, lv2ev:EventPort) * \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1)

\n \n */ int diff --git a/src/engine/events/CreatePortEvent.cpp b/src/engine/events/CreatePortEvent.cpp index 6f3f80e5..b70615d7 100644 --- a/src/engine/events/CreatePortEvent.cpp +++ b/src/engine/events/CreatePortEvent.cpp @@ -106,15 +106,13 @@ CreatePortEvent::pre_process() _engine.engine_store()->add(_patch_port); if (!_patch->parent()) { - if (_type == "lv2:AudioPort") + if (_type == "lv2:AudioPort") { _driver_port = _engine.audio_driver()->create_port( dynamic_cast(_patch_port)); - else if (_type == "ingen:MIDIPort" || _type == "lv2ev:EventPort") + } else if (_type == "lv2ev:EventPort") { _driver_port = _engine.midi_driver()->create_port( dynamic_cast(_patch_port)); - else if (_type == "ingen:OSCPort" && _engine.osc_driver()) - _driver_port = _engine.osc_driver()->create_port( - dynamic_cast(_patch_port)); + } } assert(_ports_array->size() == _patch->num_ports()); @@ -134,14 +132,13 @@ CreatePortEvent::execute(ProcessContext& context) _engine.maid()->push(_patch->external_ports()); _patch->external_ports(_ports_array); } - + if (_driver_port) { - if (_type == "lv2:AudioPort") + if (_type == "lv2:AudioPort") { _engine.audio_driver()->add_port(_driver_port); - else if (_type == "ingen:MIDIPort" || _type == "lv2ev:EventPort") + } else if (_type == "lv2ev:EventPort") { _engine.midi_driver()->add_port(_driver_port); - else if (_type == "ingen:OSCPort") - cerr << "OSC DRIVER PORT" << endl; + } } if (_source) diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index 107cdaa8..bc7832ea 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -74,10 +74,6 @@ PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) xml->get_widget("canvas_menu_add_audio_output", _menu_add_audio_output); xml->get_widget("canvas_menu_add_control_input", _menu_add_control_input); xml->get_widget("canvas_menu_add_control_output", _menu_add_control_output); - xml->get_widget("canvas_menu_add_midi_input", _menu_add_midi_input); - xml->get_widget("canvas_menu_add_midi_output", _menu_add_midi_output); - xml->get_widget("canvas_menu_add_osc_input", _menu_add_osc_input); - xml->get_widget("canvas_menu_add_osc_output", _menu_add_osc_output); xml->get_widget("canvas_menu_add_event_input", _menu_add_event_input); xml->get_widget("canvas_menu_add_event_output", _menu_add_event_output); xml->get_widget("canvas_menu_load_plugin", _menu_load_plugin); @@ -97,18 +93,6 @@ PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) _menu_add_control_output->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), "control_output", "lv2:ControlPort", true)); - _menu_add_midi_input->signal_activate().connect( - sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), - "midi_input", "ingen:MIDIPort", false)); - _menu_add_midi_output->signal_activate().connect( - sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), - "midi_output", "ingen:MIDIPort", true)); - _menu_add_osc_input->signal_activate().connect( - sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), - "osc_input", "ingen:OSCPort", false)); - _menu_add_osc_output->signal_activate().connect( - sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), - "osc_output", "ingen:OSCPort", true)); _menu_add_event_input->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), "event_input", "lv2ev:EventPort", false)); diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp index 842f25f6..98c71aff 100644 --- a/src/gui/PatchCanvas.hpp +++ b/src/gui/PatchCanvas.hpp @@ -149,10 +149,6 @@ private: Gtk::MenuItem* _menu_add_control_output; Gtk::MenuItem* _menu_add_event_input; Gtk::MenuItem* _menu_add_event_output; - Gtk::MenuItem* _menu_add_midi_input; - Gtk::MenuItem* _menu_add_midi_output; - Gtk::MenuItem* _menu_add_osc_input; - Gtk::MenuItem* _menu_add_osc_output; Gtk::MenuItem* _menu_load_plugin; Gtk::MenuItem* _menu_load_patch; Gtk::MenuItem* _menu_new_patch; diff --git a/src/gui/ingen_gui.glade b/src/gui/ingen_gui.glade index 892e0cab..b1fd83b8 100644 --- a/src/gui/ingen_gui.glade +++ b/src/gui/ingen_gui.glade @@ -497,53 +497,62 @@ 3 12 - + True - 1 - Node Name: - True + True + Clear filter text (show all plugins) + gtk-clear + True + 0 - 2 - 3 + 2 + 3 GTK_FILL - + True + Name contains: - 1 - 2 - 1 - 2 GTK_FILL + - + True + True + True + Search string to filter plugin list + * - 1 - 2 - GTK_FILL - GTK_FILL + 1 + 2 + 6 - + True + False + True + Add selected plugin to patch + gtk-add + True + 0 2 3 - 1 - 2 + 2 + 3 GTK_FILL - GTK_FILL + @@ -586,60 +595,51 @@ - + True - False - True - Add selected plugin to patch - gtk-add - True - 0 2 3 - 2 - 3 + 1 + 2 GTK_FILL - + GTK_FILL - + True - True - True - Search string to filter plugin list - * - 1 - 2 - 6 + 1 + 2 + GTK_FILL + GTK_FILL - + True - Name contains: + 1 + 2 + 1 + 2 GTK_FILL - - + True - True - Clear filter text (show all plugins) - gtk-clear - True - 0 + 1 + Node Name: + True - 2 - 3 + 2 + 3 GTK_FILL @@ -670,61 +670,61 @@ 2 2 - + True - 0 - Name: + True + True + * + True - GTK_FILL - GTK_EXPAND - 5 + 1 + 2 + + 4 - + True - 0 - Polyphony: + True + 1 0 100 1 10 10 + 1 + 1 + 2 1 2 GTK_FILL - GTK_EXPAND - 5 + + 4 - + True - True - 1 0 100 1 10 10 - 1 + 0 + Polyphony: - 1 - 2 1 2 GTK_FILL - - 4 + GTK_EXPAND + 5 - + True - True - True - * - True + 0 + Name: - 1 - 2 - - 4 + GTK_FILL + GTK_EXPAND + 5 @@ -826,63 +826,71 @@ 12 4 - + True - 0 - <b>Name: </b> - True + + + True + True + Specify the name for the new patch + Specify: + True + 0 + True + load_subpatch_name_from_file_radio + + + False + False + + + + + True + False + True + Specify the name for the new patch + * + True + + + False + 1 + + - GTK_FILL - + 3 + 4 + GTK_FILL - + True 0 - <b>Polyphony: </b> - True - - - 1 - 2 - GTK_FILL - - - - - - True - True - Use the name stored in the patch file - Load from file - True - 0 - True - True - 1 - 2 + 2 + 3 GTK_FILL - + True True - Use the polyphony value stored in the patch file - Load from file + Set polyphony to the same value as the parent (containing) patch + Same as parent (?) True 0 - True True + load_subpatch_poly_from_file_radio - 1 - 2 + 2 + 3 1 2 GTK_FILL @@ -933,19 +941,19 @@ - + True True - Set polyphony to the same value as the parent (containing) patch - Same as parent (?) + Use the polyphony value stored in the patch file + Load from file True 0 + True True - load_subpatch_poly_from_file_radio - 2 - 3 + 1 + 2 1 2 GTK_FILL @@ -953,55 +961,47 @@ - + True - 0 + True + Use the name stored in the patch file + Load from file + True + 0 + True + True - 2 - 3 + 1 + 2 GTK_FILL - + True - - - True - True - Specify the name for the new patch - Specify: - True - 0 - True - load_subpatch_name_from_file_radio - - - False - False - - - - - True - False - True - Specify the name for the new patch - * - True - - - False - 1 - - + 0 + <b>Polyphony: </b> + True - 3 - 4 - GTK_FILL + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Name: </b> + True + + + GTK_FILL + @@ -1062,54 +1062,6 @@ 4 12 4 - - - True - 0 - <b>Polyphony: </b> - True - - - GTK_FILL - - - - - - True - True - Use the same polyphony as the current patch - Keep current - True - 0 - True - True - - - 1 - 2 - GTK_FILL - - - - - - True - True - Use the polyphony value stored in the patch file - Load from file - True - 0 - True - load_patch_poly_from_current_radio - - - 2 - 3 - GTK_FILL - - - True @@ -1150,6 +1102,54 @@ GTK_FILL + + + True + True + Use the polyphony value stored in the patch file + Load from file + True + 0 + True + load_patch_poly_from_current_radio + + + 2 + 3 + GTK_FILL + + + + + + True + True + Use the same polyphony as the current patch + Keep current + True + 0 + True + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Polyphony: </b> + True + + + GTK_FILL + + + False @@ -1216,15 +1216,15 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True 0 1 @@ -1239,145 +1239,74 @@ - + True 1 0 1 1 - 4 - - - True - - - - - 1 - - - - - True - True - 0 - True - - - False - 2 - - - - - False - False - - - - - 4 - 5 - 8 - - - - - True - - - True - 0 - - - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - - - True - GTK_SHADOW_NONE - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - - - - - - True - True - - - True - True - Apply changed controls to all voices - All Voices - True - 0 - True - - - False - False - - - - - True - 5 - - - True - True - Apply changed controls to one voice only - Specific Voice: - True - 0 - True - control_panel_all_voices_radio - - - False - False - - + 4 - + True - False - True - Voice control changes are applied to - 1 1 100 1 10 10 - 1 - True - - 1 - - False - False 1 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + 0 -9.9999999999999999e+45 1.0000000000000001e+63 1 10 10 + 4 + True + + + False + 2 + + + + + False + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 9.0923076923076922e+136 -1e+113 1e+137 0 0 0 + 63 + False False - 5 1 + + 3 + 4 + 8 + + + + + True + + + 1 + 2 + GTK_FILL + @@ -1640,25 +1569,113 @@ - + True + + + True + 0 + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + + + + + + + + + True + True + + + True + True + Apply changed controls to all voices + All Voices + True + 0 + True + + + False + False + + + + + True + 5 + + + True + True + Apply changed controls to one voice only + Specific Voice: + True + 0 + True + control_panel_all_voices_radio + + + False + False + + + + + True + False + True + Voice control changes are applied to + 1 1 100 1 10 10 + 1 + True + + + 1 + + + + + False + False + 1 + + + + + False + 5 + 1 + + - - 1 - 2 - GTK_FILL - - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True 0 1 @@ -1673,7 +1690,7 @@ - + True 1 0 @@ -1681,7 +1698,7 @@ 1 4 - + True @@ -1691,14 +1708,11 @@ - + True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 12 - 0 -9.9999999999999999e+45 1.0000000000000001e+63 1 10 10 - 4 - True + 0 + True False @@ -1711,24 +1725,10 @@ False - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 9.0923076923076922e+136 -1e+113 1e+137 0 0 0 - 63 - False - - - False - 1 - - - 3 - 4 + 4 + 5 8 @@ -1820,51 +1820,51 @@ 2 2 - + True - <b>Patch Search Path: </b> - True + 0 + 1 + 2 GTK_FILL - + True - True - * + <i>Example: /foo/bar:/home/john/patches:/usr/share/om/patches</i> + True 1 2 + 1 + 2 + GTK_FILL - + True - <i>Example: /foo/bar:/home/john/patches:/usr/share/om/patches</i> - True + True + * 1 2 - 1 - 2 - GTK_FILL - + True - 0 + <b>Patch Search Path: </b> + True - 1 - 2 GTK_FILL @@ -1942,16 +1942,18 @@ 8 8 - + True - Name: + Author: + 1 + 2 GTK_FILL - + True True * @@ -1959,10 +1961,12 @@ 1 2 + 1 + 2 - + True True * @@ -1970,18 +1974,14 @@ 1 2 - 1 - 2 - + True - Author: + Name: - 1 - 2 GTK_FILL @@ -2267,7 +2267,7 @@ 10 6 - + True 0 - @@ -2275,28 +2275,34 @@ 1 2 + 2 + 3 GTK_FILL - + True 0 - Type: + Name: + 2 + 3 GTK_FILL - + True 0 - URI: + - + 1 + 2 1 2 GTK_FILL @@ -2304,14 +2310,12 @@ - + True 0 - - + URI: - 1 - 2 1 2 GTK_FILL @@ -2319,20 +2323,18 @@ - + True 0 - Name: + Type: - 2 - 3 GTK_FILL - + True 0 - @@ -2340,8 +2342,6 @@ 1 2 - 2 - 3 GTK_FILL @@ -2494,64 +2494,33 @@ Contributors: 2 8 - - True - - - True - False - True - 16180 1 65535 1 10 10 - 1 - True - - - False - False - - - - - 1 - 2 - 1 - 2 - GTK_FILL - 8 - - - - + True - - - True - True - * - True - 28 - osc.udp://localhost:16180 - - + 0 1 2 + 2 + 3 GTK_FILL - GTK_FILL - 8 + - + True + False True - Connect to running server at: + Use internal engine True 0 True + connect_server_radiobutton + 2 + 3 GTK_FILL @@ -2574,35 +2543,66 @@ Contributors: - + True - False True - Use internal engine + Connect to running server at: True 0 True - connect_server_radiobutton - 2 - 3 GTK_FILL - + True - 0 + + + True + True + * + True + 28 + osc.udp://localhost:16180 + + 1 2 - 2 - 3 GTK_FILL - + GTK_FILL + 8 + + + + + True + + + True + False + True + 16180 1 65535 1 10 10 + 1 + True + + + False + False + + + + + 1 + 2 + 1 + 2 + GTK_FILL + 8 @@ -2694,15 +2694,6 @@ Contributors: - - - True - Add a MIDI input to this patch - MIDI - True - - - True @@ -2712,15 +2703,6 @@ Contributors: - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Add an OSC input to this patch - OSC - True - - @@ -2757,15 +2739,6 @@ Contributors: - - - True - Add a MIDI output to this patch - MIDI - True - - - True @@ -2775,15 +2748,6 @@ Contributors: - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Add an OSC output to this patch - OSC - True - - @@ -2961,19 +2925,26 @@ Contributors: 2 8 - + True - True - Enter a short name suitable for use as an identifier or filename. - -The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. - - * - True + 0 + Short Name: - 1 - 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + Symbol: + + + GTK_FILL @@ -2994,26 +2965,19 @@ The first character must be one of _, a-z or A-Z and subsequenct characters can - - True - 0 - Symbol: - - - GTK_FILL - - - - - + True - 0 - Short Name: + True + Enter a short name suitable for use as an identifier or filename. + +The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. + + * + True - 1 - 2 - GTK_FILL + 1 + 2 @@ -3156,17 +3120,26 @@ Thank you for contributing. 2 4 - + True - True - 0 -100000000 100000000 1 10 10 - 1 - 5 - True + 0 + Maximum Value: - 1 - 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + Minimum Value: + + + GTK_FILL @@ -3188,26 +3161,17 @@ Thank you for contributing. - - True - 0 - Minimum Value: - - - GTK_FILL - - - - - + True - 0 - Maximum Value: + True + 0 -100000000 100000000 1 10 10 + 1 + 5 + True - 1 - 2 - GTK_FILL + 1 + 2 -- cgit v1.2.1