I was under the impression that the default ValueSource used an AsyncUpdater, thus making it threadsafe. Maybe I misunderstood - the Listener report is async but the actual Value update isn’t, therefore it’s not usable across threads?
Anyone have tips on changing a Value from a thread?
A VFLib piece? So I would call setValue and it would operate on the other thread? That would be the ticket… but I just realized that I will need to determine the state of other values, to decide what to do. Case in point being a ‘toggle’ operation, where I need to know the current value so I can decide whether to set off or on. So I will need to operate on the main thread (curses). I could get all clever passing the (in this case) Midi Message to a queue, but I think I may as well just get a Message thread lock.
Wait - the Midi callback thread isn’t the audio thread is it? Can I block that safely?
Edit: bugger, no I can’t. Back to the drawing board.