UI upgrades
24
LJ.conf
@ -1,5 +1,5 @@
|
||||
[General]
|
||||
lasernumber = 4
|
||||
lasernumber = 1
|
||||
debug = 0
|
||||
ljayserverip = 127.0.0.1
|
||||
nozoscip = 127.0.0.1
|
||||
@ -26,7 +26,7 @@ warpdest = [[-1500., 1500.],
|
||||
|
||||
[laser1]
|
||||
color = -1
|
||||
ip = 192.168.1.5
|
||||
ip = 192.168.1.3
|
||||
kpps = 25000
|
||||
centerx = 506
|
||||
centery = 413
|
||||
@ -39,9 +39,9 @@ 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.]]
|
||||
[ 1500., 1500.],
|
||||
[ 1500.,-1500.],
|
||||
[-1500.,-1500.]]
|
||||
|
||||
[laser2]
|
||||
color = -1
|
||||
@ -58,15 +58,15 @@ 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.]]
|
||||
[ 1500., 1500.],
|
||||
[ 1500.,-1500.],
|
||||
[-1500.,-1500.]]
|
||||
|
||||
[laser3]
|
||||
color = -1
|
||||
ip = 192.168.1.4
|
||||
kpps = 25000
|
||||
centerx = 0
|
||||
centerx = -12
|
||||
centery = 0
|
||||
zoomx = 38.0
|
||||
zoomy = 26.0
|
||||
@ -77,7 +77,7 @@ 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.]]
|
||||
[ 1500., 1500.],
|
||||
[ 1500.,-1500.],
|
||||
[-1500.,-1500.]]
|
||||
|
||||
|
@ -20,7 +20,7 @@ Sam Neurohack
|
||||
|
||||
import math
|
||||
import redis
|
||||
from OSC import OSCServer, OSCClient, OSCMessage
|
||||
#from OSC import OSCServer, OSCClient, OSCMessage
|
||||
|
||||
redisIP = '127.0.0.1'
|
||||
r = redis.StrictRedis(host=redisIP, port=6379, db=0)
|
||||
@ -39,6 +39,7 @@ oscmsg = OSCMessage()
|
||||
osclientlj.connect((redisIP, 8002))
|
||||
'''
|
||||
|
||||
'''
|
||||
def Send(oscaddress,oscargs=''):
|
||||
|
||||
oscmsg = OSCMessage()
|
||||
@ -53,7 +54,7 @@ def Send(oscaddress,oscargs=''):
|
||||
print ('Connection to LJ refused : died ?')
|
||||
pass
|
||||
#time.sleep(0.001
|
||||
|
||||
'''
|
||||
|
||||
def WebStatus(message):
|
||||
Send("/status",message)
|
||||
@ -249,7 +250,7 @@ def rPolyLineOneColor(xy_list, c, PL , closed, xpos = 0, ypos =0, resize =0.7, r
|
||||
|
||||
|
||||
def LinesPL(PL):
|
||||
print "Stupido !! your code is to old : use DrawPL() instead of LinesPL()"
|
||||
print ("Stupido !! your code is to old : use DrawPL() instead of LinesPL()")
|
||||
DrawPL(PL)
|
||||
|
||||
def DrawPL(PL):
|
||||
@ -311,4 +312,4 @@ def Text(message,c, PL, xpos, ypos, resize, rotx, roty, rotz):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
96
clients/planetarium/hipnames
Normal file
@ -0,0 +1,96 @@
|
||||
Acamar, 13847
|
||||
Groombridge 1830, 57939
|
||||
Achernar, 7588
|
||||
Hadar, 68702
|
||||
Acrux, 60718
|
||||
Hamal, 9884
|
||||
Adhara, 33579
|
||||
Izar, 72105
|
||||
Agena, 68702
|
||||
Kapteyn's star, 24186
|
||||
Albireo, 95947
|
||||
Kaus Australis, 90185
|
||||
Alcor, 65477
|
||||
Kocab, 72607
|
||||
Alcyone, 17702
|
||||
Kruger,60, 110893
|
||||
Aldebaran, 21421
|
||||
Luyten's star, 36208
|
||||
Alderamin, 105199
|
||||
Markab, 113963
|
||||
Algenib, 1067
|
||||
Megrez, 59774
|
||||
Algieba, 50583
|
||||
Menkar, 14135
|
||||
Algol, 14576
|
||||
Merak, 53910
|
||||
Alhena, 31681
|
||||
Mintaka, 25930
|
||||
Alioth, 62956
|
||||
Mira, 10826
|
||||
Alkaid, 67301
|
||||
Mirach, 5447
|
||||
Almaak, 9640
|
||||
Mirphak, 15863
|
||||
Alnair, 109268
|
||||
Mizar, 65378
|
||||
Alnath, 25428
|
||||
Nihal, 25606
|
||||
Alnilam, 26311
|
||||
Nunki, 92855
|
||||
Alnitak, 26727
|
||||
Phad, 58001
|
||||
Alphard, 46390
|
||||
Pleione, 17851
|
||||
Alphekka, 76267
|
||||
Polaris, 11767
|
||||
Alpheratz, 677
|
||||
Pollux, 37826
|
||||
Alshain, 98036
|
||||
Procyon, 37279
|
||||
Altair, 97649
|
||||
Proxima, 70890
|
||||
Ankaa, 2081
|
||||
Rasalgethi, 84345
|
||||
Antares, 80763
|
||||
Rasalhague, 86032
|
||||
Arcturus, 69673
|
||||
Red,Rectangle, 30089
|
||||
Arneb, 25985,
|
||||
Regulus, 49669
|
||||
Babcock's star, 112247
|
||||
Rigel, 24436
|
||||
Barnard's,star, 87937
|
||||
Rigil Kent, 71683
|
||||
Bellatrix, 25336
|
||||
Sadalmelik, 109074
|
||||
Betelgeuse, 27989
|
||||
Saiph, 27366
|
||||
Campbell's star, 96295
|
||||
Scheat, 113881
|
||||
Canopus, 30438
|
||||
Shaula, 85927
|
||||
Capella, 24608
|
||||
Shedir, 3179
|
||||
Caph, 746
|
||||
Sheliak, 92420
|
||||
Castor, 36850
|
||||
Sirius, 32349
|
||||
Cor Caroli, 63125
|
||||
Spica, 65474
|
||||
Cyg X-1, 98298
|
||||
Tarazed, 97278
|
||||
Deneb, 102098
|
||||
Thuban, 68756
|
||||
Denebola, 57632
|
||||
Unukalhai, 77070
|
||||
Diphda, 3419
|
||||
Van,Maanen 2, 3829
|
||||
Dubhe, 54061
|
||||
Vega, 91262
|
||||
Enif, 107315
|
||||
Vindemiatrix, 63608
|
||||
Etamin, 87833
|
||||
Zaurak, 18543
|
||||
Fomalhaut, 113368
|
||||
3C 273, 60936
|
@ -46,6 +46,7 @@ def OSCstart():
|
||||
#osc_udp_client(redisIP, 8002, "LJ 8002")
|
||||
|
||||
def OSCframe():
|
||||
#print("OSCprocess")
|
||||
osc_process()
|
||||
|
||||
# Properly close the system. Todo
|
||||
@ -55,14 +56,11 @@ def OSCstop():
|
||||
|
||||
def Send(oscaddress,oscargs=''):
|
||||
|
||||
oscmsg = OSCMessage()
|
||||
oscmsg.setAddress(oscaddress)
|
||||
oscmsg.append(oscargs)
|
||||
|
||||
#print ("sending to bhorosc : ",oscmsg)
|
||||
try:
|
||||
msg = oscbuildparse.OSCMessage(oscaddress, None, [oscargs])
|
||||
osc_send(msg, "LJ 8002")
|
||||
OSCframe()
|
||||
|
||||
except:
|
||||
print ('Connection to LJ refused : died ?')
|
||||
pass
|
||||
@ -82,11 +80,6 @@ osc_udp_server("0.0.0.0", 3724, "anotherserver")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ASCII_GRAPHICS = [
|
||||
|
||||
# caracteres corrects
|
||||
@ -341,4 +334,4 @@ def Text(message,c, PL, xpos, ypos, resize, rotx, roty, rotz):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/python3
|
||||
# coding=UTF-8
|
||||
|
||||
'''
|
||||
@ -5,7 +6,7 @@ Multi Laser planetarium in python3 for LJ.
|
||||
v0.01
|
||||
Sam Neurohack
|
||||
|
||||
Accuracy tested against apparent data and starchart at https://www.calsky.com/cs.cgi?cha=7&sec=3&sub=2
|
||||
Accuracy could be tested against apparent data and starchart at https://www.calsky.com/cs.cgi?cha=7&sec=3&sub=2
|
||||
Remember to set the same observer position and time.
|
||||
|
||||
See Readme for more information
|
||||
@ -13,8 +14,10 @@ See Readme for more information
|
||||
|
||||
Todo:
|
||||
|
||||
- use debug mode and check altaz calculated values against online sites.
|
||||
- Validate aa2radec() with online calculator. Rewrite it to remove need for Astropy.
|
||||
- Findout how to use OSC in python 3.
|
||||
-
|
||||
- Code WebUI page.
|
||||
- UpdateStars() in each laser sky. Get magnitude. See UpdateSolar for example.
|
||||
- All Draw operations should also check visibility in the given laser altitude range.
|
||||
@ -39,7 +42,11 @@ from skyfield.data import hipparcos
|
||||
|
||||
from osc4py3.as_eventloop import *
|
||||
from osc4py3 import oscbuildparse
|
||||
from osc4py3 import oscmethod as osm
|
||||
#from osc4py3 import oscmethod as osm
|
||||
from osc4py3.oscmethod import *
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import json
|
||||
@ -65,8 +72,8 @@ print ("Arguments parsing if needed...")
|
||||
argsparser = argparse.ArgumentParser(description="Planetarium for LJ")
|
||||
argsparser.add_argument("-r","--redisIP",help="IP of the Redis server used by LJ (127.0.0.1 by default) ",type=str)
|
||||
argsparser.add_argument("-c","--client",help="LJ client number (0 by default)",type=int)
|
||||
argsparser.add_argument("-l","--laser",help="Laser number to be displayed (0 by default)",type=int)
|
||||
argsparser.add_argument("-d","--debug",help="Verbosity level (0 by default)",type=int)
|
||||
argsparser.add_argument("-L","--Lasers",help="Number of lasers connected (1 by default).",type=int)
|
||||
argsparser.add_argument("-v","--verbose",help="Verbosity level (0 by default)",type=int)
|
||||
argsparser.add_argument("-i","--input",help="inputs OSC Port (8005 by default)",type=int)
|
||||
#argsparser.add_argument("-n","--name",help="City Name of the observer",type=str)
|
||||
#argsparser.add_argument("-r","--redisIP",help="Country code of the observer ",type=str)
|
||||
@ -79,13 +86,13 @@ if args.client:
|
||||
else:
|
||||
ljclient = 0
|
||||
|
||||
if args.laser:
|
||||
lasernumber = args.laser
|
||||
if args.Lasers:
|
||||
lasernumber = args.Lasers
|
||||
else:
|
||||
lasernumber = 0
|
||||
lasernumber = 1
|
||||
|
||||
if args.debug:
|
||||
debug = args.laser
|
||||
if args.verbose:
|
||||
debug = args.verbose
|
||||
else:
|
||||
debug = 0
|
||||
|
||||
@ -322,7 +329,7 @@ def DrawSolar(laser):
|
||||
# Stars
|
||||
#
|
||||
|
||||
StarsObjectShape = [(-50,30), (-30,-30), (30,-30), (10,30), (-50,30)]
|
||||
StarsObjectShape = [(-10,10), (-10,-10), (10,-10), (10,10), (-10,10)]
|
||||
|
||||
def LoadHipparcos(ts):
|
||||
global hipdata
|
||||
@ -543,6 +550,26 @@ def InitObserver(SkyCity, SkyCountryCode, time,ts):
|
||||
RadecSkies(LaserSkies, AstroSkyTime)
|
||||
|
||||
|
||||
# Change Observer position by adding deltas (Gpslong, gpslat, elevation in decimal degree/meters)
|
||||
def UpdateObserver(gpslatdelta, gpslongdelta, elevationdelta,time,ts):
|
||||
global LaserSkies, Skylat, Skylong, SkyfieldTime, AstrObserver, SkyObserver
|
||||
|
||||
Skylat += gpslatdelta
|
||||
Skylong += gpslongdelta
|
||||
Skyelevation += elevationdelta
|
||||
AstroSkyTime = time
|
||||
print ("AstroPy time", AstroSkyTime)
|
||||
SkyfieldTime = ts.from_astropy(AstroSkyTime)
|
||||
print("SkyfieldTime from AstropyUTC",SkyfieldTime.utc_iso())
|
||||
|
||||
AstrObserver = EarthLocation(lat = Skylat * u.deg, lon = Skylong * u.deg, height = Skyelevation * u.m,)
|
||||
SkyObserver = earth + Topos(Skylat, Skylong)
|
||||
RadecSkies(LaserSkies, AstroSkyTime)
|
||||
|
||||
UpdateSolar()
|
||||
UpdateStars()
|
||||
UpdateAnything()
|
||||
|
||||
def NewTime(timeshift):
|
||||
|
||||
SkyfieldTime += timeshift
|
||||
@ -555,60 +582,60 @@ def NewTime(timeshift):
|
||||
UpdateAnything()
|
||||
|
||||
|
||||
#def handlerfunction(s, x, y):
|
||||
# Will receive message data unpacked in s, x, y
|
||||
# pass
|
||||
|
||||
def OSChandler(address, s, x, y):
|
||||
def OSCstart(value):
|
||||
# Will receive message address, and message data flattened in s, x, y
|
||||
print("Planetarium OSC server got address", address,"s",s,"x",x,"y",y)
|
||||
pass
|
||||
|
||||
print("Planetarium OSC server got /planet/start with value", value)
|
||||
|
||||
|
||||
def OSCUI(value):
|
||||
# Will receive message address, and message data flattened in s, x, y
|
||||
print("Planetarium OSC server got /planet/planetUI with value", value)
|
||||
|
||||
def WebStatus(message):
|
||||
lj3.Send("/status",message)
|
||||
|
||||
|
||||
#
|
||||
# Main part
|
||||
#
|
||||
|
||||
try:
|
||||
|
||||
lj3.OSCstart()
|
||||
# Make server channels to receive packets.
|
||||
#osc_udp_server("127.0.0.1", 3721, "localhost")
|
||||
osc_udp_server("0.0.0.0", OSCinPort, "InPort")
|
||||
|
||||
# Associate Python functions with message address patterns, using default
|
||||
# argument scheme OSCARG_DATAUNPACK.
|
||||
#osc_method("/planet/*", handlerfunction)
|
||||
# Too, but request the message address pattern before in argscheme
|
||||
osc_method("/planet/*", OSChandler, argscheme=osm.OSCARG_ADDRESS + osm.OSCARG_DATAUNPACK)
|
||||
WebStatus("Planetarium")
|
||||
|
||||
# OSC Server callbacks
|
||||
print("Starting OSC at 127.0.0.1 port",OSCinPort,"...")
|
||||
osc_startup()
|
||||
osc_udp_server("127.0.0.1", OSCinPort, "InPort")
|
||||
osc_method("/planet/start*", OSCstart)
|
||||
osc_method("/planet/planetUI*", OSCUI)
|
||||
|
||||
WebStatus("Load Cities.")
|
||||
ts = load.timescale()
|
||||
LoadCities()
|
||||
|
||||
SkyCity = 'Paris'
|
||||
SkyCountryCode = 'FR'
|
||||
WebStatus(SkyCity)
|
||||
|
||||
WebStatus("Solar System..")
|
||||
LoadSolar()
|
||||
|
||||
WebStatus("Observer..")
|
||||
InitObserver(SkyCity, SkyCountryCode, Time.now(),ts)
|
||||
|
||||
|
||||
WebStatus("Load Stars..")
|
||||
LoadHipparcos(ts)
|
||||
|
||||
|
||||
StarSelect()
|
||||
|
||||
#print()
|
||||
#print ("Updating Sky Objects for current observer...")
|
||||
#print()
|
||||
WebStatus("Updating...")
|
||||
print("Updating solar system (de421) objects position for observer at", Skylat, Skylong, "time", SkyfieldTime.utc_iso())
|
||||
UpdateSolar()
|
||||
#print ("Done.")
|
||||
#print()
|
||||
|
||||
print("Updating stars for observer at", Skylat, Skylong, "time", SkyfieldTime.utc_iso())
|
||||
UpdateStars(ts)
|
||||
|
||||
WebStatus("Ready")
|
||||
lj3.Send("/planet/start",1)
|
||||
print ("Done.")
|
||||
|
||||
# UpdateStars() Todo
|
||||
@ -617,19 +644,28 @@ try:
|
||||
DisplaySolar = False
|
||||
DisplayOrientation = True
|
||||
DisplayAnything = False
|
||||
print("Start displaying on",lasernumber,"lasers")
|
||||
|
||||
while 1:
|
||||
|
||||
for laser in range(lasernumber):
|
||||
|
||||
#print ("Drawing laser",lasernumber)
|
||||
if DisplayOrientation:
|
||||
DrawOrientation(laser)
|
||||
lj3.OSCframe()
|
||||
|
||||
if DisplaySolar:
|
||||
DrawSolar(laser)
|
||||
lj3.OSCframe()
|
||||
|
||||
if DisplayStars:
|
||||
DrawStars(laser)
|
||||
lj3.OSCframe()
|
||||
|
||||
if DisplayAnything:
|
||||
DrawAnything()
|
||||
lj3.OSCframe()
|
||||
|
||||
lj3.DrawPL(laser)
|
||||
lj3.OSCframe()
|
||||
@ -644,6 +680,8 @@ except KeyboardInterrupt:
|
||||
|
||||
finally:
|
||||
|
||||
WebStatus("Planet Exit")
|
||||
print("Stopping OSC...")
|
||||
lj3.OSCstop()
|
||||
|
||||
print ("Fin du planetarium.")
|
||||
|
243
commands.py
@ -73,7 +73,7 @@ Bob could use /pl/2/0 and /pl/2/1 and Lisa could use /pl/2/2 and /pl/2/3.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
import types, time
|
||||
import gstt
|
||||
import homographyp
|
||||
@ -159,144 +159,153 @@ def Mouse(x1,y1,x2,y2):
|
||||
def handler(oscpath, args):
|
||||
|
||||
print ""
|
||||
print "Handler"
|
||||
print "OSC handler in commands.py got oscpath[1] :",oscpath[1], "with args :",args
|
||||
|
||||
if oscpath[1] == "client" or oscpath[1] =="noteon" or oscpath[1]=="mouse":
|
||||
# 2 incoming cases : generic or specific for a given lasernumber
|
||||
# Need better programming
|
||||
if oscpath[1] == "client" or oscpath[1] =="noteon" or oscpath[1]=="mouse" or oscpath[1]=="emergency" or oscpath[1]=="simu" or oscpath[1]=="status" or oscpath[1]=="run" or oscpath[1]=="nozoid" or oscpath[1]=="planet" or oscpath[1]=="live" or oscpath[1]=="planet" :
|
||||
|
||||
if oscpath[1] == "client":
|
||||
LasClientChange(int(args[0]))
|
||||
|
||||
elif oscpath[1] == "noteon":
|
||||
NoteOn(int(args[0]))
|
||||
|
||||
elif oscpath[1] == "mouse":
|
||||
Mouse(int(args[0]),int(args[1]),int(args[2]),int(args[3]))
|
||||
|
||||
# /emergency value (0 or 1)
|
||||
if oscpath[1] == "emergency":
|
||||
|
||||
if args[0] == "1":
|
||||
print "EMERGENCY MODE"
|
||||
for laser in range(gstt.lasernumber):
|
||||
print "Black requested for laser ", laser
|
||||
BlackOn(laser)
|
||||
else:
|
||||
for laser in range(gstt.lasernumber):
|
||||
print "Back to normal for laser ", laser
|
||||
UserOn(laser)
|
||||
|
||||
|
||||
else:
|
||||
pathlength = len(oscpath)
|
||||
|
||||
if pathlength == 3:
|
||||
laser = int(oscpath[2])
|
||||
else:
|
||||
laser = int(oscpath[3])
|
||||
|
||||
print "args[0] :",args[0]," ", type(args[0])
|
||||
|
||||
# /grid/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "grid":
|
||||
|
||||
if args[0] == "1":
|
||||
print "Grid requested for laser ", laser
|
||||
GridOn(laser)
|
||||
else:
|
||||
print "No grid for laser ", laser
|
||||
UserOn(laser)
|
||||
|
||||
|
||||
# /black/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "black":
|
||||
|
||||
if args[0] == "1":
|
||||
print "Black requested for laser ", laser
|
||||
BlackOn(laser)
|
||||
else:
|
||||
print "No black for laser ", laser
|
||||
UserOn(laser)
|
||||
|
||||
|
||||
# /ip/lasernumber value
|
||||
if oscpath[1] == "ip":
|
||||
print "New IP for laser ", laser
|
||||
gstt.lasersIPS[laser]= args[0]
|
||||
settings.Write()
|
||||
|
||||
|
||||
# /kpps/lasernumber value
|
||||
# Live change of kpps is not implemented in newdac.py. Change will effect next startup.
|
||||
if oscpath[1] == "kpps":
|
||||
print "New kpps for laser ", laser, " next startup", int(args[0])
|
||||
gstt.kpps[laser]= int(args[0])
|
||||
settings.Write()
|
||||
|
||||
# /angle/lasernumber value
|
||||
if oscpath[1] == "angle":
|
||||
print "New Angle modification for laser ", oscpath[2], ":", float(args[0])
|
||||
gstt.finANGLE[laser] += float(args[0])
|
||||
NewEDH(laser)
|
||||
"New angle", gstt.finANGLE[laser]
|
||||
print "args[0] :",args[0]," ", type(args[0])
|
||||
|
||||
# /intens/lasernumber value
|
||||
if oscpath[1] == "intens":
|
||||
print "New intensity requested for laser ", laser, ":", int(args[0])
|
||||
print "Change not implemented yet"
|
||||
|
||||
|
||||
|
||||
# /resampler/lasernumber lsteps
|
||||
# lsteps is a string like "[ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]"
|
||||
if oscpath[1] == "resampler":
|
||||
Resampler(laser,args[0])
|
||||
# /grid/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "grid":
|
||||
|
||||
|
||||
# /mouse/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "mouse":
|
||||
if args[0] == "1":
|
||||
print "Grid requested for laser ", laser
|
||||
GridOn(laser)
|
||||
else:
|
||||
print "No grid for laser ", laser
|
||||
UserOn(laser)
|
||||
|
||||
|
||||
# /ip/lasernumber value
|
||||
if oscpath[1] == "ip":
|
||||
print "New IP for laser ", laser
|
||||
gstt.lasersIPS[laser]= args[0]
|
||||
settings.Write()
|
||||
|
||||
if args[0] == "1":
|
||||
print "Mouse requested for laser ", oscpath[2]
|
||||
gstt.Laser = oscpath[2]
|
||||
else:
|
||||
print "No mouse for laser ", oscpath[2]
|
||||
|
||||
|
||||
# /swap/X/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "swap" and oscpath[2] == "X":
|
||||
|
||||
print "swapX was", gstt.swapX[laser]
|
||||
if args[0] == "0":
|
||||
print "swap X -1 for laser ", laser
|
||||
gstt.swapX[laser]= -1
|
||||
NewEDH(laser)
|
||||
|
||||
else:
|
||||
print "swap X 1 for laser ", laser
|
||||
gstt.swapX[laser]= 1
|
||||
NewEDH(laser)
|
||||
|
||||
# /swap/Y/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "swap" and oscpath[2] == "Y":
|
||||
|
||||
print "swapY was", gstt.swapX[laser]
|
||||
if args[0] == "0":
|
||||
print "swap Y -1 for laser ", laser
|
||||
gstt.swapY[laser]= -1
|
||||
NewEDH(laser)
|
||||
else:
|
||||
print "swap Y 1 for laser ", laser
|
||||
gstt.swapY[laser]= 1
|
||||
NewEDH(laser)
|
||||
|
||||
# /loffset/X/lasernumber value
|
||||
if oscpath[1] == "loffset" and oscpath[2] == "X":
|
||||
print "offset/X laser", laser, "modified to", args[0]
|
||||
gstt.centerX[laser] -= int(args[0])
|
||||
NewEDH(laser)
|
||||
# /kpps/lasernumber value
|
||||
# Live change of kpps is not implemented in newdac.py. Change will effect next startup.
|
||||
if oscpath[1] == "kpps":
|
||||
print "New kpps for laser ", laser, " next startup", int(args[0])
|
||||
gstt.kpps[laser]= int(args[0])
|
||||
settings.Write()
|
||||
|
||||
# /loffset/Y/lasernumber value
|
||||
if oscpath[1] == "loffset" and oscpath[2] == "Y":
|
||||
print "offset/Y laser", laser, "modified to", args[0]
|
||||
gstt.centerY[laser] -= int(args[0])
|
||||
NewEDH(laser)
|
||||
|
||||
|
||||
# /scale/X/lasernumber value
|
||||
if oscpath[1] == "scale" and oscpath[2] == "X":
|
||||
if gstt.zoomX[laser] + int(args[0]) > 0:
|
||||
gstt.zoomX[laser] += int(args[0])
|
||||
print "scale/X laser", laser , "modified to", gstt.zoomX[laser]
|
||||
# /angle/lasernumber value
|
||||
if oscpath[1] == "angle":
|
||||
print "New Angle modification for laser ", oscpath[2], ":", float(args[0])
|
||||
gstt.finANGLE[laser] += float(args[0])
|
||||
NewEDH(laser)
|
||||
|
||||
# /scale/Y/lasernumber value
|
||||
if oscpath[1] == "scale" and oscpath[2] == "Y":
|
||||
if gstt.zoomY[laser] + int(args[0]) > 0:
|
||||
gstt.zoomY[laser] += int(args[0])
|
||||
print "scale/Y laser", laser, "modified to", gstt.zoomY[laser]
|
||||
"New angle", gstt.finANGLE[laser]
|
||||
|
||||
# /intens/lasernumber value
|
||||
if oscpath[1] == "intens":
|
||||
print "New intensity requested for laser ", laser, ":", int(args[0])
|
||||
print "Change not implemented yet"
|
||||
|
||||
|
||||
|
||||
# /resampler/lasernumber lsteps
|
||||
# lsteps is a string like "[ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]"
|
||||
if oscpath[1] == "resampler":
|
||||
Resampler(laser,args[0])
|
||||
|
||||
|
||||
# /mouse/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "mouse":
|
||||
|
||||
if args[0] == "1":
|
||||
print "Mouse requested for laser ", oscpath[2]
|
||||
gstt.Laser = oscpath[2]
|
||||
else:
|
||||
print "No mouse for laser ", oscpath[2]
|
||||
|
||||
|
||||
# /swap/X/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "swap" and oscpath[2] == "X":
|
||||
|
||||
print "swapX was", gstt.swapX[laser]
|
||||
if args[0] == "0":
|
||||
print "swap X -1 for laser ", laser
|
||||
gstt.swapX[laser]= -1
|
||||
NewEDH(laser)
|
||||
|
||||
else:
|
||||
print "swap X 1 for laser ", laser
|
||||
gstt.swapX[laser]= 1
|
||||
NewEDH(laser)
|
||||
|
||||
# /swap/Y/lasernumber value (0 or 1)
|
||||
if oscpath[1] == "swap" and oscpath[2] == "Y":
|
||||
|
||||
print "swapY was", gstt.swapX[laser]
|
||||
if args[0] == "0":
|
||||
print "swap Y -1 for laser ", laser
|
||||
gstt.swapY[laser]= -1
|
||||
NewEDH(laser)
|
||||
else:
|
||||
print "swap Y 1 for laser ", laser
|
||||
gstt.swapY[laser]= 1
|
||||
NewEDH(laser)
|
||||
|
||||
# /loffset/X/lasernumber value
|
||||
if oscpath[1] == "loffset" and oscpath[2] == "X":
|
||||
print "offset/X laser", laser, "modified to", args[0]
|
||||
gstt.centerX[laser] -= int(args[0])
|
||||
NewEDH(laser)
|
||||
|
||||
# /loffset/Y/lasernumber value
|
||||
if oscpath[1] == "loffset" and oscpath[2] == "Y":
|
||||
print "offset/Y laser", laser, "modified to", args[0]
|
||||
gstt.centerY[laser] -= int(args[0])
|
||||
NewEDH(laser)
|
||||
|
||||
|
||||
# /scale/X/lasernumber value
|
||||
if oscpath[1] == "scale" and oscpath[2] == "X":
|
||||
if gstt.zoomX[laser] + int(args[0]) > 0:
|
||||
gstt.zoomX[laser] += int(args[0])
|
||||
print "scale/X laser", laser , "modified to", gstt.zoomX[laser]
|
||||
NewEDH(laser)
|
||||
|
||||
# /scale/Y/lasernumber value
|
||||
if oscpath[1] == "scale" and oscpath[2] == "Y":
|
||||
if gstt.zoomY[laser] + int(args[0]) > 0:
|
||||
gstt.zoomY[laser] += int(args[0])
|
||||
print "scale/Y laser", laser, "modified to", gstt.zoomY[laser]
|
||||
NewEDH(laser)
|
||||
|
||||
'''
|
||||
For reference values of EDH modifier if assign to keyboard keys (was alignp)
|
||||
|
10
gstt.py
@ -74,11 +74,13 @@ swapY = [1,1,1,-1]
|
||||
# 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)]
|
||||
|
||||
#stepslongline = [(0.25,1), (0.75, 1), (1.0, 1)]
|
||||
#stepshortline = [(1.0, 8)]
|
||||
#stepslongline = [(0.25, 3), (0.75, 3), (1.0, 10)]
|
||||
stepslongline = [(0.25,1), (0.75, 1), (1.0, 1)]
|
||||
#stepshortline = [(1.0, 8)]
|
||||
stepslongline = [(1.0, 1)]
|
||||
#stepslongline = [(1.0, 1)]
|
||||
#stepshortline = [(1.0, 1)]
|
||||
|
||||
point = [0,0,0]
|
||||
|
||||
|
157
main.py
Normal file → Executable file
@ -14,7 +14,7 @@ todo :
|
||||
|
||||
|
||||
'''
|
||||
from __future__ import absolute_import
|
||||
|
||||
import time
|
||||
import gstt
|
||||
import redis
|
||||
@ -78,8 +78,8 @@ print "Laser client number :",gstt.LasClientNumber
|
||||
serverIP = gstt.LjayServerIP
|
||||
print "Redis IP :", serverIP
|
||||
|
||||
bhoroscIP = gstt.oscIPin
|
||||
print "Bhorosc IP :", bhoroscIP
|
||||
extoscIP = gstt.oscIPin
|
||||
print "extosc IP :", extoscIP
|
||||
|
||||
nozoscIP = gstt.nozoscip
|
||||
print "Nozosc IP :", nozoscIP
|
||||
@ -94,15 +94,15 @@ print "Lasers requested :", gstt.LaserNumber
|
||||
# Websocket listening port
|
||||
wsPORT = 9001
|
||||
|
||||
# With Bhorosc
|
||||
# With extosc
|
||||
# OSC Server : accept OSC message on port 8002
|
||||
#oscIPin = "192.168.1.10"s
|
||||
bhoroscIPin = serverIP
|
||||
bhoroscPORTin = 8002
|
||||
extoscIPin = serverIP
|
||||
extoscPORTin = 8002
|
||||
|
||||
# OSC Client : to send OSC message to an IP port 8001
|
||||
bhoroscIPout = bhoroscIP
|
||||
bhoroscPORTout = 8001
|
||||
extoscIPout = extoscIP
|
||||
extoscPORTout = 8001
|
||||
|
||||
|
||||
# With Nozoid
|
||||
@ -110,9 +110,14 @@ bhoroscPORTout = 8001
|
||||
NozoscIPout = nozoscIP
|
||||
NozoscPORTout = 8003
|
||||
|
||||
#print bhoroscIPin
|
||||
|
||||
oscserver = OSCServer( (bhoroscIPin, bhoroscPORTin) )
|
||||
# With Planetarium
|
||||
# OSC Client : to send OSC message to planetarium inport 8005
|
||||
planetIPout = nozoscIP
|
||||
planetPORTout = 8005
|
||||
|
||||
|
||||
oscserver = OSCServer( (extoscIPin, extoscPORTin) )
|
||||
oscserver.timeout = 0
|
||||
OSCRunning = True
|
||||
|
||||
@ -122,64 +127,90 @@ def handle_timeout(self):
|
||||
|
||||
oscserver.handle_timeout = types.MethodType(handle_timeout, oscserver)
|
||||
|
||||
osclientbhorosc = OSCClient()
|
||||
osclientext = OSCClient()
|
||||
oscmsg = OSCMessage()
|
||||
osclientbhorosc.connect((bhoroscIPout, bhoroscPORTout))
|
||||
osclientext.connect((extoscIPout, extoscPORTout))
|
||||
|
||||
# send UI string as OSC message to Bhorosc 8001
|
||||
# sendbhorosc(oscaddress, [arg1, arg2,...])
|
||||
# send UI string as OSC message to extosc 8001
|
||||
# sendextosc(oscaddress, [arg1, arg2,...])
|
||||
|
||||
def sendbhorosc(oscaddress,oscargs=''):
|
||||
def sendextosc(oscaddress,oscargs=''):
|
||||
|
||||
oscmsg = OSCMessage()
|
||||
oscmsg.setAddress(oscaddress)
|
||||
oscmsg.append(oscargs)
|
||||
|
||||
#print ("sending to bhorosc : ",oscmsg)
|
||||
#print ("sending to extosc : ",oscmsg)
|
||||
try:
|
||||
osclientbhorosc.sendto(oscmsg, (bhoroscIPout, bhoroscPORTout))
|
||||
osclientext.sendto(oscmsg, (extoscIPout, extoscPORTout))
|
||||
oscmsg.clearData()
|
||||
except:
|
||||
print ('Connection to bhorosc refused : died ?')
|
||||
print ('Connection to extosc IP', extoscIPout, 'port', extoscPORTout,'refused : died ?')
|
||||
sendWSall("/on 0")
|
||||
sendWSall("/status NoLJay")
|
||||
pass
|
||||
|
||||
#time.sleep(0.001)
|
||||
|
||||
|
||||
# send UI string as OSC message to Nozosc 8003
|
||||
# sendnozosc(oscaddress, [arg1, arg2,...])
|
||||
|
||||
osclientnozoid = OSCClient()
|
||||
osclientnozoid.connect((NozoscIPout, NozoscPORTout))
|
||||
|
||||
def sendnozosc(oscaddress,oscargs=''):
|
||||
|
||||
oscmsg = OSCMessage()
|
||||
oscmsg.setAddress(oscaddress)
|
||||
oscmsg.append(oscargs)
|
||||
|
||||
#print ("sending to nozosc : ",oscmsg)
|
||||
print "Sending OSC to Nozosc server :", oscaddress,'with args', oscargs
|
||||
try:
|
||||
osclientnozosc.sendto(oscmsg, (NozoscIPout, NozoscPORTout))
|
||||
osclientnozoid.sendto(oscmsg, (NozoscIPout, NozoscPORTout))
|
||||
oscmsg.clearData()
|
||||
except:
|
||||
print ('Connection to nozosc refused : died ?')
|
||||
print 'Connection to nozosc IP', NozoscIPout,'port', NozoscPORTout,' refused : died ?'
|
||||
sendWSall("/on 0")
|
||||
sendWSall("/status No Nozosc ")
|
||||
pass
|
||||
|
||||
#time.sleep(0.001)
|
||||
|
||||
# send UI string as OSC message to Planet 8005
|
||||
# sendplanet(oscaddress, [arg1, arg2,...])
|
||||
|
||||
osclientplanet = OSCClient()
|
||||
osclientplanet.connect((planetIPout, planetPORTout))
|
||||
|
||||
def sendplanet(oscaddress,oscargs=''):
|
||||
|
||||
oscmsg = OSCMessage()
|
||||
oscmsg.setAddress(oscaddress)
|
||||
oscmsg.append(oscargs)
|
||||
|
||||
print "Sending OSC to Planet server :", oscaddress,'with args :', oscargs
|
||||
try:
|
||||
osclientplanet.sendto(oscmsg, (planetIPout, planetPORTout))
|
||||
oscmsg.clearData()
|
||||
except:
|
||||
print 'OSC send to planet IP', planetIPout, 'port', planetPORTout, "refused : died ?"
|
||||
sendWSall("/planet/start 0")
|
||||
sendWSall("/status No Planet")
|
||||
|
||||
#time.sleep(0.001)
|
||||
|
||||
# OSC default path handler : send incoming OSC message to UI via websocket 9001
|
||||
def handler(path, tags, args, source):
|
||||
|
||||
oscpath = path.split("/")
|
||||
print ""
|
||||
print "OSC said : ", path, oscpath, args
|
||||
print "OSC default handler in main said : path", path," oscpath ", oscpath," args", args
|
||||
#print "debug", gstt.debug
|
||||
if gstt.debug >0:
|
||||
print ""
|
||||
print "default handler"
|
||||
print "OSC said : ", path, oscpath, args
|
||||
#if gstt.debug >0:
|
||||
# print "default handler"
|
||||
# print "OSC said path", path," oscpath ", oscpath," args", args
|
||||
|
||||
sendWSall(path + " " + str(args[0]))
|
||||
|
||||
commands.handler(oscpath,args)
|
||||
|
||||
|
||||
@ -216,8 +247,8 @@ def osc_thread():
|
||||
|
||||
|
||||
lack= r.get('/lack/'+str(laserid))
|
||||
if gstt.debug >0:
|
||||
print "laserid", laserid,"lack",lack
|
||||
if gstt.debug >1:
|
||||
print "laserid", laserid, "lack", lack
|
||||
if lack == 'a': # Dac sent ACK ("a") -> led is green (1)
|
||||
sendWSall("/lack/" + str(laserid) +" 1")
|
||||
if lack == 'F': # Dac sent FULL ("F") -> led is orange (5)
|
||||
@ -280,27 +311,61 @@ def client_left(client, server):
|
||||
print("WS Client(%d) disconnected" % client['id'])
|
||||
|
||||
|
||||
# Called when a WS client sends a message
|
||||
# Called for each ws received message.
|
||||
def message_received(client, server, message):
|
||||
if len(message) > 200:
|
||||
message = message[:200]+'..'
|
||||
|
||||
if gstt.debug >0:
|
||||
print ("")
|
||||
print("WS Client(%d) said: %s" % (client['id'], message))
|
||||
#if gstt.debug >0:
|
||||
# print ("")
|
||||
# print("WS Client(%d) said: %s" % (client['id'], message))
|
||||
|
||||
print("WS Client(%d) said: %s" % (client['id'], message))
|
||||
print("")
|
||||
|
||||
oscpath = message.split(" ")
|
||||
args[0] = str(oscpath[1])
|
||||
#print oscpath[0].split("/"),oscpath[1]
|
||||
commands.handler(oscpath[0].split("/"),args)
|
||||
|
||||
# current UI has no dedicated off button so /on 0 trigs /off to bhorosc
|
||||
if oscpath[0] == "/on":
|
||||
if oscpath[1] == "1":
|
||||
sendbhorosc("/on")
|
||||
print "WS Client", client['id'], "said :", message, "splitted in an oscpath :", oscpath
|
||||
|
||||
# If message included "planet" forward the message as OSC to planet IP port 8005
|
||||
if oscpath[0].find("planet") != -1:
|
||||
if len(oscpath) == 1:
|
||||
sendplanet(oscpath[0], oscargs='noargs')
|
||||
else:
|
||||
sendbhorosc("/off")
|
||||
sendplanet(oscpath[0], oscargs=oscpath[1])
|
||||
|
||||
# If message included "nozoid" forward the message as OSC to nozoid IP port 8003
|
||||
elif oscpath[0].find("nozoid") != -1:
|
||||
if len(oscpath) == 1:
|
||||
sendnozosc(oscpath[0], oscargs='noargs')
|
||||
else:
|
||||
sendnozosc(oscpath[0], oscargs=oscpath[1])
|
||||
|
||||
# If message included "ai" do something
|
||||
elif oscpath[0].find("ai") != -1:
|
||||
print "ai order ", oscpath
|
||||
|
||||
# If message included "lissa" do something
|
||||
elif oscpath[0].find("lissa") != -1:
|
||||
print "lissa order ", oscpath
|
||||
|
||||
# If message included "vj" do something
|
||||
elif oscpath[0].find("vj") != -1:
|
||||
print "VJ order ", oscpath
|
||||
|
||||
elif len(oscpath) > 1:
|
||||
args[0] = str(oscpath[1])
|
||||
#print oscpath[0].split("/"),oscpath[1]
|
||||
|
||||
# current UI has no dedicated off button so /on 0 trigs /off to extosc
|
||||
elif oscpath[0] == "/on":
|
||||
if oscpath[1] == "1":
|
||||
sendextosc("/on")
|
||||
else:
|
||||
sendextosc("/off")
|
||||
|
||||
else:
|
||||
args[0] = "noargs"
|
||||
commands.handler(oscpath[0].split("/"),args)
|
||||
|
||||
|
||||
# if needed a loop back : WS Client -> server -> WS Client
|
||||
#sendWSall("ws"+message)
|
||||
@ -367,10 +432,10 @@ try:
|
||||
# Websocket startup
|
||||
server = WebsocketServer(wsPORT,host=serverIP)
|
||||
|
||||
# Launch OSC thread listening to Bhorosc
|
||||
# Launch OSC thread listening to extosc
|
||||
print ""
|
||||
print "Launching OSC server..."
|
||||
print "at", bhoroscIPin, "port",str(bhoroscPORTin)
|
||||
print "at", extoscIPin, "port",str(extoscPORTin)
|
||||
print "Will update webUI dac status every second"
|
||||
oscserver.addMsgHandler( "/noteon", commands.NoteOn )
|
||||
# Default OSC handler for all OSC incoming message
|
||||
|
338
webui/LJ.js
@ -1,23 +1,25 @@
|
||||
//
|
||||
// LJ.js v0.7.0
|
||||
// LJ.js v0.7.1
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Central horizontal menu
|
||||
//
|
||||
|
||||
function noMenu() {
|
||||
// Set all menu button with normal button style
|
||||
var x = document.getElementById("showalign");
|
||||
x.className = "button";
|
||||
var x = document.getElementById("showrun");
|
||||
x.className = "button";
|
||||
var x = document.getElementById("showcanvas");
|
||||
x.className = "button";
|
||||
var x = document.getElementById("showlive");
|
||||
x.className = "button";
|
||||
var x = document.getElementById("shownozoid");
|
||||
x.className = "button";
|
||||
var x = document.getElementById("showplanet");
|
||||
x.className = "button";
|
||||
// Set all central menu buttons with normal button style
|
||||
var x = document.getElementById("align");
|
||||
x.value = 0 ;
|
||||
var x = document.getElementById("run");
|
||||
x.value = 0 ;
|
||||
var x = document.getElementById("simu");
|
||||
x.value = 0 ;
|
||||
var x = document.getElementById("live");
|
||||
x.value = 0 ;
|
||||
var x = document.getElementById("nozoid");
|
||||
x.value = 0 ;
|
||||
var x = document.getElementById("planet");
|
||||
x.value = 0 ;
|
||||
|
||||
// Hide all possible main central grids.
|
||||
var x = document.getElementById("mgalign");
|
||||
@ -37,103 +39,188 @@
|
||||
}
|
||||
|
||||
function showAlign() {
|
||||
noMenu();
|
||||
noMenu();
|
||||
var x = document.getElementById("mgalign");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("showalign");
|
||||
x.className = "button:checked";
|
||||
var x = document.getElementById("align");
|
||||
x.value = 1 ;
|
||||
}
|
||||
|
||||
function showRun() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mgrun");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("showrun");
|
||||
x.className = "button:checked";
|
||||
}
|
||||
function showRun() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mgrun");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("run");
|
||||
x.value = 1 ;
|
||||
}
|
||||
|
||||
function showCanvas() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mgsimu");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("cnvbuttons");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("showcanvas");
|
||||
x.className = "button:checked";
|
||||
}
|
||||
function showCanvas() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mgsimu");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("cnvbuttons");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("simu");
|
||||
x.value = 1 ;
|
||||
}
|
||||
|
||||
function showLive() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mglive");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("showlive");
|
||||
x.className = "button:checked";
|
||||
}
|
||||
function showLive() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mglive");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("live");
|
||||
x.value = 1 ;
|
||||
}
|
||||
|
||||
function showNozoid() {
|
||||
function showNozoid() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mgnozoid");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("shownozoid");
|
||||
x.className = "button:checked";
|
||||
}
|
||||
var x = document.getElementById("nozoid");
|
||||
x.value = 1 ;
|
||||
}
|
||||
|
||||
function showPlanet() {
|
||||
function showPlanet() {
|
||||
noMenu();
|
||||
var x = document.getElementById("mgplanet");
|
||||
x.style.display = "grid";
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("cnvbuttons");
|
||||
x.style.display = "grid";
|
||||
var x = document.getElementById("showplanet");
|
||||
x.className = "button:checked";
|
||||
}
|
||||
var x = document.getElementById("planet");
|
||||
x.value = 1 ;
|
||||
}
|
||||
|
||||
function buttonClicked(clicked_id) {
|
||||
_WS.send("/" + clicked_id);
|
||||
}
|
||||
function buttonClicked(clicked_id) {
|
||||
|
||||
function onSubmit(clicked_id) {
|
||||
var input = document.getElementById(clicked_id);
|
||||
console.log("/" + clicked_id + " " + input.value);
|
||||
_WS.send("/" + clicked_id + " " + input.value);
|
||||
_WS.showout("/" + clicked_id + " " + input.value);
|
||||
_WS.send("/" + clicked_id);
|
||||
|
||||
// update Canvas right part of maingrid
|
||||
if (clicked_id === "planet/planetUI") {
|
||||
showplanetUI();
|
||||
}
|
||||
if (clicked_id === "nozoid/nozoidUI") {
|
||||
shownozoidUI();
|
||||
}
|
||||
if (clicked_id === "ai/aiUI") {
|
||||
showaiUI();
|
||||
}
|
||||
if (clicked_id === "lissa/lissaUI") {
|
||||
showlissaUI();
|
||||
}
|
||||
if (clicked_id === "vj/vjUI") {
|
||||
showlissaUI();
|
||||
}
|
||||
if (clicked_id === "nozoid/down 50") {
|
||||
var x = document.getElementById("nozoid/down 50");
|
||||
x.value = 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SimuUIs
|
||||
//
|
||||
|
||||
function nosimuUI() {
|
||||
// Hide all possible main central grids.
|
||||
var x = document.getElementById("planetUI");
|
||||
x.style.display = "none";
|
||||
var x = document.getElementById("nozoidUI");
|
||||
x.style.display = "none";
|
||||
var x = document.getElementById("aiUI");
|
||||
x.style.display = "none";
|
||||
var x = document.getElementById("lissaUI");
|
||||
x.style.display = "none";
|
||||
var x = document.getElementById("vjUI");
|
||||
x.style.display = "none";
|
||||
}
|
||||
|
||||
function showplanetUI() {
|
||||
nosimuUI();
|
||||
var x = document.getElementById("planetUI");
|
||||
x.style.display = "grid";
|
||||
}
|
||||
|
||||
function shownozoidUI() {
|
||||
nosimuUI();
|
||||
var x = document.getElementById("nozoidUI");
|
||||
x.style.display = "grid";
|
||||
}
|
||||
|
||||
function showaiUI() {
|
||||
nosimuUI();
|
||||
var x = document.getElementById("aiUI");
|
||||
x.style.display = "grid";
|
||||
}
|
||||
|
||||
function showlissaUI() {
|
||||
nosimuUI();
|
||||
var x = document.getElementById("lissaUI");
|
||||
x.style.display = "grid";
|
||||
}
|
||||
|
||||
function showvjUI() {
|
||||
nosimuUI();
|
||||
var x = document.getElementById("vjUI");
|
||||
x.style.display = "grid";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Forms submits
|
||||
//
|
||||
|
||||
function onSubmit(clicked_id) {
|
||||
var input = document.getElementById(clicked_id);
|
||||
console.log("/" + clicked_id + " " + input.value);
|
||||
_WS.send("/" + clicked_id + " " + input.value);
|
||||
_WS.showout("/" + clicked_id + " " + input.value);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Websocket handler
|
||||
//
|
||||
|
||||
var pl = "";
|
||||
var pl2 = new Array();
|
||||
var _WS = {
|
||||
uri: 'ws://127.0.0.1:9001/',
|
||||
ws: null,
|
||||
init : function (e) {
|
||||
_WS.s = new WebSocket(_WS.uri);
|
||||
_WS.s.onopen = function (e) { _WS.onOpen(e); };
|
||||
_WS.s.onclose = function (e) { _WS.onClose(e); };
|
||||
_WS.s.onmessage = function (e) { _WS.onMessage(e); };
|
||||
_WS.s.onerror = function (e) { _WS.onError(e); };
|
||||
},
|
||||
onOpen: function () {
|
||||
_WS.showout(_WS.uri);
|
||||
_WS.showout('CONNECTED');
|
||||
document.getElementById("on").value = 1;
|
||||
},
|
||||
onClose: function () {
|
||||
_WS.showout('DISCONNECTED');
|
||||
document.getElementById("on").value = 0;
|
||||
document.getElementById("lstt/0").value = 0;
|
||||
document.getElementById("lstt/1").value = 0;
|
||||
document.getElementById("lstt/2").value = 0;
|
||||
document.getElementById("lstt/3").value = 0;
|
||||
document.getElementById("lack/0").value = 0;
|
||||
document.getElementById("lack/1").value = 0;
|
||||
document.getElementById("lack/2").value = 0;
|
||||
document.getElementById("lack/3").value = 0;
|
||||
},
|
||||
onMessage: function (e) {
|
||||
var res = e.data.split(" ");
|
||||
//console.log(e.data)
|
||||
//console.log(res[0].substring(0,6))
|
||||
var _WS = {
|
||||
uri: 'ws://127.0.0.1:9001/',
|
||||
ws: null,
|
||||
|
||||
init : function (e) {
|
||||
_WS.s = new WebSocket(_WS.uri);
|
||||
_WS.s.onopen = function (e) { _WS.onOpen(e); };
|
||||
_WS.s.onclose = function (e) { _WS.onClose(e); };
|
||||
_WS.s.onmessage = function (e) { _WS.onMessage(e); };
|
||||
_WS.s.onerror = function (e) { _WS.onError(e); };
|
||||
},
|
||||
|
||||
onOpen: function () {
|
||||
_WS.showout(_WS.uri);
|
||||
_WS.showout('CONNECTED');
|
||||
document.getElementById("on").value = 1;
|
||||
},
|
||||
|
||||
onClose: function () {
|
||||
_WS.showout('DISCONNECTED');
|
||||
document.getElementById("on").value = 0;
|
||||
document.getElementById("lstt/0").value = 0;
|
||||
document.getElementById("lstt/1").value = 0;
|
||||
document.getElementById("lstt/2").value = 0;
|
||||
document.getElementById("lstt/3").value = 0;
|
||||
document.getElementById("lack/0").value = 0;
|
||||
document.getElementById("lack/1").value = 0;
|
||||
document.getElementById("lack/2").value = 0;
|
||||
document.getElementById("lack/3").value = 0;
|
||||
},
|
||||
|
||||
onMessage: function (e) {
|
||||
var res = e.data.split(" ");
|
||||
//console.log(e.data)
|
||||
//console.log(res[0].substring(0,6))
|
||||
|
||||
switch (res[0].substring(0,6)) {
|
||||
case "/statu":
|
||||
_WS.showstatus(e.data.slice(8));
|
||||
@ -149,39 +236,44 @@
|
||||
document.getElementById(res[0].slice(1)).value = res[1];
|
||||
_WS.showin(e.data);
|
||||
}
|
||||
|
||||
},
|
||||
onError: function (e) {
|
||||
_WS.showin('<span style="color: red;">ERROR:</span> ' + e.data);
|
||||
},
|
||||
showin: function (message) {
|
||||
var divtext = document.getElementById('showin');
|
||||
divtext.innerHTML="";
|
||||
divtext.innerHTML= message.toString();
|
||||
},
|
||||
showout: function (message) {
|
||||
var divtext = document.getElementById('showout');
|
||||
divtext.innerHTML="";
|
||||
divtext.innerHTML= message.toString();
|
||||
},
|
||||
showstatus: function (message) {
|
||||
var divtext = document.getElementById('showstatus');
|
||||
divtext.innerHTML="";
|
||||
divtext.innerHTML= message.toString();
|
||||
},
|
||||
send: function (message) {
|
||||
if (!message.length) {
|
||||
alert('Empty message not allowed !');
|
||||
} else {
|
||||
_WS.showout(message);
|
||||
_WS.s.send(message);
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
_WS.showout('GOODBYE !');
|
||||
_WS.s.close();
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
window.addEventListener('load', _WS.init, false);
|
||||
onError: function (e) {
|
||||
_WS.showin('<span style="color: red;">ERROR:</span> ' + e.data);
|
||||
},
|
||||
|
||||
showin: function (message) {
|
||||
var divtext = document.getElementById('showin');
|
||||
divtext.innerHTML="";
|
||||
divtext.innerHTML= message.toString();
|
||||
},
|
||||
|
||||
showout: function (message) {
|
||||
var divtext = document.getElementById('showout');
|
||||
divtext.innerHTML="";
|
||||
divtext.innerHTML= message.toString();
|
||||
},
|
||||
|
||||
showstatus: function (message) {
|
||||
var divtext = document.getElementById('showstatus');
|
||||
divtext.innerHTML="";
|
||||
divtext.innerHTML= message.toString();
|
||||
},
|
||||
|
||||
send: function (message) {
|
||||
if (!message.length) {
|
||||
alert('Empty message not allowed !');
|
||||
} else {
|
||||
_WS.showout(message);
|
||||
_WS.s.send(message);
|
||||
}
|
||||
},
|
||||
|
||||
close: function () {
|
||||
_WS.showout('GOODBYE !');
|
||||
_WS.s.close();
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('load', _WS.init, false);
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
.mgtitle {
|
||||
display: grid;
|
||||
height: 90px;
|
||||
grid-template-columns: 130px 70px 80px 600px;
|
||||
grid-template-columns: 130px 70px 80px 70px 530px;
|
||||
background-color: #111;
|
||||
transition: all .3s ease;
|
||||
padding-top: 10px;
|
||||
@ -21,13 +21,13 @@
|
||||
}
|
||||
.mgstatus {
|
||||
display: grid;
|
||||
grid-template-columns: 300px 150px 1fr;
|
||||
grid-template-columns: 470px 80px 1fr;
|
||||
grid-template-raw: 30px;
|
||||
grid-column-gap: 1px;
|
||||
grid-row-gap: 1px;
|
||||
border-color: #334;
|
||||
border-style: groove;
|
||||
border-width: 1px;
|
||||
border-width: 0px;
|
||||
background-color: #111;
|
||||
font-size: small;
|
||||
color:#444;
|
||||
@ -37,7 +37,7 @@
|
||||
font-family: 'hobeaux-rococeaux-background', Helvetica;
|
||||
}
|
||||
.mgalign {
|
||||
display: grid;
|
||||
display: none;
|
||||
height: 400px;
|
||||
grid-template-columns: 144px 144px 138px 138px 10px 326px;
|
||||
grid-template-rows: 1Fr;
|
||||
@ -47,13 +47,12 @@
|
||||
border-width: 1px;
|
||||
}
|
||||
.mgsimu {
|
||||
display: none;
|
||||
display: grid;
|
||||
height: 400px;
|
||||
width: 900px;
|
||||
grid-template-columns: 500px 400px;
|
||||
grid-template-rows: 400px;
|
||||
background-color: #151515;
|
||||
|
||||
}
|
||||
.cnvbuttons {
|
||||
display: none;
|
||||
@ -133,7 +132,7 @@
|
||||
display: grid;
|
||||
height: 80px;
|
||||
grid-template-columns: 60px 75px 40px 60px 75px 60px 75px 60px 75px;
|
||||
background-color: #111;
|
||||
background-color: #000;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
grid-gap: 1px;
|
||||
@ -303,10 +302,7 @@
|
||||
vertical-align: middle;
|
||||
padding: 8px 5px;
|
||||
border: 1px solid #404040;
|
||||
background: #141414;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#141414), to(#141414));
|
||||
background: -moz-linear-gradient(top, #141414, #141414);
|
||||
background: linear-gradient(to bottom, #141414, #141414);
|
||||
background: #000;
|
||||
font: normal normal normal 11px arial;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
@ -343,15 +339,22 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
.submit {
|
||||
background: #0c0c0c;
|
||||
background: #000;
|
||||
color: #c0c0c0;
|
||||
width: 90px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
height: 15px;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#0c0c0c), to(#141414));
|
||||
background: -moz-linear-gradient(top, #0c0c0c, #141414);
|
||||
background: linear-gradient(to bottom, #0c0c0c, #141414);
|
||||
border: 1px solid #445;
|
||||
}
|
||||
.submitsmall {
|
||||
background: #000;
|
||||
color: #c0c0c0;
|
||||
width: 45px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
height: 15px;
|
||||
border: 1px solid #445;
|
||||
}
|
||||
|
||||
|
||||
|
599
webui/index.html
@ -1,5 +1,10 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
LJ webapp 'mg' stand for main grid elements
|
||||
-->
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@ -50,6 +55,8 @@
|
||||
<div><webaudio-switch id="on" height="52" width="41" value="0" src="knobs/bigbluetoggle.png" type="toggle"></webaudio-switch></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Lasers state grid -->
|
||||
<div class="lsttgrid">
|
||||
|
||||
@ -80,19 +87,48 @@
|
||||
<div><webaudio-knob id="lack/3" src="knobs/leds.png" height="17" width="17" diameter="17" min="0" max="6" value="0" sprites="6"></webaudio-knob></div>
|
||||
</div>
|
||||
|
||||
<!-- blackout button -->
|
||||
<div class="blackout">
|
||||
<div class="lasertextxs">Emergy Black</div>
|
||||
<div><webaudio-switch id="emergency" height="64" width="64" value="0" src="knobs/blackout.png" type="toggle"></webaudio-switch></div>
|
||||
</div>
|
||||
<div>
|
||||
<!--
|
||||
|
||||
<div class="topgrid">
|
||||
<div class="lasertext">Laser</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic5.png" diameter="70" min="16" max="20" value="0" sprites="5"></webaudio-knob></div>
|
||||
<div><webaudio-param style="font-size:medium;" link="noteon"></webaudio-param></div>
|
||||
<div class="lasertext">Set</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic5.png" diameter="70" min="8" max="12" value="4" sprites="5"></webaudio-knob></div>
|
||||
<div class="lasertext">Curve</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic10.png" diameter="70" min="0" max="7" value="4" sprites="10"></webaudio-knob></div>
|
||||
<div class="lasertext">Simu</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic5.png" diameter="70" min="24" max="28" value="0" sprites="5"></webaudio-knob></div>
|
||||
-->
|
||||
<!--
|
||||
<div class="app">
|
||||
<x-sign>
|
||||
<div class="glitch __city" data-text="paris city">
|
||||
</div>
|
||||
<div class="glitch __info" data-text="paris city">
|
||||
</div>
|
||||
|
||||
<div class="glitch __state">
|
||||
<table class="t-info">
|
||||
<tr>
|
||||
<th class="xl-info" colspan="2" rowspan="2"></th>
|
||||
<th class="sm-info" colspan="2"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sm-info" colspan="2">http://www.teamlaser.fr</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</x-sign>
|
||||
</div>
|
||||
-->
|
||||
<!--
|
||||
<div class="lasertext">Laser</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic5.png" diameter="70" min="16" max="20" value="0" sprites="5"></webaudio-knob></div>
|
||||
<div><webaudio-param style="font-size:medium;" link="noteon"></webaudio-param></div>
|
||||
<div class="lasertext">Set</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic5.png" diameter="70" min="8" max="12" value="4" sprites="5"></webaudio-knob></div>
|
||||
<div class="lasertext">Curve</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic10.png" diameter="70" min="0" max="7" value="4" sprites="10"></webaudio-knob></div>
|
||||
<div class="lasertext">Simu</div>
|
||||
<div><webaudio-knob id="noteon" src="knobs/Prophetic5.png" diameter="70" min="24" max="28" value="0" sprites="5"></webaudio-knob></div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
@ -109,15 +145,57 @@
|
||||
<webaudio-switch id="simu" height="10" width="99" value="0" src="knobs/simu.png" type="toggle"></webaudio-switch>
|
||||
<webaudio-switch id="run" height="10" width="99" value="0" src="knobs/run.png" type="toggle"></webaudio-switch>
|
||||
<webaudio-switch id="live" height="10" width="99" value="0" src="knobs/live.png" type="toggle"></webaudio-switch> -->
|
||||
<button class="button:checked" id="showalign" onclick="showAlign()" checked="checked">Align</button>
|
||||
<button class="button" id="showcanvas" onclick="showCanvas()">Simu</button>
|
||||
<button class="button" id="showrun" onclick="showRun()">Run</button>
|
||||
<button class="button" id="showlive" onclick="showLive()">Live</button>
|
||||
<webaudio-switch id="align" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/align.png"></webaudio-switch>
|
||||
<webaudio-switch id="simu" value="1" height="27" width="75" tooltip="Switch-B" src="knobs/simu.png"></webaudio-switch>
|
||||
<webaudio-switch id="live" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/live.png"></webaudio-switch>
|
||||
<webaudio-switch id="run" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/run.png"></webaudio-switch>
|
||||
<webaudio-switch id="planet" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/planet.png"></webaudio-switch>
|
||||
<webaudio-switch id="nozoid" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/nozoid.png"></webaudio-switch>
|
||||
<!--
|
||||
<button class="button" id="showrun" onclick="showRun()">Run</button>
|
||||
<button class="button" id="shownozoid" onclick="showNozoid()">Nozoid</button>
|
||||
<button class="button" id="showplanet" onclick="showPlanet()">Planet</button>
|
||||
</div>
|
||||
<div><button class="button" id="showstatus">DISCONNECTED</button></div>
|
||||
<div></div>
|
||||
-->
|
||||
</div>
|
||||
<div><button class="submit" id="showstatus">OFFLINE</button></div>
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<span class="lasertext">Client</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="noteon 0 selected="selected" ">0</option>
|
||||
<option value="noteon 1">1</option>
|
||||
<option value="noteon 2">2</option>
|
||||
<option value="noteon 3">3</option>
|
||||
</select>
|
||||
|
||||
<span class="lasertext">PL</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="noteon 24" selected="selected" >0</option>
|
||||
<option value="noteon 25">1</option>
|
||||
<option value="noteon 26">2</option>
|
||||
<option value="noteon 27">3</option>
|
||||
</select>
|
||||
|
||||
<span class="lasertext">Laser</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="noteon 24" selected="selected" >0</option>
|
||||
<option value="noteon 25">1</option>
|
||||
<option value="noteon 26">2</option>
|
||||
<option value="noteon 27">3</option>
|
||||
</select>
|
||||
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="planet/planetUI" selected="selected" >Planetarium</option>
|
||||
<option value="nozoid/nozoidUI">Nozoid</option>
|
||||
<option value="vj/vjUI">VJing</option>
|
||||
<option value="ai/aiUI">AI</option>
|
||||
<option value="lissa/lissaUI">Lissa</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -146,7 +224,7 @@
|
||||
<webaudio-switch id="swap/Y/0" value="0" height="25" width="21" tooltip="Switch-B" src="knobs/swapy.png"></webaudio-switch>
|
||||
</div>
|
||||
<!-- Lasergrid 0 -->
|
||||
<div class="lasergrid" style="background-image: url(lasergrid0.png);">
|
||||
<div class="lasergrid" style="background-image: url(knobs/lasergrid0.png);">
|
||||
|
||||
<div><webaudio-param id="kpps/0" link="kpps/0" ></webaudio-param></div>
|
||||
<div><webaudio-param id="points/0" link="points/0"></webaudio-param></div>
|
||||
@ -200,7 +278,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Lasergrid 1 -->
|
||||
<div class="lasergrid" style="background-image: url(lasergrid1.png);">
|
||||
<div class="lasergrid" style="background-image: url(knobs/lasergrid1.png);">
|
||||
<div><webaudio-param id="kpps/1" link="kpps/1"></webaudio-param></div>
|
||||
<div><webaudio-param id="points/1" link="points/1"></webaudio-param></div>
|
||||
<div class="lasertext">kPPS</div>
|
||||
@ -253,7 +331,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Laser 2 grid -->
|
||||
<div class="lasergrid" style="background-image: url(lasergrid2.png)">
|
||||
<div class="lasergrid" style="background-image: url(knobs/lasergrid2.png)">
|
||||
<div><webaudio-param id="kpps/2" link="kpps/2"></webaudio-param></div>
|
||||
<div><webaudio-param id="points/2" link="points/2"></webaudio-param></div>
|
||||
<div class="lasertext">kPPS</div>
|
||||
@ -309,7 +387,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Laser 3 grid -->
|
||||
<div class="lasergrid" style="background-image: url(lasergrid3.png)">
|
||||
<div class="lasergrid" style="background-image: url(knobs/lasergrid3.png)">
|
||||
<div><webaudio-param id="kpps/3" link="kpps/3" ></webaudio-param></div>
|
||||
<div><webaudio-param id="points/3" link="points/3"></webaudio-param></div>
|
||||
<div class="lasertext">kPPS</div>
|
||||
@ -441,33 +519,330 @@
|
||||
|
||||
|
||||
<!--
|
||||
Simulator to display point list
|
||||
Simulator and interfaces
|
||||
-->
|
||||
|
||||
<div id = "mgsimu" class="mgsimu">
|
||||
<!-- left part : simulator -->
|
||||
<div>
|
||||
<canvas id="canvas" width="500" height="400" style="border-color: #445;border-style:groove;border-width:1px;"></canvas>
|
||||
</div>
|
||||
|
||||
<!-- Selection buttons grid -->
|
||||
<!-- right part : interdace -->
|
||||
<div>
|
||||
|
||||
<!-- sub right part : planetarium -->
|
||||
|
||||
<div id ="planetUI" style = "display: grid;justify-items: center;">
|
||||
<!-- Stop and start switch -->
|
||||
<div>
|
||||
<div><webaudio-switch id="planet/start" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/planet.png"></webaudio-switch></div>
|
||||
</div>
|
||||
|
||||
<form onsubmit="onSubmit(); return false;">
|
||||
<span class="lasertext">Country (FR)</span>
|
||||
<input class = "submitsmall" onchange = "onSubmit(this.id)" type="text" id="planet/country">
|
||||
<span class="lasertext">City</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/city">
|
||||
</form>
|
||||
<form>
|
||||
<span class="lasertext">Date/Time (2012-7-12 23:00:00) </span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/time">
|
||||
</form>
|
||||
<form onsubmit="onSubmit(); return false;">
|
||||
<span class="lasertext">Laser 0 : Alt</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/alt/0">
|
||||
<span class="lasertext">Az</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/az/0">
|
||||
<span class="lasertext">Angle</span>
|
||||
<input class = "submitsmall" onchange = "onSubmit(this.id)" type="text" id="planet/angle/0">
|
||||
</form>
|
||||
<form onsubmit="onSubmit(); return false;">
|
||||
<span class="lasertext">Laser 1 : Alt</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/alt/1">
|
||||
<span class="lasertext">Az</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/az/1">
|
||||
<span class="lasertext">Angle</span>
|
||||
<input class = "submitsmall" onchange = "onSubmit(this.id)" type="text" id="planet/angle/1">
|
||||
</form>
|
||||
<form onsubmit="onSubmit(); return false;">
|
||||
<span class="lasertext">Laser 2 : Alt</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/alt/2">
|
||||
<span class="lasertext">Az</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/az/2">
|
||||
<span class="lasertext">Angle</span>
|
||||
<input class = "submitsmall" onchange = "onSubmit(this.id)" type="text" id="planet/angle/2">
|
||||
</form>
|
||||
<form onsubmit="onSubmit(); return false;">
|
||||
<span class="lasertext">Laser 3 : Alt</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/alt/3">
|
||||
<span class="lasertext">Az</span>
|
||||
<input class = "submit" onchange = "onSubmit(this.id)" type="text" id="planet/az/3">
|
||||
<span class="lasertext">Angle</span>
|
||||
<input class = "submitsmall" onchange = "onSubmit(this.id)" type="text" id="planet/angle/3">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- sub right part : lissaUI -->
|
||||
|
||||
<div id ="lissaUI" style = "display: none;justify-items: center;">
|
||||
<!-- Lissa interface -->
|
||||
<div class="lissabox">
|
||||
<div class="lasertext" style="border-color:#334;border-style: groove;border-width:1px;">LISSA
|
||||
</div>
|
||||
<div class="lissagrid">
|
||||
|
||||
<div><webaudio-knob id="cc/5" diameter="60" min="0" max="127" value="0"></webaudio-knob></div>
|
||||
<div><webaudio-knob id="cc/6" diameter="60" min="0" max="127" value="0"></webaudio-knob></div>
|
||||
<div><webaudio-param link="cc/5" value="0"></webaudio-param></div>
|
||||
<div><webaudio-param link="cc/6" value="0"></webaudio-param></div>
|
||||
<div class="lasertext">Select X</div>
|
||||
<div class="lasertext">Select Y</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="spacer"></div>
|
||||
<div><webaudio-knob id="cc/21" diameter="60" min="1" max="127" value="1"></webaudio-knob></div>
|
||||
<div><webaudio-knob id="cc/22" diameter="60" min="1" max="127" value="1"></webaudio-knob></div>
|
||||
<div><webaudio-param link="cc/21" value="0"></webaudio-param></div>
|
||||
<div><webaudio-param link="cc/22" value="0"></webaudio-param></div>
|
||||
<div class="lasertext">FOV</div>
|
||||
<div class="lasertext">Dist</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="spacer"></div>
|
||||
<div><webaudio-knob id="cc/1" diameter="60" min="1" max="127" value="1"></webaudio-knob></div>
|
||||
<div><webaudio-knob id="cc/2" diameter="60" min="1" max="127" value="1"></webaudio-knob></div>
|
||||
<div><webaudio-param link="cc/1" value="0"></webaudio-param></div>
|
||||
<div><webaudio-param link="cc/2" value="0"></webaudio-param></div>
|
||||
<div class="lasertext">Offset X</div>
|
||||
<div class="lasertext">Offset Y</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- sub right part : aiUI -->
|
||||
|
||||
<div id ="aiUI" style = "display: none;justify-items: center;">
|
||||
<!-- with AI Interface -->
|
||||
<div class="withaibox">
|
||||
<div class="lasertext" style="border-color:#334;border-style: groove;border-width:1px;">With AI
|
||||
</div>
|
||||
<div class="withaigrid">
|
||||
<div><webaudio-knob id="ai/velocity" diameter="60" min="0" max="127" value="64"></webaudio-knob></div>
|
||||
<div><webaudio-knob id="ai/expressivity" diameter="60" min="0" max="127" value="64"></webaudio-knob></div>
|
||||
<div><webaudio-param link="ai/velocity" value="64"></webaudio-param></div>
|
||||
<div><webaudio-param link="ai/expressivity" value="64"></webaudio-param></div>
|
||||
<div class="lasertext">Velocity</div>
|
||||
<div class="lasertext">Express.</div>
|
||||
|
||||
<div class="spacer"></div>
|
||||
<div class="spacer"></div>
|
||||
<div><webaudio-knob id="ai/sensibility" diameter="60" min="0" max="127" value="64"></webaudio-knob></div>
|
||||
<div><webaudio-knob id="ai/beauty" diameter="60" min="0" max="127" value="64"></webaudio-knob></div>
|
||||
<div><webaudio-param link="ai/sensibility" value="64"></webaudio-param></div>
|
||||
<div><webaudio-param link="ai/beauty" value="64"></webaudio-param></div>
|
||||
<div class="lasertext">Sens.</div>
|
||||
<div class="lasertext">Beauty</div>
|
||||
|
||||
<div class="spacer"></div>
|
||||
<div class="spacer"></div>
|
||||
<div><webaudio-knob id="cc/1" diameter="60" min="1" max="127" value="64"></webaudio-knob></div>
|
||||
<div><webaudio-knob id="cc/2" diameter="60" min="1" max="127" value="64"></webaudio-knob></div>
|
||||
<div><webaudio-param link="cc/1" value="1"></webaudio-param></div>
|
||||
<div><webaudio-param link="cc/2" value="1"></webaudio-param></div>
|
||||
<div class="lasertext">CC 1</div>
|
||||
<div class="lasertext">CC 2</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- sub right part : vjUI -->
|
||||
|
||||
<div id ="vjUI" style = "display: none;justify-items: center;">
|
||||
<!-- VJ Interface -->
|
||||
<!-- Stop and start switch -->
|
||||
<div><webaudio-switch id="vj/start" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/live.png"></webaudio-switch></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- sub right part : NozoidUI -->
|
||||
|
||||
<div id ="nozoidUI" style = "display: none;justify-items: center;">
|
||||
<!-- Stop and start switch -->
|
||||
<div>
|
||||
<div><webaudio-switch id="nozoid/start" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/nozoids.png"></webaudio-switch></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- Nozoids list and leds -->
|
||||
<div>
|
||||
<webaudio-switch id="nozoid/mmo3" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/mmo3.png"></webaudio-switch>
|
||||
<webaudio-knob id="nozoid/mmo3/led" src="knobs/leds.png" height="17" width="17" diameter="17" min="0" max="6" value="0" sprites="6"></webaudio-knob>
|
||||
|
||||
<webaudio-switch id="nozoid/ocs2" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/ocs2.png"></webaudio-switch>
|
||||
<webaudio-knob id="nozoid/ocs2/led" src="knobs/leds.png" height="17" width="17" diameter="17" min="0" max="6" value="0" sprites="6"></webaudio-knob>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Curve choice -->
|
||||
<div>
|
||||
<span class="lasertext" >Curve</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/curve 0">0</option>
|
||||
<option value="nozoid/curve 1">1</option>
|
||||
<option value="nozoid/curve 2">2</option>
|
||||
<option value="nozoid/curve 3">3</option>
|
||||
</select>
|
||||
|
||||
<!-- Color choice -->
|
||||
<span class="lasertext" >Color</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/color 255 0 0">Red</option>
|
||||
<option value="nozoid/color 0 255 0">Green</option>
|
||||
<option value="nozoid/color 0 0 255">Blue</option>
|
||||
<option value="nozoid/color 255 255 0">Yellow</option>
|
||||
<option value="nozoid/color 0 255 255">Cyan</option>
|
||||
<option value="nozoid/color 255 0 255">Magenta</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- X curve Line IN and X Curve choices -->
|
||||
<div>
|
||||
<span class="lasertext" >X : LineIN</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/X/IN 0">STOP</option>
|
||||
<option value="nozoid/X/IN 1">VCO1</option>
|
||||
<option value="nozoid/X/IN 2">VCO2</option>
|
||||
<option value="nozoid/X/IN 3">LFO1</option>
|
||||
<option value="nozoid/X/IN 4">LFO2</option>
|
||||
<option value="nozoid/X/IN 5">LFO3</option>
|
||||
<option value="nozoid/X/IN 6">CV/GEN</option>
|
||||
<option value="nozoid/X/IN 7">ADSR</option>
|
||||
<option value="nozoid/X/IN 8">LIGHT</option>
|
||||
<option value="nozoid/X/IN 9">LINE IN</option>
|
||||
<option value="nozoid/X/IN 10">MIDI</option>
|
||||
<option value="nozoid/X/IN 11">CV1</option>
|
||||
<option value="nozoid/X/IN 12">CV2</option>
|
||||
<option value="nozoid/X/IN 13">CV3</option>
|
||||
<option value="nozoid/X/IN 17">1 Out</option>
|
||||
<option value="nozoid/X/IN 18">2 Out</option>
|
||||
<option value="nozoid/X/IN 20">VCF</option>
|
||||
<option value="nozoid/X/IN 21">MIX</option>
|
||||
<option value="nozoid/X/IN 22">VCA</option>
|
||||
</select>
|
||||
<span class="lasertext" >Curve</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/X/IN 0">Stop</option>
|
||||
<option value="nozoid/X/IN 1">OSC1</option>
|
||||
<option value="nozoid/X/IN 2">OSC2</option>
|
||||
<option value="nozoid/X/IN 3">OSC3</option>
|
||||
<option value="nozoid/X/IN 4">LFO1</option>
|
||||
<option value="nozoid/X/IN 5">LFO2</option>
|
||||
<option value="nozoid/X/IN 6">LFO3</option>
|
||||
<option value="nozoid/X/IN 7">ADSR</option>
|
||||
<option value="nozoid/X/IN 8">CV</option>
|
||||
<option value="nozoid/X/IN 9">Line IN</option>
|
||||
<option value="nozoid/X/IN 10">Jstck</option>
|
||||
<option value="nozoid/X/IN 11">INL</option>
|
||||
<option value="nozoid/X/IN 12">INR</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Y curve Line IN and Y Curve choices -->
|
||||
<div>
|
||||
<span class="lasertext" >Y : LineIN</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/Y/IN 0">STOP</option>
|
||||
<option value="nozoid/Y/IN 1">VCO1</option>
|
||||
<option value="nozoid/Y/IN 2">VCO2</option>
|
||||
<option value="nozoid/Y/IN 3">LFO1</option>
|
||||
<option value="nozoid/Y/IN 4">LFO2</option>
|
||||
<option value="nozoid/Y/IN 5">LFO3</option>
|
||||
<option value="nozoid/Y/IN 6">CV/GEN</option>
|
||||
<option value="nozoid/Y/IN 7">ADSR</option>
|
||||
<option value="nozoid/Y/IN 8">LIGHT</option>
|
||||
<option value="nozoid/Y/IN 9">LINE IN</option>
|
||||
<option value="nozoid/Y/IN 10">MIDI</option>
|
||||
<option value="nozoid/Y/IN 11">CV1</option>
|
||||
<option value="nozoid/Y/IN 12">CV2</option>
|
||||
<option value="nozoid/Y/IN 13">CV3</option>
|
||||
<option value="nozoid/Y/IN 17">1 Out</option>
|
||||
<option value="nozoid/Y/IN 18">2 Out</option>
|
||||
<option value="nozoid/Y/IN 20">VCF</option>
|
||||
<option value="nozoid/Y/IN 21">MIX</option>
|
||||
<option value="nozoid/Y/IN 22">VCA</option>
|
||||
</select>
|
||||
<span class="lasertext" >Curve</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/Y/IN 0">Stop</option>
|
||||
<option value="nozoid/Y/IN 1">OSC1</option>
|
||||
<option value="nozoid/Y/IN 2">OSC2</option>
|
||||
<option value="nozoid/Y/IN 3">OSC3</option>
|
||||
<option value="nozoid/Y/IN 4">LFO1</option>
|
||||
<option value="nozoid/Y/IN 5">LFO2</option>
|
||||
<option value="nozoid/Y/IN 6">LFO3</option>
|
||||
<option value="nozoid/Y/IN 7">ADSR</option>
|
||||
<option value="nozoid/Y/IN 8">CV</option>
|
||||
<option value="nozoid/Y/IN 9">Line IN</option>
|
||||
<option value="nozoid/Y/IN 10">Jstck</option>
|
||||
<option value="nozoid/Y/IN 11">INL</option>
|
||||
<option value="nozoid/X/IN 12">INR</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Automodulation X and Y choice -->
|
||||
<div>
|
||||
<span class="lasertext" >Automod : X</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/auto/X/0">0</option>
|
||||
<option value="nozoid/auto/X/1 Out">1 Out</option>
|
||||
<option value="nozoid/auto/X/2 Out">2 Out</option>
|
||||
<option value="nozoid/auto/X/3 Out">3 Out</option>
|
||||
<option value="nozoid/auto/X/OutR">OutR</option>
|
||||
<option value="nozoid/auto/X/OutL">OutL</option>
|
||||
</select>
|
||||
<span class="lasertext">Y</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="nozoid/auto/Y/0">0</option>
|
||||
<option value="nozoid/auto/Y/1 Out">1 Out</option>
|
||||
<option value="nozoid/auto/Y/2 Out">2 Out</option>
|
||||
<option value="nozoid/auto/Y/3 Out">3 Out</option>
|
||||
<option value="nozoid/auto/Y/OutR">OutR</option>
|
||||
<option value="nozoid/auto/Y/OutL">OutL</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Nozoid speed UP and Down -->
|
||||
<div>
|
||||
<webaudio-switch id="nozoid/down 50" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/slower.png"></webaudio-switch>
|
||||
<webaudio-switch id="nozoid/up 50" value="0" height="27" width="75" tooltip="Switch-B" src="knobs/faster.png"></webaudio-switch>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Selection buttons grid
|
||||
<div id="cnvbuttons" class="cnvbuttons">
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/client.png" alt=" " class="icongrid" /></div>
|
||||
<div><button id ="noteon 0" onclick ="buttonClicked(this.id)" class="button:checked">0</button></div>
|
||||
<div><button id ="noteon 1" onclick ="buttonClicked(this.id)" class="button">1</button></div>
|
||||
<div><button id ="noteon 2" onclick ="buttonClicked(this.id)" class="button">2</button></div>
|
||||
<div><button id ="noteon 3" onclick ="buttonClicked(this.id)" class="button">3</button></div>
|
||||
<div><img src="knobs/iconljay2.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/iconljay2.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/iconljay2.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/iconljay2.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/iconljay2.png" alt=" " class="icongrid" /></div>
|
||||
<div><img src="knobs/iconljay2.png" alt=" " class="icongrid" /></div>
|
||||
<div><button id ="noteon 24" onclick ="buttonClicked(this.id)" class="button:checked">PL 0</button></div>
|
||||
<div><button id ="noteon 25" onclick ="buttonClicked(this.id)" class="button">PL 1</button></div>
|
||||
<div><button id ="noteon 26" onclick ="buttonClicked(this.id)" class="button">PL 2</button></div>
|
||||
<div><button id ="noteon 27" onclick ="buttonClicked(this.id)" class="button">PL 3</button></div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
||||
@ -589,64 +964,64 @@
|
||||
<div>
|
||||
<span class="lasertext" >XCURVE LineIN</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="x/IN 0">STOP</option>
|
||||
<option value="x/IN 1">VCO1</option>
|
||||
<option value="x/IN 2">VCO2</option>
|
||||
<option value="x/IN 3">LFO1</option>
|
||||
<option value="x/IN 4">LFO2</option>
|
||||
<option value="x/IN 5">LFO3</option>
|
||||
<option value="x/IN 6">CV/GEN</option>
|
||||
<option value="x/IN 7">ADSR</option>
|
||||
<option value="x/IN 8">LIGHT</option>
|
||||
<option value="x/IN 9">LINE IN</option>
|
||||
<option value="x/IN 10">MIDI</option>
|
||||
<option value="x/IN 11">CV1</option>
|
||||
<option value="x/IN 12">CV2</option>
|
||||
<option value="x/IN 13">CV3</option>
|
||||
<option value="x/IN 17">1 Out</option>
|
||||
<option value="x/IN 18">2 Out</option>
|
||||
<option value="x/IN 20">VCF</option>
|
||||
<option value="x/IN 21">MIX</option>
|
||||
<option value="x/IN 22">VCA</option>
|
||||
<option value="nozoid/X/IN 0">STOP</option>
|
||||
<option value="nozoid/X/IN 1">VCO1</option>
|
||||
<option value="nozoid/X/IN 2">VCO2</option>
|
||||
<option value="nozoid/X/IN 3">LFO1</option>
|
||||
<option value="nozoid/X/IN 4">LFO2</option>
|
||||
<option value="nozoid/X/IN 5">LFO3</option>
|
||||
<option value="nozoid/X/IN 6">CV/GEN</option>
|
||||
<option value="nozoid/X/IN 7">ADSR</option>
|
||||
<option value="nozoid/X/IN 8">LIGHT</option>
|
||||
<option value="nozoid/X/IN 9">LINE IN</option>
|
||||
<option value="nozoid/X/IN 10">MIDI</option>
|
||||
<option value="nozoid/X/IN 11">CV1</option>
|
||||
<option value="nozoid/X/IN 12">CV2</option>
|
||||
<option value="nozoid/X/IN 13">CV3</option>
|
||||
<option value="nozoid/X/IN 17">1 Out</option>
|
||||
<option value="nozoid/X/IN 18">2 Out</option>
|
||||
<option value="nozoid/X/IN 20">VCF</option>
|
||||
<option value="nozoid/X/IN 21">MIX</option>
|
||||
<option value="nozoid/X/IN 22">VCA</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="lasertext" >XCURVE</span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="x/IN 0">Stop</option>
|
||||
<option value="x/IN 1">OSC1</option>
|
||||
<option value="x/IN 2">OSC2</option>
|
||||
<option value="x/IN 3">OSC3</option>
|
||||
<option value="x/IN 4">LFO1</option>
|
||||
<option value="x/IN 5">LFO2</option>
|
||||
<option value="x/IN 6">LFO3</option>
|
||||
<option value="x/IN 7">ADSR</option>
|
||||
<option value="x/IN 8">CV</option>
|
||||
<option value="x/IN 9">Line IN</option>
|
||||
<option value="x/IN 10">Jstck</option>
|
||||
<option value="x/IN 11">INL</option>
|
||||
<option value="x/IN 12">INR</option>
|
||||
<option value="nozoid/X/IN 0">Stop</option>
|
||||
<option value="nozoid/X/IN 1">OSC1</option>
|
||||
<option value="nozoid/X/IN 2">OSC2</option>
|
||||
<option value="nozoid/X/IN 3">OSC3</option>
|
||||
<option value="nozoid/X/IN 4">LFO1</option>
|
||||
<option value="nozoid/X/IN 5">LFO2</option>
|
||||
<option value="nozoid/X/IN 6">LFO3</option>
|
||||
<option value="nozoid/X/IN 7">ADSR</option>
|
||||
<option value="nozoid/X/IN 8">CV</option>
|
||||
<option value="nozoid/X/IN 9">Line IN</option>
|
||||
<option value="nozoid/X/IN 10">Jstck</option>
|
||||
<option value="nozoid/X/IN 11">INL</option>
|
||||
<option value="nozoid/X/IN 12">INR</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="lasertext" >Automodulation X ? </span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="auto/X/0">0</option>
|
||||
<option value="auto/X/1 Out">1 Out</option>
|
||||
<option value="auto/X/2 Out">2 Out</option>
|
||||
<option value="auto/X/3 Out">3 Out</option>
|
||||
<option value="auto/X/OutR">OutR</option>
|
||||
<option value="auto/X/OutL">OutL</option>
|
||||
<option value="nozoid/auto/X/0">0</option>
|
||||
<option value="nozoid/auto/X/1 Out">1 Out</option>
|
||||
<option value="nozoid/auto/X/2 Out">2 Out</option>
|
||||
<option value="nozoid/auto/X/3 Out">3 Out</option>
|
||||
<option value="nozoid/auto/X/OutR">OutR</option>
|
||||
<option value="nozoid/auto/X/OutL">OutL</option>
|
||||
</select>
|
||||
<span class="lasertext">Automodulation Y ? </span>
|
||||
<select onclick="buttonClicked(this.value)">
|
||||
<option value="auto/Y/0">0</option>
|
||||
<option value="auto/Y/1 Out">1 Out</option>
|
||||
<option value="auto/Y/2 Out">2 Out</option>
|
||||
<option value="auto/Y/3 Out">3 Out</option>
|
||||
<option value="auto/Y/OutR">OutR</option>
|
||||
<option value="auto/Y/OutL">OutL</option>
|
||||
<option value="nozoid/auto/Y/0">0</option>
|
||||
<option value="nozoid/auto/Y/1 Out">1 Out</option>
|
||||
<option value="nozoid/auto/Y/2 Out">2 Out</option>
|
||||
<option value="nozoid/auto/Y/3 Out">3 Out</option>
|
||||
<option value="nozoid/auto/Y/OutR">OutR</option>
|
||||
<option value="nozoid/auto/Y/OutL">OutL</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -707,13 +1082,13 @@
|
||||
var log=[];
|
||||
var knobs = document.getElementsByTagName('webaudio-knob');
|
||||
for(var i = 0; i < knobs.length; i++){
|
||||
knobs[i].addEventListener("input",Dump,false);
|
||||
knobs[i].addEventListener("change",Dump,false);
|
||||
knobs[i].addEventListener("input",Dump,false);
|
||||
knobs[i].addEventListener("change",Dump,false);
|
||||
}
|
||||
var sliders = document.getElementsByTagName('webaudio-slider');
|
||||
for(var i = 0; i < sliders.length; i++){
|
||||
sliders[i].addEventListener("input",Dump,false);
|
||||
sliders[i].addEventListener("change",Dump,false);
|
||||
sliders[i].addEventListener("input",Dump,false);
|
||||
sliders[i].addEventListener("change",Dump,false);
|
||||
}
|
||||
var switches = document.getElementsByTagName('webaudio-switch');
|
||||
for(var i = 0; i < switches.length; i++) {
|
||||
@ -722,7 +1097,7 @@
|
||||
function Dump(e) {
|
||||
var str="";
|
||||
str=e.type + " : " + e.target.id + " : " + e.target.value + " ";
|
||||
//console.log(str);
|
||||
console.log(str);
|
||||
log.unshift(str);
|
||||
log.length=1;
|
||||
str="";
|
||||
@ -734,27 +1109,52 @@
|
||||
evview.innerHTML=str;
|
||||
//console.log( e.type + "/" + e.target.id + "/" + e.target.value);
|
||||
|
||||
if (e.target.id === "noteon" && e.type ==="input")
|
||||
console.log("only noteon change are sent not input");
|
||||
if (e.target.id === "align" && e.type === "change") {
|
||||
showAlign();
|
||||
}
|
||||
if (e.target.id === "simu" && e.type === "change") {
|
||||
showCanvas();
|
||||
}
|
||||
if (e.target.id === "live" && e.type === "change") {
|
||||
showLive();
|
||||
}
|
||||
if (e.target.id === "nozoid" && e.type === "change") {
|
||||
showNozoid();
|
||||
}
|
||||
if (e.target.id === "planet" && e.type === "change") {
|
||||
showPlanet();
|
||||
}
|
||||
if (e.target.id === "run" && e.type === "change") {
|
||||
showRun();
|
||||
}
|
||||
if (e.target.id === "on" && e.type === "change") {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
else
|
||||
_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
|
||||
// for /scale : after a change (knob is released) reset knob value to 0
|
||||
if (e.target.id.substring(0,5) === "scale" && e.type === "change") {
|
||||
e.target.value = 0;
|
||||
//console.log(e.target.id + "set to 0")
|
||||
}
|
||||
// for /loffset : after a change (knob is released) reset knob value to 0
|
||||
if (e.target.id.substring(0,7) === "loffset" && e.type === "change") {
|
||||
e.target.value = 0;
|
||||
console.log(e.target.id + "set to 0")
|
||||
}
|
||||
// for /angle : after a change (knob is released) reset knob value to 0
|
||||
if (e.target.id.substring(0,5) === "angle" && e.type === "change") {
|
||||
e.target.value = 0;
|
||||
//console.log(e.target.id + "set to 0")
|
||||
}
|
||||
if (e.target.id === "nozoid/down 50" && e.type === "input") {
|
||||
e.target.value = 1 ;
|
||||
}
|
||||
|
||||
if (e.target.id === "noteon" && e.type ==="input")
|
||||
console.log("only noteon change are sent not input");
|
||||
else
|
||||
_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
|
||||
// for /scale : after a change (knob is released) reset knob value to 0
|
||||
if (e.target.id.substring(0,5) === "scale" && e.type === "change") {
|
||||
e.target.value = 0;
|
||||
//console.log(e.target.id + "set to 0")
|
||||
}
|
||||
// for /loffset : after a change (knob is released) reset knob value to 0
|
||||
if (e.target.id.substring(0,7) === "loffset" && e.type === "change") {
|
||||
e.target.value = 0;
|
||||
console.log(e.target.id + "set to 0")
|
||||
}
|
||||
// for /angle : after a change (knob is released) reset knob value to 0
|
||||
if (e.target.id.substring(0,5) === "angle" && e.type === "change") {
|
||||
e.target.value = 0;
|
||||
//console.log(e.target.id + "set to 0")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -783,7 +1183,8 @@
|
||||
return { x: evt.clientX - rect.left, y: evt.clientY - rect.top };
|
||||
}
|
||||
|
||||
function MouseDown(evt)
|
||||
|
||||
function MouseDown(evt)
|
||||
{
|
||||
mousePosDown = getMousePos(aligncanvas, evt);
|
||||
mouseMsgDown = mousePosDown.x + ' ' + mousePosDown.y;
|
||||
|
BIN
webui/knobs/align.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.7 KiB |
BIN
webui/knobs/faster.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
webui/knobs/live.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 7.3 KiB |
BIN
webui/knobs/mmo3.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.0 KiB |
BIN
webui/knobs/nozoid.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
webui/knobs/nozoids.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
webui/knobs/ocs2.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
webui/knobs/planet.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
webui/knobs/power.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
webui/knobs/run.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
webui/knobs/simu.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
webui/knobs/slower.png
Normal file
After Width: | Height: | Size: 3.8 KiB |