LJ/libs3/gstt.py

182 lines
4.2 KiB
Python
Raw Normal View History

2018-12-13 11:05:32 +00:00
# coding=UTF-8
'''
2020-10-04 17:46:45 +00:00
nozoscip
2018-12-18 01:45:23 +00:00
LJ Global state
v0.8.0
2018-12-31 13:49:11 +00:00
**
2020-09-19 12:28:56 +00:00
Almost all values here Will be overriden by data in LJ.conf at startup
2018-12-31 13:49:11 +00:00
**
2020-09-19 12:28:56 +00:00
LICENCE : CC BY
2018-12-18 01:45:23 +00:00
by Sam Neurohack, Loloster, pclf
from /team/laser
'''
2018-12-13 11:05:32 +00:00
#ConfigName = "setexample.conf"
2018-12-21 16:23:43 +00:00
ConfigName = "LJ.conf"
2018-12-13 11:05:32 +00:00
2019-01-16 00:50:24 +00:00
debug = 0
2020-09-19 12:28:56 +00:00
ljpath=''
2018-12-13 11:05:32 +00:00
anims= [[],[],[],[]]
2020-09-19 12:28:56 +00:00
# How many lasers are connected. Different that "currentlaser" and "dacnumber" (=autodetected)
2020-09-29 22:15:40 +00:00
LaserNumber = 4
2018-12-19 11:39:54 +00:00
# What laser client to listen at launch
2019-08-06 01:08:54 +00:00
SceneNumber = 0
MaxScenes = 3
2018-12-19 11:39:54 +00:00
2023-06-03 12:43:53 +00:00
ScreenX = [-1500,1500]
ScreenY = [-1500,1500]
2019-01-16 00:50:24 +00:00
screen_size = [400,400]
2023-06-03 12:43:53 +00:00
#xy_center = [screen_size[0]/2,screen_size[1]/2]
xy_center = [0,0]
2018-12-13 11:05:32 +00:00
2023-06-03 12:43:53 +00:00
RediServerIP = '192.168.1.13'
2018-12-13 11:05:32 +00:00
oscIPin = '192.168.1.15'
2020-10-04 17:46:45 +00:00
nozoscIP = '192.168.1.15'
2020-09-19 12:28:56 +00:00
wwwIP = '192.168.1.15'
2018-12-13 11:05:32 +00:00
# gstt.Laser select to what laser modifcation will occur.
# Can be changed with /noteon 16-23
2018-12-18 01:45:23 +00:00
Laser = 0
2018-12-13 11:05:32 +00:00
2018-12-18 01:45:23 +00:00
# gstt.simuPL select what point list number to display in webUI simulator
2018-12-13 11:05:32 +00:00
# Can be changed with /noteon 24-31
simuPL = 1
2024-08-19 19:22:38 +00:00
# gstt.laserIPS.
2018-12-13 11:05:32 +00:00
lasersIPS = ['192.168.1.5','192.168.1.6','192.168.1.3','192.168.1.4']
2020-09-19 12:28:56 +00:00
maxdacs = 4
2018-12-19 11:39:54 +00:00
2020-09-19 12:28:56 +00:00
# Autodetected by DAChecks() in main3 :
2024-08-19 19:22:38 +00:00
# Store connected dacs. Maybe laser 1 in LJ.conf is not connected but Laser 2 is.
2020-09-19 12:28:56 +00:00
dacs = [-1, -1, -1, -1]
# Actual number of connected DACs
dacnumber = 0
2018-12-13 11:05:32 +00:00
# gstt.kpps stores kpps for each laser.
2018-12-31 13:49:11 +00:00
# ** Will be overridden by LJ.conf file values **
2018-12-13 11:05:32 +00:00
kpps = [25000,25000,25000,25000]
2024-08-19 19:22:38 +00:00
lasertype = ["LOCAL","LOCAL","LOCAL","LOCAL"]
dacfamily = ["etherdream","etherdream","etherdream","etherdream"]
cmd = [None,None,None,None]
2020-09-19 12:28:56 +00:00
intensity = [-1,-1,-1,-1]
2023-06-03 12:43:53 +00:00
intens = [-1,-1,-1,-1]
red = [100,100,100,100]
green = [100,100,100,100]
blue = [100,100,100,100]
2018-12-13 11:05:32 +00:00
# gstt.GridDisplay : if = 1 Curve points actually sent to PL are replaced by a grid
GridDisplay = [0,0,0,0]
2024-08-19 19:22:38 +00:00
# Transformation Matrix for each laser
2018-12-13 11:05:32 +00:00
EDH = [[], [], [], []]
2024-08-19 19:22:38 +00:00
# Etherdreams reports
2018-12-13 11:05:32 +00:00
# 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]]
2024-08-19 19:22:38 +00:00
# store last dac answers : ACK, not ACK,...
2018-12-13 11:05:32 +00:00
lstt_dacanswers = [[-1], [-1], [-1], [-1]]
2024-08-19 19:22:38 +00:00
# store last number of points sent to etherdreams buffer
2018-12-13 11:05:32 +00:00
lstt_points = [[0], [0], [0], [0]]
swapX = [1,1,1,-1]
swapY = [1,1,1,-1]
2020-09-19 12:28:56 +00:00
lsteps = [[],[],[],[]]
2018-12-31 13:49:11 +00:00
# For glitch art : change position and number of points added by tracer.py
2024-08-19 19:22:38 +00:00
# shortline is for distance with next point, shorter than 4000 (in etherdream coordinates)
2018-12-13 11:05:32 +00:00
# i.e (0.25,3) means add 3 points at 25% on the line.
2019-02-26 10:10:57 +00:00
stepshortline = [(1.0, 8)]
stepslongline = [(0.25, 3), (0.75, 3), (1.0, 10)]
#stepslongline = [(0.25,1), (0.75, 1), (1.0, 1)]
2019-02-10 15:53:51 +00:00
#stepshortline = [(1.0, 8)]
2019-02-26 10:10:57 +00:00
#stepslongline = [(1.0, 1)]
#stepshortline = [(1.0, 1)]
2018-12-13 11:05:32 +00:00
point = [0,0,0]
cc = [0] * 256
lfo = [0] * 10
osc = [0] * 255
oscInUse = [0] * 255
knob = [0] * 33
# Viewer distance (cc 21)
cc[21]=60
viewer_distance = cc[21] * 8
2024-08-19 19:22:38 +00:00
# fov (cc 22)
2018-12-13 11:05:32 +00:00
cc[22]= 60
fov = 4 * cc[22]
JumpFlag =0
# OSC ports
#temporaray fix hack : iport=nozoport
2019-03-10 22:06:04 +00:00
iport = 8002 # LJ input port
oport = 8001 # LJ output port
2018-12-13 11:05:32 +00:00
noziport=8003 #nozosc.py receiving commands port
nozoport=8001 #nozosc.py sending port to LJay (main.py)
nozuport=0 #linux serial usb port connecting nozoid devices ACM0 by default
2024-08-19 19:22:38 +00:00
angleX = 0
2018-12-13 11:05:32 +00:00
angleY = 0
angleZ = 0
# multilasers arrays
centerX = [0,0,0,0]
centerY = [0,0,0,0]
zoomX = [0,0,0,0]
zoomY = [0,0,0,0]
sizeX = [0,0,0,0]
sizeY = [0,0,0,0]
finANGLE = [0,0,0,0]
warpdest = [[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]],
[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]],
[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]],
[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]]
]
2020-09-19 12:28:56 +00:00
2023-06-03 12:43:53 +00:00
BhorealLayer = 0
BhorealLayers = ['Maxwell1','Maxwell2','Maxwell3']
LaunchpadLayer = 0
LaunchpadLayers = ['Maxwell1','Maxwell2','OS']
BeatstepLayer = 0
BeatstepLayers = ['XY','TraRot',"HueInt","Zregulators"]
BCRLayer = 0
BCRLayers = ['Main','Second']
SequencerLayer = 3
SequencerLayers = ['XY','TraRot',"HueInt","Zregulators"]
lpd8Layer = 0
lpd8Layers = ['Maxwell1','Maxwell2','Maxwell3','OS']
TouchOSCUI = False
TouchOSCPort = 8001
# TouchOSCIP is now auto assigned when /connect is received
2020-09-19 12:28:56 +00:00
TouchOSCIP = '192.168.2.67' # iPad 1
2023-06-03 12:43:53 +00:00
#TouchOSCIP = '192.168.2.67' # iPad 1
2020-09-19 12:28:56 +00:00
#TouchOSCIP = '192.168.2.156' # iPad mini
#TouchOSCIP = '192.168.43.146' # iPad mini @ fuzz
#TouchOSCIP = '192.168.151.213' # CCN
#TouchOSCIP = '127.0.0.1' # Localhost