Max Follow MIDI Clock Sync Tempo Changes?

Learn about building and using Max for Live devices.
Post Reply
smilinggoat
Posts: 19
Joined: Sun Nov 16, 2008 5:20 pm

Max Follow MIDI Clock Sync Tempo Changes?

Post by smilinggoat » Sat Nov 12, 2011 8:50 am

I'm creating a looper/sampler for live performance in Max for Live. I sync Live to Traktor Pro 2's MIDI Clock output. My Max patches get tempo information when they are instantiated, so when the tempo changes once they're already running, the patches do not keep in sync with the new tempo information.

Is there a way to [bang] on any tempo change?
Or (less desirably) poll the master tempo periodically to see if any changes have occurred and at that point then [bang]?

Cheers

broc
Posts: 1151
Joined: Mon Jul 26, 2004 8:37 am

Re: Max Follow MIDI Clock Sync Tempo Changes?

Post by broc » Sat Nov 12, 2011 11:03 am

You can use [sync~] to receive midi clock and observe the master tempo.

<pre><code>
----------begin_max5_patcher----------
353.3ocwT1sSCBCEG+5xSQSuFWnaCGy6zWCyho.ca0TNkP6hLWlO61V.EMaS
TRb2P47Amy+9iS6g.DIUUy0D7c3GwHzg.Dx6x4.0ZiHEr5LIS6SirVpfcEjv
lP1WU6LRtwGbZq2FWl8k7lJ69HlgDhIoLXCAupMu0JvnEu5yhFMIp0cIyjsU
.adphmYZpvxE1nXZRraINpwXRzGURj6EmJ84anzdhS.cZi1qm.qv2Sx8UBlD
+fRlSbQOFD3dDNPT.7WrMrqaFdsWrjJ61miSK+sPxwmQvl4K8rY4kXSx0FMF
AbZpPOGUDf4u.kjYNNrviloKtDShuxLQuGxd6zPY14fhVrAXR+.S3HQDkRcK
yu8hmoFKi7EkHEv2urwqKm+uBNsZWUV2tscxE+ozx4Z6jDyHTPubbm76kzVQ
dN2GuCBEh7RkkVsZ.u5j+EGpjbci9CRJ4eUQwCARiPQViiAuCDHWvkM
-----------end_max5_patcher-----------
</code></pre>

smilinggoat
Posts: 19
Joined: Sun Nov 16, 2008 5:20 pm

Re: Max Follow MIDI Clock Sync Tempo Changes?

Post by smilinggoat » Sat Nov 12, 2011 5:20 pm

Super. Thank you Broc!

broc
Posts: 1151
Joined: Mon Jul 26, 2004 8:37 am

Re: Max Follow MIDI Clock Sync Tempo Changes?

Post by broc » Sat Nov 12, 2011 8:39 pm

Sorry, I just realized that [sync~] will *not* work in M4L.

In M4L you need to use [plugsync~] instead.
It delivers tempo information from the host (on the 6th outlet, see reference page for details).

smilinggoat
Posts: 19
Joined: Sun Nov 16, 2008 5:20 pm

Re: Max Follow MIDI Clock Sync Tempo Changes?

Post by smilinggoat » Sat Nov 12, 2011 9:26 pm

Hmm, [sync~] is actually providing sync information in my patch. I haven't tested it thoroughly but it is doing something heheh. I'll definitely give [plugsync~] a shot this weekend. Cheers!

broc
Posts: 1151
Joined: Mon Jul 26, 2004 8:37 am

Re: Max Follow MIDI Clock Sync Tempo Changes?

Post by broc » Sat Nov 12, 2011 10:19 pm

Ok, I've checked again.

In fact, [sync~] delivers 120 bpm but doesn't follow the master tempo (because M4L can't receive midi clock).
On the other hand, [plugsync~] continuously delivers the actual bpm of the host.

NOTE: The [plugsync~] reference page seems wrong, ie. you do *not* need the formula to calculate bpm.

Post Reply