diff --git a/LJ.conf b/LJ.conf index 5a6e41e..31795c3 100644 --- a/LJ.conf +++ b/LJ.conf @@ -1,8 +1,6 @@ [General] -set = 5 -curve = 0 lasernumber = 1 -debug = 2 +debug = 0 ljayserverip = 127.0.0.1 nozoscip = 127.0.0.1 bhoroscip = 127.0.0.1 diff --git a/README.md b/README.md index ce3fc03..99cb68d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -LJ v0.7.0 +LJ v0.7.1 By Sam Neurohack, Loloster, Cocoa @@ -15,7 +15,7 @@ LJ has 3 main components : - A manager that talk to all tracers (which client number point lists to draw, new geometry correction,...), handle the webui functions, OSC commands,... - Up to ten clients, that simultaneously send one point list per laser. -You run and write your clients in any redis capable programming langage (50+ : https://redis.io/clients). +You write abd run your laser client software in any redis capable programming langage (50+ : https://redis.io/clients). Needs at least : an etherdream DAC connected to an ILDA laser, RJ 45 IP network (gigabits only !! no wifi, 100 mpbs doesn't work well with several lasers) @@ -32,20 +32,12 @@ LJ supports Linux and OS X. Windows is unkown but welcome, if someone want to ju (Doc in progress) - OSC and websocket commands. Very cool : LJ can script or be scripted. -- Interactive (mouse style) warp correction for each laser. - Web ui : In your browser open webui/index.html. Javascript is needed. - Status update every 0.5 seconds : every etherdream DAC state, number of buffer points sent,... - "Optimisation" points automatically added, can be changed live for glitch art. Search "resampler" commands. - A compiled version for os x and linux of nannou.org etherdream+laser emulator is included. For more informations, like license see https://github.com/nannou-org/ether-dream - A 3D anaglyph client example -# -# External devices -# - -(Doc in Progress) - - # # Networking @@ -71,7 +63,7 @@ By default LJ uses on 127.0.0.1 (localhost) : You need to update LJ.conf to your network/etherdreams IPs and be sure to check command arguments : python main.py --help -A dedicated computer to act as "laser server" usually depends on how many lasers you want to control and your main computer load. If you seen flickering with small point lists, try the dedicated computer option and/or stop process interfering like redis monitoring,... +The need for a dedicated computer to act as "laser server" usually depends on how many lasers you want to control and your main computer load. If you seen flickering with small point lists, try the dedicated computer option and/or stop process interfering like redis monitoring,... @@ -82,7 +74,7 @@ Program your own "Client" : - Carefully read all comments in clients examples. - Generate at least one point list array (say a square). - Feed your point list array in string format to redis server. - +- laserglyph.py is # @@ -98,16 +90,13 @@ For OS X, you need brew already installed, then : brew update brew upgrade brew install redis -type all install.sh commands beginning line 4. +type all install.sh commands beginning line 4. An OS X install script soon !! For Linux and OS X : -Check the bind line in /etc/redis/redis.conf : +You probably want redis bound to all network interfaces : comment the bind line in /etc/redis/redis.conf and restart it. -- If client and laser servers computers are the same, use 127.0.0.1 -- Client and laser server are different, use the laser server computer IP. - -In webui/index.html change the ws ip adress to the server IP or 127.0.0.1 if client computer = laser server computer. +In webui/index.html change the ws ip adress to the server IP if needed. Using the same idea check all ip address in LJ.conf. @@ -117,15 +106,21 @@ Using the same idea check all ip address in LJ.conf. # To run # +Order is : + +- Dac/Laser (emulator or IRL) +- Redis server once. +- This server. see below. +- Load/reload webUI page from disk in a browser (webui/index.html). Javascript must be enabled. +- A Client, see in clients folder for examples. + + A typical start is python main.py -L numberoflasers. Use -h to display all possible arguments. -Always start the redis server first, then laser server, maybe those two should run on the same computer, then your client. Case 1 : the laser server computer is the same that the computer running a client : python main.py -Open/reload in browser webui/index.html. (javascript must be enabled) - Check in your client code if the laser server IP is the good one Run your client @@ -162,10 +157,7 @@ redis-cli -h redisserverIP monitor (Doc in Progress) - kpps live modification for glitch art. -- Improve Bhoreal & LaunchPad inputs -- Improve WebUI with simulator. -- Warp corrections should not used warpdestinations default values in conf file. - +- A grid style warp correction process in webUI # @@ -174,7 +166,7 @@ redis-cli -h redisserverIP monitor ![Etherdream Laser DAC](https://www.ether-dream.com/ed2-external.jpg) -This program suppose that the ether dream is configured in a certain way especially for its IP address. For ether dream 1 : write an autoplay.txt file inside an SD Card within the ether dream DAC, with the following lines you can adjust i.e for pps or fps. Yes, there is a builtin DHCP client in the ether dream DAC but if you run multiple lasers, having a fixed dedicated network makes you focus on laser stuff. +This program suppose that the ether dream is configured in a certain way especially for its IP address. We write an autoplay.txt file inside an SD Card within the ether dream DAC, with the following lines you can adjust i.e for pps or fps. Yes, there is a builtin DHCP client in the ether dream DAC but if you run multiple lasers, having a fixed dedicated network makes you focus on laser stuff. /net/ipaddr 192.168.1.3 @@ -187,30 +179,3 @@ This program suppose that the ether dream is configured in a certain way especia /ilda/fps 25 About hardware setup, especially if you have several lasers : ILDA cables are insanely expensive. You may consider the Power Over Ethernet 'POE' option. Buy a very small ILDA cable, a POE splitter and connect everything to the ether dream fixed near your laser. You can have then a simple and very long network cable and use a Power Over Ethernet injector or switch closed to the driving computer. Beware some vendors use 24V POE Injector : POE injectors and splitters must match. - - -# -# Coordinates if you use the proj() function -# - -3D points (x,y,z) has *0,0,0 in the middle* -A square centered around origin and size 200 (z =0 is added automatically) : -([-200, -200, 0], [200, -200, 0], [200, 200, 0], [-200, 200, 0], [-200, -200, 0]) - -Pygame screen points are 2D. *0,0 is top left* -with no 3D rotations + 3D -> 2D Projection + translation to top left: -[(300.0, 400.0), (500.0, 400.0), (500.0, 200.0), (300.0, 200.0), (300.0, 400.0)] - - -Pygame points with color is fed to laser renderer -[(300.0, 400.0, 0), (500.0, 400.0, 16776960), (500.0, 200.0, 16776960), (300.0, 200.0, 16776960), (300.0, 400.0, 16776960)] - - -Laser points traced - -Because of blanking many points are automatically added and converted in etherdream coordinates system -32765 to +32765 in x and y axis. - -16 (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 65280, 65280, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0), (-1500.0, 1500.0, 0, 0, 0) -8 (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0), (1500.0, 1500.0, 65280, 65280, 0) -8 (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0), (1500.0, -1500.0, 65280, 65280, 0) -8 (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0), (-1500.0, -1500.0, 65280, 65280, 0) diff --git a/clients/laserglyph.py b/clients/laserglyph.py index 0f5f34c..1bfa388 100644 --- a/clients/laserglyph.py +++ b/clients/laserglyph.py @@ -150,7 +150,7 @@ def Draw1PL(): counter =0 while 1: - Shape = [] + #Shape = [] Left = [] Right = [] for fa in faces: @@ -168,7 +168,7 @@ def Draw1PL(): #print "right",x+RightShift(z*25),y,z, Proj(x+RightShift(z*25),y,z) - Shape.append(Proj(x,y,z,0,0,counter)) + #Shape.append(Proj(x,y,z,0,0,counter)) Left.append( Proj(x+LeftShift(z*25),y,z,0,counter,0)) Right.append(Proj(x+RightShift(z*25),y,z,0,counter,0)) diff --git a/gstt.py b/gstt.py index 7eb3082..b2d7629 100644 --- a/gstt.py +++ b/gstt.py @@ -4,6 +4,10 @@ LJ Global state v0.8.0 +** +Almost all values here Will be overriden by LJ.conf file data +** + LICENCE : CC by Sam Neurohack, Loloster, pclf from /team/laser @@ -17,7 +21,7 @@ debug = 2 anims= [[],[],[],[]] -# How many lasers are connected. Different that "currentlaser" used by bhorosc +# How many lasers are connected. Different that "currentlaser". LaserNumber = 2 # What laser client to listen at launch @@ -27,7 +31,6 @@ MaxLasClient = 3 screen_size = [800,600] xy_center = [screen_size[0]/2,screen_size[1]/2] -# Will be overriden by mainy.conf file data LjayServerIP = '192.168.1.13' oscIPin = '192.168.1.15' nozoscip = '192.168.1.15' @@ -40,13 +43,13 @@ Laser = 0 # Can be changed with /noteon 24-31 simuPL = 1 -# gstt.laserIPS. Will be overridden by the ConfigName (see below) file values +# gstt.laserIPS. lasersIPS = ['192.168.1.5','192.168.1.6','192.168.1.3','192.168.1.4'] # gstt.kpps stores kpps for each laser. -# ** Will be overridden by the ConfigName (see below) file values ** +# ** Will be overridden by LJ.conf file values ** kpps = [25000,25000,25000,25000] # gstt.GridDisplay : if = 1 Curve points actually sent to PL are replaced by a grid @@ -55,12 +58,12 @@ GridDisplay = [0,0,0,0] # Transformation Matrix for each laser EDH = [[], [], [], []] -# Laser states +# Etherdreams reports # ipconn is initial newdac to its etherdream lstt_ipconn = [[-1], [-1], [-1], [-1]] # dacstt is dac light engine state lstt_dacstt = [[-1], [-1], [-1], [-1]] -# store last dac answers ACK, not ACK +# store last dac answers : ACK, not ACK,... lstt_dacanswers = [[-1], [-1], [-1], [-1]] # store last number of points sent to etherdreams buffer lstt_points = [[0], [0], [0], [0]] @@ -68,8 +71,8 @@ lstt_points = [[0], [0], [0], [0]] swapX = [1,1,1,-1] swapY = [1,1,1,-1] -# For glitch art : change position and decrease number of points added by newdac.py -# shortline for lines shorter than 4000 (in etherdream coordinates) +# For glitch art : change position and number of points added by tracer.py +# shortline is for distance with next point, shorter than 4000 (in etherdream coordinates) # i.e (0.25,3) means add 3 points at 25% on the line. stepshortline = [(1.0, 8)] stepslongline = [(0.25, 3), (0.75, 3), (1.0, 10)] @@ -106,7 +109,6 @@ angleY = 0 angleZ = 0 # multilasers arrays -# will be overrided but settings.conf values. centerX = [0,0,0,0] centerY = [0,0,0,0] zoomX = [0,0,0,0] diff --git a/settings.py b/settings.py index 048c6da..dd3441d 100644 --- a/settings.py +++ b/settings.py @@ -18,8 +18,6 @@ import numpy as np def Write(): - config.set('General', 'set', str(gstt.Set)) - config.set('General', 'curve', str(gstt.Curve)) config.set('General', 'lasernumber', str(gstt.LaserNumber)) config.set('General', 'ljayserverip', str(gstt.LjayServerIP)) config.set('General', 'bhoroscip', str(gstt.oscIPin)) @@ -46,8 +44,6 @@ def Write(): def Read(): - gstt.Set = config.getint('General', 'set') - gstt.Curve = config.getint('General', 'curve') gstt.LaserNumber = config.getint('General', 'lasernumber') gstt.LjayServerIP= config.get('General', 'ljayserverip') gstt.oscIPin = config.get('General', 'bhoroscip') diff --git a/visualiser-linux-nomsaa b/visualiser-linux-nomsaa new file mode 100755 index 0000000..2d8dcca Binary files /dev/null and b/visualiser-linux-nomsaa differ