Changeset - 5bcb950024af
bin/bumppad
Show inline comments
 
@@ -46,25 +46,26 @@ class pad(tk.Frame):
 

	
 
            root.bind(
 
                "<KeyPress-%s>" % key, lambda ev, sub=sub: self.bumpto(sub, 1))
 
            root.bind("<KeyRelease-%s>" % key,
 
                      lambda ev, sub=sub: self.bumpto(sub, 0))
 

	
 
    def bumpto(self, sub, lev):
 
        now = time.time()
 
        self.levs[sub] = lev * self.mag.get()
 
        self.master.after_idle(self.output)
 

	
 
    def output(self):
 
        dmx = sub_maxes(*[s * l for s, l in list(self.levs.items())]).get_dmx_list()
 
        dmx = sub_maxes(*[s * l
 
                          for s, l in list(self.levs.items())]).get_dmx_list()
 
        dmxclient.outputlevels(dmx, clientid="bumppad")
 

	
 

	
 
root = tk.Tk()
 
root.tk_setPalette("maroon4")
 
root.wm_title("bumppad")
 
mag = tk.DoubleVar()
 

	
 
tk.Label(root,
 
         text="Keypad press/release activate sub; 1..5 set mag",
 
         font="Helvetica -12 italic",
 
         anchor='w').pack(side='bottom', fill='x')
bin/collector
Show inline comments
 
#!bin/python
 
"""
 
Collector receives device attrs from multiple senders, combines
 
them, and sends output attrs to hardware. The combining part has
 
custom code for some attributes.
 

	
 
Input can be over http or zmq.
 
"""
 

	
 

	
 
from run_local import log
 

	
 
from rdflib import URIRef, Literal
 
from twisted.internet import reactor, utils
 
from txzmq import ZmqEndpoint, ZmqFactory, ZmqPullConnection
 
import json
 
import logging
 
import optparse
 
import time
 
import traceback
 
import cyclone.web, cyclone.websocket
 
from greplin import scales
bin/curvecalc
Show inline comments
 
#!bin/python
 
"""
 
now launches like this:
 
% bin/curvecalc http://light9.bigasterisk.com/show/dance2007/song1
 

	
 

	
 

	
 
todo: curveview should preserve more objects, for speed maybe
 

	
 
"""
 

	
 

	
 
import sys
 
import imp
 
sys.path.append('/usr/lib/python2.7/dist-packages')  # For gtk
 
from twisted.internet import gtk3reactor
 
gtk3reactor.install()
 
from twisted.internet import reactor
 

	
 
import time, textwrap, os, optparse, linecache, signal, traceback, json
 
import gi
 
from gi.repository import Gtk
 
from gi.repository import GObject
 
from gi.repository import Gdk
 
@@ -404,25 +403,26 @@ class Main(object):
 
    def onSave(self, *args):
 
        # only doing curves still. I hope to eliminate all this.
 
        log.info("saving curves")
 
        self.curveset.save()
 
        log.info("saved")
 

	
 
    def makeStatusLines(self, master):
 
        """various labels that listen for dispatcher signals"""
 
        for row, (signame, textfilter) in enumerate([
 
            ('input time', lambda t: "%.2fs" % t),
 
            ('output levels', lambda levels: textwrap.fill(
 
                "; ".join([
 
                    "%s:%.2f" % (n, v) for n, v in list(levels.items())[:2] if v > 0
 
                    "%s:%.2f" % (n, v) for n, v in list(levels.items())[:2] if v
 
                    > 0
 
                ]), 70)),
 
            ('update period', lambda t: "%.1fms" % (t * 1000)),
 
            ('update status', lambda x: str(x)),
 
        ]):
 
            key = Gtk.Label("%s:" % signame)
 
            value = Gtk.Label("")
 
            master.resize(row + 1, 2)
 
            master.attach(key, 0, 1, row, row + 1)
 
            master.attach(value, 1, 2, row, row + 1)
 
            key.set_alignment(1, 0)
 
            value.set_alignment(0, 0)
 

	
bin/dmxserver
Show inline comments
 
@@ -15,25 +15,24 @@ clients shall connect to the xmlrpc serv
 
  their PID (or some other cookie)
 

	
 
  a length-n list of 0..1 levels which will represent the channel
 
    values for the n first dmx channels.
 

	
 
server is port 8030; xmlrpc method is called outputlevels(pid,levellist).
 

	
 
