diff --git a/LJ_template.conf b/LJ_template.conf new file mode 100644 index 0000000..3d5cc3d --- /dev/null +++ b/LJ_template.conf @@ -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} + } + diff --git a/libs3/commands.py b/libs3/commands.py index e551b7f..a348a60 100644 --- a/libs3/commands.py +++ b/libs3/commands.py @@ -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") diff --git a/libs3/plugins.py b/libs3/plugins.py index 7ef4dfa..bfa4eb1 100644 --- a/libs3/plugins.py +++ b/libs3/plugins.py @@ -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": diff --git a/plugins/aurora/aurora.py b/plugins/aurora/aurora.py index 6153860..17ee735 100644 --- a/plugins/aurora/aurora.py +++ b/plugins/aurora/aurora.py @@ -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): diff --git a/www/android-chrome-192x192.png b/www/android-chrome-192x192.png index dd8c0c7..93252cb 100755 Binary files a/www/android-chrome-192x192.png and b/www/android-chrome-192x192.png differ diff --git a/www/android-chrome-512x512.png b/www/android-chrome-512x512.png index 9811b9a..c52c30f 100755 Binary files a/www/android-chrome-512x512.png and b/www/android-chrome-512x512.png differ diff --git a/www/apple-touch-icon.png b/www/apple-touch-icon.png index 5e87aa2..d79efc3 100755 Binary files a/www/apple-touch-icon.png and b/www/apple-touch-icon.png differ diff --git a/www/auralls.html b/www/auralls.html index 43485aa..866ed23 100644 --- a/www/auralls.html +++ b/www/auralls.html @@ -149,6 +149,61 @@ + +
+
+ +
+

Scene

+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+ +
+ + +
+
+
+
+
+
+
+ +