コード例 #1
0
 def __init__(self):
     self._log = get_logger()
     self._log.info("Creating Server")
     self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     self._socket.settimeout(2.0)
     self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     self._out = False
コード例 #2
0
 def __init__(self, node_controller=getNodeController()):
     self._log = get_logger("Connection.Server.RawOCSServer")
     self._log.info("Creating Server")
     self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     self._socket.settimeout(2.0)
     self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     self._out = False
     self._node_controller = node_controller
コード例 #3
0
 def __init__(self, node_controller):
     self._log = get_logger("Connection.OCSServer")
     self._log.info("Creating Server")
     self._dispatcher = dispatcher.Dispatcher()
     self._dispatcher.map("/*", self._attendPetition)
     self._server = osc_server.ThreadingOSCUDPServer((HOST, PORT),
                                                     self._dispatcher)
     self._server_thread = threading.Thread(target=self._startServer)
     self._node_controller = node_controller
コード例 #4
0
 def __init__(self, input_port_name, timer_trigger = False):
     self._log = get_logger()
     self._log.info("Starting Particle Trigger MIDI Launcher")
     self._input_port_name = input_port_name
     self._input_port = mido.open_input(self._input_port_name)
     self._phenomena = Phenomena()
     self._midi_to_particle = {36: ["p+", "p-"], 37: ["n0"], 38: ["pi-", "pi+", "pi0"], 39: ["K-", "K+", "K0"],
                               40: ["e-", "e+"], 41: ["mu-", "mu+"], 42: ["tau-", "tau+"], 43: ["H0"], 44: ["Z0"],
                               45: ["W+", "W-"], 48: ["u", "ubar"], 49: ["d","dbar"], 50: ["c", "cbar"], 51: ["s", "sbar"],
                               52: ["t", "tbar"], 53: ["b", "bbar"], 54: ["gamma0", "g0"], 55: ["nu_e","nubar_e"], 56: ["pi0","pi+","pi-"],
                               57: ["K0", "K+","K-"], 58: ["J/psi(1S)0"], 59: ["Lambda0"], 60: ["B0"], 61: ["B+","B-"], 62: ["D0"],
                               63: ["D+","D-"], 64: ["Upsilon(1D)0"], 65: ["Xi0"], 66: ["Xi+","Xi-"], 67: ["Omega(c)0"],
                               68: ["Sigma+","Sigma-"], 69: ["Sigma0"], 66: ["Xi+","Xi-"], 71: ["Omega+","Omega-"], 72: ["eta0"]}
     self._switching_note = 6
     self._last_triggering_note = 36
     self._msg = None
     self._is_note_on = None
     self._note = None
     self._switch_particle = 0
     self._last_trigger_time = time.time()
     if timer_trigger:
         self._timer = threading.Timer(2, self._timeTrigger)
         self._timer.start()
コード例 #5
0
 def __init__(self, conn):
     self._log = get_logger("Connection.Client.Petition")
     PetitionCommon.__init__(self, conn, self._log)
コード例 #6
0
 def __init__(self, conn, node_controller):
     self._log = get_logger("Connection.Server.RawOCSServer")
     PetitionCommon.__init__(self, conn, self._log)
     
     self._node_controller = node_controller
コード例 #7
0
 def __init__(self, conn):
     PetitionCommon.__init__(self, conn, get_logger())
     self._log = get_logger()
コード例 #8
0
 def __init__(self, conn):
     PetitionCommon.__init__(self, conn, get_logger())
     self._log = get_logger()
     self._node_controller = getNodeController()