I've been thinking....this is fitting well with something else I've been toying with
on the side: Event Scriptlets.
Something happens. A parameter changes, a loop reaches the end, a loop goes into Mute mode,
a track is reset. What do you want to do? Send a MIDI event, send an OSC message, trigger a sample, turn on the blue spot, run a script.
MIDI Export and OSC are really just two examples of side effects that can happen when the looping engine reaches a state. The engine needs to be designed in a way that user defined behavior can be inserted at various points, what programmers might call a callback, listener, or lambda. Or what audio people might think of as a patch point or plugin. The engine doesn't care what these do, it just needs to provide a way to do them.
So we have an engine all instrumented and ready to tell us when things happen, how do you tell it what you want to do? This is a massive GUI problem. But we don't necessarily need a GUI, we can invent a language. It isn't a Mobius script (though it COULD be...more on that later). Consider some exmaples:
when at loopEnd in track 2 midiout(1, 42)
when mode mute in track 1 send("/some/long/osc/message")
when function Record in track 1 {in not 1 Mute}
In that last example notice "{in not 1 Mute}". That is a scriptlet. I've been spending a lot of time recently redesignging the scripting language. It is equivalent to this in the old scripting language.
for 2-8
Mute
End
The differences are it is more like a traditional language and doesn't require line breaks, and most importantly, it doesn't have to be in a file. It's just a string of text, it can go anywhere. Currently, I'm working on having this in bindings. Instead of binding a MIDI note to the name of a script file, you just bind a MIDI note to a line of scriptlet text. But this also works well to define the behavior that happens as a side effect of an engine event. Event Scriptlets.
What's missing is a way to associate engine events with scriptlets, which is exactly the same problem as associating an engine event with a MIDI export.
So now we have two languages: one for Mobius scriptlets, and one for this event association. There are
some syntactical advantages to having them be different, but we might be able to merge those.
As a final note, I'm liking this "command file" concept for bindings as well as exports. Imagine this:
// this is a file that defines a bunch of MIDI bindings
// this is a fully specified binding
note 42 channel 1 track 3 Record
// this line defines default characteristics for the bindings
// that happen after it
with type note channel 1
// and now we just have a bunch of note numbers
42 Undo
43 Redo
44 NextLoop
45 PrevLoop
// and you can use symbolic names as well
C#4 NextTrack
You write a file that looks like that and Import it from the main menu. This automatically
generates the Binding Set in the mobius.xml and you can look at it in the UI as if you
had spent an hour wiggling the mouse.