Aurora layers bugfixs

This commit is contained in:
sam 2020-10-06 03:11:02 +02:00
parent 132ea32d66
commit cc93d13e22
10 changed files with 210 additions and 13 deletions

114
LJ_template.conf Normal file
View File

@ -0,0 +1,114 @@
[General]
lasernumber = 1
debug = 0
ljayserverip = 0.0.0.0
wwwip = 192.168.2.43
nozoscip = 127.0.0.1
bhoroscip = 127.0.0.1
autostart = artnet
wstype = ws
wsport = 9001
[laser0]
color = -1
type = DS1000
ip = 192.168.2.4
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
swapx = 1
swapy = -1
lsteps = [ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser1]
color = -1
type = LOCAL
ip = 192.168.2.43
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [ (1.0, 2),(0.25, 1), (0.75, 1), (1.0, 5)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser2]
color = -1
type = LUKE400
ip = 192.168.2.6
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser3]
color = -1
type = LUKE400
ip = 192.168.1.5
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[plugins]
plugins = {
"aurora": {"OSC": 8090, "command": "python3 plugins/aurora/aurora.py", "display": True},
"nozoid": {"OSC": 8003, "command": "python3 plugins/audio/nozoids3.py", "display": True},
"glyph": {"OSC": 8004, "command": "python3 plugins/laserglyph.py", "display": True},
"planet": {"OSC": 8005, "command": "python3 plugins/planetarium/main.py", "display": True},
"words": {"OSC": 8006, "command": "python3 plugins/livewords3.py", "display": True},
"cycl": {"OSC": 8007, "command": "python3 plugins/textcycl.py", "display": True},
"simu": {"OSC": 8008, "command": "python plugins/pysimu.py", "display": False},
"artnet": {"OSC": 8009, "command": "python3 libs3/artnet.py", "display": False},
"trckr": {"OSC": 8017, "command": "python3 plugins/trckr.py", "display": False},
"maxw": {"OSC": 8012, "command": "python3 plugins/maxwell.py", "display": True},
"square": {"OSC": 8013, "command": "python3 plugins/square.py", "display": True},
"custom1": {"OSC": 8014, "command": "python3 plugins/custom1.py", "display": True},
"mitraille": {"OSC": 8015, "command": "python3 plugins/audio/mitraille.py", "display": True},
"livecode": {"OSC": 8016, "command": "python3 plugins/livecoding.py", "display": True},
"ljpong": {"OSC": 8020, "command": "python plugins/games/ljpong/main.py", "display": True},
"ljwars": {"OSC": 8021, "command": "python plugins/games/ljsw/main.py", "display": True},
"audiogen": {"OSC": 8030, "command": "python3 plugins/audio/audiogen.py", "display": False},
"midigen": {"OSC": 8031, "command": "python3 plugins/audio/midigen.py", "display": False},
"viewgen": {"OSC": 8032, "command": "python3 plugins/audio/viewgen.py", "display": True}
}

View File

@ -194,9 +194,10 @@ def NoteOn(note):
else:
gstt.Laser = note -24
plugins.sendWSall("/status Laser " + str(gstt.Laser))
plugins.SendAll("/scim "+str(gstt.Laser))
print("Current Laser switched to", gstt.Laser)
plugins.sendWSall("/status Laser " + str(gstt.Laser))
plugins.SendAll(["/scim", str(gstt.Laser), "1"])
def Scim(path, tags, args, source):
@ -579,8 +580,10 @@ def Updatepage(file_name):
o.close()
#now the modification is done in the file
# Not used anymare see configure.py
def UpdateAllwww():
pass
print("Updating www files to use", gstt.wwwIP)
Updatepage(gstt.ljpath+"/www/LJ.js")
Updatepage(gstt.ljpath+"/www/trckr/trckrcam1.html")

View File

