Play random parts of a sound file
Hello!
Sorry to bother you with this very basic question. I am just a few days into max, and am stuck with a few problems. Right now I am trying to play random sections of a sound file powered by a metro object. I have been able to play from the middle of a sound file by using the message "start" combined with a number (e.g. "start 15000" to play from 15 seconds into the recording), but I am not able to combine the "start" message with a "random" object (e.g. "random 20000" to pick a random number up to 20000) in any way. What is the solution to this?
Sincerely,
Anders
Read the help files of objects that you use.
That is best way to learn.
first problem in the 3rd toggle is that you send message start
to random, which does not understand it.
Even if random would output a number, play~ would ignore it.
Play needs start or stop, or start with adjustable start and speed times.

I guess you would not do this mistake after having a short look
into help file.
------
The last toggle has another problem.
You connected random output to right inlet of the message,
and that replaces "start" in the message with number received from random.
Again play~ doesn't react to it...
Here is fixed patch with another problem solved :
length of loaded file and maximal random time.
Maximal start position that random should be able to output
is audio file length minus playback slice length - or metro interval.
------
For playlist playback - check the help file,
you'll find out how to deal with it.