spaday_bridge

Real widget comm endpoints for the browser test, driven by JSON lines on stdin.

python spaday_bridge.py <widget> [codec] serves one instrument widget, where widget names an entry of VIEWS; python spaday_bridge.py session serves a nbplay.nbplay.Session with one sequencer-and-synth track, exposing every widget by name. Requests carry an optional widget name; without one they address the only widget, or the session itself for command.

Attributes

VIEWS

name

codec

options

session

sent

request

Functions

_jsonable(value)

Replace bytes with their length, recursively, so the state fits a JSON line.

_describe(widget)

_state(widget)

sync_all()

pick(request)

Module Contents

spaday_bridge.VIEWS
spaday_bridge._jsonable(value)

Replace bytes with their length, recursively, so the state fits a JSON line.

spaday_bridge._describe(widget)
spaday_bridge._state(widget)
spaday_bridge.name
spaday_bridge.codec
spaday_bridge.options
spaday_bridge.session
spaday_bridge.sent = []
spaday_bridge.sync_all()
spaday_bridge.pick(request)
spaday_bridge.request