Forums > MaxMSP

How to sync buffer playback with tempo and time sig

October 27, 2010 | 12:13 pm

I have been scratching my head for days, trying to work out the best way to do the following:

1. Store a sound in buffer
2. Play sound at varying rates according to tempo (pref w/o pitch change)
3. Play sound in varying time signatures by shortening the loop length (eg. from 16/16 to 14/16)
– but then allowing the full loop length to be restored afterwards.

I basically want a buffer playback system to match up to the array of LEDs at the bottom! (see patch).

I have tried using a phasor~ synced to the transport, to control wave~ playback rate, but I cant figure out how to get the loop length to sync with the transport.

I have also tried groove~ but can’t figure out the scaling for the playback rate.

It feels like it should be easier than it is – am I missing something?

– Pasted Max Patch, click to expand. –

October 27, 2010 | 8:34 pm

Transport timesig can only be set when time is at 0(from helpfile: "set time signature (can only be done when time is at 0)")

So you can accomplish this by using trigger to send a 0 to the ticks inlet just before sending time sig message:

– Pasted Max Patch, click to expand. –

________________________________
*Never fear, Noob4Life was never here!*


October 28, 2010 | 10:05 am

Thanks for looking at that Noob. Certainly feels neater. I will hook the number box up to some sort of button system, so I can eventually control time sig externally.

My main problem is the playback. What is the best way to scale playback rate according to tempo, but also loop the correct number of 16th notes relative to the soundfile length?

Is it a case of scaling the groove~ playback speed and setting the loop length values? Or is there a better way?


October 28, 2010 | 9:26 pm

Alright Paul
yeah man this same problem had me stuck for weeks.
Here is a sub patch i’ve made to sync a sound file to a global tempo.

You tell it the Rate, SF lenght(sec’s), number of beats, time sig, ect

I’m not to sure if the time sig section is working a 100% but it was close enough for me to work with 4/4 drum loops. It should be a fair starting point.
I need to go back to it at some point, if you get it working better than i did make sure you post it up. I would love to see it.

Anyway hope it helps

– Pasted Max Patch, click to expand. –

October 20, 2012 | 6:55 pm

mrmrshoes! Thanks for that patch! I’m still digesting it but coudl you help a brotha out and post the clipboard for your "[Meter2Clicks]" patch? It’s in the subfolder and I know not how to recreate. In your helpful comment box you call it a BeatValue and I lose you. Thanks for this, I hope you come back to this! ^_^ might make my own thread here soon


Viewing 5 posts - 1 through 5 (of 5 total)