tracer shutdown order

This commit is contained in:
Sam 2023-07-09 16:09:18 +02:00
parent 23a07470e6
commit e45ab18f5d
14 changed files with 80 additions and 60 deletions

74
LJ.conf
View File

@ -10,47 +10,47 @@ wstype = ws
wsport = 9001 wsport = 9001
[laser0] [laser0]
dac_family = helios
color = -1 color = -1
type = DS1000 type = LOCAL
dac_family = helios
ip = 127.0.0.1 ip = 127.0.0.1
kpps = 31921 kpps = 32692
centerx = -5376.0
centery = 11844.0
zoomx = 29.15625
zoomy = 31.21875
sizex = 32000.0
sizey = 32000.0
finangle = 0.0
intens = 255.0 intens = 255.0
red = 100 red = 100
green = 100 green = 100
blue = 100 blue = 100
centerx = -21504.0
centery = 21000.0
zoomx = 48.0
zoomy = 47.4375
sizex = 32000.0
sizey = 32000.0
finangle = 3.246312408709453
swapx = -1 swapx = -1
swapy = -1 swapy = -1
lsteps = [ (1.0, 1),(0.25, 1), (0.75, 1), (1.0, 1)] lsteps = [ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.], warpdest = [[-1500., 1500.],
[ 1500., 1500.], [ 1500., 1500.],
[ 1500.,-1500.], [ 1500.,-1500.],
[-1500.,-1500.]] [-1500.,-1500.]]
[laser1] [laser1]
dac_family = etherdream
color = -1 color = -1
type = LOCAL type = LOCAL
ip = 192.168.2.4 dac_family = helios
kpps = 27000 ip = 192.168.2.5
intens = 255.0 kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100 red = 100
green = 100 green = 100
blue = 100 blue = 100
centerx = 6340.91015625
centery = 2181.81640625
zoomx = 41.71875
zoomy = 46.3125
sizex = 32000.0
sizey = 32000.0
finangle = 0.0
swapx = -1 swapx = -1
swapy = -1 swapy = -1
lsteps = [ (1.0, 2),(0.25, 1), (0.75, 1), (1.0, 5)] lsteps = [ (1.0, 2),(0.25, 1), (0.75, 1), (1.0, 5)]
@ -60,22 +60,22 @@ warpdest = [[-1500., 1500.],
[-1500.,-1500.]] [-1500.,-1500.]]
[laser2] [laser2]
dac_family = etherdream
color = -1 color = -1
type = LUKE400 type = LUKE400
dac_family = helios
ip = 192.168.2.6 ip = 192.168.2.6
kpps = 25000 kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255 intens = 255
red = 100 red = 100
green = 100 green = 100
blue = 100 blue = 100
centerx = 0
centery = 0
zoomx = 10.0
zoomy = 10.0
sizex = 32000
sizey = 32000
finangle = 0.0
swapx = -1 swapx = -1
swapy = -1 swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)] lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
@ -85,22 +85,22 @@ warpdest = [[-1500., 1500.],
[-1500.,-1500.]] [-1500.,-1500.]]
[laser3] [laser3]
dac_family = etherdream
color = -1 color = -1
type = LUKE400 type = LUKE400
dac_family = helios
ip = 192.168.1.5 ip = 192.168.1.5
kpps = 25000 kpps = 25000
intens = 255
red = 100
green = 100
blue = 100
centerx = 0 centerx = 0
centery = 0 centery = 0
zoomx = 10.0 zoomx = 50.0
zoomy = 10.0 zoomy = 50.0
sizex = 32000 sizex = 32000
sizey = 32000 sizey = 32000
finangle = 0.0 finangle = 0.0
intens = 255
red = 100
green = 100
blue = 1000
swapx = -1 swapx = -1
swapy = -1 swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)] lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->

View File

