I am not an expert in buf.Op, so I'm searching for tips to cut a one hour sample in a random way only at "0 sound energy" to avoid clicks…and make a folder of those samples.
Anyone would know about this ?
it's not quite clear what you exactly want to do...
if you just want to avoid clicks it would be a lot easier to just apply an amplitude envelope, when playing the samples.
if you want to seperate the "events" in your audiofile (like for example protool's beat detective), that's a whole different story.
Depending on the kind of your audio material this can get quite tricky.
And if you want to do this "offline" (meaning, not having to wait one hour for the whole buffer to be processed), max is probably not the best environment for this task.
Of course, it can be done in max ;)
If you want to split only at zero crossings, then there is [zerox~] but I don't know how accurate it would be to do what you want. The only way I can think of to do it would be to generate your random split points, then scan the buffer (with peek~ or index~), detecting the 0-crossings (with zerox~ or some maths after peek~), and then quantize the random split points to the list of 0-crossings.
For a 1 hour audio file that would take a long time! Well, it would take an hour if you did it at audio rate with zerox~. You could set up a patch that used the non-realtime audio driver though.
I agree with Mudang, you could do it in max but it would probably be pretty clunky, and much much easier to window out clicks during playback.
I tell my point in a different way:
One hour of speech from streaming radio should be cropped randomly in little audios tracks, and to avoid clicks, it should be done at 0 energy, (I am not talking about silence, but it could be a solution if I don't manage to do what I want).
I keep searching :)