poke buffer transition smoothing

Wil's icon

I've never tried this before.
as you can see in the patch, I am experimenting with poking different buffer functions into different parts of a buffer to create custom envelopes.

Buffer:
What I have made so far works -
However, I am wondering (as labeled in the patch) if there is a way smooth out the transition when combining different buffer functions the way that I did it?

Player:
I used [ease] to give the impression of speeding up/slowing down of the envelope. However, I cannot figure out the math that speeds up, slows down the phasor so that the total length of one phasor cycle (0-1) matches the total length of the buffered envelope like it does with a static amount of time.
For example: Using line the way I'm trying-- or something completely different?

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


making the buffer envelope:

making the player:

Source Audio's icon

your waveforms show only upper, positive half.
if you wanted to add tail as in your example and match
it's gain to value in head buffer at that index, but at that point it is
very low or negative, what then ?

mixing parts of several buffers like that ?
allways recreating head one if tail changes ?
instead of mixing head with tail into result buffer ?
makes things slow.
adding crossfades, ... I don't know.
why not use function

Wil's icon

Thank you for the more concise version of what I am experimenting with.
And thanks for the questions. This helps a lot.

it's gain to value in head buffer at that index, but at that point it is very low or negative, what then ?

That's what I was asking about - is it possible to somehow manipulate only a small portion of a buffer function (most likely the beginning or end) so that it connects more smoothly to a different buffer function?

If not, I do my best to find sweet the spots where the transitions kind of match up, are clean or to my liking, and then make presets. (including for different fill sin $1)
-- still, I should be able to figure out how to curve the beginning of hamming half.

mixing parts of several buffers like that ? allways recreating head one if tail changes ? instead of mixing head with tail into result buffer ?

ok. poke buffer 1+buffer 2 into buffer 3. Doors opening!

why not use function

hmm... maybe can use function for making the second buffer (tail),
--trying to make the smooth adjustable sin using function might result in large bouts of anger and/or smashing computer :/ (or something I don't know about function?)

Source Audio's icon

one could do all that with such short buffers, because analysing them is not
taking long time, and then crossfade them using peek.

you might also check lyon putpourri el.function and el.buffet externals,
https://disis.music.vt.edu/eric/main/lyonpotpourri/

there are also buffer manipulating objects in flucoma package

Wil's icon

Great. Thanks!