Hello!

On Thu, 21 May 2020 at 17:33, Oleg Nesterov <[email protected]> wrote:

> 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...
>

Sure, that's formally more correct.

>
> 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.
>

I managed to find a commit talking about the "route" primitive, but I
couldn't find anything about "outputs": what is it?

If I run

process = ifN(3, _<-100,-1,-1,-1, _==0,0,0,0, _>100,1,1,1, 10,10,10);

I get ERROR : stack overflow in eval.

Going a bit back: you said that Faust doesn't distinguish between (1,2,3)
and ((1,2,3)) and that it obviously makes sense; could you elaborate why?


>
> > 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 ;)
>

Heh, I understand. I think that the discussions on Slack are more about
less advanced topics and new users feel less pressure asking there rather
than on the list.

Personally, regardless of the complexity of the issue, I'd love to see
emails here on the list on a daily basis.


>
> I have already found faustaudio.slack.com (after you mentioned it some
> time
> ago), but what is Discord channel? google didn't help...
>

I'm not familiar with it. Stéphane just pointed out that the "the audio
programmer" Discord server has rooms for both Faust and Juce, as I was
asking about something related to the two.

Here is the link:
https://discord.com/channels/382895736356077570/651037481017409595.

As always, thanks a lot for your time. :-)

Dario
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to