buf.op, cut sound at "0 energy"

Sep 27, 2010 at 3:35pm

buf.op, cut sound at "0 energy"

Hi,
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 ?
Thx.
-Ad-

#52492
Sep 29, 2010 at 9:46am

I trie several buf.Op examples from the forum, but none responds to this point, I just can find the minimum and maximum of energy but not the “0″.
Should I do a FFT ?
Ad

#188773
Sep 30, 2010 at 1:38pm

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 ;)
Java/Javascript would be the way to go…

#188774
Sep 30, 2010 at 2:14pm

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.

#188775
Sep 30, 2010 at 2:29pm

Thx guys,
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).
It’s of course off line job, I’ll search for javascript solution, maybe buf.Op could help me;
I keep searching :)
Ad.

#188776
Oct 2, 2010 at 2:36pm

wonder how long it would take peek~ to scan and copy the relevant parts to new buffers~ and save them…?

#188777
Oct 2, 2010 at 8:43pm

energy is something which can not be measured for only one sample, so in
order to find the sample where you want to cut, you need to do DSP in the
runtime, a bufer object wont have such a feature.

#188778

You must be logged in to reply to this topic.