summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clients/new/PatchLibrarian.cpp824
-rw-r--r--src/clients/new/PatchLibrarian.h66
-rw-r--r--src/clients/new/patch_loader/Makefile.am13
-rw-r--r--src/clients/new/patch_loader/patch_loader.cpp76
-rw-r--r--src/clients/patch_loader/README5
-rw-r--r--src/clients/patch_loader/cmdline.c163
-rw-r--r--src/clients/patch_loader/cmdline.ggo7
-rw-r--r--src/clients/patch_loader/cmdline.h47
-rw-r--r--src/libs/client/ConnectionModel.cpp (renamed from src/clients/ConnectionModel.cpp)0
-rw-r--r--src/libs/client/ConnectionModel.h (renamed from src/clients/ConnectionModel.h)0
-rw-r--r--src/libs/client/ControlModel.h (renamed from src/clients/ControlModel.h)0
-rw-r--r--src/libs/client/DirectSigClientInterface.h (renamed from src/clients/DirectSigClientInterface.h)0
-rw-r--r--src/libs/client/Makefile.am (renamed from src/clients/Makefile.am)0
-rw-r--r--src/libs/client/ModelClientInterface.cpp (renamed from src/clients/ModelClientInterface.cpp)0
-rw-r--r--src/libs/client/ModelClientInterface.h (renamed from src/clients/ModelClientInterface.h)0
-rw-r--r--src/libs/client/ModelEngineInterface.h (renamed from src/clients/ModelEngineInterface.h)0
-rw-r--r--src/libs/client/NodeModel.cpp (renamed from src/clients/NodeModel.cpp)0
-rw-r--r--src/libs/client/NodeModel.h (renamed from src/clients/NodeModel.h)0
-rw-r--r--src/libs/client/OSCEngineInterface.cpp (renamed from src/clients/OSCEngineInterface.cpp)0
-rw-r--r--src/libs/client/OSCEngineInterface.h (renamed from src/clients/OSCEngineInterface.h)0
-rw-r--r--src/libs/client/OSCListener.cpp (renamed from src/clients/OSCListener.cpp)0
-rw-r--r--src/libs/client/OSCListener.h (renamed from src/clients/OSCListener.h)0
-rw-r--r--src/libs/client/OSCModelEngineInterface.cpp (renamed from src/clients/OSCModelEngineInterface.cpp)0
-rw-r--r--src/libs/client/OSCModelEngineInterface.h (renamed from src/clients/OSCModelEngineInterface.h)0
-rw-r--r--src/libs/client/ObjectController.h (renamed from src/clients/ObjectController.h)0
-rw-r--r--src/libs/client/ObjectModel.cpp (renamed from src/clients/ObjectModel.cpp)0
-rw-r--r--src/libs/client/ObjectModel.h (renamed from src/clients/ObjectModel.h)0
-rw-r--r--src/libs/client/PatchLibrarian.cpp (renamed from src/clients/PatchLibrarian.cpp)0
-rw-r--r--src/libs/client/PatchLibrarian.cpp.new (renamed from src/clients/PatchLibrarian.cpp.new)0
-rw-r--r--src/libs/client/PatchLibrarian.h (renamed from src/clients/PatchLibrarian.h)0
-rw-r--r--src/libs/client/PatchModel.cpp (renamed from src/clients/PatchModel.cpp)0
-rw-r--r--src/libs/client/PatchModel.h (renamed from src/clients/PatchModel.h)0
-rw-r--r--src/libs/client/PluginModel.h (renamed from src/clients/PluginModel.h)0
-rw-r--r--src/libs/client/PortModel.h (renamed from src/clients/PortModel.h)0
-rw-r--r--src/libs/client/PresetModel.h (renamed from src/clients/PresetModel.h)0
-rw-r--r--src/libs/client/SigClientInterface.h (renamed from src/clients/SigClientInterface.h)0
-rw-r--r--src/libs/client/ThreadedSigClientInterface.cpp (renamed from src/clients/ThreadedSigClientInterface.cpp)0
-rw-r--r--src/libs/client/ThreadedSigClientInterface.h (renamed from src/clients/ThreadedSigClientInterface.h)0
-rw-r--r--src/libs/engine/Makefile.am83
-rw-r--r--src/progs/console/ConsoleClientHooks.cpp (renamed from src/clients/console/ConsoleClientHooks.cpp)0
-rw-r--r--src/progs/console/ConsoleClientHooks.h (renamed from src/clients/console/ConsoleClientHooks.h)0
-rw-r--r--src/progs/console/Makefile.am (renamed from src/clients/console/Makefile.am)0
-rw-r--r--src/progs/console/README (renamed from src/clients/console/README)0
-rw-r--r--src/progs/console/console_client.cpp (renamed from src/clients/console/console_client.cpp)0
-rw-r--r--src/progs/console/patches/COPYING (renamed from src/clients/console/patches/COPYING)0
-rw-r--r--src/progs/console/patches/dssi_test.omp (renamed from src/clients/console/patches/dssi_test.omp)0
-rw-r--r--src/progs/console/patches/filter_patch.omp (renamed from src/clients/console/patches/filter_patch.omp)0
-rw-r--r--src/progs/console/patches/old_super_simple_patch.omp (renamed from src/clients/console/patches/old_super_simple_patch.omp)0
-rw-r--r--src/progs/console/patches/send_test.omp (renamed from src/clients/console/patches/send_test.omp)0
-rw-r--r--src/progs/console/patches/simple_patch.omp (renamed from src/clients/console/patches/simple_patch.omp)0
-rw-r--r--src/progs/console/patches/super_simple_patch.omp (renamed from src/clients/console/patches/super_simple_patch.omp)0
-rw-r--r--src/progs/console/patches/test_patch.omp (renamed from src/clients/console/patches/test_patch.omp)0
-rw-r--r--src/progs/demolition/DemolitionClientInterface.cpp (renamed from src/clients/demolition/DemolitionClientInterface.cpp)0
-rw-r--r--src/progs/demolition/DemolitionClientInterface.h (renamed from src/clients/demolition/DemolitionClientInterface.h)0
-rw-r--r--src/progs/demolition/DemolitionModel.cpp (renamed from src/clients/demolition/DemolitionModel.cpp)0
-rw-r--r--src/progs/demolition/DemolitionModel.h (renamed from src/clients/demolition/DemolitionModel.h)0
-rw-r--r--src/progs/demolition/Makefile.am (renamed from src/clients/demolition/Makefile.am)0
-rw-r--r--src/progs/demolition/README (renamed from src/clients/demolition/README)0
-rw-r--r--src/progs/demolition/cmdline.c (renamed from src/clients/demolition/cmdline.c)0
-rw-r--r--src/progs/demolition/cmdline.ggo (renamed from src/clients/demolition/cmdline.ggo)0
-rw-r--r--src/progs/demolition/cmdline.h (renamed from src/clients/demolition/cmdline.h)0
-rw-r--r--src/progs/demolition/demolition.cpp (renamed from src/clients/demolition/demolition.cpp)0
-rw-r--r--src/progs/gtk/App.cpp (renamed from src/clients/gtk/App.cpp)0
-rw-r--r--src/progs/gtk/App.h (renamed from src/clients/gtk/App.h)0
-rw-r--r--src/progs/gtk/BreadCrumb.h (renamed from src/clients/gtk/BreadCrumb.h)0
-rw-r--r--src/progs/gtk/ConfigWindow.cpp (renamed from src/clients/gtk/ConfigWindow.cpp)0
-rw-r--r--src/progs/gtk/ConfigWindow.h (renamed from src/clients/gtk/ConfigWindow.h)0
-rw-r--r--src/progs/gtk/Configuration.cpp (renamed from src/clients/gtk/Configuration.cpp)0
-rw-r--r--src/progs/gtk/Configuration.h (renamed from src/clients/gtk/Configuration.h)0
-rw-r--r--src/progs/gtk/ConnectWindow.cpp (renamed from src/clients/gtk/ConnectWindow.cpp)0
-rw-r--r--src/progs/gtk/ConnectWindow.h (renamed from src/clients/gtk/ConnectWindow.h)0
-rw-r--r--src/progs/gtk/ControlGroups.cpp (renamed from src/clients/gtk/ControlGroups.cpp)0
-rw-r--r--src/progs/gtk/ControlGroups.h (renamed from src/clients/gtk/ControlGroups.h)0
-rw-r--r--src/progs/gtk/ControlInterface.cpp (renamed from src/clients/gtk/ControlInterface.cpp)0
-rw-r--r--src/progs/gtk/ControlInterface.h (renamed from src/clients/gtk/ControlInterface.h)0
-rw-r--r--src/progs/gtk/ControlPanel.cpp (renamed from src/clients/gtk/ControlPanel.cpp)0
-rw-r--r--src/progs/gtk/ControlPanel.h (renamed from src/clients/gtk/ControlPanel.h)0
-rw-r--r--src/progs/gtk/Controller.cpp (renamed from src/clients/gtk/Controller.cpp)0
-rw-r--r--src/progs/gtk/Controller.h (renamed from src/clients/gtk/Controller.h)0
-rw-r--r--src/progs/gtk/DSSIController.cpp (renamed from src/clients/gtk/DSSIController.cpp)0
-rw-r--r--src/progs/gtk/DSSIController.h (renamed from src/clients/gtk/DSSIController.h)0
-rw-r--r--src/progs/gtk/DSSIModule.cpp (renamed from src/clients/gtk/DSSIModule.cpp)0
-rw-r--r--src/progs/gtk/DSSIModule.h (renamed from src/clients/gtk/DSSIModule.h)0
-rw-r--r--src/progs/gtk/GladeFactory.cpp (renamed from src/clients/gtk/GladeFactory.cpp)0
-rw-r--r--src/progs/gtk/GladeFactory.h (renamed from src/clients/gtk/GladeFactory.h)0
-rw-r--r--src/progs/gtk/GtkClientInterface.cpp (renamed from src/clients/gtk/GtkClientInterface.cpp)0
-rw-r--r--src/progs/gtk/GtkClientInterface.h (renamed from src/clients/gtk/GtkClientInterface.h)0
-rw-r--r--src/progs/gtk/GtkObjectController.cpp (renamed from src/clients/gtk/GtkObjectController.cpp)0
-rw-r--r--src/progs/gtk/GtkObjectController.h (renamed from src/clients/gtk/GtkObjectController.h)0
-rw-r--r--src/progs/gtk/LashController.cpp (renamed from src/clients/gtk/LashController.cpp)0
-rw-r--r--src/progs/gtk/LashController.h (renamed from src/clients/gtk/LashController.h)0
-rw-r--r--src/progs/gtk/LoadPatchWindow.cpp (renamed from src/clients/gtk/LoadPatchWindow.cpp)0
-rw-r--r--src/progs/gtk/LoadPatchWindow.h (renamed from src/clients/gtk/LoadPatchWindow.h)0
-rw-r--r--src/progs/gtk/LoadPluginWindow.cpp (renamed from src/clients/gtk/LoadPluginWindow.cpp)0
-rw-r--r--src/progs/gtk/LoadPluginWindow.h (renamed from src/clients/gtk/LoadPluginWindow.h)0
-rw-r--r--src/progs/gtk/LoadSubpatchWindow.cpp (renamed from src/clients/gtk/LoadSubpatchWindow.cpp)0
-rw-r--r--src/progs/gtk/LoadSubpatchWindow.h (renamed from src/clients/gtk/LoadSubpatchWindow.h)0
-rw-r--r--src/progs/gtk/Loader.cpp (renamed from src/clients/gtk/Loader.cpp)0
-rw-r--r--src/progs/gtk/Loader.h (renamed from src/clients/gtk/Loader.h)0
-rw-r--r--src/progs/gtk/Makefile.am (renamed from src/clients/gtk/Makefile.am)0
-rw-r--r--src/progs/gtk/MessagesWindow.cpp (renamed from src/clients/gtk/MessagesWindow.cpp)0
-rw-r--r--src/progs/gtk/MessagesWindow.h (renamed from src/clients/gtk/MessagesWindow.h)0
-rw-r--r--src/progs/gtk/NewSubpatchWindow.cpp (renamed from src/clients/gtk/NewSubpatchWindow.cpp)0
-rw-r--r--src/progs/gtk/NewSubpatchWindow.h (renamed from src/clients/gtk/NewSubpatchWindow.h)0
-rw-r--r--src/progs/gtk/NodeControlWindow.cpp (renamed from src/clients/gtk/NodeControlWindow.cpp)0
-rw-r--r--src/progs/gtk/NodeControlWindow.h (renamed from src/clients/gtk/NodeControlWindow.h)0
-rw-r--r--src/progs/gtk/NodeController.cpp (renamed from src/clients/gtk/NodeController.cpp)0
-rw-r--r--src/progs/gtk/NodeController.h (renamed from src/clients/gtk/NodeController.h)0
-rw-r--r--src/progs/gtk/NodePropertiesWindow.cpp (renamed from src/clients/gtk/NodePropertiesWindow.cpp)0
-rw-r--r--src/progs/gtk/NodePropertiesWindow.h (renamed from src/clients/gtk/NodePropertiesWindow.h)0
-rw-r--r--src/progs/gtk/OmFlowCanvas.cpp (renamed from src/clients/gtk/OmFlowCanvas.cpp)0
-rw-r--r--src/progs/gtk/OmFlowCanvas.h (renamed from src/clients/gtk/OmFlowCanvas.h)0
-rw-r--r--src/progs/gtk/OmModule.cpp (renamed from src/clients/gtk/OmModule.cpp)0
-rw-r--r--src/progs/gtk/OmModule.h (renamed from src/clients/gtk/OmModule.h)0
-rw-r--r--src/progs/gtk/OmPort.cpp (renamed from src/clients/gtk/OmPort.cpp)0
-rw-r--r--src/progs/gtk/OmPort.h (renamed from src/clients/gtk/OmPort.h)0
-rw-r--r--src/progs/gtk/PatchController.cpp (renamed from src/clients/gtk/PatchController.cpp)0
-rw-r--r--src/progs/gtk/PatchController.h (renamed from src/clients/gtk/PatchController.h)0
-rw-r--r--src/progs/gtk/PatchDescriptionWindow.cpp (renamed from src/clients/gtk/PatchDescriptionWindow.cpp)0
-rw-r--r--src/progs/gtk/PatchDescriptionWindow.h (renamed from src/clients/gtk/PatchDescriptionWindow.h)0
-rw-r--r--src/progs/gtk/PatchTreeWindow.cpp (renamed from src/clients/gtk/PatchTreeWindow.cpp)0
-rw-r--r--src/progs/gtk/PatchTreeWindow.h (renamed from src/clients/gtk/PatchTreeWindow.h)0
-rw-r--r--src/progs/gtk/PatchView.cpp (renamed from src/clients/gtk/PatchView.cpp)0
-rw-r--r--src/progs/gtk/PatchView.h (renamed from src/clients/gtk/PatchView.h)0
-rw-r--r--src/progs/gtk/PatchWindow.cpp (renamed from src/clients/gtk/PatchWindow.cpp)0
-rw-r--r--src/progs/gtk/PatchWindow.h (renamed from src/clients/gtk/PatchWindow.h)0
-rw-r--r--src/progs/gtk/PortController.cpp (renamed from src/clients/gtk/PortController.cpp)0
-rw-r--r--src/progs/gtk/PortController.h (renamed from src/clients/gtk/PortController.h)0
-rw-r--r--src/progs/gtk/RenameWindow.cpp (renamed from src/clients/gtk/RenameWindow.cpp)0
-rw-r--r--src/progs/gtk/RenameWindow.h (renamed from src/clients/gtk/RenameWindow.h)0
-rw-r--r--src/progs/gtk/Store.cpp (renamed from src/clients/gtk/Store.cpp)0
-rw-r--r--src/progs/gtk/Store.h (renamed from src/clients/gtk/Store.h)0
-rw-r--r--src/progs/gtk/SubpatchModule.cpp (renamed from src/clients/gtk/SubpatchModule.cpp)0
-rw-r--r--src/progs/gtk/SubpatchModule.h (renamed from src/clients/gtk/SubpatchModule.h)0
-rw-r--r--src/progs/gtk/cmdline.c (renamed from src/clients/gtk/cmdline.c)0
-rw-r--r--src/progs/gtk/cmdline.ggo (renamed from src/clients/gtk/cmdline.ggo)0
-rw-r--r--src/progs/gtk/cmdline.h (renamed from src/clients/gtk/cmdline.h)0
-rw-r--r--src/progs/gtk/main.cpp (renamed from src/clients/gtk/main.cpp)0
-rw-r--r--src/progs/gtk/om-icon.png (renamed from src/clients/gtk/om-icon.png)bin1189 -> 1189 bytes
-rw-r--r--src/progs/gtk/om_gtk.glade (renamed from src/clients/gtk/om_gtk.glade)0
-rw-r--r--src/progs/gtk/om_gtk.glade.bak (renamed from src/clients/gtk/om_gtk.glade.bak)0
-rw-r--r--src/progs/gtk/om_gtk.gladep (renamed from src/clients/gtk/om_gtk.gladep)0
-rw-r--r--src/progs/gtk/om_gtk.gladep.bak (renamed from src/clients/gtk/om_gtk.gladep.bak)0
-rw-r--r--src/progs/gtk/singletons.cpp (renamed from src/clients/gtk/singletons.cpp)0
-rw-r--r--src/progs/om/Makefile.am254
-rw-r--r--src/progs/om/cmdline.c (renamed from src/libs/engine/cmdline.c)0
-rw-r--r--src/progs/om/cmdline.ggo (renamed from src/libs/engine/cmdline.ggo)0
-rw-r--r--src/progs/om/cmdline.h (renamed from src/libs/engine/cmdline.h)0
-rw-r--r--src/progs/om/main.cpp (renamed from src/libs/engine/main.cpp)0
-rw-r--r--src/progs/patch_loader/Makefile.am (renamed from src/clients/patch_loader/Makefile.am)0
-rw-r--r--src/progs/patch_loader/README (renamed from src/clients/new/patch_loader/README)0
-rw-r--r--src/progs/patch_loader/cmdline.c (renamed from src/clients/new/patch_loader/cmdline.c)0
-rw-r--r--src/progs/patch_loader/cmdline.ggo (renamed from src/clients/new/patch_loader/cmdline.ggo)0
-rw-r--r--src/progs/patch_loader/cmdline.h (renamed from src/clients/new/patch_loader/cmdline.h)0
-rw-r--r--src/progs/patch_loader/new_patch_loader.cpp (renamed from src/clients/patch_loader/new_patch_loader.cpp)0
-rw-r--r--src/progs/patch_loader/patch_loader.cpp (renamed from src/clients/patch_loader/patch_loader.cpp)0
-rw-r--r--src/progs/python/Makefile.am (renamed from src/clients/python/Makefile.am)0
-rwxr-xr-xsrc/progs/python/OSC.py (renamed from src/clients/python/OSC.py)0
-rw-r--r--src/progs/python/omecho.py (renamed from src/clients/python/omecho.py)0
-rw-r--r--src/progs/python/omsynth.py (renamed from src/clients/python/omsynth.py)0
-rw-r--r--src/progs/python/scripts/Makefile.am (renamed from src/clients/python/scripts/Makefile.am)0
-rwxr-xr-xsrc/progs/python/scripts/flatten.py (renamed from src/clients/python/scripts/flatten.py)0
-rw-r--r--src/progs/python/scripts/sillysinepatch.py (renamed from src/clients/python/scripts/sillysinepatch.py)0
-rw-r--r--src/progs/supercollider/Makefile.am (renamed from src/clients/supercollider/Makefile.am)0
-rw-r--r--src/progs/supercollider/Om.sc (renamed from src/clients/supercollider/Om.sc)0
-rw-r--r--src/progs/supercollider/README (renamed from src/clients/supercollider/README)0
-rw-r--r--src/progs/supercollider/example.sc (renamed from src/clients/supercollider/example.sc)0
167 files changed, 36 insertions, 1502 deletions
diff --git a/src/clients/new/PatchLibrarian.cpp b/src/clients/new/PatchLibrarian.cpp
deleted file mode 100644
index 66c013e5..00000000
--- a/src/clients/new/PatchLibrarian.cpp
+++ /dev/null
@@ -1,824 +0,0 @@
-/* This file is part of Om. Copyright (C) 2005 Dave Robillard.
- *
- * Om is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Om is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "PatchLibrarian.h"
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include "PatchModel.h"
-#include "NodeModel.h"
-#include "ConnectionModel.h"
-#include "PortModel.h"
-#include "PresetModel.h"
-#include "OSCModelEngineInterface.h"
-#include "PluginModel.h"
-#include "util/Path.h"
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <utility> // for pair, make_pair
-#include <cassert>
-#include <cstring>
-#include <string>
-#include <unistd.h> // for usleep
-#include <cstdlib> // for atof
-#include <cmath>
-
-using std::string; using std::vector; using std::pair;
-using std::cerr; using std::cout; using std::endl;
-using Om::Path;
-
-namespace LibOmClient {
-
-
-/** Load a patch in to the engine (and client) from a patch file.
- *
- * The name and poly from the passed PatchModel are used. If the name is
- * the empty string, the name will be loaded from the file. If the poly
- * is 0, it will be loaded from file. Otherwise the given values will
- * be used.
- *
- * @param parent_path Path of the patch to create the new patch under.
- *
- * @param name Name to give the new Patch. If @a name is the empty string,
- * the name stored in the patch file will be used.
- *
- * @param poly The polyphony of the new patch if nonzero, otherwise the
- * polyphony value stored in the patch file will be used.
- *
- * @return true on success.
- */
-bool
-PatchLibrarian::load_patch(EngineInterface* engine,
- const string& filename,
- const Path& parent_path,
- string name,
- uint32_t poly)
-{
- cerr << "Loading patch " << filename << "" << endl;
-
- //const size_t temp_buf_length = 255;
- //char temp_buf[temp_buf_length];
-
- xmlDocPtr doc = xmlParseFile(filename.c_str());
-
- if (doc == NULL ) {
- cerr << "Unable to parse patch file." << endl;
- return false;
- }
-
- xmlNodePtr cur = xmlDocGetRootElement(doc);
-
- if (cur == NULL) {
- cerr << "Document has no root element." << endl;
- xmlFreeDoc(doc);
- return false;
- }
-
- if (xmlStrcmp(cur->name, (const xmlChar*) "patch")) {
- cerr << "File is not an Om patch file (root node != patch)." << endl;
- xmlFreeDoc(doc);
- return false;
- }
-
- cur = cur->xmlChildrenNode;
- string path;
-
- map<string, string> metadata;
-
- // Load Patch attributes
- while (cur != NULL) {
- xmlChar* const key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
- if (name == "") {
- assert(key);
- name = (char*)key;
- }
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"polyphony"))) {
- if (poly == 0) {
- assert(key);
- poly = atoi((char*)key); // FIXME: error checking
- }
- /* Don't know what this tag is, add it as metadata without overwriting
- * (so caller can set arbitrary metadata which will be preserved)
- * FIXME: this is just plain filthy. XML is not RDF. */
- } else if (key
- && xmlStrcmp(cur->name, (const xmlChar*)"connection")
- && xmlStrcmp(cur->name, (const xmlChar*)"node")
- && xmlStrcmp(cur->name, (const xmlChar*)"subpatch")
- && xmlStrcmp(cur->name, (const xmlChar*)"filename")
- && xmlStrcmp(cur->name, (const xmlChar*)"preset")) {
-
- metadata[(char*)cur->name] == (char*)key;
- }
-
- xmlFree(key);
-
- cur = cur->next;
- }
-
-
- // Didn't find a polyphony value, set monophonic by default
- if (poly == 0) poly = 1;
-
-
- /* FIXME: This functionality needs to be implemented (elsewhere)
- if (!existing) {
- // Wait until the patch is created or the node creations may fail
- if (wait) {
- int id = m_osc_controller->get_next_request_id();
- m_osc_controller->set_wait_response_id(id);
- m_osc_controller->create_patch(pm, id);
- bool succeeded = m_osc_controller->wait_for_response();
-
- // If creating the patch failed, bail out so we don't load all these nodes
- // into an already existing patch
- if (!succeeded) {
- cerr << "[PatchLibrarian] Patch load failed (patch already exists)" << endl;
- return "";
- }
- } else {
- m_osc_controller->create_patch(pm);
- }
- }
- */
- engine->create_patch(path, poly, -1);
-
-
- /* Set the filename metadata. (FIXME)
- * This isn't so good, considering multiple clients on multiple machines, and
- * absolute filesystem paths obviously aren't going to be correct. But for now
- * this is all I can figure out to have Save/Save As work properly for subpatches */
- engine->set_metadata(path, "filename", filename);
-
-#if 0
- // Load nodes
- NodeModel* nm = NULL;
- cur = xmlDocGetRootElement(doc)->xmlChildrenNode;
-
- while (cur != NULL) {
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"node"))) {
- nm = parse_node(pm, doc, cur);
- if (nm != NULL) {
- m_osc_controller->add_node(nm);
- m_osc_controller->set_all_metadata(nm);
- for (list<PortModel*>::const_iterator j = nm->ports().begin();
- j != nm->ports().end(); ++j) {
- // FIXME: ew
- snprintf(temp_buf, temp_buf_length, "%f", (*j)->user_min());
- m_osc_controller->set_metadata((*j)->path(), "user-min", temp_buf);
- snprintf(temp_buf, temp_buf_length, "%f", (*j)->user_max());
- m_osc_controller->set_metadata((*j)->path(), "user-max", temp_buf);
- }
- nm = NULL;
- usleep(10000);
- }
- }
- cur = cur->next;
- }
-
- // Load subpatches
- cur = xmlDocGetRootElement(doc)->xmlChildrenNode;
- while (cur != NULL) {
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"subpatch"))) {
- load_subpatch(pm, doc, cur);
- }
- cur = cur->next;
- }
-
- // Load connections
- ConnectionModel* cm = NULL;
- cur = xmlDocGetRootElement(doc)->xmlChildrenNode;
- while (cur != NULL) {
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"connection"))) {
- cm = parse_connection(pm, doc, cur);
- if (cm != NULL) {
- m_osc_controller->connect(cm->src_port_path(), cm->dst_port_path());
- usleep(1000);
- }
- }
- cur = cur->next;
- }
-
-
- // Load presets (control values)
- PresetModel* preset_model = NULL;
- cur = xmlDocGetRootElement(doc)->xmlChildrenNode;
- while (cur != NULL) {
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"preset"))) {
- preset_model = parse_preset(pm, doc, cur);
- assert(preset_model != NULL);
- if (preset_model->name() == "default")
- m_osc_controller->set_preset(pm->path(), preset_model);
- }
- cur = cur->next;
- }
-#endif
- xmlFreeDoc(doc);
- xmlCleanupParser();
-
- //m_osc_controller->set_all_metadata(pm);
-
- //if (!existing)
- // m_osc_controller->enable_patch(pm->path());
-
- return true;
-}
-
-
-#if 0
-/** Searches for the filename passed in the path, returning the full
- * path of the file, or the empty string if not found.
- *
- * This function tries to be as friendly a black box as possible - if the path
- * passed is an absolute path and the file is found there, it will return
- * that path, etc.
- *
- * additional_path is a list (colon delimeted as usual) of additional
- * directories to look in. ie the directory the parent patch resides in would
- * be a good idea to pass as additional_path, in the case of a subpatch.
- */
-string
-PatchLibrarian::find_file(const string& filename, const string& additional_path)
-{
- string search_path = additional_path + ":" + m_patch_path;
-
- // Try to open the raw filename first
- std::ifstream is(filename.c_str(), std::ios::in);
- if (is.good()) {
- is.close();
- return filename;
- }
-
- string directory;
- string full_patch_path = "";
-
- while (search_path != "") {
- directory = search_path.substr(0, search_path.find(':'));
- if (search_path.find(':') != string::npos)
- search_path = search_path.substr(search_path.find(':')+1);
- else
- search_path = "";
-
- full_patch_path = directory +"/"+ filename;
-
- std::ifstream is;
- is.open(full_patch_path.c_str(), std::ios::in);
-
- if (is.good()) {
- is.close();
- return full_patch_path;
- } else {
- cerr << "[PatchLibrarian] Could not find patch file " << full_patch_path << endl;
- }
- }
-
- return "";
-}
-
-
-/** Save a patch from a PatchModel to a filename.
- *
- * The filename passed is the true filename the patch will be saved to (with no prefixing or anything
- * like that), and the patch_model's filename member will be set accordingly.
- *
- * This will break if:
- * - The filename does not have an extension (ie contain a ".")
- * - The patch_model has no (Om) path
- */
-void
-PatchLibrarian::save_patch(PatchModel* patch_model, const string& filename, bool recursive)
-{
- assert(filename != "");
- assert(patch_model->path() != "");
-
- cout << "Saving patch " << patch_model->path() << " to " << filename << endl;
-
- patch_model->filename(filename);
-
- string dir = filename.substr(0, filename.find_last_of("/"));
-
- NodeModel* nm = NULL;
- PatchModel* spm = NULL; // subpatch model
-
- xmlDocPtr xml_doc = NULL;
- xmlNodePtr xml_root_node = NULL;
- xmlNodePtr xml_node = NULL;
- xmlNodePtr xml_child_node = NULL;
- xmlNodePtr xml_grandchild_node = NULL;
-
- xml_doc = xmlNewDoc((xmlChar*)"1.0");
- xml_root_node = xmlNewNode(NULL, (xmlChar*)"patch");
- xmlDocSetRootElement(xml_doc, xml_root_node);
-
- const size_t temp_buf_length = 255;
- char temp_buf[temp_buf_length];
-
- string patch_name;
- if (patch_model->path() != "/") {
- patch_name = patch_model->name();
- } else {
- patch_name = filename;
- if (patch_name.find("/") != string::npos)
- patch_name = patch_name.substr(patch_name.find_last_of("/") + 1);
- if (patch_name.find(".") != string::npos)
- patch_name = patch_name.substr(0, patch_name.find_last_of("."));
- }
-
- assert(patch_name.length() > 0);
- xml_node = xmlNewChild(xml_root_node, NULL, (xmlChar*)"name",
- (xmlChar*)patch_name.c_str());
-
- snprintf(temp_buf, temp_buf_length, "%zd", patch_model->poly());
- xml_node = xmlNewChild(xml_root_node, NULL, (xmlChar*)"polyphony", (xmlChar*)temp_buf);
-
- // Write metadata
- for (map<string, string>::const_iterator i = patch_model->metadata().begin();
- i != patch_model->metadata().end(); ++i) {
- // Dirty hack, don't save coordinates in patch file
- if ((*i).first != "module-x" && (*i).first != "module-y"
- && (*i).first != "filename")
- xml_node = xmlNewChild(xml_root_node, NULL,
- (xmlChar*)(*i).first.c_str(), (xmlChar*)(*i).second.c_str());
-
- assert((*i).first != "node");
- assert((*i).first != "subpatch");
- assert((*i).first != "name");
- assert((*i).first != "polyphony");
- assert((*i).first != "preset");
- }
-
- // Save nodes and subpatches
- for (NodeModelMap::const_iterator i = patch_model->nodes().begin(); i != patch_model->nodes().end(); ++i) {
- nm = i->second;
-
- if (nm->plugin()->type() == PluginModel::Patch) { // Subpatch
- spm = (PatchModel*)i->second;
- xml_node = xmlNewChild(xml_root_node, NULL, (xmlChar*)"subpatch", NULL);
-
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"name", (xmlChar*)spm->name().c_str());
-
- string ref_filename;
- // No path
- if (spm->filename() == "") {
- ref_filename = spm->name() + ".om";
- spm->filename(dir +"/"+ ref_filename);
- // Absolute path
- } else if (spm->filename().substr(0, 1) == "/") {
- // Attempt to make it a relative path, if it's undernath this patch's dir
- if (dir.substr(0, 1) == "/" && spm->filename().substr(0, dir.length()) == dir) {
- ref_filename = spm->filename().substr(dir.length()+1);
- } else { // FIXME: not good
- ref_filename = spm->filename().substr(spm->filename().find_last_of("/")+1);
- spm->filename(dir +"/"+ ref_filename);
- }
- } else {
- ref_filename = spm->filename();
- }
-
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"filename", (xmlChar*)ref_filename.c_str());
-
- snprintf(temp_buf, temp_buf_length, "%zd", spm->poly());
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"polyphony", (xmlChar*)temp_buf);
-
- // Write metadata
- for (map<string, string>::const_iterator i = nm->metadata().begin();
- i != nm->metadata().end(); ++i) {
- // Dirty hack, don't save metadata that would be in patch file
- if ((*i).first != "polyphony" && (*i).first != "filename"
- && (*i).first != "author" && (*i).first != "description")
- xml_child_node = xmlNewChild(xml_node, NULL,
- (xmlChar*)(*i).first.c_str(), (xmlChar*)(*i).second.c_str());
- }
-
- if (recursive)
- save_patch(spm, spm->filename(), true);
-
- } else { // Normal node
- xml_node = xmlNewChild(xml_root_node, NULL, (xmlChar*)"node", NULL);
-
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"name", (xmlChar*)nm->name().c_str());
-
- if (nm->plugin() == NULL) break;
-
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"polyphonic",
- (xmlChar*)((nm->polyphonic()) ? "true" : "false"));
-
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"type",
- (xmlChar*)nm->plugin()->type_string());
- /*
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"plugin-label",
- (xmlChar*)(nm->plugin()->plug_label().c_str()));
-
- if (nm->plugin()->type() != PluginModel::Internal) {
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"library-name",
- (xmlChar*)(nm->plugin()->lib_name().c_str()));
- }*/
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"plugin-uri",
- (xmlChar*)(nm->plugin()->uri().c_str()));
-
- // Write metadata
- for (map<string, string>::const_iterator i = nm->metadata().begin(); i != nm->metadata().end(); ++i) {
- // DSSI _hack_ (FIXME: fix OSC to be more like this and not smash DSSI into metadata?)
- if ((*i).first.substr(0, 16) == "dssi-configure--") {
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"dssi-configure", NULL);
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL,
- (xmlChar*)"key", (xmlChar*)(*i).first.substr(16).c_str());
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL,
- (xmlChar*)"value", (xmlChar*)(*i).second.c_str());
- } else if ((*i).first == "dssi-program") {
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"dssi-program", NULL);
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL,
- (xmlChar*)"bank", (xmlChar*)(*i).second.substr(0, (*i).second.find("/")).c_str());
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL,
- (xmlChar*)"program", (xmlChar*)(*i).second.substr((*i).second.find("/")+1).c_str());
- } else {
- xml_child_node = xmlNewChild(xml_node, NULL,
- (xmlChar*)(*i).first.c_str(), (xmlChar*)(*i).second.c_str());
- }
- }
-
- PortModel* pm = NULL;
- // Write port metadata, if necessary
- for (list<PortModel*>::const_iterator i = nm->ports().begin(); i != nm->ports().end(); ++i) {
- pm = (*i);
- if (pm->is_input() && pm->user_min() != pm->min_val() || pm->user_max() != pm->max_val()) {
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"port", NULL);
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL, (xmlChar*)"name",
- (xmlChar*)pm->path().name().c_str());
- snprintf(temp_buf, temp_buf_length, "%f", pm->user_min());
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL, (xmlChar*)"user-min", (xmlChar*)temp_buf);
- snprintf(temp_buf, temp_buf_length, "%f", pm->user_max());
- xml_grandchild_node = xmlNewChild(xml_child_node, NULL, (xmlChar*)"user-max", (xmlChar*)temp_buf);
- }
- }
- }
- }
-
- // Save connections
-
- const list<ConnectionModel*>& cl = patch_model->connections();
- const ConnectionModel* c = NULL;
-
- for (list<ConnectionModel*>::const_iterator i = cl.begin(); i != cl.end(); ++i) {
- c = (*i);
- xml_node = xmlNewChild(xml_root_node, NULL, (xmlChar*)"connection", NULL);
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"source-node",
- (xmlChar*)c->src_port_path().parent().name().c_str());
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"source-port",
- (xmlChar*)c->src_port_path().name().c_str());
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"destination-node",
- (xmlChar*)c->dst_port_path().parent().name().c_str());
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"destination-port",
- (xmlChar*)c->dst_port_path().name().c_str());
- }
-
- // Save control values (ie presets eventually, right now just current control vals)
-
- xmlNodePtr xml_preset_node = xmlNewChild(xml_root_node, NULL, (xmlChar*)"preset", NULL);
- xml_node = xmlNewChild(xml_preset_node, NULL, (xmlChar*)"name", (xmlChar*)"default");
-
- PortModel* pm = NULL;
-
- // Save node port controls
- for (NodeModelMap::const_iterator n = patch_model->nodes().begin(); n != patch_model->nodes().end(); ++n) {
- nm = n->second;
- for (PortModelList::const_iterator p = nm->ports().begin(); p != nm->ports().end(); ++p) {
- pm = *p;
- if (pm->is_input() && pm->is_control()) {
- float val = pm->value();
- xml_node = xmlNewChild(xml_preset_node, NULL, (xmlChar*)"control", NULL);
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"node-name",
- (xmlChar*)nm->name().c_str());
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"port-name",
- (xmlChar*)pm->path().name().c_str());
- snprintf(temp_buf, temp_buf_length, "%f", val);
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"value",
- (xmlChar*)temp_buf);
- }
- }
- }
-
- // Save patch port controls
- for (PortModelList::const_iterator p = patch_model->ports().begin();
- p != patch_model->ports().end(); ++p) {
- pm = *p;
- if (pm->is_input() && pm->is_control()) {
- float val = pm->value();
- xml_node = xmlNewChild(xml_preset_node, NULL, (xmlChar*)"control", NULL);
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"port-name",
- (xmlChar*)pm->path().name().c_str());
- snprintf(temp_buf, temp_buf_length, "%f", val);
- xml_child_node = xmlNewChild(xml_node, NULL, (xmlChar*)"value",
- (xmlChar*)temp_buf);
- }
- }
-
- xmlSaveFormatFile(filename.c_str(), xml_doc, 1); // 1 == pretty print
-
- xmlFreeDoc(xml_doc);
- xmlCleanupParser();
-}
-
-
-/** Build a NodeModel given a pointer to a Node in a patch file.
- */
-NodeModel*
-PatchLibrarian::parse_node(const PatchModel* parent, xmlDocPtr doc, const xmlNodePtr node)
-{
- NodeModel* nm = new NodeModel("/UNINITIALIZED"); // FIXME: ew
- PluginModel* plugin = new PluginModel();
-
- xmlChar* key;
- xmlNodePtr cur = node->xmlChildrenNode;
-
- bool found_name = false;
-
- while (cur != NULL) {
- key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
- nm->set_path(parent->base_path() + (char*)key);
- found_name = true;
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"polyphonic"))) {
- nm->polyphonic(!strcmp((char*)key, "true"));
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"type"))) {
- plugin->set_type((const char*)key);
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"library-name"))) {
- plugin->lib_name((char*)key);
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"plugin-label"))) {
- plugin->plug_label((char*)key);
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"plugin-uri"))) {
- plugin->uri((char*)key);
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"port"))) {
- xmlNodePtr child = cur->xmlChildrenNode;
-
- string path;
- float user_min = 0.0;
- float user_max = 0.0;
-
- while (child != NULL) {
- key = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(child->name, (const xmlChar*)"name"))) {
- path = nm->base_path() + (char*)key;
- } else if ((!xmlStrcmp(child->name, (const xmlChar*)"user-min"))) {
- user_min = atof((char*)key);
- } else if ((!xmlStrcmp(child->name, (const xmlChar*)"user-max"))) {
- user_max = atof((char*)key);
- }
-
- xmlFree(key);
- key = NULL; // Avoid a (possible?) double free
-
- child = child->next;
- }
-
- // FIXME: nasty assumptions
- PortModel* pm = new PortModel(path,
- PortModel::CONTROL, PortModel::INPUT, PortModel::NONE,
- 0.0, user_min, user_max);
- nm->add_port(pm);
-
- // DSSI hacks. Stored in the patch files as special elements, but sent to
- // the engine as normal metadata with specially formatted key/values. Not
- // sure if this is the best way to go about this, but it's the least damaging
- // right now
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"dssi-program"))) {
- xmlNodePtr child = cur->xmlChildrenNode;
-
- string bank;
- string program;
-
- while (child != NULL) {
- key = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(child->name, (const xmlChar*)"bank"))) {
- bank = (char*)key;
- } else if ((!xmlStrcmp(child->name, (const xmlChar*)"program"))) {
- program = (char*)key;
- }
-
- xmlFree(key);
- key = NULL; // Avoid a (possible?) double free
- child = child->next;
- }
- nm->set_metadata("dssi-program", bank +"/"+ program);
-
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"dssi-configure"))) {
- xmlNodePtr child = cur->xmlChildrenNode;
-
- string dssi_key;
- string dssi_value;
-
- while (child != NULL) {
- key = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(child->name, (const xmlChar*)"key"))) {
- dssi_key = (char*)key;
- } else if ((!xmlStrcmp(child->name, (const xmlChar*)"value"))) {
- dssi_value = (char*)key;
- }
-
- xmlFree(key);
- key = NULL; // Avoid a (possible?) double free
-
- child = child->next;
- }
- nm->set_metadata(string("dssi-configure--").append(dssi_key), dssi_value);
-
- } else { // Don't know what this tag is, add it as metadata
- if (key != NULL)
- nm->set_metadata((const char*)cur->name, (const char*)key);
- }
- xmlFree(key);
- key = NULL;
-
- cur = cur->next;
- }
-
- if (nm->path() == "") {
- cerr << "[PatchLibrarian] Malformed patch file (node tag has empty children)" << endl;
- cerr << "[PatchLibrarian] Node ignored." << endl;
- delete nm;
- return NULL;
- } else {
- nm->plugin(plugin);
- return nm;
- }
-}
-
-
-void
-PatchLibrarian::load_subpatch(PatchModel* parent, xmlDocPtr doc, const xmlNodePtr subpatch)
-{
- xmlChar *key;
- xmlNodePtr cur = subpatch->xmlChildrenNode;
-
- PatchModel* pm = new PatchModel("/UNINITIALIZED", 1); // FIXME: ew
-
- while (cur != NULL) {
- key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
- if (parent == NULL)
- pm->set_path(string("/") + (const char*)key);
- else
- pm->set_path(parent->base_path() + (const char*)key);
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"polyphony"))) {
- pm->poly(atoi((const char*)key));
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"filename"))) {
- pm->filename((const char*)key);
- } else { // Don't know what this tag is, add it as metadata
- if (key != NULL && strlen((const char*)key) > 0)
- pm->set_metadata((const char*)cur->name, (const char*)key);
- }
- xmlFree(key);
- key = NULL;
-
- cur = cur->next;
- }
-
- // This needs to be done after setting the path above, to prevent
- // NodeModel::set_path from calling it's parent's rename_node with
- // an invalid (nonexistant) name
- pm->set_parent(parent);
-
- load_patch(pm, false);
-}
-
-
-/** Build a ConnectionModel given a pointer to a connection in a patch file.
- */
-ConnectionModel*
-PatchLibrarian::parse_connection(const PatchModel* parent, xmlDocPtr doc, const xmlNodePtr node)
-{
- //cerr << "[PatchLibrarian] Parsing connection..." << endl;
-
- xmlChar *key;
- xmlNodePtr cur = node->xmlChildrenNode;
-
- string source_node, source_port, dest_node, dest_port;
-
- while (cur != NULL) {
- key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"source-node"))) {
- source_node = (char*)key;
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"source-port"))) {
- source_port = (char*)key;
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"destination-node"))) {
- dest_node = (char*)key;
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"destination-port"))) {
- dest_port = (char*)key;
- }
-
- xmlFree(key);
- key = NULL; // Avoid a (possible?) double free
-
- cur = cur->next;
- }
-
- if (source_node == "" || source_port == "" || dest_node == "" || dest_port == "") {
- cerr << "[PatchLibrarian] Malformed patch file (connection tag has empty children)" << endl;
- cerr << "[PatchLibrarian] Connection ignored." << endl;
- return NULL;
- }
-
- // FIXME: temporary compatibility, remove any slashes from port names
- // remove this soon once patches have migrated
- string::size_type slash_index;
- while ((slash_index = source_port.find("/")) != string::npos)
- source_port[slash_index] = '-';
-
- while ((slash_index = dest_port.find("/")) != string::npos)
- dest_port[slash_index] = '-';
-
- ConnectionModel* cm = new ConnectionModel(parent->base_path() + source_node +"/"+ source_port,
- parent->base_path() + dest_node +"/"+ dest_port);
-
- return cm;
-}
-
-
-/** Build a PresetModel given a pointer to a preset in a patch file.
- */
-PresetModel*
-PatchLibrarian::parse_preset(const PatchModel* patch, xmlDocPtr doc, const xmlNodePtr node)
-{
- xmlNodePtr cur = node->xmlChildrenNode;
- xmlChar* key;
-
- PresetModel* pm = new PresetModel(patch->base_path());
-
- while (cur != NULL) {
- key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
- assert(key != NULL);
- pm->name((char*)key);
- } else if ((!xmlStrcmp(cur->name, (const xmlChar*)"control"))) {
- xmlNodePtr child = cur->xmlChildrenNode;
-
- string node_name = "", port_name = "";
- float val = 0.0;
-
- while (child != NULL) {
- key = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
-
- if ((!xmlStrcmp(child->name, (const xmlChar*)"node-name"))) {
- node_name = (char*)key;
- } else if ((!xmlStrcmp(child->name, (const xmlChar*)"port-name"))) {
- port_name = (char*)key;
- } else if ((!xmlStrcmp(child->name, (const xmlChar*)"value"))) {
- val = atof((char*)key);
- }
-
- xmlFree(key);
- key = NULL; // Avoid a (possible?) double free
-
- child = child->next;
- }
-
- if (port_name == "") {
- string msg = "Unable to parse control in patch file ( node = ";
- msg.append(node_name).append(", port = ").append(port_name).append(")");
- m_client_hooks->error(msg);
- } else {
- // FIXME: temporary compatibility, remove any slashes from port name
- // remove this soon once patches have migrated
- string::size_type slash_index;
- while ((slash_index = port_name.find("/")) != string::npos)
- port_name[slash_index] = '-';
- pm->add_control(node_name, port_name, val);
- }
- }
- xmlFree(key);
- key = NULL;
- cur = cur->next;
- }
- if (pm->name() == "") {
- m_client_hooks->error("Preset in patch file has no name.");
- pm->name("Unnamed");
- }
-
- return pm;
-}
-#endif
-
-
-} // namespace LibOmClient
diff --git a/src/clients/new/PatchLibrarian.h b/src/clients/new/PatchLibrarian.h
deleted file mode 100644
index ac69f0f5..00000000
--- a/src/clients/new/PatchLibrarian.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This file is part of Om. Copyright (C) 2005 Dave Robillard.
- *
- * Om is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Om is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PATCHLIBRARIAN_H
-#define PATCHLIBRARIAN_H
-
-#include <string>
-#include <libxml/tree.h>
-#include "util/Path.h"
-#include "EngineInterface.h"
-using std::string;
-using Om::Path;
-using Om::Shared::EngineInterface;
-
-namespace LibOmClient {
-
-
-/** Loads patch files, sending the necessary messages to an EngineInterface
- * to recreate the patch.
- *
- * Because this only uses EngineInterface, this same code can be used to load
- * patches client side or server side.
- *
- * \ingroup libomclient
- */
-class PatchLibrarian
-{
-public:
-
- //static void save_patch(PatchModel* patch_model, const string& filename, bool recursive);
-
- static bool
- PatchLibrarian::load_patch(EngineInterface* engine,
- const string& filename,
- const Path& parent_path = "/",
- string name = "",
- uint32_t poly = 0);
-
-private:
- PatchLibrarian() {}
-
- /*
- static NodeModel* parse_node(const PatchModel* parent, xmlDocPtr doc, const xmlNodePtr cur);
- static ConnectionModel* parse_connection(const PatchModel* parent, xmlDocPtr doc, const xmlNodePtr cur);
- static PresetModel* parse_preset(const PatchModel* parent, xmlDocPtr doc, const xmlNodePtr cur);
- static void load_subpatch(PatchModel* parent, xmlDocPtr doc, const xmlNodePtr cur);
- */
-};
-
-
-} // namespace LibOmClient
-
-#endif // PATCHLIBRARIAN_H
diff --git a/src/clients/new/patch_loader/Makefile.am b/src/clients/new/patch_loader/Makefile.am
deleted file mode 100644
index 1448ac92..00000000
--- a/src/clients/new/patch_loader/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-EXTRA_DIST = README
-
-om_patch_loader_CXXFLAGS = -I$(top_srcdir)/src/clients -I$(top_srcdir)/src/common/util -I$(top_srcdir)/src/common/interface -DPKGDATADIR=\"$(pkgdatadir)\" $(LXML2_CFLAGS) $(LOSC_CFLAGS)
-om_patch_loader_LDADD = ../libomclient.a $(LOSC_LIBS) $(LXML2_LIBS)
-
-bin_PROGRAMS = om_patch_loader
-
-om_patch_loader_DEPENDENCIES = ../libomclient.a
-
-om_patch_loader_SOURCES = \
- patch_loader.cpp \
- cmdline.h \
- cmdline.c
diff --git a/src/clients/new/patch_loader/patch_loader.cpp b/src/clients/new/patch_loader/patch_loader.cpp
deleted file mode 100644
index 8884e85b..00000000
--- a/src/clients/new/patch_loader/patch_loader.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/* This file is part of Om. Copyright (C) 2005 Dave Robillard.
- *
- * Om is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Om is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <iostream>
-#include <unistd.h>
-#include "cmdline.h" // generated by gengetopt
-#include "util/Path.h"
-#include "OSCEngineInterface.h"
-#include "PatchLibrarian.h"
-
-using std::cout; using std::cerr; using std::endl;
-using Om::Path;
-
-using namespace LibOmClient;
-
-
-int
-main(int argc, char** argv)
-{
- const char* engine_url = NULL;
- int client_port = 0;
-
- /* Parse command line options */
- gengetopt_args_info args_info;
- if (cmdline_parser (argc, argv, &args_info) != 0)
- return 1;
-
- if (args_info.engine_url_given) {
- engine_url = args_info.engine_url_arg;
- } else {
- cout << "[Main] No engine URL specified. Attempting to use osc.udp://localhost:16180" << endl;
- engine_url = "osc.udp://localhost:16180";
- }
-
- if (args_info.client_port_given)
- client_port = args_info.client_port_arg;
- else
- client_port = 0; // will choose a free port automatically
-
- OSCEngineInterface engine(engine_url);
-
- /* Connect to engine */
- if (!engine.attach()) {
- cerr << "Unable to connect to engine" << endl;
- return 1;
- }
-
- engine.activate();
- engine.register_client();
-
- /*int id = engine.get_next_request_id();
- engine.set_wait_response_id(id);
- engine.load_plugins(id);
- engine.wait_for_response();
- */
- engine.load_plugins();
-
- // Load patches
- for (uint i=0; i < args_info.inputs_num; ++i)
- PatchLibrarian::load_patch(&engine, args_info.inputs[i]);
-
- return 0;
-}
diff --git a/src/clients/patch_loader/README b/src/clients/patch_loader/README
deleted file mode 100644
index 9f3b6f4b..00000000
--- a/src/clients/patch_loader/README
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a stand-alone patch loader for Om. It has no user interface, it
-just launches, loads the patch(es) passed as a parameter, and exits.
-
-Useful for loading patches from scripts, other apps, etc. or just using
-Om patches without loading the GUI.
diff --git a/src/clients/patch_loader/cmdline.c b/src/clients/patch_loader/cmdline.c
deleted file mode 100644
index 0606cb7b..00000000
--- a/src/clients/patch_loader/cmdline.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- File autogenerated by gengetopt version 2.10
- generated with the following command:
- gengetopt -u
-
- The developers of gengetopt consider the fixed text that goes in all
- gengetopt output files to be in the public domain:
- we make no copyright claims on it.
-*/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* If we use autoconf. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "getopt.h"
-
-#include "cmdline.h"
-
-void
-cmdline_parser_print_version (void)
-{
- printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
-}
-
-void
-cmdline_parser_print_help (void)
-{
- cmdline_parser_print_version ();
- printf("\n"
- "Usage: %s [OPTIONS]... [FILES]...\n", CMDLINE_PARSER_PACKAGE);
- printf(" -h --help Print help and exit\n");
- printf(" -V --version Print version and exit\n");
- printf(" -uSTRING --engine-url=STRING Om engine URL to connect to\n");
- printf(" -pINT --client-port=INT Client port to listen on\n");
-}
-
-
-static char *gengetopt_strdup (const char *s);
-
-/* gengetopt_strdup() */
-/* strdup.c replacement of strdup, which is not standard */
-char *
-gengetopt_strdup (const char *s)
-{
- char *result = (char*)malloc(strlen(s) + 1);
- if (result == (char*)0)
- return (char*)0;
- strcpy(result, s);
- return result;
-}
-
-int
-cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
-{
- int c; /* Character of the parsed option. */
- int missing_required_options = 0;
-
- args_info->help_given = 0 ;
- args_info->version_given = 0 ;
- args_info->engine_url_given = 0 ;
- args_info->client_port_given = 0 ;
-#define clear_args() { \
- args_info->engine_url_arg = NULL; \
-}
-
- clear_args();
-
- args_info->inputs = NULL;
- args_info->inputs_num = 0;
-
- optarg = 0;
- optind = 1;
- opterr = 1;
- optopt = '?';
-
- while (1)
- {
- int option_index = 0;
- char *stop_char;
-
- static struct option long_options[] = {
- { "help", 0, NULL, 'h' },
- { "version", 0, NULL, 'V' },
- { "engine-url", 1, NULL, 'u' },
- { "client-port", 1, NULL, 'p' },
- { NULL, 0, NULL, 0 }
- };
-
- stop_char = 0;
- c = getopt_long (argc, argv, "hVu:p:", long_options, &option_index);
-
- if (c == -1) break; /* Exit from `while (1)' loop. */
-
- switch (c)
- {
- case 'h': /* Print help and exit. */
- clear_args ();
- cmdline_parser_print_help ();
- exit (EXIT_SUCCESS);
-
- case 'V': /* Print version and exit. */
- clear_args ();
- cmdline_parser_print_version ();
- exit (EXIT_SUCCESS);
-
- case 'u': /* Om engine URL to connect to. */
- if (args_info->engine_url_given)
- {
- fprintf (stderr, "%s: `--engine-url' (`-u') option given more than once\n", CMDLINE_PARSER_PACKAGE);
- clear_args ();
- exit (EXIT_FAILURE);
- }
- args_info->engine_url_given = 1;
- args_info->engine_url_arg = gengetopt_strdup (optarg);
- break;
-
- case 'p': /* Client port to listen on. */
- if (args_info->client_port_given)
- {
- fprintf (stderr, "%s: `--client-port' (`-p') option given more than once\n", CMDLINE_PARSER_PACKAGE);
- clear_args ();
- exit (EXIT_FAILURE);
- }
- args_info->client_port_given = 1;
- args_info->client_port_arg = strtol (optarg,&stop_char,0);
- break;
-
-
- case 0: /* Long option with no short option */
-
- case '?': /* Invalid option. */
- /* `getopt_long' already printed an error message. */
- exit (EXIT_FAILURE);
-
- default: /* bug: option not considered. */
- fprintf (stderr, "%s: option unknown: %c\n", CMDLINE_PARSER_PACKAGE, c);
- abort ();
- } /* switch */
- } /* while */
-
-
- if ( missing_required_options )
- exit (EXIT_FAILURE);
-
- if (optind < argc)
- {
- int i = 0 ;
-
- args_info->inputs_num = argc - optind ;
- args_info->inputs =
- (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
- while (optind < argc)
- args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
- }
-
- return 0;
-}
diff --git a/src/clients/patch_loader/cmdline.ggo b/src/clients/patch_loader/cmdline.ggo
deleted file mode 100644
index 5acd6737..00000000
--- a/src/clients/patch_loader/cmdline.ggo
+++ /dev/null
@@ -1,7 +0,0 @@
-# Process this file with gengetopt -u to generate the necessary code (in cmdline.h, cmdline.c)
-
-package "om_patch_loader - A command line patch loading client for Om"
-
-option "engine-url" u "Om engine URL to connect to" string no
-option "client-port" p "Client port to listen on" int no
-
diff --git a/src/clients/patch_loader/cmdline.h b/src/clients/patch_loader/cmdline.h
deleted file mode 100644
index b417c664..00000000
--- a/src/clients/patch_loader/cmdline.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* cmdline.h */
-
-/* File autogenerated by gengetopt version 2.10 */
-
-#ifndef CMDLINE_H
-#define CMDLINE_H
-
-/* If we use autoconf. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifndef CMDLINE_PARSER_PACKAGE
-#define CMDLINE_PARSER_PACKAGE "om_patch_loader - A command line patch loading client for the Om realtime modular synthesizer"
-#endif
-
-#ifndef CMDLINE_PARSER_VERSION
-#define CMDLINE_PARSER_VERSION VERSION
-#endif
-
-struct gengetopt_args_info
-{
- char * engine_url_arg; /* Om engine URL to connect to. */
- int client_port_arg; /* Client port to listen on. */
-
- int help_given ; /* Whether help was given. */
- int version_given ; /* Whether version was given. */
- int engine_url_given ; /* Whether engine-url was given. */
- int client_port_given ; /* Whether client-port was given. */
-
- char **inputs ; /* unamed options */
- unsigned inputs_num ; /* unamed options number */
-} ;
-
-int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info);
-
-void cmdline_parser_print_help(void);
-void cmdline_parser_print_version(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* CMDLINE_H */
diff --git a/src/clients/ConnectionModel.cpp b/src/libs/client/ConnectionModel.cpp
index 1c7541b9..1c7541b9 100644
--- a/src/clients/ConnectionModel.cpp
+++ b/src/libs/client/ConnectionModel.cpp
diff --git a/src/clients/ConnectionModel.h b/src/libs/client/ConnectionModel.h
index ef909850..ef909850 100644
--- a/src/clients/ConnectionModel.h
+++ b/src/libs/client/ConnectionModel.h
diff --git a/src/clients/ControlModel.h b/src/libs/client/ControlModel.h
index 872dcca2..872dcca2 100644
--- a/src/clients/ControlModel.h
+++ b/src/libs/client/ControlModel.h
diff --git a/src/clients/DirectSigClientInterface.h b/src/libs/client/DirectSigClientInterface.h
index 12672a48..12672a48 100644
--- a/src/clients/DirectSigClientInterface.h
+++ b/src/libs/client/DirectSigClientInterface.h
diff --git a/src/clients/Makefile.am b/src/libs/client/Makefile.am
index 24e6a3bb..24e6a3bb 100644
--- a/src/clients/Makefile.am
+++ b/src/libs/client/Makefile.am
diff --git a/src/clients/ModelClientInterface.cpp b/src/libs/client/ModelClientInterface.cpp
index 46754161..46754161 100644
--- a/src/clients/ModelClientInterface.cpp
+++ b/src/libs/client/ModelClientInterface.cpp
diff --git a/src/clients/ModelClientInterface.h b/src/libs/client/ModelClientInterface.h
index 1f5ea09d..1f5ea09d 100644
--- a/src/clients/ModelClientInterface.h
+++ b/src/libs/client/ModelClientInterface.h
diff --git a/src/clients/ModelEngineInterface.h b/src/libs/client/ModelEngineInterface.h
index aa041aef..aa041aef 100644
--- a/src/clients/ModelEngineInterface.h
+++ b/src/libs/client/ModelEngineInterface.h
diff --git a/src/clients/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index efdae494..efdae494 100644
--- a/src/clients/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
diff --git a/src/clients/NodeModel.h b/src/libs/client/NodeModel.h
index af4171ed..af4171ed 100644
--- a/src/clients/NodeModel.h
+++ b/src/libs/client/NodeModel.h
diff --git a/src/clients/OSCEngineInterface.cpp b/src/libs/client/OSCEngineInterface.cpp
index 5ac598f1..5ac598f1 100644
--- a/src/clients/OSCEngineInterface.cpp
+++ b/src/libs/client/OSCEngineInterface.cpp
diff --git a/src/clients/OSCEngineInterface.h b/src/libs/client/OSCEngineInterface.h
index 63157da1..63157da1 100644
--- a/src/clients/OSCEngineInterface.h
+++ b/src/libs/client/OSCEngineInterface.h
diff --git a/src/clients/OSCListener.cpp b/src/libs/client/OSCListener.cpp
index 503be47d..503be47d 100644
--- a/src/clients/OSCListener.cpp
+++ b/src/libs/client/OSCListener.cpp
diff --git a/src/clients/OSCListener.h b/src/libs/client/OSCListener.h
index d0b9cc1c..d0b9cc1c 100644
--- a/src/clients/OSCListener.h
+++ b/src/libs/client/OSCListener.h
diff --git a/src/clients/OSCModelEngineInterface.cpp b/src/libs/client/OSCModelEngineInterface.cpp
index 9e648141..9e648141 100644
--- a/src/clients/OSCModelEngineInterface.cpp
+++ b/src/libs/client/OSCModelEngineInterface.cpp
diff --git a/src/clients/OSCModelEngineInterface.h b/src/libs/client/OSCModelEngineInterface.h
index 4400a1b4..4400a1b4 100644
--- a/src/clients/OSCModelEngineInterface.h
+++ b/src/libs/client/OSCModelEngineInterface.h
diff --git a/src/clients/ObjectController.h b/src/libs/client/ObjectController.h
index c79ac24d..c79ac24d 100644
--- a/src/clients/ObjectController.h
+++ b/src/libs/client/ObjectController.h
diff --git a/src/clients/ObjectModel.cpp b/src/libs/client/ObjectModel.cpp
index cb196f8a..cb196f8a 100644
--- a/src/clients/ObjectModel.cpp
+++ b/src/libs/client/ObjectModel.cpp
diff --git a/src/clients/ObjectModel.h b/src/libs/client/ObjectModel.h
index be58a00f..be58a00f 100644
--- a/src/clients/ObjectModel.h
+++ b/src/libs/client/ObjectModel.h
diff --git a/src/clients/PatchLibrarian.cpp b/src/libs/client/PatchLibrarian.cpp
index 65323435..65323435 100644
--- a/src/clients/PatchLibrarian.cpp
+++ b/src/libs/client/PatchLibrarian.cpp
diff --git a/src/clients/PatchLibrarian.cpp.new b/src/libs/client/PatchLibrarian.cpp.new
index dc05c9e3..dc05c9e3 100644
--- a/src/clients/PatchLibrarian.cpp.new
+++ b/src/libs/client/PatchLibrarian.cpp.new
diff --git a/src/clients/PatchLibrarian.h b/src/libs/client/PatchLibrarian.h
index ace91f24..ace91f24 100644
--- a/src/clients/PatchLibrarian.h
+++ b/src/libs/client/PatchLibrarian.h
diff --git a/src/clients/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 829c9ca5..829c9ca5 100644
--- a/src/clients/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
diff --git a/src/clients/PatchModel.h b/src/libs/client/PatchModel.h
index 12871933..12871933 100644
--- a/src/clients/PatchModel.h
+++ b/src/libs/client/PatchModel.h
diff --git a/src/clients/PluginModel.h b/src/libs/client/PluginModel.h
index 85365d64..85365d64 100644
--- a/src/clients/PluginModel.h
+++ b/src/libs/client/PluginModel.h
diff --git a/src/clients/PortModel.h b/src/libs/client/PortModel.h
index 6d0895cf..6d0895cf 100644
--- a/src/clients/PortModel.h
+++ b/src/libs/client/PortModel.h
diff --git a/src/clients/PresetModel.h b/src/libs/client/PresetModel.h
index bd187dfc..bd187dfc 100644
--- a/src/clients/PresetModel.h
+++ b/src/libs/client/PresetModel.h
diff --git a/src/clients/SigClientInterface.h b/src/libs/client/SigClientInterface.h
index f384f239..f384f239 100644
--- a/src/clients/SigClientInterface.h
+++ b/src/libs/client/SigClientInterface.h
diff --git a/src/clients/ThreadedSigClientInterface.cpp b/src/libs/client/ThreadedSigClientInterface.cpp
index 860d91f6..860d91f6 100644
--- a/src/clients/ThreadedSigClientInterface.cpp
+++ b/src/libs/client/ThreadedSigClientInterface.cpp
diff --git a/src/clients/ThreadedSigClientInterface.h b/src/libs/client/ThreadedSigClientInterface.h
index 16259531..16259531 100644
--- a/src/clients/ThreadedSigClientInterface.h
+++ b/src/libs/client/ThreadedSigClientInterface.h
diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am
index ae0b3e53..3b425ba2 100644
--- a/src/libs/engine/Makefile.am
+++ b/src/libs/engine/Makefile.am
@@ -1,11 +1,13 @@
SUBDIRS = tests
DIST_SUBDIRS = events
-AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/engine/events -fno-exceptions -fno-rtti
+AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/libom_la -I$(top_srcdir)/src/engine/events -fno-exceptions -fno-rtti
MAINTAINERCLEANFILES = Makefile.in
-common_SOURCES = \
+LTLIBRARIES = libom.la
+
+libom_la_SOURCES = \
util.h \
tuning.h \
Node.h \
@@ -98,16 +100,13 @@ common_SOURCES = \
AudioDriver.h \
MidiDriver.h \
midi.h \
- ../common/util/Semaphore.h \
- ../common/util/types.h \
- ../common/util/Path.h \
- ../common/util/Queue.h \
- ../common/interface/ClientInterface.h \
- ../common/interface/EngineInterface.h \
- instantiations.cpp
-
-# Events
-common_SOURCES += \
+ ../libom_la/util/Semaphore.h \
+ ../libom_la/util/types.h \
+ ../libom_la/util/Path.h \
+ ../libom_la/util/Queue.h \
+ ../libom_la/interface/ClientInterface.h \
+ ../libom_la/interface/EngineInterface.h \
+ instantiations.cpp \
events/RegisterClientEvent.h \
events/RegisterClientEvent.cpp \
events/UnregisterClientEvent.h \
@@ -165,25 +164,25 @@ common_SOURCES += \
events/MidiLearnEvent.cpp
if WITH_JACK_MIDI
-common_SOURCES += \
+libom_la_SOURCES += \
JackMidiDriver.h \
JackMidiDriver.cpp
endif
if WITH_ALSA_MIDI
-common_SOURCES += \
+libom_la_SOURCES += \
AlsaMidiDriver.h \
AlsaMidiDriver.cpp
endif
if WITH_LADSPA
-common_SOURCES += \
+libom_la_SOURCES += \
LADSPAPlugin.h \
LADSPAPlugin.cpp
endif
if WITH_DSSI
-common_SOURCES += \
+libom_la_SOURCES += \
DSSIPlugin.h \
DSSIPlugin.cpp \
events/DSSIConfigureEvent.cpp \
@@ -197,63 +196,15 @@ common_SOURCES += \
endif
if WITH_LV2
-common_SOURCES += \
+libom_la_SOURCES += \
LV2Plugin.h \
LV2Plugin.cpp
endif
if WITH_LASH
-common_SOURCES += \
+libom_la_SOURCES += \
LashDriver.h \
LashDriver.cpp \
LashRestoreDoneEvent.h
endif
-
-#
-# Non-installed library to link stand-alone and in-process build against
-#
-
-noinst_LTLIBRARIES = libom.la
-libom_la_SOURCES = $(common_SOURCES)
-
-
-
-#
-# Stand-alone engine
-#
-if BUILD_ENGINE
-
-bin_PROGRAMS = om
-om_DEPENDENCIES = libom.la
-om_LDADD = @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ -lrt libom.la
-
-om_SOURCES = \
- main.cpp \
- cmdline.h \
- cmdline.c
-
-endif # BUILD_ENGINE
-
-
-
-#
-# Jack internal client
-#
-if BUILD_IN_PROCESS_ENGINE
-
-
-# FIXME: broken
-
-
-# FIXME: Figure out how to get this properly
-omdir = $(prefix)/lib/jack
-
-om_la_CFLAGS = -fPIC
-om_LTLIBRARIES = om.la
-om_la_LDFLAGS = -module -avoid-version @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@
-om_la_SOURCES = OmInProcess.cpp
-
-endif # BUILD_IN_PROCESS_ENGINE
-
-
diff --git a/src/clients/console/ConsoleClientHooks.cpp b/src/progs/console/ConsoleClientHooks.cpp
index 1a911c6a..1a911c6a 100644
--- a/src/clients/console/ConsoleClientHooks.cpp
+++ b/src/progs/console/ConsoleClientHooks.cpp
diff --git a/src/clients/console/ConsoleClientHooks.h b/src/progs/console/ConsoleClientHooks.h
index ceb6cd5a..ceb6cd5a 100644
--- a/src/clients/console/ConsoleClientHooks.h
+++ b/src/progs/console/ConsoleClientHooks.h
diff --git a/src/clients/console/Makefile.am b/src/progs/console/Makefile.am
index f46bdbad..f46bdbad 100644
--- a/src/clients/console/Makefile.am
+++ b/src/progs/console/Makefile.am
diff --git a/src/clients/console/README b/src/progs/console/README
index 79c629a5..79c629a5 100644
--- a/src/clients/console/README
+++ b/src/progs/console/README
diff --git a/src/clients/console/console_client.cpp b/src/progs/console/console_client.cpp
index 4e5586ce..4e5586ce 100644
--- a/src/clients/console/console_client.cpp
+++ b/src/progs/console/console_client.cpp
diff --git a/src/clients/console/patches/COPYING b/src/progs/console/patches/COPYING
index e265c4a3..e265c4a3 100644
--- a/src/clients/console/patches/COPYING
+++ b/src/progs/console/patches/COPYING
diff --git a/src/clients/console/patches/dssi_test.omp b/src/progs/console/patches/dssi_test.omp
index 0613a57b..0613a57b 100644
--- a/src/clients/console/patches/dssi_test.omp
+++ b/src/progs/console/patches/dssi_test.omp
diff --git a/src/clients/console/patches/filter_patch.omp b/src/progs/console/patches/filter_patch.omp
index acaad0c8..acaad0c8 100644
--- a/src/clients/console/patches/filter_patch.omp
+++ b/src/progs/console/patches/filter_patch.omp
diff --git a/src/clients/console/patches/old_super_simple_patch.omp b/src/progs/console/patches/old_super_simple_patch.omp
index 1abd3c23..1abd3c23 100644
--- a/src/clients/console/patches/old_super_simple_patch.omp
+++ b/src/progs/console/patches/old_super_simple_patch.omp
diff --git a/src/clients/console/patches/send_test.omp b/src/progs/console/patches/send_test.omp
index 579a3b80..579a3b80 100644
--- a/src/clients/console/patches/send_test.omp
+++ b/src/progs/console/patches/send_test.omp
diff --git a/src/clients/console/patches/simple_patch.omp b/src/progs/console/patches/simple_patch.omp
index aaa38827..aaa38827 100644
--- a/src/clients/console/patches/simple_patch.omp
+++ b/src/progs/console/patches/simple_patch.omp
diff --git a/src/clients/console/patches/super_simple_patch.omp b/src/progs/console/patches/super_simple_patch.omp
index 02dc63a2..02dc63a2 100644
--- a/src/clients/console/patches/super_simple_patch.omp
+++ b/src/progs/console/patches/super_simple_patch.omp
diff --git a/src/clients/console/patches/test_patch.omp b/src/progs/console/patches/test_patch.omp
index 04c0487b..04c0487b 100644
--- a/src/clients/console/patches/test_patch.omp
+++ b/src/progs/console/patches/test_patch.omp
diff --git a/src/clients/demolition/DemolitionClientInterface.cpp b/src/progs/demolition/DemolitionClientInterface.cpp
index e58371d4..e58371d4 100644
--- a/src/clients/demolition/DemolitionClientInterface.cpp
+++ b/src/progs/demolition/DemolitionClientInterface.cpp
diff --git a/src/clients/demolition/DemolitionClientInterface.h b/src/progs/demolition/DemolitionClientInterface.h
index 374008b5..374008b5 100644
--- a/src/clients/demolition/DemolitionClientInterface.h
+++ b/src/progs/demolition/DemolitionClientInterface.h
diff --git a/src/clients/demolition/DemolitionModel.cpp b/src/progs/demolition/DemolitionModel.cpp
index 786c08cd..786c08cd 100644
--- a/src/clients/demolition/DemolitionModel.cpp
+++ b/src/progs/demolition/DemolitionModel.cpp
diff --git a/src/clients/demolition/DemolitionModel.h b/src/progs/demolition/DemolitionModel.h
index 64e0cc61..64e0cc61 100644
--- a/src/clients/demolition/DemolitionModel.h
+++ b/src/progs/demolition/DemolitionModel.h
diff --git a/src/clients/demolition/Makefile.am b/src/progs/demolition/Makefile.am
index 4854f045..4854f045 100644
--- a/src/clients/demolition/Makefile.am
+++ b/src/progs/demolition/Makefile.am
diff --git a/src/clients/demolition/README b/src/progs/demolition/README
index 536d3481..536d3481 100644
--- a/src/clients/demolition/README
+++ b/src/progs/demolition/README
diff --git a/src/clients/demolition/cmdline.c b/src/progs/demolition/cmdline.c
index 11fcd108..11fcd108 100644
--- a/src/clients/demolition/cmdline.c
+++ b/src/progs/demolition/cmdline.c
diff --git a/src/clients/demolition/cmdline.ggo b/src/progs/demolition/cmdline.ggo
index 8fb68170..8fb68170 100644
--- a/src/clients/demolition/cmdline.ggo
+++ b/src/progs/demolition/cmdline.ggo
diff --git a/src/clients/demolition/cmdline.h b/src/progs/demolition/cmdline.h
index be56aafe..be56aafe 100644
--- a/src/clients/demolition/cmdline.h
+++ b/src/progs/demolition/cmdline.h
diff --git a/src/clients/demolition/demolition.cpp b/src/progs/demolition/demolition.cpp
index 84a08c84..84a08c84 100644
--- a/src/clients/demolition/demolition.cpp
+++ b/src/progs/demolition/demolition.cpp
diff --git a/src/clients/gtk/App.cpp b/src/progs/gtk/App.cpp
index 6b71b4ec..6b71b4ec 100644
--- a/src/clients/gtk/App.cpp
+++ b/src/progs/gtk/App.cpp
diff --git a/src/clients/gtk/App.h b/src/progs/gtk/App.h
index 1ba18962..1ba18962 100644
--- a/src/clients/gtk/App.h
+++ b/src/progs/gtk/App.h
diff --git a/src/clients/gtk/BreadCrumb.h b/src/progs/gtk/BreadCrumb.h
index f79ad363..f79ad363 100644
--- a/src/clients/gtk/BreadCrumb.h
+++ b/src/progs/gtk/BreadCrumb.h
diff --git a/src/clients/gtk/ConfigWindow.cpp b/src/progs/gtk/ConfigWindow.cpp
index db3bce18..db3bce18 100644
--- a/src/clients/gtk/ConfigWindow.cpp
+++ b/src/progs/gtk/ConfigWindow.cpp
diff --git a/src/clients/gtk/ConfigWindow.h b/src/progs/gtk/ConfigWindow.h
index caf1531f..caf1531f 100644
--- a/src/clients/gtk/ConfigWindow.h
+++ b/src/progs/gtk/ConfigWindow.h
diff --git a/src/clients/gtk/Configuration.cpp b/src/progs/gtk/Configuration.cpp
index e4882cc3..e4882cc3 100644
--- a/src/clients/gtk/Configuration.cpp
+++ b/src/progs/gtk/Configuration.cpp
diff --git a/src/clients/gtk/Configuration.h b/src/progs/gtk/Configuration.h
index f0f9bef9..f0f9bef9 100644
--- a/src/clients/gtk/Configuration.h
+++ b/src/progs/gtk/Configuration.h
diff --git a/src/clients/gtk/ConnectWindow.cpp b/src/progs/gtk/ConnectWindow.cpp
index 15bab62c..15bab62c 100644
--- a/src/clients/gtk/ConnectWindow.cpp
+++ b/src/progs/gtk/ConnectWindow.cpp
diff --git a/src/clients/gtk/ConnectWindow.h b/src/progs/gtk/ConnectWindow.h
index 8c0c7390..8c0c7390 100644
--- a/src/clients/gtk/ConnectWindow.h
+++ b/src/progs/gtk/ConnectWindow.h
diff --git a/src/clients/gtk/ControlGroups.cpp b/src/progs/gtk/ControlGroups.cpp
index de87be05..de87be05 100644
--- a/src/clients/gtk/ControlGroups.cpp
+++ b/src/progs/gtk/ControlGroups.cpp
diff --git a/src/clients/gtk/ControlGroups.h b/src/progs/gtk/ControlGroups.h
index ab1e3413..ab1e3413 100644
--- a/src/clients/gtk/ControlGroups.h
+++ b/src/progs/gtk/ControlGroups.h
diff --git a/src/clients/gtk/ControlInterface.cpp b/src/progs/gtk/ControlInterface.cpp
index 9ac6e07e..9ac6e07e 100644
--- a/src/clients/gtk/ControlInterface.cpp
+++ b/src/progs/gtk/ControlInterface.cpp
diff --git a/src/clients/gtk/ControlInterface.h b/src/progs/gtk/ControlInterface.h
index 8cba6a79..8cba6a79 100644
--- a/src/clients/gtk/ControlInterface.h
+++ b/src/progs/gtk/ControlInterface.h
diff --git a/src/clients/gtk/ControlPanel.cpp b/src/progs/gtk/ControlPanel.cpp
index f344e2c3..f344e2c3 100644
--- a/src/clients/gtk/ControlPanel.cpp
+++ b/src/progs/gtk/ControlPanel.cpp
diff --git a/src/clients/gtk/ControlPanel.h b/src/progs/gtk/ControlPanel.h
index 1f24344f..1f24344f 100644
--- a/src/clients/gtk/ControlPanel.h
+++ b/src/progs/gtk/ControlPanel.h
diff --git a/src/clients/gtk/Controller.cpp b/src/progs/gtk/Controller.cpp
index 05ebe84a..05ebe84a 100644
--- a/src/clients/gtk/Controller.cpp
+++ b/src/progs/gtk/Controller.cpp
diff --git a/src/clients/gtk/Controller.h b/src/progs/gtk/Controller.h
index fd516992..fd516992 100644
--- a/src/clients/gtk/Controller.h
+++ b/src/progs/gtk/Controller.h
diff --git a/src/clients/gtk/DSSIController.cpp b/src/progs/gtk/DSSIController.cpp
index 570211c7..570211c7 100644
--- a/src/clients/gtk/DSSIController.cpp
+++ b/src/progs/gtk/DSSIController.cpp
diff --git a/src/clients/gtk/DSSIController.h b/src/progs/gtk/DSSIController.h
index 53f6fc8b..53f6fc8b 100644
--- a/src/clients/gtk/DSSIController.h
+++ b/src/progs/gtk/DSSIController.h
diff --git a/src/clients/gtk/DSSIModule.cpp b/src/progs/gtk/DSSIModule.cpp
index 7dae48ac..7dae48ac 100644
--- a/src/clients/gtk/DSSIModule.cpp
+++ b/src/progs/gtk/DSSIModule.cpp
diff --git a/src/clients/gtk/DSSIModule.h b/src/progs/gtk/DSSIModule.h
index 2ad10c04..2ad10c04 100644
--- a/src/clients/gtk/DSSIModule.h
+++ b/src/progs/gtk/DSSIModule.h
diff --git a/src/clients/gtk/GladeFactory.cpp b/src/progs/gtk/GladeFactory.cpp
index e930c4c4..e930c4c4 100644
--- a/src/clients/gtk/GladeFactory.cpp
+++ b/src/progs/gtk/GladeFactory.cpp
diff --git a/src/clients/gtk/GladeFactory.h b/src/progs/gtk/GladeFactory.h
index a3ee1022..a3ee1022 100644
--- a/src/clients/gtk/GladeFactory.h
+++ b/src/progs/gtk/GladeFactory.h
diff --git a/src/clients/gtk/GtkClientInterface.cpp b/src/progs/gtk/GtkClientInterface.cpp
index 7bda1e9e..7bda1e9e 100644
--- a/src/clients/gtk/GtkClientInterface.cpp
+++ b/src/progs/gtk/GtkClientInterface.cpp
diff --git a/src/clients/gtk/GtkClientInterface.h b/src/progs/gtk/GtkClientInterface.h
index 7214ef19..7214ef19 100644
--- a/src/clients/gtk/GtkClientInterface.h
+++ b/src/progs/gtk/GtkClientInterface.h
diff --git a/src/clients/gtk/GtkObjectController.cpp b/src/progs/gtk/GtkObjectController.cpp
index 7277d346..7277d346 100644
--- a/src/clients/gtk/GtkObjectController.cpp
+++ b/src/progs/gtk/GtkObjectController.cpp
diff --git a/src/clients/gtk/GtkObjectController.h b/src/progs/gtk/GtkObjectController.h
index 4a09b9c7..4a09b9c7 100644
--- a/src/clients/gtk/GtkObjectController.h
+++ b/src/progs/gtk/GtkObjectController.h
diff --git a/src/clients/gtk/LashController.cpp b/src/progs/gtk/LashController.cpp
index d95d8515..d95d8515 100644
--- a/src/clients/gtk/LashController.cpp
+++ b/src/progs/gtk/LashController.cpp
diff --git a/src/clients/gtk/LashController.h b/src/progs/gtk/LashController.h
index f61c9f7f..f61c9f7f 100644
--- a/src/clients/gtk/LashController.h
+++ b/src/progs/gtk/LashController.h
diff --git a/src/clients/gtk/LoadPatchWindow.cpp b/src/progs/gtk/LoadPatchWindow.cpp
index 60f6e15f..60f6e15f 100644
--- a/src/clients/gtk/LoadPatchWindow.cpp
+++ b/src/progs/gtk/LoadPatchWindow.cpp
diff --git a/src/clients/gtk/LoadPatchWindow.h b/src/progs/gtk/LoadPatchWindow.h
index 7d7093bd..7d7093bd 100644
--- a/src/clients/gtk/LoadPatchWindow.h
+++ b/src/progs/gtk/LoadPatchWindow.h
diff --git a/src/clients/gtk/LoadPluginWindow.cpp b/src/progs/gtk/LoadPluginWindow.cpp
index b84ae39e..b84ae39e 100644
--- a/src/clients/gtk/LoadPluginWindow.cpp
+++ b/src/progs/gtk/LoadPluginWindow.cpp
diff --git a/src/clients/gtk/LoadPluginWindow.h b/src/progs/gtk/LoadPluginWindow.h
index adf11ab4..adf11ab4 100644
--- a/src/clients/gtk/LoadPluginWindow.h
+++ b/src/progs/gtk/LoadPluginWindow.h
diff --git a/src/clients/gtk/LoadSubpatchWindow.cpp b/src/progs/gtk/LoadSubpatchWindow.cpp
index fe02d772..fe02d772 100644
--- a/src/clients/gtk/LoadSubpatchWindow.cpp
+++ b/src/progs/gtk/LoadSubpatchWindow.cpp
diff --git a/src/clients/gtk/LoadSubpatchWindow.h b/src/progs/gtk/LoadSubpatchWindow.h
index 45efdd15..45efdd15 100644
--- a/src/clients/gtk/LoadSubpatchWindow.h
+++ b/src/progs/gtk/LoadSubpatchWindow.h
diff --git a/src/clients/gtk/Loader.cpp b/src/progs/gtk/Loader.cpp
index 643dc3c9..643dc3c9 100644
--- a/src/clients/gtk/Loader.cpp
+++ b/src/progs/gtk/Loader.cpp
diff --git a/src/clients/gtk/Loader.h b/src/progs/gtk/Loader.h
index 46b5f3a8..46b5f3a8 100644
--- a/src/clients/gtk/Loader.h
+++ b/src/progs/gtk/Loader.h
diff --git a/src/clients/gtk/Makefile.am b/src/progs/gtk/Makefile.am
index c92ae2b2..c92ae2b2 100644
--- a/src/clients/gtk/Makefile.am
+++ b/src/progs/gtk/Makefile.am
diff --git a/src/clients/gtk/MessagesWindow.cpp b/src/progs/gtk/MessagesWindow.cpp
index dfdc3750..dfdc3750 100644
--- a/src/clients/gtk/MessagesWindow.cpp
+++ b/src/progs/gtk/MessagesWindow.cpp
diff --git a/src/clients/gtk/MessagesWindow.h b/src/progs/gtk/MessagesWindow.h
index 5f5b86e6..5f5b86e6 100644
--- a/src/clients/gtk/MessagesWindow.h
+++ b/src/progs/gtk/MessagesWindow.h
diff --git a/src/clients/gtk/NewSubpatchWindow.cpp b/src/progs/gtk/NewSubpatchWindow.cpp
index dcc2cd2d..dcc2cd2d 100644
--- a/src/clients/gtk/NewSubpatchWindow.cpp
+++ b/src/progs/gtk/NewSubpatchWindow.cpp
diff --git a/src/clients/gtk/NewSubpatchWindow.h b/src/progs/gtk/NewSubpatchWindow.h
index 8421ea08..8421ea08 100644
--- a/src/clients/gtk/NewSubpatchWindow.h
+++ b/src/progs/gtk/NewSubpatchWindow.h
diff --git a/src/clients/gtk/NodeControlWindow.cpp b/src/progs/gtk/NodeControlWindow.cpp
index e40af67f..e40af67f 100644
--- a/src/clients/gtk/NodeControlWindow.cpp
+++ b/src/progs/gtk/NodeControlWindow.cpp
diff --git a/src/clients/gtk/NodeControlWindow.h b/src/progs/gtk/NodeControlWindow.h
index a9224de9..a9224de9 100644
--- a/src/clients/gtk/NodeControlWindow.h
+++ b/src/progs/gtk/NodeControlWindow.h
diff --git a/src/clients/gtk/NodeController.cpp b/src/progs/gtk/NodeController.cpp
index 57756877..57756877 100644
--- a/src/clients/gtk/NodeController.cpp
+++ b/src/progs/gtk/NodeController.cpp
diff --git a/src/clients/gtk/NodeController.h b/src/progs/gtk/NodeController.h
index ed2a6d59..ed2a6d59 100644
--- a/src/clients/gtk/NodeController.h
+++ b/src/progs/gtk/NodeController.h
diff --git a/src/clients/gtk/NodePropertiesWindow.cpp b/src/progs/gtk/NodePropertiesWindow.cpp
index 048f2513..048f2513 100644
--- a/src/clients/gtk/NodePropertiesWindow.cpp
+++ b/src/progs/gtk/NodePropertiesWindow.cpp
diff --git a/src/clients/gtk/NodePropertiesWindow.h b/src/progs/gtk/NodePropertiesWindow.h
index efff01bb..efff01bb 100644
--- a/src/clients/gtk/NodePropertiesWindow.h
+++ b/src/progs/gtk/NodePropertiesWindow.h
diff --git a/src/clients/gtk/OmFlowCanvas.cpp b/src/progs/gtk/OmFlowCanvas.cpp
index a7e41ea2..a7e41ea2 100644
--- a/src/clients/gtk/OmFlowCanvas.cpp
+++ b/src/progs/gtk/OmFlowCanvas.cpp
diff --git a/src/clients/gtk/OmFlowCanvas.h b/src/progs/gtk/OmFlowCanvas.h
index 2a553f5b..2a553f5b 100644
--- a/src/clients/gtk/OmFlowCanvas.h
+++ b/src/progs/gtk/OmFlowCanvas.h
diff --git a/src/clients/gtk/OmModule.cpp b/src/progs/gtk/OmModule.cpp
index 3a31b7f3..3a31b7f3 100644
--- a/src/clients/gtk/OmModule.cpp
+++ b/src/progs/gtk/OmModule.cpp
diff --git a/src/clients/gtk/OmModule.h b/src/progs/gtk/OmModule.h
index ebb36fe6..ebb36fe6 100644
--- a/src/clients/gtk/OmModule.h
+++ b/src/progs/gtk/OmModule.h
diff --git a/src/clients/gtk/OmPort.cpp b/src/progs/gtk/OmPort.cpp
index b43b8294..b43b8294 100644
--- a/src/clients/gtk/OmPort.cpp
+++ b/src/progs/gtk/OmPort.cpp
diff --git a/src/clients/gtk/OmPort.h b/src/progs/gtk/OmPort.h
index 69a867d5..69a867d5 100644
--- a/src/clients/gtk/OmPort.h
+++ b/src/progs/gtk/OmPort.h
diff --git a/src/clients/gtk/PatchController.cpp b/src/progs/gtk/PatchController.cpp
index 83ba62d9..83ba62d9 100644
--- a/src/clients/gtk/PatchController.cpp
+++ b/src/progs/gtk/PatchController.cpp
diff --git a/src/clients/gtk/PatchController.h b/src/progs/gtk/PatchController.h
index de4af5e4..de4af5e4 100644
--- a/src/clients/gtk/PatchController.h
+++ b/src/progs/gtk/PatchController.h
diff --git a/src/clients/gtk/PatchDescriptionWindow.cpp b/src/progs/gtk/PatchDescriptionWindow.cpp
index d10a9c0e..d10a9c0e 100644
--- a/src/clients/gtk/PatchDescriptionWindow.cpp
+++ b/src/progs/gtk/PatchDescriptionWindow.cpp
diff --git a/src/clients/gtk/PatchDescriptionWindow.h b/src/progs/gtk/PatchDescriptionWindow.h
index 7c00faab..7c00faab 100644
--- a/src/clients/gtk/PatchDescriptionWindow.h
+++ b/src/progs/gtk/PatchDescriptionWindow.h
diff --git a/src/clients/gtk/PatchTreeWindow.cpp b/src/progs/gtk/PatchTreeWindow.cpp
index 065f4d6a..065f4d6a 100644
--- a/src/clients/gtk/PatchTreeWindow.cpp
+++ b/src/progs/gtk/PatchTreeWindow.cpp
diff --git a/src/clients/gtk/PatchTreeWindow.h b/src/progs/gtk/PatchTreeWindow.h
index 3177e5e2..3177e5e2 100644
--- a/src/clients/gtk/PatchTreeWindow.h
+++ b/src/progs/gtk/PatchTreeWindow.h
diff --git a/src/clients/gtk/PatchView.cpp b/src/progs/gtk/PatchView.cpp
index e89428e9..e89428e9 100644
--- a/src/clients/gtk/PatchView.cpp
+++ b/src/progs/gtk/PatchView.cpp
diff --git a/src/clients/gtk/PatchView.h b/src/progs/gtk/PatchView.h
index ff6aebf9..ff6aebf9 100644
--- a/src/clients/gtk/PatchView.h
+++ b/src/progs/gtk/PatchView.h
diff --git a/src/clients/gtk/PatchWindow.cpp b/src/progs/gtk/PatchWindow.cpp
index 1513d473..1513d473 100644
--- a/src/clients/gtk/PatchWindow.cpp
+++ b/src/progs/gtk/PatchWindow.cpp
diff --git a/src/clients/gtk/PatchWindow.h b/src/progs/gtk/PatchWindow.h
index 54ea11ef..54ea11ef 100644
--- a/src/clients/gtk/PatchWindow.h
+++ b/src/progs/gtk/PatchWindow.h
diff --git a/src/clients/gtk/PortController.cpp b/src/progs/gtk/PortController.cpp
index ec05541b..ec05541b 100644
--- a/src/clients/gtk/PortController.cpp
+++ b/src/progs/gtk/PortController.cpp
diff --git a/src/clients/gtk/PortController.h b/src/progs/gtk/PortController.h
index cc2f9dc3..cc2f9dc3 100644
--- a/src/clients/gtk/PortController.h
+++ b/src/progs/gtk/PortController.h
diff --git a/src/clients/gtk/RenameWindow.cpp b/src/progs/gtk/RenameWindow.cpp
index bde9a2c1..bde9a2c1 100644
--- a/src/clients/gtk/RenameWindow.cpp
+++ b/src/progs/gtk/RenameWindow.cpp
diff --git a/src/clients/gtk/RenameWindow.h b/src/progs/gtk/RenameWindow.h
index 81dc96e3..81dc96e3 100644
--- a/src/clients/gtk/RenameWindow.h
+++ b/src/progs/gtk/RenameWindow.h
diff --git a/src/clients/gtk/Store.cpp b/src/progs/gtk/Store.cpp
index 97e556c9..97e556c9 100644
--- a/src/clients/gtk/Store.cpp
+++ b/src/progs/gtk/Store.cpp
diff --git a/src/clients/gtk/Store.h b/src/progs/gtk/Store.h
index 9fb4b270..9fb4b270 100644
--- a/src/clients/gtk/Store.h
+++ b/src/progs/gtk/Store.h
diff --git a/src/clients/gtk/SubpatchModule.cpp b/src/progs/gtk/SubpatchModule.cpp
index 9c0e78e4..9c0e78e4 100644
--- a/src/clients/gtk/SubpatchModule.cpp
+++ b/src/progs/gtk/SubpatchModule.cpp
diff --git a/src/clients/gtk/SubpatchModule.h b/src/progs/gtk/SubpatchModule.h
index 162779d7..162779d7 100644
--- a/src/clients/gtk/SubpatchModule.h
+++ b/src/progs/gtk/SubpatchModule.h
diff --git a/src/clients/gtk/cmdline.c b/src/progs/gtk/cmdline.c
index 11fcd108..11fcd108 100644
--- a/src/clients/gtk/cmdline.c
+++ b/src/progs/gtk/cmdline.c
diff --git a/src/clients/gtk/cmdline.ggo b/src/progs/gtk/cmdline.ggo
index d62cf521..d62cf521 100644
--- a/src/clients/gtk/cmdline.ggo
+++ b/src/progs/gtk/cmdline.ggo
diff --git a/src/clients/gtk/cmdline.h b/src/progs/gtk/cmdline.h
index e404ac2e..e404ac2e 100644
--- a/src/clients/gtk/cmdline.h
+++ b/src/progs/gtk/cmdline.h
diff --git a/src/clients/gtk/main.cpp b/src/progs/gtk/main.cpp
index 702d52f9..702d52f9 100644
--- a/src/clients/gtk/main.cpp
+++ b/src/progs/gtk/main.cpp
diff --git a/src/clients/gtk/om-icon.png b/src/progs/gtk/om-icon.png
index b26dd942..b26dd942 100644
--- a/src/clients/gtk/om-icon.png
+++ b/src/progs/gtk/om-icon.png
Binary files differ
diff --git a/src/clients/gtk/om_gtk.glade b/src/progs/gtk/om_gtk.glade
index abe5f254..abe5f254 100644
--- a/src/clients/gtk/om_gtk.glade
+++ b/src/progs/gtk/om_gtk.glade
diff --git a/src/clients/gtk/om_gtk.glade.bak b/src/progs/gtk/om_gtk.glade.bak
index 7714d1f3..7714d1f3 100644
--- a/src/clients/gtk/om_gtk.glade.bak
+++ b/src/progs/gtk/om_gtk.glade.bak
diff --git a/src/clients/gtk/om_gtk.gladep b/src/progs/gtk/om_gtk.gladep
index a8bd18bd..a8bd18bd 100644
--- a/src/clients/gtk/om_gtk.gladep
+++ b/src/progs/gtk/om_gtk.gladep
diff --git a/src/clients/gtk/om_gtk.gladep.bak b/src/progs/gtk/om_gtk.gladep.bak
index a8bd18bd..a8bd18bd 100644
--- a/src/clients/gtk/om_gtk.gladep.bak
+++ b/src/progs/gtk/om_gtk.gladep.bak
diff --git a/src/clients/gtk/singletons.cpp b/src/progs/gtk/singletons.cpp
index 75b441e9..75b441e9 100644
--- a/src/clients/gtk/singletons.cpp
+++ b/src/progs/gtk/singletons.cpp
diff --git a/src/progs/om/Makefile.am b/src/progs/om/Makefile.am
index ae0b3e53..2f503130 100644
--- a/src/progs/om/Makefile.am
+++ b/src/progs/om/Makefile.am
@@ -1,232 +1,15 @@
-SUBDIRS = tests
-DIST_SUBDIRS = events
-
-AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/engine/events -fno-exceptions -fno-rtti
+AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/engine -I$(top_srcdir)/src/engine/events -fno-exceptions -fno-rtti
MAINTAINERCLEANFILES = Makefile.in
-common_SOURCES = \
- util.h \
- tuning.h \
- Node.h \
- NodeBase.h \
- NodeBase.cpp \
- InternalNode.h \
- Patch.h \
- Patch.cpp \
- NodeFactory.h \
- NodeFactory.cpp \
- Om.h \
- Om.cpp \
- OmApp.h \
- OmApp.cpp \
- JackAudioDriver.h \
- JackAudioDriver.cpp \
- OSCReceiver.h \
- OSCReceiver.cpp \
- Responder.h \
- OSCResponder.h \
- OSCResponder.cpp \
- ClientKey.h \
- ClientBroadcaster.h \
- ClientBroadcaster.cpp \
- ObjectSender.h \
- ObjectSender.cpp \
- OSCClient.h \
- OSCClient.cpp \
- Buffer.h \
- Buffer.cpp \
- Port.h \
- Port.cpp \
- PortBase.h \
- PortBase.cpp \
- InputPort.h \
- InputPort.cpp \
- OutputPort.h \
- OutputPort.cpp \
- MidiMessage.h \
- MidiNoteNode.h \
- MidiNoteNode.cpp \
- MidiTriggerNode.h \
- MidiTriggerNode.cpp \
- MidiControlNode.h \
- MidiControlNode.cpp \
- BridgeNode.h \
- BridgeNode.cpp \
- ControlInputNode.h \
- ControlInputNode.cpp \
- ControlOutputNode.h \
- ControlOutputNode.cpp \
- AudioInputNode.h \
- AudioInputNode.cpp \
- AudioOutputNode.h \
- AudioOutputNode.cpp \
- MidiInputNode.h \
- MidiInputNode.cpp \
- MidiOutputNode.h \
- MidiOutputNode.cpp \
- Event.h \
- Event.cpp \
- QueuedEvent.h \
- EventSource.h \
- QueuedEventSource.h \
- QueuedEventSource.cpp \
- QueuedEngineInterface.h \
- QueuedEngineInterface.cpp \
- OmObject.h \
- Maid.h \
- Maid.cpp \
- MaidObject.h \
- Tree.h \
- ClientRecord.h \
- PortInfo.h \
- PluginLibrary.h \
- Plugin.h \
- Array.h \
- List.h \
- PostProcessor.h \
- PostProcessor.cpp \
- Connection.h \
- Connection.cpp \
- ConnectionBase.h \
- ConnectionBase.cpp \
- ObjectStore.h \
- ObjectStore.cpp \
- TransportNode.h \
- TransportNode.cpp \
- Driver.h \
- AudioDriver.h \
- MidiDriver.h \
- midi.h \
- ../common/util/Semaphore.h \
- ../common/util/types.h \
- ../common/util/Path.h \
- ../common/util/Queue.h \
- ../common/interface/ClientInterface.h \
- ../common/interface/EngineInterface.h \
- instantiations.cpp
-
-# Events
-common_SOURCES += \
- events/RegisterClientEvent.h \
- events/RegisterClientEvent.cpp \
- events/UnregisterClientEvent.h \
- events/UnregisterClientEvent.cpp \
- events/PingQueuedEvent.h \
- events/ActivateEvent.h \
- events/ActivateEvent.cpp \
- events/DeactivateEvent.h \
- events/DeactivateEvent.cpp \
- events/SetPortValueEvent.h \
- events/SetPortValueEvent.cpp \
- events/SetPortValueQueuedEvent.h \
- events/SetPortValueQueuedEvent.cpp \
- events/NoteOnEvent.h \
- events/NoteOnEvent.cpp \
- events/NoteOffEvent.h \
- events/NoteOffEvent.cpp \
- events/AllNotesOffEvent.h \
- events/AllNotesOffEvent.cpp \
- events/ConnectionEvent.h \
- events/ConnectionEvent.cpp \
- events/DisconnectionEvent.h \
- events/DisconnectionEvent.cpp \
- events/DisconnectNodeEvent.h \
- events/DisconnectNodeEvent.cpp \
- events/DisconnectPortEvent.h \
- events/DisconnectPortEvent.cpp \
- events/DestroyEvent.h \
- events/DestroyEvent.cpp \
- events/AddNodeEvent.h \
- events/AddNodeEvent.cpp \
- events/SetMetadataEvent.h \
- events/SetMetadataEvent.cpp \
- events/RequestMetadataEvent.h \
- events/RequestMetadataEvent.cpp \
- events/RequestPortValueEvent.h \
- events/RequestPortValueEvent.cpp \
- events/RequestAllObjectsEvent.h \
- events/RequestAllObjectsEvent.cpp \
- events/RequestPluginsEvent.h \
- events/RequestPluginsEvent.cpp \
- events/CreatePatchEvent.h \
- events/CreatePatchEvent.cpp \
- events/LoadPluginsEvent.h \
- events/LoadPluginsEvent.cpp \
- events/EnablePatchEvent.h \
- events/EnablePatchEvent.cpp \
- events/DisablePatchEvent.h \
- events/DisablePatchEvent.cpp \
- events/ClearPatchEvent.h \
- events/ClearPatchEvent.cpp \
- events/RenameEvent.h \
- events/RenameEvent.cpp \
- events/MidiLearnEvent.h \
- events/MidiLearnEvent.cpp
-
-if WITH_JACK_MIDI
-common_SOURCES += \
- JackMidiDriver.h \
- JackMidiDriver.cpp
-endif
-
-if WITH_ALSA_MIDI
-common_SOURCES += \
- AlsaMidiDriver.h \
- AlsaMidiDriver.cpp
-endif
-
-if WITH_LADSPA
-common_SOURCES += \
- LADSPAPlugin.h \
- LADSPAPlugin.cpp
-endif
-
-if WITH_DSSI
-common_SOURCES += \
- DSSIPlugin.h \
- DSSIPlugin.cpp \
- events/DSSIConfigureEvent.cpp \
- events/DSSIConfigureEvent.h \
- events/DSSIControlEvent.cpp \
- events/DSSIControlEvent.h \
- events/DSSIProgramEvent.cpp \
- events/DSSIProgramEvent.h \
- events/DSSIUpdateEvent.cpp \
- events/DSSIUpdateEvent.h
-endif
-
-if WITH_LV2
-common_SOURCES += \
- LV2Plugin.h \
- LV2Plugin.cpp
-endif
-
-if WITH_LASH
-common_SOURCES += \
- LashDriver.h \
- LashDriver.cpp \
- LashRestoreDoneEvent.h
-endif
-
-
-#
-# Non-installed library to link stand-alone and in-process build against
-#
-
-noinst_LTLIBRARIES = libom.la
-libom_la_SOURCES = $(common_SOURCES)
-
-
-
#
# Stand-alone engine
#
if BUILD_ENGINE
bin_PROGRAMS = om
-om_DEPENDENCIES = libom.la
-om_LDADD = @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ -lrt libom.la
+om_DEPENDENCIES = ../../libs/engine/libom.la
+om_LDADD = @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ -lrt ../../libs/engine/libom.la
om_SOURCES = \
main.cpp \
@@ -236,24 +19,25 @@ om_SOURCES = \
endif # BUILD_ENGINE
-
+##
+## Jack internal client
+##
+#if BUILD_IN_PROCESS_ENGINE
#
-# Jack internal client
#
-if BUILD_IN_PROCESS_ENGINE
-
-
-# FIXME: broken
-
-
-# FIXME: Figure out how to get this properly
-omdir = $(prefix)/lib/jack
+## FIXME: broken
+#
+#
+## FIXME: Figure out how to get this properly
+#omdir = $(prefix)/lib/jack
+#
+#om_la_CFLAGS = -fPIC
+#om_LTLIBRARIES = om.la
+#om_la_LDFLAGS = -module -avoid-version @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@
+#om_la_SOURCES = OmInProcess.cpp
+#
+#endif # BUILD_IN_PROCESS_ENGINE
-om_la_CFLAGS = -fPIC
-om_LTLIBRARIES = om.la
-om_la_LDFLAGS = -module -avoid-version @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@
-om_la_SOURCES = OmInProcess.cpp
-endif # BUILD_IN_PROCESS_ENGINE
diff --git a/src/libs/engine/cmdline.c b/src/progs/om/cmdline.c
index 6b7ddf6a..6b7ddf6a 100644
--- a/src/libs/engine/cmdline.c
+++ b/src/progs/om/cmdline.c
diff --git a/src/libs/engine/cmdline.ggo b/src/progs/om/cmdline.ggo
index 8c006ca7..8c006ca7 100644
--- a/src/libs/engine/cmdline.ggo
+++ b/src/progs/om/cmdline.ggo
diff --git a/src/libs/engine/cmdline.h b/src/progs/om/cmdline.h
index fe36a969..fe36a969 100644
--- a/src/libs/engine/cmdline.h
+++ b/src/progs/om/cmdline.h
diff --git a/src/libs/engine/main.cpp b/src/progs/om/main.cpp
index a69c7e76..a69c7e76 100644
--- a/src/libs/engine/main.cpp
+++ b/src/progs/om/main.cpp
diff --git a/src/clients/patch_loader/Makefile.am b/src/progs/patch_loader/Makefile.am
index 15e0c503..15e0c503 100644
--- a/src/clients/patch_loader/Makefile.am
+++ b/src/progs/patch_loader/Makefile.am
diff --git a/src/clients/new/patch_loader/README b/src/progs/patch_loader/README
index 9f3b6f4b..9f3b6f4b 100644
--- a/src/clients/new/patch_loader/README
+++ b/src/progs/patch_loader/README
diff --git a/src/clients/new/patch_loader/cmdline.c b/src/progs/patch_loader/cmdline.c
index 0606cb7b..0606cb7b 100644
--- a/src/clients/new/patch_loader/cmdline.c
+++ b/src/progs/patch_loader/cmdline.c
diff --git a/src/clients/new/patch_loader/cmdline.ggo b/src/progs/patch_loader/cmdline.ggo
index 5acd6737..5acd6737 100644
--- a/src/clients/new/patch_loader/cmdline.ggo
+++ b/src/progs/patch_loader/cmdline.ggo
diff --git a/src/clients/new/patch_loader/cmdline.h b/src/progs/patch_loader/cmdline.h
index b417c664..b417c664 100644
--- a/src/clients/new/patch_loader/cmdline.h
+++ b/src/progs/patch_loader/cmdline.h
diff --git a/src/clients/patch_loader/new_patch_loader.cpp b/src/progs/patch_loader/new_patch_loader.cpp
index 8884e85b..8884e85b 100644
--- a/src/clients/patch_loader/new_patch_loader.cpp
+++ b/src/progs/patch_loader/new_patch_loader.cpp
diff --git a/src/clients/patch_loader/patch_loader.cpp b/src/progs/patch_loader/patch_loader.cpp
index e8579ed7..e8579ed7 100644
--- a/src/clients/patch_loader/patch_loader.cpp
+++ b/src/progs/patch_loader/patch_loader.cpp
diff --git a/src/clients/python/Makefile.am b/src/progs/python/Makefile.am
index 017b1f4b..017b1f4b 100644
--- a/src/clients/python/Makefile.am
+++ b/src/progs/python/Makefile.am
diff --git a/src/clients/python/OSC.py b/src/progs/python/OSC.py
index 74eb5880..74eb5880 100755
--- a/src/clients/python/OSC.py
+++ b/src/progs/python/OSC.py
diff --git a/src/clients/python/omecho.py b/src/progs/python/omecho.py
index c0d2d3b1..c0d2d3b1 100644
--- a/src/clients/python/omecho.py
+++ b/src/progs/python/omecho.py
diff --git a/src/clients/python/omsynth.py b/src/progs/python/omsynth.py
index d7cfa5ab..d7cfa5ab 100644
--- a/src/clients/python/omsynth.py
+++ b/src/progs/python/omsynth.py
diff --git a/src/clients/python/scripts/Makefile.am b/src/progs/python/scripts/Makefile.am
index 3e070601..3e070601 100644
--- a/src/clients/python/scripts/Makefile.am
+++ b/src/progs/python/scripts/Makefile.am
diff --git a/src/clients/python/scripts/flatten.py b/src/progs/python/scripts/flatten.py
index eaf8084d..eaf8084d 100755
--- a/src/clients/python/scripts/flatten.py
+++ b/src/progs/python/scripts/flatten.py
diff --git a/src/clients/python/scripts/sillysinepatch.py b/src/progs/python/scripts/sillysinepatch.py
index ac51a080..ac51a080 100644
--- a/src/clients/python/scripts/sillysinepatch.py
+++ b/src/progs/python/scripts/sillysinepatch.py
diff --git a/src/clients/supercollider/Makefile.am b/src/progs/supercollider/Makefile.am
index 69661c73..69661c73 100644
--- a/src/clients/supercollider/Makefile.am
+++ b/src/progs/supercollider/Makefile.am
diff --git a/src/clients/supercollider/Om.sc b/src/progs/supercollider/Om.sc
index cb366d58..cb366d58 100644
--- a/src/clients/supercollider/Om.sc
+++ b/src/progs/supercollider/Om.sc
diff --git a/src/clients/supercollider/README b/src/progs/supercollider/README
index 020da8aa..020da8aa 100644
--- a/src/clients/supercollider/README
+++ b/src/progs/supercollider/README
diff --git a/src/clients/supercollider/example.sc b/src/progs/supercollider/example.sc
index 6186e433..6186e433 100644
--- a/src/clients/supercollider/example.sc
+++ b/src/progs/supercollider/example.sc