osc4py3 icon indicating copy to clipboard operation
osc4py3 copied to clipboard

osc_process doesnt stops keeps on giving values when it is not in while loop also

Open ambuje opened this issue 6 years ago • 2 comments

ambuje avatar Jul 18 '19 23:07 ambuje

Your description is a little brief. How to you start osc4py3 (event loop, communication threads, all threads)? Have you some piece of code showing what you do ? Thanks.

lpointal avatar Jul 19 '19 08:07 lpointal

from osc4py3.as_eventloop import * from osc4py3 import oscmethod as osm

def eeg_handler(ch1, ch2, ch3, ch4,ch5):

print(ch1)

Start the system.

osc_startup()

Make server channels to receive packets.

osc_udp_server("192.168.43.197", 5006, "aservername")

Associate Python functions with message address patterns, using default

argument scheme OSCARG_DATAUNPACK.

osc_method("/muse/eeg", eeg_handler)

Periodically call osc4py3 processing method in your event loop.

osc_process()

Properly close the system.

osc_terminate()

My code I start by event loop You can suggest any other way as well. I am noob in this area.

ambuje avatar Jul 19 '19 08:07 ambuje