Multi-stream slice offsets

Yep - I’ve just checked and this does exactly what I’d expect here - I get 3 sounds on the left (each triggering randomly) and 2 on the right (also triggering randomly).

Because the triggers are so fast and the grains so short (1899 sample every 2500-4500 samples) it’s a bit hard to differentiate the sounds, but it does happen. You’ve also connected both of the outputs to the left, so you’re only hearing 3 of the 5 layers in your patch.

Let me know if you’re still struggling to understand and we can talk further or even set up a call to go through it if needed.

Hey! Thank you for the speedy response. Yes, I definitely don’t quite understand multistreams yet. Big improvement.

My main issue now is how to add and remove voices. Here’s the idea - I’m using fluid.plotter with a radius to pick up some number of samples. I want one voice to be created/removed for each point the radius picks up - for now, if I have one point selected, it plays that point in every stream created. My guess is I want to mute the streams that are greater than the count of selected points, but I’m not sure. Hopefully that makes sense.

I’d certainly be down for a call to work through this if you’re up for it. Thanks again!

----------begin_max5_patcher----------
5633.3oc6cs0iaiik94z.8+AsElG1EaE27NkVfAauyK8SyKy.L.CFrnfrsrK
kHK4URNIcMXpe6KuIYIU5BKaJW1URgDac0jmOdtwCOj7e9y+zGtaY12hJty6
+x6e38gO7OEW4CpqIuxGptvGtaW32VkDVndv6VksaWTZ4c2atYYz2J02HOJr
LxS7vw6NryKaiWf2WxhWEU38u+e+eT+7IwoQqxNjpdIT0UiWq9MxV9oOxg0O
69vxUOFmt8g7nUk5pID.7W.t2iCjehXpSXvE.u+2p2ZSVZYQ7SQpB.uvGFvn
TpOmEDDPnUOU5gcwoIQkJpB13pYGJqtLPc0+0O+SxuEec+4iRBPZs2l7rcdk
OF4UDkHnrn0dEIBfxaeVrnp+JfJvnPEBoPGTfFqHD4WT5fXEbADQDPDI.F.f
AHzaLVUiNZbwaalm36LuPukG1rIJ2dfhELFPwzLSXLWgSBbPhSfgvIXvB.mQ
X..hx.T.6sFm1Gu5yc4cZR79iQ7j.pRDhxjeAwHETPFQfhx3XLymifPhOv+s
lIQJ47KgogI+dgPfJ6P9pndQA9nxJZYCflC.qfDITLnjBmwBv9bLjBw.xkAC
Ri9pfRdIDrIYQY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QxsSWQo058BS2Z1im4M2ch2mmsOKudWudAN33abnLaad35Xy7
CD7hQY39JFsbwi7hco361If2352rMyYcyytvuwNtudOPqhLl0JB+g3TIWVTE
8CtuwGMIXQCYilEn41lO.MFNq6BWIWRaZ0FpZ97wAHnBZ4FnE1zIQWQ6Mm6n
CP8spaDASAJP0NKXpHpijbLvYp90dTRbY6iEBZ0reCH13yD+wuu2ifiH1v8k
xV226Q87dW0RacDfrtgs099mMbdplwFJpDHfn96dtN83U8mRNDUO2oGn50in
KFxYDEe.qtlFHuDb9po4YeM8DppGqfzZIY77VU+s7nnSopp0Yhk+IOBx7EVo
lsZ4eIZ8ITG49DLTIRBITg3oRoiQY4LUQ+6QIIYecp55lLQwD+jQmnbw.mF.
.9iaABQgbsVInOTQJz.JgNGjxgcKix+srjSBzErq.kFQpvZIUUkgM0H5xZ59
vznj+Vb1jpsNam3NZZUPJ.tu1cLAOuxRA5jbiC9twMNiG+pLLP13TrOT2eBU
lH7y+j3Q9+oq+doL
-----------end_max5_patcher-----------

js kntobuf: (this just converts the list of symbols kdtree spits out to a list of ints i can put into a buffer)

inlets = 1;
outlets = 1;


function anything()
{
	var indices = [];
	
	for(i = 0; i<arguments.length; i++)
	{
		indices.push(parseInt(arguments[i]));
	}
	
	outlet(0,indices);
}

Yes - in terms of muting streams you have a few options, depending on what you want to happen. The most obvious is to start and stop the fl.interval~ in each stream (you need to set the /switchable parameter to allow this).

