Client bugfixs
This commit is contained in:
parent
b79a3487eb
commit
8205534a40
6 changed files with 64 additions and 54 deletions
|
|
@ -9,6 +9,11 @@ OSCom.Start(serverIP, OSCPORT)
|
|||
default handler : handler(path, tags, args, source)
|
||||
register particular OSC command in Start(): i.e oscserver.addMsgHandler( "/n", Note)
|
||||
|
||||
Launch
|
||||
|
||||
print("Launching OSC Server", serverIP,':', OSCPORT)
|
||||
OSCom.Start(serverIP, OSCPORT)
|
||||
|
||||
'''
|
||||
|
||||
import midi3
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ UDPcom for jamidi v0.1b
|
|||
UDPcom.Start(serverIP, UDPORT)
|
||||
Handler : udp_thread()
|
||||
|
||||
Launch :
|
||||
|
||||
print("Launching UDP Server", serverIP,':', wsPORT)
|
||||
UDPcom.Start(serverIP, UDPORT)
|
||||
|
||||
Read below for :
|
||||
|
||||
- MIDI NOTES use ;nmonv
|
||||
|
|
@ -21,16 +26,20 @@ import midi3
|
|||
import types, json
|
||||
import socket
|
||||
import _thread, time
|
||||
import midi3
|
||||
|
||||
import WScom, OSCom
|
||||
import gstt
|
||||
import time
|
||||
|
||||
#base36 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
||||
|
||||
def GetTime():
|
||||
return time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())
|
||||
|
||||
|
||||
#
|
||||
# SERVER part
|
||||
#
|
||||
|
||||
def udp_thread():
|
||||
|
||||
while True:
|
||||
|
|
|
|||
|
|
@ -9,6 +9,19 @@ WScom.Start(serverIP, wsPORT)
|
|||
WScom.runforever()
|
||||
handler : message_received(client, wserver, message)
|
||||
|
||||
Launch :
|
||||
|
||||
print("Launching WS Server", serverIP,':', UDPORT)
|
||||
WScom.Start(serverIP, wsPORT)
|
||||
|
||||
try:
|
||||
|
||||
|
||||
WScom.runforever()
|
||||
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
'''
|
||||
|
||||
import midi3
|
||||
|
|
@ -21,6 +34,10 @@ from websocket_server import WebsocketServer
|
|||
import gstt
|
||||
import UDPcom, OSCom
|
||||
|
||||
#
|
||||
# Server part
|
||||
#
|
||||
|
||||
def Start(serverIP, wsPORT):
|
||||
global wserver
|
||||
|
||||
|
|
@ -140,7 +157,7 @@ def message_received(client, wserver, message):
|
|||
def send(message):
|
||||
|
||||
if gstt.clientmode == True:
|
||||
send(message)
|
||||
midi3.ws.send(message)
|
||||
else:
|
||||
wserver.send_message_to_all(msg = message)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue