From Studio One, send text to Maschine Studio displays

NiDBiLD

2016-01-31 22:07:41

Hey! I'm working on a Studio One template for Maschine Studio.

Right now I'm attempting to send text strings (param name and value) to the two displays of my Maschine Studio hardware.

I'm basically wondering if this is something that can be achieved using Bome MIDI translator, or if it's better to do natively somehow.

Right now I get erratic behaviour from the displays at best. Track names get stuck on-screen, and the only value I can get out is track volume. The js file S1 uses to bridge with HUI seems to do quite buggy and weird stuff, and I want to replace it with something a bit more solid.

I'm sorry for my general noobiness in this area. This is my first complex midi project.

DvlsAdvct

2016-01-31 22:56:03

Hi NiDBiLD. No worries on noobiness. Even those who are experts around here are noobs.

So, I guess the best question I can ask is how is the data being conveyed? What kind of data is the Studio One sending to Maschine? Is it sending for a Sysex string?

NiDBiLD

2016-02-01 00:21:35

That's part of the problem, I think. The MCU Script S1 uses refers to a library that seems opaque to me - probably built into S1.

Look at this js function:

BasicMackieHandler = function () {
this.interfaces = [Host.Interfaces.IObserver, Host.Interfaces.IParamObserver];
}

The script also calls on a few methods belonging to Host:

Host.Signals.advise (kMCUSignal, this);

Host.Signals.unadvise (kMCUSignal, this);

It seems reasonable that it's in these places communication via midi takes place. Can't find any midi communication explicitly in the code. Signals to and from Host seem to be input and output.

However, much of the MCU js script seems to revolve around the text that's supposed to appear on the displays. So I guess it really takes care of everything that happens up until the message is sent. Everything is in ascii format at this point, so the conversion to midi seems to be taking place elsewhere.

I've checked everywhere for the API for Studio One, but if it's out there, it's well hidden.

There is no possibility of assigning displays in the NI Controller Editor. And no clues hidden away inside the .ncms-template file that NI Controller Editor uses either. I've checked inside the Maschine standalone executable as well. All code there seems to relate to the Maschine App, and not MIDI mode.

Can I listen in on the communication between S1 and the hardware somehow? Is that a useful thing to do?

DvlsAdvct

2016-02-01 00:40:55

If you are on a Mac, you can use their MIDI monitor to see what is sending back and forth. If you are on PC, use SendSX or MIDI-Ox to see all the signals that are being transmitted.

NiDBiLD

2016-02-13 22:13:38

I apologise for the late reply. I've tried out many different things, but the sysex messages seem to be in some way obscured.

I am listening in with MIDI monitor. I am turning a knob, straight below the display, and the value on the screen changes. I can control pan and volume of tracks this way, with visual feedback on the screen, like a MCU unit. This is with a modified version of the Mackie Control script for Studio One.

There are two rows of text on-screen. Four columns per display - sixteen different fields in total.

This is an example of what I get from a knob twiddle using MIDI monitor. This twiddling changes the value of the bottom row of column 2, on display 1:

21:27:22.910 From Maschine Studio Virtual Input Pitch Wheel 2 6306
21:27:22.910 From Maschine Studio Virtual Input Pitch Wheel 2 6552
21:27:22.913 From Maschine Studio Virtual Input Pitch Wheel 2 6798
21:27:22.915 From Maschine Studio Virtual Input Pitch Wheel 2 7011

The message seems to be translated from hex to decimal. This is a completely different kind of message than I get from turning a normal knob, which usually gives me a CC value from 0 to 127, depending on what I tell it to do. In the NI controller editor, the knob is set as "MCU Channel", instead of Control Change. There are eight of these channels available, sending on channels 0 through 7.

I get the following data from the built in MIDI monitor inside Studio One, when doing the same kind of thing. I am unable to copy and paste from this window for some reason, so I'll attach a screenshot:

Image

This is sysex, right?

When doing a bank change using that same template (Changes the top row), it generates very little data in MIDI monitor:

21:49:41.510 From Maschine Studio Virtual Input Note On 1 B1 127
21:49:41.575 From Maschine Studio Virtual Input Note Off 1 B1 0

Inside Studio One, however, this is what I get from doing the exact same thing:

Image

What happens on the displays in this case is that the top row of every column changes, to display the track names in the selected bank. I can see a pitch bend command here as well, like the ones controlling the bottom row, so I suppose the values should change as well. They don't however, for some reason.

This has my brains in knots, and I've been pondering this for some time now, attempting to solve this by myself, but with no success.

I stumbled upon this just yesterday, while scouring the net for anything having to do with hacking Maschine hardware:
"Finally, I have basic identification of the project name and authorship displaying on the two screens upon initialization of the script. This was an amazing epiphany for me when I discovered how to use the screens in Controller mode. I am pretty sure I was the first to do this, but it depends on how you look at it. I am simply sending messages via sysex to a certain knob and it is showing up on the screen."
Source: http://www.voidrunner.com/2011/07/midi- ... enges.html

So, this might be the information I'm looking for, and it confirms my observations. However, the Mackie HUI hex-to-text translation I've dug up don't correspond to the messages being sent, which seems weird. When checking the messages against the character sets found in this document, the messages are complete nonsense: http://stash.reaper.fm/12332/HUI.pdf

Do the HUI protocol translate differently than the MCU does? Are there two different protocols here? Am I trying to use the wrong one? If so, is there some kind of documentation that I can use for correct translation?

Any kind of guidance would be highly appreciated. I'm desperately trying to make sense of this, and all I get is more questions. This is a normal stage in all kinds of learning, I know. Especially in programming, and extra-especially when reverse-engineering stuff.

Anyway, I'd appreciate some pointers from people who might know enough to make more sense of this than me.

------

By the way, I happened to find this entire endeavour so entertaining I bought MIDI translator and started playing around. Seems to be a great piece of software, and I'll enjoy it immensely. Wanna report a bug though - When I attempt to send really long strings containing weird characters as a midi message, the program crashes. I have a mac running Mac OS X 10.11.2, and can replicate the error systematically.

NiDBiLD

2016-02-14 00:48:53

Update:

Attempting to send the same messages to the same knob via BMT doesn't get me any text either. It just results in the knob momentarily setting a value, depending on the message I send.

The messages above doesn't seem to be associated with the text displayed at all. It's just how a MCU channel sets its value. I guess it's because these things, on the original device, are motorised faders, and that they need a really high resolution.

They go from -8192 to +8191, and those four number values in the S1 midi monitor that appeared when twiddling the knob, were, well, the actual values of the knob. Go figure...

NiDBiLD

2016-02-14 01:00:53

Update 2:

Found the MCU specifications as well, by scouring the wayback machine back to 2013. Apple had a document on their webpage back then explaining how to communicate with an MCU unit.

Here it is, if anyone else needs it. Might only work with Logic, though. I have no idea. The part explaining midi implementation starts on page 235:

https://web.archive.org/web/20130402181 ... ceInfo.pdf

Unfortunately, it doesn't seem to do the trick for me either. Sending sysex according to those specs, and still nothing on the displays. On the positive side, this document talks about 7 character scribble strips (page 248), which is exactly what my hardware seems to emulate. It writes six characters, and separates fields using a space that is one character wide.

However, as I now have both HUI and MCU documentation available. I just need to make sense of it. At least, there's some bit of progress. Assuming the docs from Apple apply here, that is.

NiDBiLD

2016-02-14 01:15:09

Update 3:

I attempted to capture what happens between Studio One and Maschine Studio using Sysex Librarian.

No results there either. The application doesn't notice any messages when listening to Maschine Studio Virtual Out, which is the port selected in Studio One for MIDI out.

DvlsAdvct

2016-02-16 16:00:35

Those E0 messages are pitch bend, not systex. Sysex messages always end with F7, 100% of the time. the E0 message is a high res MIDI message, 14-bit data as opposed to standard 7-bit.

When you send a message to the device using MT, it's just going to set the knob to whatever value you send it. So that's all working as intended.

Both screen shots you sent don't seem to show the values being sent, so that might not work as a solution. The only way we can figure out what sysex message to send is to know the full string the Maschine is looking for. There are a series of bits of data before the string that defines what gets read out, but it doesn't look like the monitor is picking that up. Can you also view what is coming out of the DAW? as opposed to the Maschine?

J

NiDBiLD

2016-02-16 16:03:26

How do I see what's coming out of the DAW? Are there any ports I should listen to?

DvlsAdvct

2016-02-16 16:04:58

I'm not 100% sure. You're sending output to the Maschine ports, which should be what the messages are being sent on. Let me think on it and see if I can figure out an option.

NiDBiLD

2016-02-16 16:26:54

Thank you!

I'll try to figure it out as well.

I'm listening in with BMT too, and I don't get any sysex from neither the Maschine Virtual In or the Maschine Virtual Out.

NiDBiLD

2016-02-18 15:12:16

Update:

I got sysex out of this thing, but it's weird:

Image

It sends only F0 00 00 00.

This is the result when turning any knob that results in a change on the display.

Obviously something happens on some other lane that I have yet to figure out how to listen in to.

NiDBiLD

2016-02-18 20:25:59

Okay. I solved it now. I found a way to listen in to the sysex sent to Maschine.

It has a slightly different header from HUI standard, but the characters are coded the same, so there was just a single piece of the puzzle missing.

florian

2016-02-25 00:46:53

awesome! would you mind sharing your MT Pro project (and possibly other setup files) here? I'm sure that there are other people who'd love to do the same.
Thanks,
Florian

NiDBiLD

2016-02-25 19:54:58

Right now my project is between versions, and a bit jumbled up.

I can, however, share my notes from this process - a very helpful document that describes communication with maschine displays in detail:

https://docs.google.com/spreadsheets/d/ ... sp=sharing

If you have any questions, I'll gladly elaborate!

florian

2016-02-25 20:19:28

nice! thanks,
Florian