On 05/20, Dario Sanfilippo wrote:
>
> I use the "ceil" function for the cond in "if" as I want _any_ non-zero
> value to result true, whereas ba.if gives false for any fractional
> condition < 1. I opened an issue about this but I think that fixing it, if
> bad behaviour (bad if thinking of C/C++, maybe), may break other code.
Heh, I didn't even know that select2 typecasts the 1st input to "int" ;)
Thanks. But then I think !=(0) makes more sense than ceil...
As for ifN. Perhaps something like this can work for you:
ifN(N, inp) = par(n, N, line(n,C)) with {
C = (outputs(inp) - N) / (N + 1);
take(i) = inp : route(outputs(inp),1,i+1,1);
cond(c) = take((N+1) * c) != 0;
else(n) = take((N+1) * C + n);
then(n,c) = take((N+1) * c + n + 1);
line(n,0) = else(n);
line(n,c) = select2(cond(C-c), line(n,c-1), then(n,C-c));
};
the 1st arg N is the number of outputs. Example:
prtcess = ifN(3, C1,t11,t12,t13, C2,t21,t22,t23, ..., Cn,tn1,tn2,tn3,
e1,e2,e3).
I wrote this without any thinking, there must be a more elegant solution.
> The Slack and Discord Faust channels may be drawing attention away from the
> list. Perhaps we can suggest people to also post on the list besides the
> channels when there's an issue.
Cough, can't resist... I hate the very idea of Slack ;)
I have already found faustaudio.slack.com (after you mentioned it some time
ago), but what is Discord channel? google didn't help...
Oleg.
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users