Essentially here the multi stream approach is like having (in this case) 9 copies of the patch - you can think of it as a convenience in terms of not having to make and deal with those copies, but it would be possible to do the same things without multi stream capabilities if you coded it manually.

Send me an email off list or direct message here (I think that will trigger an email to me) if you’d like to fix a time for a call.

I just having a similar nut to crack… very beginner who just try to understand how overlapping grain playback with the flucoma concat plotter would work with fl as grainplayback engine … maybe you found a solution in the meantime and care to elaborate?

Here’s something quick and nasty without any of the plumbing inbetween that does the map / analysis etc. But the principle is there to build the infrastructure you need around this.


----------begin_max5_patcher----------
1323.3ocuZkzaiaCE9r8u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dzI4zqk0LkI.94QLo21ZKwXhhlYHxZfWUeOWpdxB88AW2V20TvsQ1uVTU9R
G9qMmLQ6s0xx.zxXBL0D4x2BCGeH2pbhRlDsy.gvnF96F91UR1SW86+wec0e
JE50ySeoqUT7a0O9Etr1DM.lt.OFTlWvXHYGWoXe+PSQk+voxY+dlq+ZMkiK
zuTFNaMcknCKiRdqRTwTBcfiW7PD2CcTqg2RB4ijhGCIQ7PRlCeArjx8PPlx
+.KHydFcVIQGCIY+H3yIojwRRHejzyKmshxc05Z15Y6zT6Y2FicmKAkbX1g2
ntoj2XyVM8K1DrGKVZT5vYdML6sKVLL1hON.Q8KVXRxG0hYKV.yVvo9hIzYL
.j39pOdd1Xa.R7wcMYLhph8Ip5vxAFl7JpZzq7.FImO+E83aI8Q+FkOIh1Ge
qA6OLu3beCtAlD4s57jgQSvw1n74H2YtSOLazi4m3iZYTL.9nVHHOBtgivKI
zEud5XyLIdEKl9SKpOwmn9ts4LAQNLar4KDerh3zeZ7E7GfuX9Oc7N7EXJFr
OQxhFCGIB1WS.zJe7IC+Xjf2mTeYifbx7IV2ajiq+S1tc2yaZ6eXqHz8jeWs
k5jsvNUT4lRsSa32KFdd61HExZz8+pzM+1031WtGSb+sOC2VqIgUch93VZvo
Eoseeyd30ti4vgcaAl+84+OPb9AsY
-----------end_max5_patcher-----------

this is great @james.bradbury! than ks for taking the time.
I somehow missed your post today, while I was working on the ola version and now I find it very interesting to see/follow how you did the parts with fl that I did in normal max…
just in case: iam referring to my mod of your corpus explorer patch over here:

a question about simultaneity of frames in frame lib:
is it correct that as long as grains overlap but didn’t start at the very same time
than sink~ can do it just fine … but if I would like to have 3 simultaneous instances of a grain with different pitches (each one octave apart) I do need poly~ to accomplish it ?

You don’t need to manage polyphony at all which is one of the great things about FL :slight_smile:. Instead if a new frame hits the fl.sink~ while a new one is “playing” the new one is added to the old one. This is fundamentally no different to how a poly~ output works anyway, as usually you just have a singular out~ 1 where all the voices sum.

I’ve tried to visualise how that works for you below. Time goes from left to right and the big squares represent frames as they would be generated. The first two frames don’t overlap at all because the first is already over by the time the second arrives. The second and third frames however do have some overlap, shown with the red overlay. For “frame 3”, the red portion would be added to “frame 2”.

So you never really manage voices, you just constantly paste into the fl.sink~ and it will combine the frames giving you the effect of voices.

You can also see what I mean in this didactic patch:


----------begin_max5_patcher----------
587.3ocuVssiaCBD8Y6uBjUepJM0fsis6uR0pUDGRV1ZCV.NMsq17sW7Pr1K
4FM1JuPBCSxYNykC7RXPzR4NlNB8CzOQAAuDFD.l5MDbXePTCcWUMUCtEIX+
Vt74nYtiLrcFvbsjtpgo0H7vQsTS0SbwlGUrJiCAbAdd7LDYQ+ZdL7cx7XzC
G9IhtFtnlY.jvuYT1Y9rU9J.Van7Mb5.jN+L+ok4vKJB8P+IuFF1uLabT7qn
hqyMbbIPqx4YWhbDuIWxYIGWXtM9w96JZ09KvERYFPhDnDklMr9+vk3SvERz
sTM5ZVxTWOyu.B1rapqhbhf8cMxJZCyvTOxDzk0r2yti63lghVREatsJS+DD
cC63oKlXi4IzW7X3BmV.4ghKmG7tAr79Lbstd9Zkrw55dDjv0dP0RB7ANahT
RxmXtVy2xlqqjsrKMskAJFINUQbQJzLWL5B2hyRlau+77EOMW7qqSRRdNnkr
XhZNOuxuluQPqmZVZkbYpsz58W7p.GWcq4oSTuYxcaNrSvWKUM6QVoTL56Gz
dtNgIjRm.DdhptDOoL.icXS74Wx.gZu8OlGzxNU0ve0vKHPuEsqXZCWPMbo3
8NgcNcxbsuHk3APjO3iTsxd6WeBZT.m6Iv3QRPhG3jNAIRrOYxxo.HrO8FI2
odi7S2aDOJfK8G3QgiOSYKNBG2zMsscKSoO3L.gUO6YIP+hYvVtvsMC1pXa4
C9COWKhprBWFqpUmBBqncKbWfD0HsIRQG+vblkbVHAsRg8oe5VpiGfjZ3qg+
CLtcInL
-----------end_max5_patcher-----------

It shows how as you increase the length of the fl.uniform~ (in practice the duration of a grain) it makes the output larger, because it is being overlapped and added at the output.

thanks for taking the time to outline and illustrate that, James.
it all makes much more sense now to me!

while we are at multistreams/polyphony/voices: let say i would like to track 3 kdtree neighbours from a corpus and play those all at once via the plotter.
to see how this type of overlapping stream sounds at all and how it can be done in framelib i modified @james.bradbury ´s “quick and nasty” example patch as a starting point. the input is a list of 3 integers that refer to 3 different slice positions. this list is iterated, so i basically send 3 sets of integers (slice n and slice n+1) to [fl.read~ slices].
for some reasons it only plays the last item of the list. why? did i missed something?


----------begin_max5_patcher----------
1476.3ocwZkrjaaCD8rzWAJV4nrLwJIyIWIUpbI9VtkxUJHJHMXLWTwkYwtr
91CH.olMJIHpdb7AQCPLrwqWdc2f76ymErp7AUc.5WQ+CZ1ruOe1L6TcSLqe
7rfb4CoYxZ6xB1J0E6CV3tSQattHS0XuE9oIKaaFlkzO6NYS5M5hs+akJswI
PQHeY3BTDlzcgZGfwlKnuz+G4dNMOtS49KBp0aKjYAKPAAGVTdaViN8FYQgJ
6NYkVVXe9g82Vu1tuKWc6GvwAG1MUxbUip5eUExUY1GeX2s9w74c+rvSsQg5
dyCd3o1ndvJ5fFzJjFFkDWDa0KLxxHFkJ3LgfmvDIByj73k7EHB4TprUxhsc
JLcmZ4KinTvAS.34p5Z4V0aPNEinTytcTvSFE73S3gPXc.Lx5Zvs+dZvNNBE
AvYZ0FmlKvxddvgwgVbMYzQADcaxVtKqsdOBCiAjmPsvJ15nxilHFoDXw3sk
GiD6xQnK9jRrVQFapHDCKB2TUlaV5dXbU6AIwDB9FRnHxDgbxjPba9pKJ.77
Tq8rKgd.iE8zoiAmnSlaYHWktPm2lCb5lzLc5Wg0TiiFIeCCedcTeF5wzPjX
X8wksq0kMU5saUU.6nGNB5iimJC8j7zaJ2tMSACrhCc7RQBa8BtArSAjiUsP
DC5RnNVkD1x5ZtoRIWi9EfRG0qGntJNimZJ2HHSGkUJW2oCNRJ2IaqYVLFEN
ULFBavZZYQ2vtKUkYWR3Z34smLWuCguErOCQhDXQz85h0k2uG8Q2+A0TI2o9
VodM5iGhMpQgK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fnVhHeBI59.JtdIw7QRu
kQ20gqb2t6TU08q1JDSW+2VZcfhWL28cJ4FZeKXAUp6zCq2Mirxzcdio071J
2Yx8fv8kgDjWZbEKZ08gNF3YDo8DE5N+t5cRGRrG7v7eL++v94Sz9
-----------end_max5_patcher-----------

