"Therefor no latency. Is
this what you had in mind?"
Yes, exactly!
"The idea about using the pasteboard seems like a
kludge, and would add a user wait step for no good reason."
Not really, there is no user step involved. The current NLog beta
automatically puts the recorded wav date to the pasteboard
and just signals the DAW with a SysEx that new data is ready.
Thus, no user interaction is needed.
Of course, if preferred I can also package the wave data into
a sysex.
"... and also send it back as audio in sysex messages, this would
be ideal"
Oh yes, and in addition if the DAW sends the MIDI data well ahead
in time, then the audio sysex messages would arrive at the DAW
also ahead (minus synth buffer & core midi latency) in time that
the DAW would be able to play the MIDI track with no latency!
There might be the option that the synth isn't even output to
CoreAudio, because if the audio data arrived well ahead in time at
the
DAW, then the DAW can mix and even effect it.
This is true when in the DAW the midi synth track plays back
ready made midi data. If the user starts to edit it while running,
the data must be edited also 'ahead of time' but that should be ok.
In the mode where somebody wants to record MIDI in realtime
in an synth midi track, then due to the latencies issues, the
monitoring of the recording shall be done by the synth app
which outputs directly to CoreAudio.
So, we need probably a way to control if the synth app outputs
as well to CoreAudio or not. Could be again switch by sysex.
The basic question is, if Core MIDI allows for enough throughput.
But if programmed well by Apple, I see no reason why it shouldn't.
I will prepare some tests.
In regards to sysex, we do not have a manufacturer ID for OMAC.
what I am currently using is a magic of 7 bytes after to 0xf0:
0x00, 0x00, 0x00, 0x6f, 0x6d, 0x61, 0x63
The first 3 bytes are just zero not to interfere with any manufacturer
id.
The last 4 bytes are the ascii values for 'omac' in lower case.
Since we do not have an organizational body for OMAC, I am considering
to apply for TempoRubato for a manufacturer ID and give it free for
OMAC use (I would just replace the three zeros with the TempoRubato ID
and still the next 4 bytes would be 'omac' in order being able to
differentiate
from own use.
After the 7 bytes magic I currently use in my beta the next byte as a
message selector:
Received by synth app:
0x01 for start audio recording
0x02 for stop audio recording & copy wav to pasteboard
0x03 for start MIDI recording
0x04 for stop MIDI recording
Received by DAW app:
0x05 recorded audio is available at Intua pasteboard
0x06 recorded MIDI embedded in sysex
For the mentioned extensions above we could simply use:
0x07 to signal the synth app to output to CoreAudio only silence
0x08 to signal the synth app to output to CoreAudio again its sound
0x09 would be an embedded audio package sent to the DAW
There could 255 message selectors and keeping the value 0x00 reserved
for future extensions.
Any way this is just a simple beginning and things may change later
if we find its stupid ;-)
Any input is welcome! And if any DAW wants to play with NLog betas,
just email.
Cheers
Rolf