@ -24,7 +24,7 @@
<!-- Logo --> <!-- Logo -->
<div id="logo"> <div id="logo">
<h1 id="title">L J doc</h1> <h1 id="title">L J doc</h1>
<p>by <a href="http://www.teamlaser.fr">/team/laser</a></p> <p>by <a href="http://www.protonphoton.art">ProtonPhoton</a></p>
</div> </div>
<!-- Nav --> <!-- Nav -->
@ -78,7 +78,7 @@
<li><strong>/EDH/lasernumber : </strong>Internal. Order for tracer to update its homography.</li> <li><strong>/EDH/lasernumber : </strong>Internal. Order for tracer to update its homography.</li>
<br> <br>
<li>- Tracer control : </li> <li>- Tracer control : </li>
<li><strong>/order : </strong>0 : Draw Normal pointlists _1 : Get the new EDH _2 : Draw BLACK _3 : Draw GRID point list _4 : Resampler Change _5 : Client Key Change. _6 : Max Intensity Change _7 : kpps change _8 : color balance change.</li> <li><strong>/order : </strong>0 : Draw Normal pointlists _1 : Get the new EDH _2 : Draw BLACK _3 : Draw GRID point list _4 : Resampler Change _5 : Client Key Change. _6 : Max Intensity Change _7 : kpps change _8 : color balance change -9 : Shutdown.</li>
<li><strong>/kpps : </strong>0- DAC output speed to laser, then order 7. Depends of actual angle.</li> <li><strong>/kpps : </strong>0- DAC output speed to laser, then order 7. Depends of actual angle.</li>
<li><strong>/intensity : </strong>0-255 Laser output power, then order 6 (for alignement,...).</li> <li><strong>/intensity : </strong>0-255 Laser output power, then order 6 (for alignement,...).</li>
<li><strong>/red : </strong>0-100 % of full red, then order 8.</li> <li><strong>/red : </strong>0-100 % of full red, then order 8.</li>

View File

@ -184,6 +184,7 @@ def SceneChange(newscene):
# Change current laser and send "/scim lasernumber to each plugin" # Change current laser and send "/scim lasernumber to each plugin"
def NoteOn(note): def NoteOn(note):
print()
print("NoteOn", note) print("NoteOn", note)
# Change laser client # Change laser client
if note < 8: if note < 8:
@ -201,7 +202,7 @@ def NoteOn(note):
gstt.Laser = note -24 gstt.Laser = note -24
print("Current Laser switched to", gstt.Laser) print("Current Laser switched to", gstt.Laser)
plugins.sendWSall("/status Laser " + str(gstt.Laser)) plugins.sendWSall("/status Laser " + str(gstt.Laser))
plugins.SendAll(["/scim", str(gstt.Laser), 1]) plugins.SendAll("/scim "+str(gstt.Laser))
print("sending cropper data..") print("sending cropper data..")
plugins.sendWSall("/loffset/X/" + str(gstt.Laser) +" " +str(gstt.centerX[gstt.Laser])) plugins.sendWSall("/loffset/X/" + str(gstt.Laser) +" " +str(gstt.centerX[gstt.Laser]))
plugins.sendWSall("/loffset/Y/" + str(gstt.Laser) +" " +str(gstt.centerY[gstt.Laser])) plugins.sendWSall("/loffset/Y/" + str(gstt.Laser) +" " +str(gstt.centerY[gstt.Laser]))
@ -299,6 +300,7 @@ def handler(oscpath, args):
elif oscpath[1] == "noteon": elif oscpath[1] == "noteon":
NoteOn(int(args[0])) NoteOn(int(args[0]))
@ -715,6 +717,12 @@ def LJautokill():
log.warn("LJ stopping...") log.warn("LJ stopping...")
print(gstt.LaserNumber,"Tracers launched") print(gstt.LaserNumber,"Tracers launched")
for laser in range(gstt.LaserNumber):
if gstt.debug > 0:
print('Shutdown order for tracer '+str(laser), 9)
r.set('/order/'+str(laser), 9)
lasernumber= gstt.LaserNumber -1 lasernumber= gstt.LaserNumber -1
log.warn("Ending tracer0...") log.warn("Ending tracer0...")
worker0.join() worker0.join()
@ -727,7 +735,7 @@ def LJautokill():
if lasernumber >2: if lasernumber >2:
log.warn("Ending tracer3...") log.warn("Ending tracer3...")
worker3.join() worker3.join()
log.warn("Laser feedbacks resetting...") log.warn("Laser feedbacks resetting...")
for laserid in range(0,lasernumber+1): for laserid in range(0,lasernumber+1):

