How do you control the midi clock of an external program from max?

genfu's icon

okay, i'm sure this must be covered elsewhere, but i can't find it in the tutorials or by searching the forum here:

I want to control the transport of a external device or program via MIDI, from within max. Specifically, I am trying to control the transport of two instances of Renoise from within Max, by sending MIDI data from MIDI Yoke in Max to each these programmes indepedantly or in sync. I can get both instances of Renoise to receive midi info from max, so its just how to get send midi timing information to control the transport which i'm stuck with.

Now, this is possible with one instance of Renoise via Rewire. However, it would appear that it is not possible to currently slave two instances or Renoise to max msp as Rewire master. Therefore I wish to do the same thing with one or both instances of renoise with MIDI clock and sync information which is sent from a patch in max.

I've looked at the sync~ object but I can't understand how you send timing info to Renoise with this. Presumably this is possible though? I mean the concept should be the same as if I wanted to sync an external synth or drum machine via a clock controlled in max? How would you do that?

Can anyone offer some pointers or perhaps an example patch of how I go about this? Initially I don't need to do anything that complex, just stopping and starting the transport in each programme and adjusting the speed etc. thanks in advance

broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here is a patch of a MIDI clock generator.

genfu's icon

thanks!

broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I've just noticed that in my patch the value type of the BPM number box didn't correspond to the unit style, which may lead to inaccuracy. It's fixed in the following update.

genfu's icon

thanks this has been really useful. i've used this as a basis to make the patch i describe for controlling the renoises. although i think rewire would still be the way to go, but it needs renoise to implement multiple slave instances of the program... but this is another story, i managed to make my proof of concept anyway and it works so thanks!

Girilal's icon

Hi guys!

I am looking for a MIDI clock to feed through physical MIDI cables (from Max to physical gear via a MIDI interface). Will this patch do this? I.e. will the real world objects understand the signal as MIDI clock?

(I've copied the patch, but it'll be a while before I can test it... Just thought that perhaps broc knows what this will and will not do.)

Thanks!!

broc's icon

Yes, the patch can also be used to sync external devices.
Just select the corresponding MIDI port of your interface.

Girilal's icon

Thanks a lot broc! I'll try it out next week:-)

Girilal's icon

It is all working like the proverbial charm! Thanks broc!!

Damien Vdb's icon

Hi,

I don't know a thing yet about max programation. would it be possible to multiply or divide the midi clock coming out of ableton with max for live?

Then sending it to my synth,

For example i have a running midi scene of 120 BPM and my synth is running with the same Midi clock but on 60 BPM ?

I know that kind of hardware does exist, but not yet in software not I schearched it and found nothing.

Damien.

hetsind's icon

hello, what are doing objects t249, 250 &252 in this patch? thanks

Rick's icon

clock (decimal 248, hex 0xF8)
start (decimal 250, hex 0xFA)
continue (decimal 251, hex 0xFB)
stop (decimal 252, hex 0xFC)