maybe i still miss something important, but iam not able to start multiple grains at the the same time.
from my tests it seems that if the interval between the grain starts is smaller than 20 ms it only plays the last in a row. i would like to understand what happens here.
i append the patch (adopted from @james.bradbury ) with 3 different ways of iteration of my list (with neighbour indicies).
one version with using iter object one with a deferlow´d uzi (basically a slightly slower iter) and a iter with a 25ms interval between iterations. only the latter works.
maybe @a.harker can shed some light on it?


----------begin_max5_patcher----------
2920.3oc6bszjihiD9bU+JHbrGq1sdKXN06twF6kcts2lXhJv1XWzMFb.35Q
OwT+12TRfM1FCx1BhJ1opC9gDFo7Kemon9i6uaxrrWiJl38Kd+l2c28G2e2c
5gTCbW02uax5vWmmDVnurIqiJJBWEM4AybkQuVpGGKqGZSX47mhSW8Xdz7Ry
slSnSQO3wkpWIAS4vqjoHueu5mjtccbZRTodIH6GLaaY8n3pQiWnWtrYe+KD
T8RZttx21DYVuIS79c0L+482qd4gaj1nz9oMJ0oz1d3bnoMb+zlaYaXliIsz
nWf66IT1Fu0u4MOObyl27hKix8H70EdwovGeNLo9xShSilmsMsrIMzBTHkxo
LD7GAIHTBRhB.lt+z.BkhHRLBwETDfPXjPKOvuYfh0o7cysZTdE7TgO2MYYb
RzyQ4EwYoMt62MAPiFCeWiehBT+dl9F4+vtghSMCQ2MTdzyw0+98iFlC.VIf
Vay06wIuJpYypaS1hn7zsw5shYPf8VskzLxzPP.cS3byOVwuqmdOK3KXLhqE
EYL0aBFR+lfsGpAYkUIYy+QjFFQ0ClsIJMNcSdTQTZYXY01e2zKhVFtMo7wk
YokEw+TuIvfjdayurZS15jJxPSA+873cxX2MYUd7hrT0l3.lgZ35k627vZZC
yaRL5qHMbSK+XPBAPlyLYAPjaKlElq3UyRhZH2AZHYYIG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O546+zms+y+b8e7yzu9.9etmk+6+y6+eDjmR9A
-----------end_max5_patcher-----------

In the middle of grant writing so no time today to look at the patch, but framelib can trigger grains in extremely rapid succession in one stream (a tiny tiny fraction of a sample apart).

In a single stream you cannot have simultaneous grains - for that you have to consider “polyphony” and multiple streams.

There are thus two options for simultaneous (or near simultaneous) grains.

1 - you have a multi stream network
2 - you trigger grains a tiny distance apart with some suitable method.

So the first thing is to confirm if you are doing 1 or 2 or not. If you are and it doesn’t work there is an implementation issue. If you are not then it’s a broader conceptual issue.

I will look at the patch when time allows.

thanks Alex, that already gives me a rough idea and a direction.
the grain time distance (25ms) already worked but with 8 grains it adds up to 200 ms and when triggering a big bunch of grains with lot of transient it would be nice to have them in dead sync… I will look closer into the multistream stuff…take care

So here’s an example of 2 (super short gap of 0.0001 samples between sounds). I can’t remember (given that fl.sink~ is not set to interpolate by default) if all the samples will trigger on the same sample exactly, or whether the first one might be a single sample earlier than the others, but one of those things will happen, which for most purposes means they are simultaneous. I could dig into the detail if needed.


