summaryrefslogtreecommitdiffstats
path: root/examples/lisp-esque
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-17 21:52:20 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-17 21:52:20 +0100
commita614d807813268768419bd4097ca3267993d319b (patch)
treeb02622de83371ff4c0db8fba3c3803acc461e389 /examples/lisp-esque
parentimplement _standardise, _manipulate, _linearise and _sigmoid (diff)
downloadblueshift-a614d807813268768419bd4097ca3267993d319b.tar.gz
blueshift-a614d807813268768419bd4097ca3267993d319b.tar.bz2
blueshift-a614d807813268768419bd4097ca3267993d319b.tar.xz
...
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--examples/lisp-esque5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/lisp-esque b/examples/lisp-esque
index b26631f..c419746 100644
--- a/examples/lisp-esque
+++ b/examples/lisp-esque
@@ -671,6 +671,7 @@ def _sigmoid(mods, args):
if red or green or blue:
args = [[arg[0] if red else None, arg[1] if green else None, arg[2] if blue else None] for arg in args]
adjustments.append(lambda monitor : sigmoid(*(args[monitor % len(args)])))
+ # TODO default
def _limits(mods, args):
@@ -736,12 +737,14 @@ def _manipulate(mods, args):
red = 'red' in mods
green = 'green' in mods
blue = 'blue' in mods
+ cie = 'cie' in mods
args = evaluate_tree(args, False)
args = [[arg, arg, arg] if isinstance(arg, str) else arg for arg in args]
args = [[None if a == 'nil' else eval(a) for a in arg] for arg in args]
if red or green or blue:
args = [[arg[0] if red else None, arg[1] if green else None, arg[2] if blue else None] for arg in args]
- adjustments.append(lambda monitor : manipulate(*(args[monitor % len(args)])))
+ adjustments.append(lambda monitor : (cie_manipulate if cie else manipulate)(*(args[monitor % len(args)])))
+ # TODO default
def _standardise(mods, args):