hedgehog/ideas/ PieInTheSky
So if I had a magic wand, or a magic fairy granting me unlimited wishes with regards to this idea, how would it work? It would be far more general than the starting wish of controlling pen width with a midi controller.
IPC
Within a machine, there would be a mechanism for passing 'hedgehog' messages that would have kernel support, so that one application would fill a buffer with messages and information as to their destinations, and then just make a single syscall that would map those messages out of the address space. Possibly for efficiency, message bundles would need their own 4K pages so that things could be done by simply mapping memory out of one process space and into another, and notifying the receiving process. This should ideally be as simple as how mouse and keyboard events are sent. As such, Hedgehog would subsume mouse, keyboard, midi and other controller information into a single message format.
At present, OSC is being used in lieu of a 'universal network-friendly IPC mechanism'.
Patching
Essentially something like Max/PureData and scripting would allow users to customise how messages are routed – essentially there would be a separate HedgeHog process/app that would receive messages, process them using some means of patching (this is where the Max paradigm would be useful to have – something that software like ControllerMate has tried in the past, but which isn't commonplace at present).
At present, Python scripts that recieve OSC on one port and send on another are used in lieu of a proper patching system. Having said that, patching in languages like Python should be possible. Data sent between machines should require little more than is representable via JSON.
Networking
The idea of Hedgehog is also to help make separate pieces of hardware function as a homogeneous whole. For example, using a touchscreen laptop or tablet as an auxiliary control surface for software. TouchOSC is an example of this for music applications that support it.
As such, there would be a communications hub on each machine which routes to/from local processes and sends messages across the network when needed. A means of addressing things network-wide is needed.
Application Support
Part of the idea is to produce software, under a license like MIT, that any developer could drop into their application and, with a few lines of glue code, allow the user to make their application HedgehogFriendly. As such, there needs to be code for Windows, *nix, languages with runtimes like Java and C#, and for frameworks like Qt and Gtk. Make it easy for developers to add, and make a convincing case to do so, and keep what is required to be added to a minimum (typically a small amount of C/C++ and possibly dynamically linked Lua).
Scripting
Currently Lua is the language I have in mind. When an app receives Hedgehog messages, there needs to be a programmable way to handle messages. Some handling could be hardwired, but generally allowing the user to say that 'when my WordProcessor receives such-and-such, do this' much as the macro facilities in e.g. Microsoft Office allow. But the aim is to defragment the market by making a free and easy to integrate solution.
I am aware of the xkcd on standards. My counter is that there is nothing that does the functionality of e.g. MidiControlSurfaces that works with software outside of the music realm. I am aware that there would need to be separate codebases for runtimes and frameworks such as C#, Java, Qt and Glib. But I believe that this is something that competent engineers could do without much difficulty, given only a common standard to aim at. I am also aware of the need to prevent abuse of the scriptable side of things – so it is important that, like Lua and Javascript, but unlike Python, that things like access to the filesystem are not available by default.