----------begin_max5_patcher----------
1862.3ocuZszabaCD9r8uBhE8PKfiiHoHkTOEzhhdo4VuUTDvUK2coidrPhx
1IA0+1KeH4Xm80XItxGjLk3pgey6YH+10WsXY8ix1EneE8Onqt5aWe0UtGYe
vU8iuZQo3w7BQqaZKJksshMxE23emV9n18bZDhhQTBhRQz3gWW0UV2oKjZ2O
F2+T0J2Ood4cuKlOLU+7zeYmzubVr.8u8uZmPmuUUs4SMxbs+sYzraitAk4t
l5tRH2F87OwPXU0.cI1m8eWes8xMSDmXjAhnXDCwQInTTFBGgvXDlfvTDNFg
YHLGgSP3TDNCQhF9D6ZjsxJsPqpq9TgpRlW2U49nbnbKZx33V73TG2B63SIo
gmckWWVZ.2drKy5bWmFo2JQJsrrEstotzMrP0pQ0URjXsV13dTs4Ryvm3UbH
xA4PQGfC8r9zgXCN7ywT6ML2ciROFa.eAXCMpMajMsnGT5sHQERUYv98hBT8
ZTzsQQQXTqnbWgrEsTpePJqrLlRz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
+98QBOvke0F7DbfSL6ToBwx79P8tRYCWmOwjIt4XkQ3o4Wkmj46ezLtS94ER
gaeTsIKXucyfdZ+s3XS9nf4.oira+NyQL0obhyt.Y8cWamBd7wQUCJDDxydg
S2W2Cz0JSTbC050F6Tqt8Aw8R2NQrHTkArrSqqqfGEcTLBWyROOynO35EnV7
iXh6UxGbDCNJ6w2jt0lhd01HsmGwjd4uuQ3yX8cV8HCvqpuWVn+hC5Og9Pac
WStz4q6Clx9doA+GrMqncacwJSQewDvroIriPd8g9VIymOtyfBgkM72MxxkE
hu7te+O9q28mlDwx29kO10px+s5G+nrn1ZLBemDBgJyKzXHouAlhaFty6xOb
l1bDw97Wyo75B8qugiiF56DZkrUqpbmQlWLI6lkXmzAkFPozvG4jTx1m2vPI
7YnT1qVMkpU6pUU5dtH2uskjX7sjerworjDeeE26cSbYaOg.yinvdp5lGJYO
XGmWn+ZMi5lUxlia8GdRi2mzQShzY.nb7gILYVHLIzLa6YD.DkmpBEDgJ8hn
OAhxjCS4ooNQf34bPBLMJAQLRBgbDhlJ4hvMwPHcVHBCEAfP1lmOcJkBgRzK
gqN3jN7N3AP4PjNAABDwgPigBwPmFBMFJApeT7ToDC.kXAIqFHF17PPIHPJD
tiYPRjkwCEkhfPI7wxYlk5NWP8G0ONi87nP6yAzhkiArX4XWsV7X1yiBsWJF
jBr3QAPFxgDuwYjbT1BGm3OaW9caGm97nPKCguXCtDgCJcpfHQf3kEGhXTbH
tj3gvmTBDAWRHRQLAB2iGh3tIPxsOIDbOPYKsGc7c4Qra28xl19I6HwhRwc0
NShzabCUU9gT2vF48pg46536BQS9VkVlq6Z7Me9Qt+PXsnr1XbU0o5suLfyP
RWW0rMptcmviCWy2t9+t9+4FABwD
-----------end_max5_patcher-----------

I’ve just checked and in practice with interpolation off for fl.sink~ the grains are exactly simultaneous in the above example. There is a limit where there are enough triggers together that the combined intervals sum to more than half a sample and the grains get split across samples at the output, but that depends on the gap between them (here 0.0001 samples, which will be enough for 5000 simultaneous grains) - you can make that gap smaller if you need some ridiculous number of simultaneous grains.

thanks for the patch and the explanation. that makes sense…

I read more about multistreams and just tested something that I thought might be easy: creating 4 interval instances that get their interval-values from a list.
hmm, doesn’t work as I expected: sending the list into a perblock´ed fl.frommax~ =4.
or is there also a special treatment of the list values needed when using multistreams?


----------begin_max5_patcher----------
854.3oc2XstaaBCE92IOEH94VVmuAAlzdRllpbHtszB1QFm1rU07rOeAZRWS
K27XKKRwHrM9yemywmK9w4yBWI1wpBC9Rv2BlM6w4ylY6xzwr52mEVR2kUPq
rSKLSTVx3pvEtwTrcJa+paxqBdPbXjMTU1M47quTxxTNDv3jKhVDfhu.rH.F
ALOP51fuW+M7sk47BlxBErty70V.Dqt8SQwgGloXqpYp.SmOMetoYgeHh7tp
2gIjkl8NFLXhD4OhvYOnWxWwiqJt3Jolizc6C9JoYXGVperg4HRX3y642VgA
IQFFljZ4IpG7j7FJLnW44G1G.QKGFEcZRzRK2hvuOCQmfgnofgJ506Cx4Jl7
dZwXHJLwpJg.36yT7IXJdJXpjxWKJ2OJkIgXdDG2ekIYJnXidbePD.D74s7b
UUPY0nnLLwpVwI8+HZj+3bUQ9ZlrCD4NtXUlnPHciXcfdnAdz1+jT1cXs1F1
8IjVc+xJXFG9GAKrFrCMOuBGIfvvCABjzRlV4cIiSWUXoE3LS3gwQSpvi7+j
vClBmRgGJcZDd+Yhr1js2fCshRN+7LMolGK+aadrgIWUHxtafgqQZyAsERLx
PxkfdG5BNIYW9Q8YfQkxkyPff58A.HbpxdF..ihhD6Y7XPuoHdRRpTvyXiJk
xXmeeXuMQwSR4AUJIiVlud3U54nYRxg19kD4aYoV26UBtpJ+m1sBTuv9s3HQ
qE4t3n+sKFH0OzE1mdzujj39p8AmVrPF.+KYUUzqYuR.XN6pi0navlFxfOJW
Gu14MFhh5e75ykRgatViDvPqEFl9OesvMoe4tcpATLL9rqV3FJCiGZwvcHfq
csBKx4+98lZ2Pl9eofnRrUl0r8qwH3vNZMqRkyopbA+n4fcy4jh5NiSZG.B5
AfLWxW6.k5AjLUDztrC3AjrKBtMjf9BITaHQ7ERvVPBk5KjZSOYJeY7Hg5.R
DuXk2kysPefDrSdH7gKByc+0tzyG1dDbWPJxGHQ5BRHeX60IN4C8TW.pw233
L85hq7F+8iyUNZXH4B+R2r4dlrpd1VPzYbbq69SRVXeMm6d0l9Vnjcedy7c8
Pk57GT5jG1JsarvcwtJHBKEqYR9175P+Z5ogzlMCmpSCeC0wDaROyeZ9ubfA
rBN
-----------end_max5_patcher-----------

