Hi Sam,
> I'd like to move towards having more things use this event system. So,
> therefore monome or launchpad button presses would create Overtone
> events, arbitrary OSC servers would pipe incoming OSC messages as
> events, and MIDI controllers would also pipe incoming MIDI events as
> Overtone events.
Yes, unifying at this level makes a huge amount of sense.
As a concrete goal, I was wondering about hooking up several gadgets
at once and this would simplify that. I could muster TouchOSC on a phone,
a gamepad, a joystick, a USB MIDI DJ controller and a MIDI-OUT keyboard.
> This would therefore have consequences to how we describe events and
> how we handle them:
> * Events 'names' should probably map onto OSC-like strings. This means
> that they can be namespaced with / i.e. foo/bar or
> overtone/midi/nanoKONTROL2 etc. It also makes mapping incoming OSC
> messages trivial.
> * Handlers should be able to register interest for an event subtree.
> For example, it might be useful to register interest with /* (i.e. all
> events) or /overtone/midi/* (i.e. all MIDI events).
So, specifying paths to nodes and selecting nodesets in an events tree?
That reminds me of XPath. Which is great, I've done a lot of work
with XSLT/XPath.
However, it is still a text-based representation of a structured
item and I wonder if clojure can express this more usefully? In a small
way, that's why I moved to using a vector as an event-name.
Showing my inexperience with clojure here, is there already something
in the area of XPath/tree-handling/zippers that could be useful?