From a96166710faf2447ed10194d1829db5564b0dff9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 4 May 2007 03:59:38 +0000 Subject: Made engine, serialisation, client library, and GUI all dynamically loaded modules. Combined all executables into a single "ingen" program which can do everything. git-svn-id: http://svn.drobilla.net/lad/ingen@493 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/supercollider/Ingen.sc | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'src/progs/supercollider/Ingen.sc') diff --git a/src/progs/supercollider/Ingen.sc b/src/progs/supercollider/Ingen.sc index cb366d58..873c8c2b 100644 --- a/src/progs/supercollider/Ingen.sc +++ b/src/progs/supercollider/Ingen.sc @@ -1,6 +1,6 @@ // TODO: // * Keep track of established connections. -Om : Model { +Ingen : Model { classvar <>program = "om", <>patchLoader = "om_patch_loader"; classvar <>oscURL, uiClass; var OmInternalNode, - \LADSPA -> OmLADSPANode, - \DSSI -> OmDSSINode + \Internal -> IngenInternalNode, + \LADSPA -> IngenLADSPANode, + \DSSI -> IngenDSSINode ]; - uiClass = OmEmacsUI + uiClass = IngenEmacsUI } *new { | netaddr | ^super.new.init(netaddr) @@ -76,7 +76,7 @@ Om : Model { "response/error" -> {|id,text| requestHandlers.removeAt(id); allocator.free(id); - ("Om"+text).error } + ("Ingen"+text).error } ].collect({|a| var func = a.value; OSCresponder(addr, "/om/"++a.key, {|time,resp,msg| @@ -110,11 +110,11 @@ Om : Model { patch.changed(\newNode, node); } { if (patch.getNode(nodeName).class != nodeTypeMap[type]) { - ("Om sent an existng node with differing type"+path).warn + ("Ingen sent an existng node with differing type"+path).warn } } } { - ("Om tried to create node in non-existing patch"+patchPath).warn + ("Ingen tried to create node in non-existing patch"+patchPath).warn } } { ("Invalid path in node creation"+path).warn @@ -135,17 +135,17 @@ Om : Model { parent = this.getNode(basePath) ? this.getPatch(basePath); if (parent.notNil) { if (parent.hasPort(portName).not) { - port = OmPort.new(portName, parent, type, dir, hint, def, min, max); + port = IngenPort.new(portName, parent, type, dir, hint, def, min, max); parent.ports[portName.asSymbol] = port; parent.changed(\newPort, port) } { if (parent.getPort(portName).porttype != type) { - ("Om tried to create an already existing port with differing type" + ("Ingen tried to create an already existing port with differing type" +path).warn } } } { - ("Om tried to create port on non-existing object"+basePath).warn + ("Ingen tried to create port on non-existing object"+basePath).warn } } { ("Invalid path in port creation"+path).warn @@ -163,7 +163,7 @@ Om : Model { if (node.notNil) { node.parent.nodes.removeAt(node.name.asSymbol).free } { - ("Om attempting to remove non-existing node"+path).warn + ("Ingen attempting to remove non-existing node"+path).warn } }, "port_removal" -> {|path| @@ -171,7 +171,7 @@ Om : Model { if (port.notNil) { port.parent.ports.removeAt(port.name.asSymbol).free } { - ("Om attempting to remove non-existing port"+path).warn + ("Ingen attempting to remove non-existing port"+path).warn } }, "patch_destruction" -> {|path| @@ -179,7 +179,7 @@ Om : Model { if (patch.notNil) { patch.parent.patches.removeAt(patch.name.asSymbol).free } { - ("Om attempting to remove non-existing patch"+path).warn + ("Ingen attempting to remove non-existing patch"+path).warn } }, "program_add" -> {|path,bank,program,name| @@ -187,7 +187,7 @@ Om : Model { if (node.respondsTo(\prProgramAdd)) { node.prProgramAdd(bank,program,name) } { - ("Om tried to add program info to"+node).warn + ("Ingen tried to add program info to"+node).warn } } ].collect({|a| @@ -217,7 +217,7 @@ Om : Model { addr.sendMsg("/om/ping", id) }; requestHandlers.removeAt(id); - "Om engine boot failed".error; + "Ingen engine boot failed".error; } } getPatch {|path, mustExist=true| @@ -267,7 +267,7 @@ Om : Model { } at {|path|^this.getObject(path.asString)} *boot {|func| - ^Om.new.waitForBoot {|e| + ^Ingen.new.waitForBoot {|e| e.activate { e.register { e.loadPlugins { @@ -286,18 +286,18 @@ Om : Model { booting = true; if (addr.addr == 2130706433) { if (loadIntoJack) { - ("jack_load"+"-i"+addr.port+"Om"+"om").unixCmd + ("jack_load"+"-i"+addr.port+"Ingen"+"om").unixCmd } { (program+"-p"+addr.port).unixCmd } } { - "You have to manually boot Om now".postln + "You have to manually boot Ingen now".postln } } loadPatch {|patchPath| (patchLoader + patchPath).unixCmd } activate { | handler | this.sendReq("engine/activate", { - root = OmPatch("",nil,this); + root = IngenPatch("",nil,this); this.changed(\newPatch, root); handler.value }) @@ -377,7 +377,7 @@ Om : Model { } quit { if (loadIntoJack) { - ("jack_unload"+"Om").unixCmd; + ("jack_unload"+"Ingen").unixCmd; booting=false; requestResponders.do(_.remove); notificationResponders.do(_.remove); @@ -445,7 +445,7 @@ Om : Model { } } -OmMetadata { +IngenMetadata { var object, dict; *new {|obj|^super.new.metadataInit(obj)} metadataInit {|obj| @@ -463,22 +463,22 @@ OmMetadata { } } -OmObject : Model { +IngenObject : Model { var