We want to be able to run the expressions in the browser and visualise the “serial” connections directly, without any interop with the module other than syncing clocks and inputs.
useq-report-current-time
module.s1
, s2
etc. into stubss1
, s2
etc. are functions that take an expr and set it as the expr for those outputsd1
, a1
etc. just set the expr (so that s1
can read it), but nothing is evaluatedeval_code
method that takes a string from the editor, evals it, and returns nothing.fill_vis_buffers
function that takes
plotCanvas
that plots the currently-active buffers oncetimeLineCanvas
that frequently clears and plots the line as it moves through the window
const numChannels = 8; // s1 through s8
const numSamples = 1024; // change to whatever
let windowDur = 5000; // milliseconds
let windowStart = 0;
let windowEnd = windowStart + windowDur;