@ -182,21 +182,26 @@ def OSCsend(name, oscaddress, oscargs =''):
# for each plugin will automatically add /pluginame before oscpath to send like /aurora/scim 1, if oscpath = "/scim 1"
def SendAll(oscpath):
print("Sending to all plugins ", "/pluginame"+oscpath)
print("Sending to all plugins...")
for plugin in list(gstt.plugins.keys()):
if gstt.debug > 0:
print("sending ","/"+plugin+oscpath,"to", plugin)
print("sending /"+plugin+oscpath,"to", plugin)
print("sending /"+plugin+oscpath[0],"to", plugin)
#sendWSall("/"+ plugin + "/start 0")
Send(plugin, "/"+plugin+oscpath)
Send(plugin, ["/"+plugin+oscpath[0], oscpath[1]])
# Send a command to given plugin. Will also start it if command contain /start 1
def Send(name, oscpath):
if oscpath[0].find(name) != -1:
print("OSC is sending to", name,":", oscpath)
#if oscpath.find(name) != -1:
if oscpath[0].find(name) != -1:
print("pinging..", name)
# Plugin is online ?
if Ping(name):
@ -227,7 +232,9 @@ def Send(name, oscpath):
#print("To trckr", name, oscpath, len(oscpath))
OSCsend(name, oscpath[0], oscpath[1:])
elif name == "aurora":
#print("To Aurora", oscpath, len(oscpath))
#print("To Aurora", oscpath)
#OSCsend(name, oscpath[:-2], oscpath[-1] )
print("To Aurora", oscpath, len(oscpath))
OSCsend(name, oscpath[0], oscpath[1:])
return True
@ -236,10 +243,9 @@ def Send(name, oscpath):
if gstt.debug >0:
print("Plugin manager send says plugin " + name + " is offline.")
#print "Command", oscpath
sendWSall("/redstatus Plugin " + name + " offline")
sendWSall("/"+ name + "/start 0")
#sendWSall("/redstatus Plugin " + name + " offline")
#sendWSall("/"+ name + "/start 0")
# Try to Start it if /start 1
if oscpath[0].find("start") != -1 and oscpath[1] == "1":

View File

@ -283,6 +283,7 @@ AllFXDisplay = [True, True, True, True]
# Animation parameters for each layer
Layer = [] *lasernumber
Stars = []
currentlayer = 0
for l in range(lasernumber):
@ -410,6 +411,7 @@ def OSChandler(path, tags, args, source):
print("NOT POSSIBLE : only", lasernumber,"laser requested at startup")
lj.SendLJ("/line1",str(lasernumber)+ " Laser")
# /aurora/color/layernumber colorname
if path.find('/aurora/color') == 0:
@ -499,8 +501,8 @@ def OSChandler(path, tags, args, source):
# /aurora/scim
if path.find('/aurora/scim') == 0:
print("OScim sending to LJ /scim",int(args[0])+24)
lj.SendLJ("/scim", [int(args[0])+24])
print("OSC default got /scim",int(args[0]))
#lj.SendLJ("/scim", [int(args[0])+24])
'''
# /aurora/color/layernumber color
@ -517,6 +519,7 @@ def OSCcolor(path, tags, args, source):
'''
# /aurora/scim layernumber
'''
def OSCim(path, tags, args, source):
newarg = path.split(" ")
@ -526,6 +529,21 @@ def OSCim(path, tags, args, source):
print("sending knobs value for new layer")
UpdateKnobs(newlaser)
midix.SendUI('/status', ["Sim : "+newlaser])
'''
# /aurora/scim layernumber
def OSCim(path, tags, args, source):
global currentlayer
newarg = path.split(" ")
currentlayer = int(args[0])
print("OSim got /scim",str(currentlayer))
print("new layer :", currentlayer)
#lj.SendLJ("/scim", [newlaser])
#print("sending knobs value for new layer")
#UpdateKnobs(newlaser)
#midix.SendUI('/status', ["Sim : "+newlaser])
def Resampler(laser,lsteps):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -149,6 +149,61 @@
</div>
<!--
Scene choice Rack
-->
<div class="content">
<div class="Settingrid">
<div>
<h2>Scene</h2>
</div>
<div class="webaudiobut" align="center" style="width: 83px;">
<button type="button" class="navled" style="border: 1px solid #002020; text-align: middle;" onclick="onSubmit(this.id)" id="scene/0/start 1" >
0
</button>
</div>
<div>
</div>
<div class="webaudiobut" align="center" style="width: 83px;">
<button type="button" class="navled" style="border: 1px solid #002020; text-align: middle;" onclick="onSubmit(this.id)" id="scene/1/start 1" >
1
</button>
</div>
<div>
</div>
<div class="webaudiobut" align="center" style="width: 83px;">
<button type="button" class="navled" style="border: 1px solid #002020; text-align: middle;" onclick="onSubmit(this.id)" id="scene/2/start 1" >
2
</button>
</div>
<div>
</div>
<div class="webaudiobut" align="center" style="width: 83px;">
<button type="button" class="navled" style="border: 1px solid #002020; text-align: middle;" onclick="onSubmit(this.id)" id="scene/3/start 1" >
3
</button>
</div>
<div></div>
<div></div>
<div></div>
<div> </div>
<div></div>
</div>
</div>
<!--
Laser Rack
@ -609,6 +664,7 @@
var x = document.getElementById(lasernote);
x.value = 1 ;
laser = id
}
function nolaser() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB