MIDI Translation (Bome MTP vs. M4L)

c00kie's icon

I haven´t used M4L so far (booo!), but now need some advanced MIDI translation. Bome MTP seems to do the job, but then again that´s another piece of software which adds complexity, maintenance and cost. I´m also just assuming, as I only checked their manual. The demo will run only 20 minutes, which doesn´t give me enough time to check what I need to know.

So first, I wonder about performance, comparing M4L to MTP. Any users who know both and can comment on latency, cpu load etc ?

Second, while I did some Perl coding back in the days, I think my current need could be a good reason to get started with M4L, assuming it can solve my issue and is performing well. Learning a tool I already own makes more sense to me and visual programming seems to be just sexier :)

So here is what I need to do:

A Launchpad Pro (and probably a push1 as well) are connected to the MIDI PC running Live. A second machine runs QLC+, a lighting control software which can learn/assign MIDI data to call scenes and move faders. I´m aware of the 8bit DMX vs. 7bit MIDI issue, but that doesn´t matter in my case. Both are connected via rtpMIDI.

Now there is more parameters in QLC than knobs on my hardware, also more scenes to call than buttons on the Launchpad. So I want to have different layouts on the Launchpad, that can quickly be switched, preferably by receiving MIDI msgs from the launchpad, for example using the upper line of buttons to call the different layouts.

The layouts should have MIDI translations for all the buttons and pads. For QLC scene recalls I would prefer to map everything to notes, so I can easily edit them in the Live Editor. Also extracting data from Live MIDI tracks, think of an existing rhythm triggering a light. For CC I would rather use an encoder or fader based hardware like APC, BCF, BCR etc.

Translations should be able to call multiple scenes in QLC, so generating one note on the launchpad should be translated into something between 1 to let´s say 30 notes generated. Not all scenes in QLC are fully featured, some only control color, others just strobe modes, so layering QLC scenes is generating a complete lighting setup. Finger drumable. Flexible to combine.

My impression is that M4L can of course do that, question is: how hard is it to get there and where do I need to start. Also, what´s the expected latency compared to a specialist like Bome MTP? I would prefer the visual programming, integration into projects and of course the getting started effect to grow more into M4L.

Ideas, Comments, Questions, let me know if I´m walking in the right direction.

c00kie's icon

Well, maybe TLDR :D

Short version:

1. How performant (latency) is M4L when handling Notes and CC sent from a MIDI controller, translating them into other MIDI data ?

2. If the mappings should be switchable via MIDI data as well, is that possible ?

3. How complex is writing such a thing in M4L ?

Evan's icon

1) minimal, iirc it might be the vector size of max? (correct me if I am wrong) but I'm fairly certain it would be faster running it inside of live via M4L than doing this externally. Probably less of a headache as well, I'm not sure how easy it is to handle data structures (your translations/mappings in this case) in BMT.

2) Yes. If you input a C1 into your device, you can spit out a C1, or any other combination of MIDI data you wish.

3) The logic stuff should be pretty straightforward, but handling all the mappings and translations would be the complex bit. You'd have to figure out an elegant way to store and recall all of that data.

c00kie's icon

So 3) is the issue at hand, I will try to find some information how hard it actually is to get this done. I see big value in learning M4L, as this is probably just the first weird idea I want to turn into a plugin :).

About BMT: It receives data and then triggers actions, which could be either sending any translated MIDI data. But an attached action can also be switching translations on and off or call different translation sets. So in that regard BMT can do what I need (in theory as of now), but it adds complexity, patch management separate from Live and of course cost.

So I will play around a bit more and see what can be achieved.

next step: find some M4L MIDI tutorials, there shoube plenty ;)

Thanks for pointing out what´s easy and what may be tricky, that´s exactly the info I was looking for !

Evan's icon

Yeah I've used BMT before, but max is better for handling large datasets, as far as I know. Max would be much more flexible, which can make learning how to do it a bit more time consuming, but options are always good.

I'd probably do this with dicts, or some combination of javascript.

broc's icon

Be aware that M4L devices are plugins which don't receive MIDI directly from the outside world but only through Live tracks. So you may get some limitations imposed by Live. For example, Live doesn't pass MIDI channel info to the plugins.

c00kie's icon

Hm, given those little things I guess I need a solid introduction to "how to create your own midi plugin with m4l". Any resources that come to mind? I will wildly google and see what I find, but maybe you know what worked best for you when you got started :)

About the channel info... I understand this as: The channel info is stripped by Live, sent to the plugin and then reapplied when sending MIDI out from that track. So if I want to address multiple channels and keep them separated, I would need to create separate tracks, one for each port/channel pair, then set the outs accordingly.

This also sounds like translations can only happen withinin one channel, it´s not possible (or really hard) to translate "incoming channel 1 C0 -> channel 1 C1" and then translate "in channel 1 C2 -> channel 4 C3" etc. Good to know, not a dealbreaker in my scenario, phew.

Thanks for these valuate hints, I will see how far I can get :)