On 08/26, Yann Orlarey wrote:
>
> I published the version with the 'any' patch.

Great, thanks Yann!

can I suggest another patch then?

With this patch par(i, 0, whatever) has zero inputs and zero outputs,
just like "0:!". To me this looks usefull, and I do remember someone
else on faudiostream-users wanted this feauture, but I can not recall
who and when.

If nothing else, lets look at fi.filterbank,

        filterbank(O,lfreqs) = an.analyzer(O,lfreqs) : delayeq(nb)
        with {
           nb = ba.count(lfreqs);
           fc(n) = ba.take(n, lfreqs);
           ap(n) = highpass_plus_lowpass(O,fc(n));
           delayeq(1) = _,_; // par(i,0,...) does not fly
           delayeq(nb) = par(i,nb-1,apchain(nb-1-i)),_,_;
           apchain(0) = _;
           apchain(i) = ap(i) : apchain(i-1);
        };

note the "does not fly" comment above. With this patch delayeq(1)
doesn't need a special handling.

Oleg.
---

diff --git a/compiler/evaluate/eval.cpp b/compiler/evaluate/eval.cpp
index 632616c2e..e19638377 100644
--- a/compiler/evaluate/eval.cpp
+++ b/compiler/evaluate/eval.cpp
@@ -904,7 +904,7 @@ static string evalLabel(const char* src, Tree visited, Tree 
localValEnv)
 static Tree iteratePar(Tree id, int num, Tree body, Tree visited, Tree 
localValEnv)
 {
     if (num == 0) {
-        evalerror(yyfilename, -1, "iteratePar called with 0 iteration", id);
+        return boxRoute(boxInt(0), boxInt(0), boxPar(boxInt(0), boxInt(0)));
     }
 
     Tree res = eval(body, visited, pushValueDef(id, tree(num - 1), 
localValEnv));



_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to