diff --git a/DataTypes/NextTime.py b/attic/DataTypes/NextTime.py rename from DataTypes/NextTime.py rename to attic/DataTypes/NextTime.py diff --git a/DataTypes/dmx.py b/attic/DataTypes/dmx.py rename from DataTypes/dmx.py rename to attic/DataTypes/dmx.py diff --git a/DataTypes/dmxlevel.py b/attic/DataTypes/dmxlevel.py rename from DataTypes/dmxlevel.py rename to attic/DataTypes/dmxlevel.py diff --git a/NodeInstance.py b/attic/NodeInstance.py rename from NodeInstance.py rename to attic/NodeInstance.py diff --git a/NodeType.py b/attic/NodeType.py rename from NodeType.py rename to attic/NodeType.py diff --git a/Nodes/delay.py b/attic/Nodes/delay.py rename from Nodes/delay.py rename to attic/Nodes/delay.py diff --git a/Nodes/dmxout.py b/attic/Nodes/dmxout.py rename from Nodes/dmxout.py rename to attic/Nodes/dmxout.py diff --git a/Nodes/gamma.py b/attic/Nodes/gamma.py rename from Nodes/gamma.py rename to attic/Nodes/gamma.py diff --git a/Nodes/sine.py b/attic/Nodes/sine.py rename from Nodes/sine.py rename to attic/Nodes/sine.py diff --git a/Op.py b/attic/Op.py rename from Op.py rename to attic/Op.py diff --git a/Port.py b/attic/Port.py rename from Port.py rename to attic/Port.py diff --git a/attic/README b/attic/README new file mode 100644 --- /dev/null +++ b/attic/README @@ -0,0 +1,2 @@ +This is old code from various years, attempting to brainstorm models. +Many of the ideas in them are very outdated. diff --git a/StateManager.py b/attic/StateManager.py rename from StateManager.py rename to attic/StateManager.py diff --git a/nodes/delay.py b/nodes/delay.py deleted file mode 100644 --- a/nodes/delay.py +++ /dev/null @@ -1,14 +0,0 @@ -"""delay node outputs the input a fixed time later""" - - -class DelayOps(Ops): - def clocked(self, input, output, stateaccess): - stateaccess.buffer - - -class Delay(Node): - def __init__(self): - Node.__init__(self) - - def getnodeparams(self): - return {'delay':State.Time} diff --git a/nodes/gamma.py b/nodes/gamma.py deleted file mode 100644 --- a/nodes/gamma.py +++ /dev/null @@ -1,32 +0,0 @@ -"""node that performs a simple gamma (exp) function on its input""" - -class GammaOps(Ops): - def started(self, input, output, stateaccess): - self.startmeup(stateaccess) - def changed(self, input, output, stateaccess): - port.output = port.input ** stateaccess.gamma + stateaccess.offset - stateaccess.lastvalue = State.FloatingPoint(port.input) - - output = gamma(input) - # no timed function - def startmeup(self, stateaccess): - # whatever - pass - -class Gamma(Node): - def __init__(self): - Node.__init__(self) - self.node_params = {'gamma':State.FloatingPoint,'offset':State.FloatingPoint} - self.ops = GammaOps() - - def getnodeparams(self): - return self.node_params - - def getports(self): - return (Port('a', optional=1), - Port('b')) - - def __str__(self): - return "3" - -world.register_node(Gamma) diff --git a/nodes/sine.py b/nodes/sine.py deleted file mode 100644 --- a/nodes/sine.py +++ /dev/null @@ -1,21 +0,0 @@ -"""node that generates a sine wave""" - - -class SineGenerator(Node): - def op(self, input, output, stateaccess): - - # input and output have names - output.sin = stateaccess.magnitude * math.sin(stateaccess.phase+input.time) - - """ - # dict-style access for names with spaces - output['sin'] = input['ti me'] - # underscore magic for accessing names with spaces-- the port object makes - # this work - output.sin=input.ti_me - - input.time = input.money - """ - - def getports(self): - return OutputPort('sin'), InputPort('time'), InputPort('money')