todo:
 
  save dmx on quit and restore on restart
 
  if parport fails, run in dummy mode (and make an option for that too)
 
"""
 

	
 

	
 
from twisted.internet import reactor
 
from twisted.web import xmlrpc, server
 
import sys, time, os
 
from optparse import OptionParser
 
import run_local
 
import txosc.dispatch, txosc. async
 
from light9.io import ParportDMX, UsbDMX
 

	
 
from light9.updatefreq import Updatefreq
 
from light9 import networking
 

	
 
from txzmq import ZmqEndpoint, ZmqFactory, ZmqPullConnection, ZmqRequestTimeoutError
 
@@ -118,25 +117,25 @@ class XMLRPCServe(xmlrpc.XMLRPC):
 
        this runs in a loop"""
 

	
 
        purge_age = 10  # seconds
 

	
 
        reactor.callLater(1, self.purgeclients)
 

	
 
        now = time.time()
 
        cids = list(self.lastseen.keys())
 
        for cid in cids:
 
            lastseen = self.lastseen[cid]
 
            if lastseen < now - purge_age:
 
                print(("forgetting client %s (no activity for %s sec)" %
 
                      (cid, purge_age)))
 
                       (cid, purge_age)))
 
                try:
 
                    del self.clientlevels[cid]
 
                except KeyError:
 
                    pass
 
                del self.clientfreq[cid]
 
                del self.lastseen[cid]
 

	
 
    def sendlevels(self):
 
        """sends to dmx if levels have changed, or if we havent sent
 
        in a while"""
 

	
 
        reactor.callLater(self.calldelay, self.sendlevels)
 
@@ -175,26 +174,26 @@ class XMLRPCServe(xmlrpc.XMLRPC):
 
        self.combinedlevels = []
 
        for chan in range(0, self.parportdmx.dimmers):
 
            x = 0
 
            for clientlist in list(self.clientlevels.values()):
 
                if len(clientlist) > chan:
 
                    # clamp client levels to 0..1
 
                    cl = max(0, min(1, clientlist[chan]))
 
                    x = max(x, cl)
 
            self.combinedlevels.append(x)
 

	
 
    def printlevels(self):
 
        """write all the levels to stdout"""
 
        print("Levels:", "".join(
 
            ["% 2d " % (x * 100) for x in self.combinedlevels]))
 
        print("Levels:",
 
              "".join(["% 2d " % (x * 100) for x in self.combinedlevels]))
 

	
 
    def printstats(self):
 
        """print the clock, freq, etc, with a \r at the end"""
 

	
 
        sys.stdout.write("dmxserver up at %s, [polls %s] " % (
 
            time.strftime("%H:%M:%S"),
 
            str(self.updatefreq),
 
        ))
 
        for cid, freq in list(self.clientfreq.items()):
 
            sys.stdout.write("[%s %s] " % (cid, str(freq)))
 
        sys.stdout.write("\r")
 
        sys.stdout.flush()
bin/effecteval
Show inline comments
 
#!bin/python
 

	
 

	
 
from run_local import log
 
from twisted.internet import reactor
 
from twisted.internet.defer import inlineCallbacks, returnValue
 
import cyclone.web, cyclone.websocket, cyclone.httpclient
 
import sys, optparse, logging, subprocess, json, itertools
 
from rdflib import URIRef, Literal
 

	
 
sys.path.append('/usr/lib/pymodules/python2.7/')  # for numpy, on rpi
 
sys.path.append('/usr/lib/python2.7/dist-packages')  # For numpy
 
from light9 import networking, showconfig
 
from light9.effecteval.effect import EffectNode
 
from light9.effect.edit import getMusicStatus, songNotePatch
bin/keyboardcomposer
Show inline comments
 
#!bin/python
 

	
 

	
 
from run_local import log
 
import cgi, time, logging
 
from optparse import OptionParser
 
import webcolors, colorsys
 
from louie import dispatcher
 
from twisted.internet import reactor, tksupport
 
from twisted.web import resource
 
from rdflib import URIRef, Literal
 
import tkinter.tix as tk
 

	
 
from light9.Fadable import Fadable
 
from light9.subclient import SubClient
 
