-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The handler parses the message incorrectly. OSC messages are sent as flat sequence so there are no positional vs keyword arguments. In order for the OSC messaging (e.g. from SuperCollider) to work, this change solved the problem. I am not a Python coder, so not sure if this does not break something else though, but this works:
@osc.handle('/notochord/feed_query', return_port=send_port)
def _(address, *args, **kw):
if not kw and len(args) % 2 == 0:
it = iter(args)
kw = dict(zip(it, it))
args = []
print(f"{address} {args=} {kw=}")
r = predictor.feed_query(*args, **kw)
return (
'/return/notochord/query',
*[x for pair in r.items() for x in pair])
Metadata
Metadata
Assignees
Labels
No labels