Problems reading MMC inside Max from Cubase.
Hi folks,
A patch I'm creating needs to be able to know the state of transport buttons inside a DAW - in my case, Nuendo (cubase!). I don't need it to synchronise transport in max or anything like that - its used to send other OSC to other parts of my system for other purposes.
I thought I had it working. Build a proof of concept that was able to look at the 6th command between the opening 240 and closing 247, and easily detect play and stop. Win. Or so I thought.
Things feel like they have become unreasonably complicated when I try to detect the status of the record button.
I have some commented output from my console below. I have pasted in the "state" (screen cap) of the transport buttons in cubase that I'm trying to figure out from the MMC data - to help with the explanation.
So from the top.
First up, pressing play. That makes sense. the 6th message is "2" which is what I expect.
Then stop. 6th message is "1" which again, I've got a handle on!
Then I hit record and things get a bit interesting, and different to what I had expected. I get a message with a bunch of 0's from the 6th message onwards. I also get a pretty standards play message. Which makes sense - since when you hit record while stopped in cubase, it triggers playback as well. (rec+play really)
Although not what I expected, I COULD always just match this message. But alas thats not to be.
First up - I hit stop, and although everything stops in cubase, I get the record message again. No stop message. Fine - I can do some matching and figure it out - but it already seems super strange.
Then comes the thing I cannot fathom.
I hit record (from stop) and again get the command I feel is record, followed by a play. Then if I hit the record button again (which should just turn off record, and keep playing in cubase) I get the record message again - exactly the same as before. However, the state of cubase is completely different - its still playing back! Indeed, if I hit stop now, I get what I would expect is a stop command.
So there's no way of telling what state cubase is in given these MMC commands. It COULD be in playback, or stopped.
I'm figuring I might be approaching this all the wrong way, but I really can't find any info from folk that have done anything outside of rewire. I unfortunately cannot use rewire on this occasion.
Does anyone have any further ideas? I'm really stumped by this one.

Here's how I captured the MMC data. Maybe I'm going about it all wrong.

...................
Cheers for that.
I had thought something like what you've written is what would work.
It was where I originally headed (ish) after reading up on the MMC spec.
It however seems like cubase/nuendo do something different to this for their internal transport.
I DID notice that if you open a MMC master device inside nuendo, it is able to output messages that would be in line to what you were saying. But that is for controlling external devices, and doesn't sync with the internal nuendo transport without a return from the machine (ie, two way sync).
Long story short, I did a tonne more sniffing of the midi using MidiMonitor. Where would I be without it.
I was able to find 10 byte commands that worked for play and stop, and 8 byte commands that could match for record on and record off. This is enough for what I need - it gives me my play and stop buttons, and the status of the rec button.
I do not know why your approach doesn't work @source audio.
I still do not know the reason behind the differences.
But at least it now works.
(insert something about if its stupid and it works, its not stupid....)

I am sorry for the typo mistake,
2nd byte is 7F = 127 NOT 126
can't say much about steinberg soft - never used that stuff.
but many manufacturers have own head when it comes to standards.
most important - you got what you need.
I will delete the post with wrong sysex string.
Oh - no need to delete - since you let me on the right path :). All g.
Re folk doing there own thing with standards - yeah I agree, but I also am unsure in this instance, since every midi keyboard with transport buttons works with cubase just fine. Perhaps they're not listening to MMC but something else.
I will ask Steinberg folk what their implementation actually is all about.
Anyhow - I got there in the end. Its interesting what they're doing with their messaging, and what hoops I need to jump thru to get things right - perhaps its all as intended. I'll paste in my final implementation when I have some of the kinks sorted out.

So this is where I got up to in the end as a proof of concept.
The three buttons in matrixctrl exactly match the stop, play and rec button states in nuendo.
Then below, I have to run a little bit of horrid tricks to get a simple message of either "stop, play or record". Play and record both are on when I need to be in "record" mode - and I need to make sure "play" is not triggered when "record" is for my system. I'm sure there's much easier ways. I just kept following my nose. Last three message boxes in a horizontal row give me what I need.
You need only 3 states, or 4 ? (in case transport is stopped but record activated)
this should give 4 states
1 = stop
2 = play
3 = stopped, rec on
4 = recording

oh of course!!! Its amazing the hoops one will go through sometimes.
There is no 3rd state given the way cubase/nuendo outputs the MMC, which is actually completely fine for my purposes. So its now successfully outputting my 3 states
1=stop
2=play
3=recording (play+record)
