forked from protonphoton/LJ
Bugfixs
This commit is contained in:
parent
c27151ec62
commit
798ac06fd1
14 changed files with 299 additions and 158 deletions
|
|
@ -607,9 +607,16 @@ def OSCrun(value):
|
|||
print("I got /run with value", value)
|
||||
doit = value
|
||||
|
||||
# /quit
|
||||
def OSCquit():
|
||||
|
||||
WebStatus("Bank0 stopping")
|
||||
print("Stopping OSC...")
|
||||
lj3.OSCstop()
|
||||
sys.exit()
|
||||
|
||||
def WebStatus(message):
|
||||
lj3.Send("/status",message)
|
||||
lj3.SendLJ("/status",message)
|
||||
|
||||
|
||||
#doit = Starfield
|
||||
|
|
@ -629,6 +636,7 @@ osc_udp_server("127.0.0.1", OSCinPort, "InPort")
|
|||
osc_method("/bank0/run*", OSCrun)
|
||||
osc_method("/bank0/ping*", lj3.OSCping)
|
||||
osc_method("/bank0/ljclient", OSCljclient)
|
||||
osc_method("/quit", OSCquit)
|
||||
|
||||
|
||||
import pygame
|
||||
|
|
|
|||
|
|
@ -69,15 +69,7 @@ def OSCframe():
|
|||
def OSCstop():
|
||||
osc_terminate()
|
||||
|
||||
|
||||
# Answer to LJ pings
|
||||
def OSCping(value):
|
||||
# Will receive message address, and message data flattened in s, x, y
|
||||
print("I got /ping with value", value)
|
||||
Send("/pong",value)
|
||||
|
||||
|
||||
def Send(oscaddress,oscargs=''):
|
||||
def SendLJ(oscaddress,oscargs=''):
|
||||
|
||||
try:
|
||||
msg = oscbuildparse.OSCMessage(oscaddress, None, [oscargs])
|
||||
|
|
@ -87,6 +79,15 @@ def Send(oscaddress,oscargs=''):
|
|||
except:
|
||||
print ('Connection to LJ refused : died ?')
|
||||
pass
|
||||
|
||||
# Answer to LJ pings
|
||||
def OSCping(value):
|
||||
# Will receive message address, and message data flattened in s, x, y
|
||||
print("I got /ping with value", value)
|
||||
SendLJ("/pong",value)
|
||||
|
||||
|
||||
|
||||
'''
|
||||
def handlerfunction(s, x, y):
|
||||
# Will receive message data unpacked in s, x, y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue