Page 1 of 1

Max Follow MIDI Clock Sync Tempo Changes?

Posted: Sat Nov 12, 2011 8:50 am
by smilinggoat
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

Re: Max Follow MIDI Clock Sync Tempo Changes?

Posted: Sat Nov 12, 2011 11:03 am
by broc
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>

Re: Max Follow MIDI Clock Sync Tempo Changes?

Posted: Sat Nov 12, 2011 5:20 pm
by smilinggoat
Super. Thank you Broc!

Re: Max Follow MIDI Clock Sync Tempo Changes?

Posted: Sat Nov 12, 2011 8:39 pm
by broc
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).

Re: Max Follow MIDI Clock Sync Tempo Changes?

Posted: Sat Nov 12, 2011 9:26 pm
by smilinggoat
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!

Re: Max Follow MIDI Clock Sync Tempo Changes?

Posted: Sat Nov 12, 2011 10:19 pm
by broc
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.