Automatically Splicing A Buffer

Jay Tobin's icon

Hey all,

First time post from a newbie here. I'm working on a project with the goal of taking a buffer and using it as fodder for a sample-based playback patch (like a drum machine). I succeeded in taking the incredibly easy way out by using groove~ to read a buffer, and changing the start/end points of the loop to effectively jump around using the same groove~ through a different buffer. Naturally, this causes absolutely awful clicks and pops since it gives me no control over interpolation.

I was wondering, then, if it's remotely possible to take a buffer and, say, automatically divide it into a number of sub-buffers? The reason I'd like to derive the sampler contents from a single, central buffer is because my patch uses a circular buffer to take live input and process it immediately, overwriting itself every 10 seconds. The goal would be to create a sort of live playback device with the ability to splice a single buffer into many sub-buffers, which would likely include employing many circular buffers to constantly update themselves to keep pace with the central buffer. I imagine playback from each individual buffer would be simple, and am not too worried about figuring out how to get each buffer to play individually.

This idea is a lot and might by all means be impossible with my current line of thinking, but I'd love to hear feedback or feasible solutions as to how something like this might be achieved. I'm including my jury-rigged patch to make the concepts easier to understand since god knows I'm sure I did a shoddy job describing what I have and what I seek.

Thanks a ton!!!

Live Sampler Machine number bar control.maxpat
Max Patch

Source Audio's icon

Even though this sounds just as another " I can't play any instrument so let computer make some noise ..."
If You want to capture 10 seconds of live sound and after doing so,
split 10 seconds into several buffers to play or loop them back, You need buffer copy function, possibly with fade I/O to avoid clicking.
You can search in direction of java based buffop, eric lyon's el.buffet etc
Capturing main buffer could be recording or stutter~

Jay Tobin's icon

The not being able to play an instrument observation is right: I’m trying to build a few patches for folks to use with no experience playing traditional instruments, so the onjective of the patch is to more or less do all the work and have anyone be able to make interesting sounds with essentially no effort.

The el.buffet external looks extremely promising, and luckily I’ve already found a consistent way to capture live audio to a buffer, so this seems like the likely solution. The java solution is definitely elegant, though I’m very interested in other uses for el.buffet. I’m gonna go ahead and see what I can do since this problem seems like a rather simple fix.

Source Audio's icon

For that specific task, copying buffers is not needed at all,
You can use as many playback units as You wish, each
having own loop slice.