here is my goal:

  1. looping a variable number of grains/neighbours simultaneously from a corpus, each instance loops one its own…
  2. set the amplitude of the grains/neighbours according to their distance to the query, so grains further away will have lower amplitudes.

from the top of my head this start with calculating the length for each grain and set the fl.intervals properly. further down the line I would somehow unpack the multistream to individual streams to set the amps. more test the next days…
any hints are appreciated.peace

The issue here as that you’ve made an assumption about how lists going into fl.frommax~ will behave that sadly doesn’t match how the object works. Lists don’t get split across streams, because lists going to fl.tomax~ are converted to frames (which is very useful for other things) and there’s no way in the patch you’ve made of clearly differentiating between the fact that you want to separate values to different streams, rather than group them into a frame - so all 4 numbers go to all 4 streams in this example.

I could see an argument for fl.frommax~ having multiple inputs when there are multiple streams (to mirror what happens with fl.tomax~) and I’d consider that for a future version, but for now you’d need a way of splitting a frame to streams or sending a different number to different streams. So - that could be 4 fl.frommax~ objects each taking a different number, or you could split a frame to 4 streams after you are in framelib land - I’ve done the second of these below.


----------begin_max5_patcher----------
1010.3oc0ZstiZiCF82vSgU9YW5T6XmaUZeRVspxDLCoShMJwYJcqJO6qujT
nEFvIwaV5HQhvXxwmuui+tXlusbQvZwAVS.3if+BrXw2VtXgYH8.K5d+hfJ5
g7RZiYZA4hpJFWFrx9YR1AoY78z7W.xcL.AzTQKKAaqoUrFPAWJ.TPUaor38
MxZFsBjK3bVtrPv6eL6ox7cE7m+TsZb6xgDF8DbE.kXtElkYtAeBB96tuDus
pfWxjlEFpavhMlkiX8meeVvoIJZk8yDpG76KWpurZhr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heW98k+KbIqWqM
-----------end_max5_patcher-----------

thanks a lot for your very quick answer Alex,

is there also a way to dynamic change the number of streams by checking the number of the list-items?
when I send a smaller list it wont update to lets say 3 or 2 streams but will stay 4.

Stream sizes in a network are fixed - you cannot dynamically change them - you can have them stay silent by controlling them in some appropriate fashion (such as using a switchable fl.interval~ and turning it off), but you cannot change the number of streams on-the-fly - this is changed only when you rewatch. In this way this technique is more similar to using poly~ or similar where you pick a max number of voices and then manage them appropriately to your needs.

And to “unpack” the streams you simply use fl.unpack~!

However it might be preferable to just do a calculation to set the amps where the maths is the same or all streams, but the numbers are different - I’m not sure that you need to explicitly unpack in this case.

I see. yeah the number of neighbours change the whole time.
I will have to dig it.

what about dynamically exclude streams from a network by only use 2 of 4 than 3 of the 4 streams ?

I knew about fl.unpack but i was not sure about how to get the n distance values into the multistream. As i just learned Fl.*~ wont eat a list (with changing size) straight away… i would like to prevent using unpack for flexibility reasons.