@@ -492,27 +491,26 @@ class KeyboardComposer(tk.Frame, SubClie
 
                               predicate=L9['group'],
 
                               newObject=group)
 

	
 
    def highlight_row(self, row):
 
        row = self.rows[row]
 
        row['bg'] = 'red'
 

	
 
    def unhighlight_row(self, row):
 
        row = self.rows[row]
 
        row['bg'] = 'black'
 

	
 
    def get_levels(self):
 
        return dict([
 
            (uri, box.slider_var.get()) for uri, box in list(self.subbox.items())
 
        ])
 
        return dict([(uri, box.slider_var.get())
 
                     for uri, box in list(self.subbox.items())])
 

	
 
    def get_output_settings(self, _graph=None):
 
        _graph = _graph or self.graph
 
        outputSettings = []
 
        for setting in _graph.objects(self.session, L9['subSetting']):
 
            effect = _graph.value(setting, L9['sub'])
 
            strength = _graph.value(setting, L9['level'])
 
            if strength:
 
                now = time.time()
 
                out, report = self.effectEval[effect].outputFromEffect(
 
                    [(L9['strength'], strength)],
 
                    songTime=now,
bin/lightsim
Show inline comments
 
#!bin/python
 

	
 

	
 
import run_local
 
import sys, logging
 

	
 
sys.path.append("lib")
 
import qt4reactor
 
qt4reactor.install()
 

	
 
from twisted.internet import reactor
 
from twisted.internet.task import LoopingCall
 
from twisted.web.xmlrpc import Proxy
 
from louie import dispatcher
 
from PyQt4.QtGui import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QMainWindow
bin/paintserver
Show inline comments
 
#!bin/python
 

	
 

	
 
from run_local import log
 
import json
 
from twisted.internet import reactor
 
from light9.greplin_cyclone import StatsForCyclone
 
from rdfdb.syncedgraph import SyncedGraph
 
from light9 import networking, showconfig
 
from greplin import scales
 
import optparse, sys, logging
 
import cyclone.web
 
from rdflib import URIRef
 
from light9 import clientsession
 
import light9.paint.solve
bin/subcomposer
Show inline comments
 
@@ -7,25 +7,24 @@ subcomposer
 
    EditChoice widget
 
      can change currentSub to another sub
 

	
 
    Levelbox widget
 
      watch observable(currentSub) for a new sub, and also watch currentSub for edits to push to the OneLevel widgets
 

	
 
        OneLevel widget
 
          UI edits are caught here and go all the way back to currentSub
 

	
 

	
 
"""
 

	
 

	
 
from run_local import log
 
import time, logging
 

	
 
log.setLevel(logging.DEBUG)
 

	
 
from optparse import OptionParser
 
import logging, urllib.request, urllib.parse, urllib.error
 
import tkinter as tk
 
import louie as dispatcher
 
from twisted.internet import reactor, tksupport, task
 
from rdflib import URIRef, RDF, RDFS, Literal
 

	
 
@@ -152,26 +151,26 @@ class Subcomposer(tk.Frame):
 
            return u
 

	
 
        delQuads = self.currentSub().allQuads()
 
        addQuads = [(repl(s), p, repl(o), newUri) for s, p, o, c in delQuads]
 
        # patch can't span contexts yet
 
        self.graph.patch(Patch(addQuads=addQuads, delQuads=[]))
 
        self.graph.patch(Patch(addQuads=[], delQuads=delQuads))
 

	
 
    def setupSubChoiceLinks(self):
 
        graph = self.graph
 

	
 
        def ann():
 
            print("currently: session=%s currentSub=%r _currentChoice=%r" % (
 
                self.session, self.currentSub(), self._currentChoice()))
 
            print("currently: session=%s currentSub=%r _currentChoice=%r" %
 
                  (self.session, self.currentSub(), self._currentChoice()))
 

	
 
        @graph.addHandler
 
        def graphChanged():
 
            # some bug where SC is making tons of graph edits and many
 
            # are failing. this calms things down.
 
            log.warn('skip graphChanged')
 
            return
 

	
 
            s = graph.value(self.session, L9['currentSub'])
 
            log.debug('HANDLER getting session currentSub from graph: %s', s)
 
            if s is None:
 
                s = self.switchToLocal()
bin/tracker
Show inline comments
 
#!/usr/bin/python
 

	
 

	
 
import sys
 
sys.path.append("../../editor/pour")
 
sys.path.append("../light8")
 

	
 
from Submaster import Submaster
 
from skim.zooming import Zooming, Pair
 
from math import sqrt, sin, cos
 
from pygame.rect import Rect
 
from xmlnodebase import xmlnodeclass, collectiveelement, xmldocfile
 
from dispatch import dispatcher
 

	
 
import dmxclient
light9/collector/collector.py
Show inline comments
 

	
 
import time
 
import logging
 
from rdflib import Literal
 
from light9.namespaces import L9, RDF
 
from light9.collector.output import setListElem
 
from light9.collector.device import toOutputAttrs, resolve
 

	
 
# types only
 
from rdflib import Graph, URIRef
 
from typing import List, Dict, Tuple, Any, TypeVar, Generic
 
from light9.collector.output import Output
 

	
light9/collector/collector_client.py
Show inline comments
 

	
 
from light9 import networking
 
from light9.effect.settings import DeviceSettings
 
from twisted.internet import defer
 
from txzmq import ZmqEndpoint, ZmqFactory, ZmqPushConnection
 
import json, time, logging
 
import treq
 

	
 
log = logging.getLogger('coll_client')
 

	
 
_zmqClient = None
 

	
 

	
light9/collector/device.py
Show inline comments
 

	
 
import logging
 
import math
 
from light9.namespaces import L9, RDF, DEV
 
from rdflib import Literal
 
from webcolors import hex_to_rgb, rgb_to_hex
 
from colormath.color_objects import sRGBColor, CMYColor
 
import colormath.color_conversions
 

	
 
log = logging.getLogger('device')
 

	
 

	
 
class Device(object):
light9/collector/output.py
Show inline comments
 

	
 
from rdflib import URIRef
 
import sys
 
import time
 
import usb.core
 
import logging
 
from twisted.internet import task, threads, reactor
 
from greplin import scales
 
log = logging.getLogger('output')
 

	
 

	
 
# eliminate this: lists are always padded now
 
def setListElem(outList, index, value, fill=0, combine=lambda old, new: new):
light9/curvecalc/client.py
Show inline comments
 
@@ -3,22 +3,24 @@ client code for talking to curvecalc
 
"""
 
import cyclone.httpclient
 
from light9 import networking
 
import urllib.request, urllib.parse, urllib.error
 
from run_local import log
 

	
 

	
 
def sendLiveInputPoint(curve, value):
 
    f = cyclone.httpclient.fetch(networking.curveCalc.path('liveInputPoint'),
 
                                 method='POST',
 
                                 timeout=1,
 
                                 postdata=urllib.parse.urlencode({
 
                                     'curve': curve,
 
                                     'value': str(value),
 
                                     'curve':
 
                                     curve,
 
                                     'value':
 
                                     str(value),
 
                                 }))
 

	
 
    @f.addCallback
 
    def cb(result):
 
        if result.code // 100 != 2:
 
            raise ValueError("curveCalc said %s: %s", result.code, result.body)
 

	
 
    return f
light9/curvecalc/curve.py
Show inline comments
 

	
 
import glob, time, logging, ast, os
 
from bisect import bisect_left, bisect
 
import louie as dispatcher
 
from twisted.internet import reactor
 
from rdflib import Literal
 
from light9 import showconfig
 
from light9.namespaces import L9, RDF, RDFS
 
from rdfdb.patch import Patch
 

	
 
log = logging.getLogger()
 
# todo: move to config, consolidate with ascoltami, musicPad, etc
 
introPad = 4
light9/curvecalc/curveview.py
Show inline comments
 

	
 
import math, logging, traceback
 
from gi.repository import Gtk
 
from gi.repository import Gdk
 
from gi.repository import GooCanvas
 
import louie as dispatcher
 
from rdflib import Literal
 
from twisted.internet import reactor
 
from light9.curvecalc.zoomcontrol import RegionZoom
 
from light9.curvecalc import cursors
 
from light9.curvecalc.curve import introPad, postPad
 
from lib.goocanvas_compat import Points, polyline_new_line
 
import imp
 
@@ -546,26 +545,26 @@ class Curveview(object):
 
        """user pushed on a slider. make a new key.  if value is None,
 
        the value will be the same as the last."""
 
        if curve != self.curve:
 
            return
 

	
 
        if value is None:
 
            value = self.curve.eval(self.current_time())
 

	
 
        self.curve.insert_pt((self.current_time(), value))
 

	
 
    def print_state(self, msg=""):
 
        if 0:
 
            print("%s: dragging_dots=%s selecting=%s" % (
 
                msg, self.dragging_dots, self.selecting))
 
            print("%s: dragging_dots=%s selecting=%s" %
 
                  (msg, self.dragging_dots, self.selecting))
 

	
 
    def select_points(self, pts):
 
        """set selection to the given point values (tuples, not indices)"""
 
        idxs = []
 
        for p in pts:
 
            idxs.append(self.curve.points.index(p))
 
        self.select_indices(idxs)
 

	
 
    def select_indices(self, idxs):
 
        """set selection to these point indices. This is the only
 
        writer to self.selected_points"""
 
        self.selected_points = idxs
light9/curvecalc/zoomcontrol.py
Show inline comments
 

	
 
from gi.repository import Gtk
 
from gi.repository import GObject
 
from gi.repository import GooCanvas
 
import louie as dispatcher
 
from light9.curvecalc import cursors
 
from lib.goocanvas_compat import Points, polyline_new_line
 
from twisted.internet import reactor
 

	
 

	
 
class ZoomControl(object):
 
    """
 
    please pack .widget
light9/effect/effecteval.py
Show inline comments
 

	
 
from rdflib import URIRef, Literal
 
from light9.namespaces import L9, RDF, DEV
 
from webcolors import rgb_to_hex, hex_to_rgb
 
from colorsys import hsv_to_rgb
 
from decimal import Decimal
 
import math
 
import traceback
 
from noise import pnoise1
 
import logging
 
import time
 
from light9.effect.settings import DeviceSettings
 
from light9.effect.scale import scale
light9/effect/scale.py
Show inline comments
 

	
 
from rdflib import Literal
 
from decimal import Decimal
 
from webcolors import rgb_to_hex, hex_to_rgb
 

	
 

	
 
def scale(value, strength):
 
    if isinstance(value, Literal):
 
        value = value.toPython()
 

	
 
    if isinstance(value, Decimal):
 
        value = float(value)
 

	
light9/effect/sequencer.py
Show inline comments
 
'''
 
copies from effectloop.py, which this should replace
 
'''
 

	
 

	
 
from louie import dispatcher
 
from rdflib import URIRef
 
from twisted.internet import reactor
 
from twisted.internet import defer
 
from twisted.internet.inotify import INotify
 
from twisted.python.filepath import FilePath
 
import cyclone.sse
 
import logging, bisect, time
 
import traceback
 

	
 
from light9.namespaces import L9, RDF
 
from light9.vidref.musictime import MusicTime
light9/effect/settings.py
Show inline comments
 

	
 
"""
 
Data structure and convertors for a table of (device,attr,value)
 
rows. These might be effect attrs ('strength'), device attrs ('rx'),
 
or output attrs (dmx channel).
 
"""
 
import decimal
 
import numpy
 
from rdflib import URIRef, Literal
 
from light9.namespaces import RDF, L9, DEV
 
from rdfdb.patch import Patch
 
import logging
 
log = logging.getLogger('settings')
light9/effect/simple_outputs.py
Show inline comments
 

	
 
import traceback
 
from light9.namespaces import L9, RDF
 
from light9.effect.scale import scale
 

	
 

	
 
class SimpleOutputs(object):
 

	
 
    def __init__(self, graph):
 
        self.graph = graph
 

	
 
        # effect : [(dev, attr, value, isScaled)]
 
        self.effectOutputs = {}
light9/effecteval/effectloop.py
Show inline comments
 

	
 
import time, json, logging, traceback
 
import numpy
 
import serial
 
from twisted.internet import reactor, threads
 
from twisted.internet.defer import inlineCallbacks, returnValue, succeed
 
from twisted.internet.error import TimeoutError
 
from rdflib import URIRef, Literal
 
import cyclone.httpclient
 
from light9.namespaces import L9, RDF, RDFS
 
from light9.effecteval.effect import EffectNode
 
from light9 import Effects
 
from light9 import networking
 
@@ -173,26 +172,27 @@ class EffectLoop(object):
 
        # this would look nice on the top of the effecteval web pages too
 
        if log.isEnabledFor(logging.DEBUG):
 
            log.debug(self.logMessage(out))
 
        else:
 
            if now > self.lastLogTime + 5:
 
                msg = self.logMessage(out)
 
                if msg != self.lastLogMsg:
 
                    log.info(msg)
 
                    self.lastLogMsg = msg
 
                self.lastLogTime = now
 

	
 
    def logMessage(self, out):
 
        return ("send dmx: {%s}" % ", ".join(
 
            "%r: %.3g" % (str(k), v) for k, v in list(out.get_levels().items())))
 
        return ("send dmx: {%s}" %
 
                ", ".join("%r: %.3g" % (str(k), v)
 
                          for k, v in list(out.get_levels().items())))
 

	
 

	
 
Z = numpy.zeros((50, 3), dtype=numpy.float16)
 

	
 

	
 
class ControlBoard(object):
 

	
 
    def __init__(
 
            self,
 
            dev='/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A7027NYX-if00-port0'
 
    ):
 
        log.info('opening %s', dev)
light9/io/__init__.py
Show inline comments
 

	
 
import sys
 

	
 

	
 
class BaseIO(object):
 

	
 
    def __init__(self):
 
        self.dummy = 1
 
        self.__name__ = 'BaseIO'
 
        # please override and set __name__ to your class name
 

	
 
    def golive(self):
 
        """call this if you want to promote the dummy object becomes a live object"""
light9/io/udmx.py
Show inline comments
 

	
 
import logging
 
import usb.core
 
from usb.util import CTRL_TYPE_VENDOR, CTRL_RECIPIENT_DEVICE, CTRL_OUT
 

	
 
log = logging.getLogger('udmx')
 
"""
 
Send dmx to one of these:
 
http://www.amazon.com/Interface-Adapter-Controller-Lighting-Freestyler/dp/B00W52VIOS
 

	
 
[4520784.059479] usb 1-2.3: new low-speed USB device number 6 using xhci_hcd
 
[4520784.157410] usb 1-2.3: New USB device found, idVendor=16c0, idProduct=05dc
 
[4520784.157416] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
light9/paint/solve.py
Show inline comments
 

	
 
from light9.namespaces import RDF, L9, DEV
 
from PIL import Image
 
import numpy
 
import scipy.misc, scipy.ndimage, scipy.optimize
 
import cairo
 
import logging
 

	
 
from light9.effect.settings import DeviceSettings, parseHex, toHex
 

	
 
log = logging.getLogger('solve')
 

	
 
# numpy images in this file are (x, y, c) layout.
light9/paint/solve_test.py
Show inline comments
 
@@ -60,36 +60,36 @@ class TestSimulationLayers(unittest.Test
 
        self.solver.loadSamples()
 

	
 
    def testBlack(self):
 
        self.assertEqual([],
 
                         self.solver.simulationLayers(
 
                             settings=DeviceSettings(self.graph, [])))
 

	
 
    def testPerfect1Match(self):
 
        layers = self.solver.simulationLayers(
 
            settings=DeviceSettings(self.graph, [(
 
                DEV['aura1'], L9['color'],
 
                "#ffffff"), (DEV['aura1'], L9['rx'],
 
                              0.5), (DEV['aura1'], L9['ry'], 0.573)]))
 
                             0.5), (DEV['aura1'], L9['ry'], 0.573)]))
 
        self.assertEqual([{
 
            'path': CAM_TEST['bg2-d.jpg'],
 
            'color': (1., 1., 1.)
 
        }], layers)
 

	
 
    def testPerfect1MatchTinted(self):
 
        layers = self.solver.simulationLayers(
 
            settings=DeviceSettings(self.graph, [(
 
                DEV['aura1'], L9['color'],
 
                "#304050"), (DEV['aura1'], L9['rx'],
 
                              0.5), (DEV['aura1'], L9['ry'], 0.573)]))
 
                             0.5), (DEV['aura1'], L9['ry'], 0.573)]))
 
        self.assertEqual([{
 
            'path': CAM_TEST['bg2-d.jpg'],
 
            'color': (.188, .251, .314)
 
        }], layers)
 

	
 
    def testPerfect2Matches(self):
 
        layers = self.solver.simulationLayers(
 
            settings=DeviceSettings(self.graph, [
 
                (DEV['aura1'], L9['color'], "#ffffff"),
 
                (DEV['aura1'], L9['rx'], 0.5),
 
                (DEV['aura1'], L9['ry'], 0.573),
 
                (DEV['aura2'], L9['color'], "#ffffff"),
light9/vidref/replay.py
Show inline comments
 

	
 
import os, gtk, shutil, logging, time
 
from bisect import bisect_left
 
from decimal import Decimal
 
log = logging.getLogger()
 

	
 
framerate = 15
 

	
 

	
 
def songDir(song):
 
    safeUri = song.split('://')[-1].replace('/', '_')
 
    return os.path.expanduser("~/light9-vidref/play-%s" % safeUri)
 

	
0 comments (0 inline, 0 general)