View File

@ -97,6 +97,7 @@ def Restart(name):
def Start(name): def Start(name):
# get Plugin configuration. # get Plugin configuration.
print("plugins starting ",name)
command = Command(name) command = Command(name)
sendWSall("/status Starting "+name+"...") sendWSall("/status Starting "+name+"...")
@ -206,6 +207,8 @@ def SendAll(oscpath):
for plugin in list(gstt.plugins.keys()): for plugin in list(gstt.plugins.keys()):
if gstt.debug > 0: if gstt.debug > 0:
print("plugin",plugin)
print('oscpath', oscpath)
print("sending /"+plugin+oscpath,"to", plugin) print("sending /"+plugin+oscpath,"to", plugin)
print("sending /"+plugin+oscpath[0],"to", plugin) print("sending /"+plugin+oscpath[0],"to", plugin)
#sendWSall("/"+ plugin + "/start 0") #sendWSall("/"+ plugin + "/start 0")

View File

@ -44,6 +44,7 @@ This tracer include an enhanced version (support for several lasers) of the ethe
6 : Max Intensity Change = reread redis key /intensity 6 : Max Intensity Change = reread redis key /intensity
7 : kpps change = reread redis key /kpps 7 : kpps change = reread redis key /kpps
8 : color balance change = reread redis keys /red /green /blue 8 : color balance change = reread redis keys /red /green /blue
9 : shutdown
- Managing Etherdream DACs : - Managing Etherdream DACs :

View File

@ -112,7 +112,13 @@ print("Start Scene number :",gstt.SceneNumber)
debug = gstt.debug debug = gstt.debug
print("Debug :", debug) print("Debug :", debug)
print("Laser feedbacks resetting...")
for laserid in range(0,gstt.LaserNumber):
r.set('/lack/'+str(laserid),64)
r.set('/lstt/'+str(laserid),64)
r.set('/cap/'+str(laserid),0)
r.set('/order/'+str(laserid), 0)
''' '''
# Nozoid OSC Client : to send OSC message to Nozoid inport 8003 # Nozoid OSC Client : to send OSC message to Nozoid inport 8003

View File

