Hi Lucian,

A useful function, in this type of routing, is `ro.interleave(N,M)`. It has
the advantage of requiring less work for the compiler, especially when N or
M is large.


import("stdfaust.lib");

N = 10;
process = ro.interleave(N,2) : par(i,N,*);


https://faustide.grame.fr/?autorun=0&voices=0&name=nbinop&inline=aW1wb3J0KCJzdGRmYXVzdC5saWIiKTsKCk4gPSAxMDsKcHJvY2VzcyA9IHJvLmludGVybGVhdmUoTiwyKSA6IHBhcihpLE4sKik7Cgo%3D

Yann

Le mar. 7 sept. 2021 à 15:30, Lucian Boca <lucianb...@gmail.com> a écrit :

> Haha awesome, thanks James!
>
> I was just putting together a similar implementation based on your
> previous email, ended up with:
>
> ```
> bop(f, items) = par(i, N, f(ba.selector(i, N, items))) with { N =
> ba.count(items); };
> ```
>
> Super useful, thanks again!
>
> On Tue, Sep 7, 2021 at 2:26 PM James Mckernon <jmcker...@gmail.com> wrote:
>
>> On 9/7/21, James Mckernon <jmcker...@gmail.com> wrote:
>> > I haven't time to work out the details now.
>>
>> Why do I lie like this? I couldn't resist trying it. I think this
>> should be you what you want.
>>
>> ba = library("basics.lib");
>> bop(op, list) = par(i, ba.count(list), op(ba.take(i + 1,list)));
>> process = (1,2,3,4) : bop(*, (2,3,4,5));
>>
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to