Max: Faster buffer -> list

One thing might be to sneak a symbol in the list and then have them be output sequentially so they can be routed to wherever you want - kinda like how sigmund~ splits with its indices -> route.

Also, at the moment length specifies in milliseconds how much of the buffer you want to see, which isn’t ideal considering the paradigm. I changed all the values with sampstoms~ but when this converts to a number lower than 1 output stops.

EDIT1:
So if you over allocate the length you can still query very small buffers just fine with jitter. Not a very useful interface though.

image

EDIT2:

I also tried making my own external to do this with the min-devkit. The code is exceptionally simple but really slow comparatively on big files (100000 samples +).

On average I get about 0.25ms from cpuclock for jit.spill whereas I get about 5ms for the external. I guess its to do with the looping behaviour of the external.

At sizes under 1000 the external is just as fast or faster.

1 Like

Yeah that’s a tricky one. I would hazard to say to just concatenate them all and dump them out, but then that’s a bit too “figure out yourself” in terms of splitting the list back up. Particularly if, as @jamesbradbury pointed out, you can receive back less samples than you originally querried.

Plus if you concatenate you will run into the 32k limit earlier isn’t good.

Perhaps just send out each channel as a list, and do them in series, starting from channel 1?

That solves the problem of needing to know the exact list length to effectively split it, and also removes the 32k concat dangers.

I agree with this. I think samples makes more sense in this context, or maybe just using the native fluid. lingo and going with @startframe and @numframes as far as what you want to get out.

For most of what I do, though, I would just dump the entire contents and then deal with it in list-land.

So does all our non-realtime stuff, and most (?) of jitter. IOW, it won’t make any difference to this particular case, AFAICS.

Mistake on my part, using the wrong jit.buffer~ attribute. This might fix it


----------begin_max5_patcher----------
1498.3oc0ZsraaiCEcs8WAgV0hIMfuDkTmMY6rXv7ATLHP1lIQE5EjnRcPQm
u8gjWJGqF+PwhxnM.VNThRWcN2W7do+9xEAqp1JaCPeF8EzhEee4hE1SYNwB
23EAEoaWmm1ZmVPo7aUq9ZvMvkdNsoLsPZuRWBkfwgXAt+pJ4Vk8R0oJUC5t
UYkaTUnVUZipeNUcpboR8RsDdKBBtw8A8utozpdIGDQ+MU2HakkpTUVU48Mx
0J3d4gI2huAQShLegcG18bJ6JxJ0ByBDR+iJUs9orxGG7XhuMb2igfgGJcum
z5p7pFXx3a4FoDqmn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