@ -228,7 +228,7 @@ args = argsparser.parse_args()
if args.verbose: if args.verbose:
debug = args.verbose debug = args.verbose
else: else:
debug = 0 debug = 1
if args.scene: if args.scene:
ljscene = args.scene ljscene = args.scene
@ -372,13 +372,12 @@ def OSChandler(path, tags, args, source):
#print() #print()
print("Aurora default OSC Handler : " + str(path) + " from Client : " + str(source[0])) print("Aurora default OSC Handler : " + str(path) + " from Client : " + str(source[0]))
#print(args) #print(args)
if len(args) > 0: if len(args) > 0:
pass pass
# OSC ui connection # OSC ui connection
if path.find("/connect") : if path.find("/connect") == 0:
print("OSCUI asked by", source) print("Aurora : OSCUI asked by", source)
gstt.TouchOSCUI = True gstt.TouchOSCUI = True
gstt.TouchOSCIP= source[0] gstt.TouchOSCIP= source[0]
beatstepUI() beatstepUI()
@ -403,10 +402,10 @@ def OSChandler(path, tags, args, source):
#log.info("with args " + str(args)) #log.info("with args " + str(args))
# /aurora/fx/layernumber FXname # /aurora/fx/layernumber FXname
if path.find('/aurora/fx') == 0: if int(path.find('/aurora/fx')) == 0:
#print("path", path, 'args', args) print("Aurora FX got : path", path, 'args', args)
#print("layer", path[11:12]) print("Aurora layer", path[11:12])
layer = int(path[11:12]) layer = int(path[11:12])
if layer <= lasernumber-1: if layer <= lasernumber-1:
@ -418,15 +417,16 @@ def OSChandler(path, tags, args, source):
lj.SendLJ("/line1",[fx]) lj.SendLJ("/line1",[fx])
midix.SendUI('/status', [fx]) midix.SendUI('/status', [fx])
else: else:
print("unknwon FX.") print("Aurora : unknwon FX.")
else: else:
print("NOT POSSIBLE : only", lasernumber,"laser requested at startup") print("Aurora : NOT POSSIBLE : only", lasernumber,"laser requested at startup")
lj.SendLJ("/line1",str(lasernumber)+ " Laser") lj.SendLJ("/line1",str(lasernumber)+ " Laser")
# /aurora/color/layernumber colorname # /aurora/color/layernumber colorname
if path.find('/aurora/color') == 0: if path.find('/aurora/color') == 0:
print()
#if args[1] =='1': #if args[1] =='1':
layer = int(path[14:15]) layer = int(path[14:15])
if layer <= lasernumber-1: if layer <= lasernumber-1:
@ -434,7 +434,7 @@ def OSChandler(path, tags, args, source):
Layer[layer]['color'] = eval(color) Layer[layer]['color'] = eval(color)
print("Aurora default OSc for Layer", layer,Layer[layer]['FX'], "Got color change to", color) print("Aurora default OSc for Layer", layer,Layer[layer]['FX'], "Got color change to", color)
else: else:
print("NOT POSSIBLE : only", lasernumber,"laser requested at startup") print("Aurora : NOT POSSIBLE : only", lasernumber,"laser requested at startup")
lj.SendLJ("/line1",str(lasernumber)+ " Laser") lj.SendLJ("/line1",str(lasernumber)+ " Laser")
# [0,1] or [0,127] # [0,1] or [0,127]
@ -513,7 +513,7 @@ def OSChandler(path, tags, args, source):
# /aurora/scim # /aurora/scim
if path.find('/aurora/scim') == 0: if path.find('/aurora/scim') == 0:
print("OSC default got /scim",int(args[0])) print("Aurora OSC : /scim",int(args[0]))
#lj.SendLJ("/scim", [int(args[0])+24]) #lj.SendLJ("/scim", [int(args[0])+24])
# /aurora/poses layer number # /aurora/poses layer number
@ -1116,6 +1116,7 @@ def AllFX():
anim.Onefield(LAY, StarFields[l], hori=0, verti=0) anim.Onefield(LAY, StarFields[l], hori=0, verti=0)
elif LAY['FX'] == "anim.Trckr": elif LAY['FX'] == "anim.Trckr":
#print("Aurora FX anim.Trckr for laser ",l, " points ",TrckrPts[l])
anim.Trckr(LAY, TrckrPts[l]) anim.Trckr(LAY, TrckrPts[l])
elif LAY['FX'] == "anim.Word": elif LAY['FX'] == "anim.Word":
@ -1214,6 +1215,7 @@ prepareStarfield()
prepareTrckr() prepareTrckr()
currentPose = 0 currentPose = 0
lj.WebStatus("Init Poses...") lj.WebStatus("Init Poses...")
anim.debug = debug
anim.preparePoses(currentPose) anim.preparePoses(currentPose)
log.info("Starting OSC server at " + str(gstt.myIP)+ " port "+ str(OSCinPort)+ " ...") log.info("Starting OSC server at " + str(gstt.myIP)+ " port "+ str(OSCinPort)+ " ...")

View File

@ -93,7 +93,7 @@
</div> </div>
</a> </a>
<a href="../settings.html"> <a href="../settings2.html">
<div class="webaudiobut"> <div class="webaudiobut">
<div align="center" class="navled"> <div align="center" class="navled">
Settings Settings