Forums > MaxMSP

Patch for traversal of a file based on cue points?

Jul 21 2013 | 4:19 am

Does anyone know of a patch or relevant Max objects for the following?

I want to be able to set a list of cue points in an audio file and have them played in order, hopefully with some click protection as well.

For loopy music the list might look like this –


The point with this is to be able to play and loop material that doesn’t obey strict tempo.

Jul 21 2013 | 4:31 am

Do you know the [chucker] object? The helpfile has an example of this type of buffer/playback munging, if I read your post correctly.


Jul 21 2013 | 4:43 am

I don’t, will check that out – thanks.

Jul 21 2013 | 5:01 am

I think perhaps a patch based around play~ and buffer~ is what I need. Particularly the ‘start’ message for play~.

Jul 21 2013 | 6:04 am

If you could explain in more detail exactly what you mean by loopy 1 2 3 3 3 , I can put something together for you; I use play a lot.

Jul 21 2013 | 9:59 am

I suppose you set a marker which forms a dictionary/hash:

[schema = key, start_time (, duration]

1 => [00.01.00, 00.03.22]
2 => [00.14.03, 00.02.69]
3 => [00.43.31, 00.01.12]

and then you send the start_time and duration values to play~.

Ideally, you would be able to discover the start_time and duration from a gui element, like a wave-editor-style display.

Jul 21 2013 | 1:13 pm

to arbitrarily jump around a buffer using [play~] I would rely on phasor in the signal domain, instead of control messages like "start". I could be misguided of course. The patch below allows you to use the waveform GUI to vary loop size and location (and pitch/direction, which I can never resist). If it contains any unfamiliar methods just shout at me for an explanation :)


edit: added one object to stop it breaking

-- Pasted Max Patch, click to expand. --


Jul 21 2013 | 1:18 pm

I forgot to ask how you wish to store and edit m/s/ms values; someone recently asked a related question about the [groove~] object; there’s [coll]; or Sam Tarakajian (of recent Mira fame/notoriety) has a tutorial video about the [dict] object under the pseudonym dude873, which may or may not apply here.


Jul 21 2013 | 1:20 pm

Between hacking my patch above, and the [chucker] helpfile, you should get closer to what you need.


Jul 21 2013 | 9:08 pm

I’d probably use either sfplay~ (with a set of cues established by ‘preload’ messages to sfplay~ or to sflist~) or buffer~ (with ‘start’ messages to play~, the parameters of which are stored in a coll).

-- Pasted Max Patch, click to expand. --


Jul 22 2013 | 2:16 pm

Thanks a lot for the patches. I’ll try them and report back.

Jul 22 2013 | 3:00 pm

Brendan: sorry I couldn’t get yours to make any sound, but I’ll definitely look at it more closely to learn from it – thanks :)

Christopher: yours sounds very smooth, exactly what I’m looking for.

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

Forums > MaxMSP