I'm playing around with a Tidal editor and trying to get feedforward-style context highlights working. Right now I'm running a Tidal boot file that contains the following editor target:
let editorTarget =
Target {oName = "editor",
oAddress = "127.0.0.1",
oPort = editorPort, -- From an ENV variable
oLatency = 0.02,
oSchedule = Pre BundleStamp,
oWindow = Nothing,
oHandshake = False,
oBusPort = Nothing
}
editorShape =
OSCContext "/editor/highlights"
Then, I'm passing it into my config with:
tidal <- startStream (defaultConfig {cVerbose = True, cFrameTimespan = 1/20})
[(superdirtTarget, [superdirtShape]),
(editorTarget, [editorShape])]
Sure enough, this produces a stream of OSC messages with the pattern ID and the location of a highlighted range. However, it's not obvious to me how you go about matching highlights with individual mininotation strings. Any tips? Is there something else I should be doing?
Like, if I have the pattern d1 $ s "sn bd" # (rotR 0.5 $ n "15 16")
and get a message to highlight the range [1, 3], how do I know which symbol to highlight?
My guess is relying on the order that events with the same timestamp come in, but that doesn't seem reliable since UDP makes no promises about dropped packets, etc.