Patch for traversal of a file based on cue points?

Andrew's icon

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 -

1,2,3,3,3,3,4,4,5,4,6,6,6,7,8,9,10,11...

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

brendan mccloskey's icon

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

Brendan

Andrew's icon

I don't, will check that out - thanks.

Andrew's icon

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

brendan mccloskey's icon

Hi
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.

Andrew's icon

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

[schema = key, start_time (min.sec.ms), duration]

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

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.

brendan mccloskey's icon

Hi
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 :)

Brendan

Max Patch
Copy patch and select New From Clipboard in Max.

edit: added one object to stop it breaking

brendan mccloskey's icon

...
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.

Brendan

brendan mccloskey's icon

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

Brendan

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

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).

Andrew's icon

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

Andrew's icon

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.