Okay, it's Bob
A few comments and thoughts on this...
First off, MMA was never designed to be an on-the-fly player. Not to say that it can't be done, but this just wasn't a MMA design item.
Now, can it be used in real-time? Maybe
If you want to use MMA in a "more real time" method, here are a few ideas (and if they take more programming/changes in MMA that is probably not an issue).
MMA really does need to process a complete file and then generate a MIDI file. A number of reasons for this, but to start let's assume that most MIDI players need a complete file to play. The way that MMA works is that it processes the entire input file and generates MIDI code as it goes. Then, when the file is complete, the MIDI data is sorted into tracks and written to a file.
But, when working in a performance environment just what do you want to change? Assume we have a song file which MMA can read ... You might want to make changes in the song like:
- tempo
- number of times a repeat/ending is done
- transposition
So, here's the easy way: just use macros for these in the song file. And then call MMA to process the file with the appropriate defs on the command line. So, you end up with stuff like this in the MMA file:
if ndef TEMPO
set TEMPO 140
endif
Tempo $Tempo
if def Transpose
transpose $transpose
endif
And run:
$ mma some-song -S tempo=120 -S transpose=-3
Heck, this could even be done with some kind of gui or hardware "switch". Then compile and play. MMA generates files pretty fast (much less than a second on my system which isn't exactly a speed demon). Certainly an acceptable delay before playing in realtime on a stage.
Am I even close on this or are my ideas just plain wrong/dumb.
Let me know.