Speaking of ba.take(), can't we add

        take ((ns, nns), xs) = take(ns,xs), take(nns, xs);

into libraries/basics.lib? see the patch below.

This way you can do, say,

        take((1,3), (1,2,3));
or
        reverse(list) = take((par(i, ba.count(list), ba.count(list)-i)), list);


And it is a bit funny that (without the patch) this code

        process = ba.take((1,1), (1,1));

crashes faust:

        ...
        faust[0x49f73a]
        faust[0x49ff36]
        /lib64/libpthread.so.0(+0x761a)[0x7fe1ee16361a]
        ASSERT : please report the stack trace and the failing DSP file to 
Faust developers (version: 2.5.25, options: cpp, -scal -ftz 0)

Oleg.


diff --git a/basics.lib b/basics.lib
index 4356f6f..329ed88 100644
--- a/basics.lib
+++ b/basics.lib
@@ -586,6 +586,7 @@ count (xx) = 1;
 //-----------------------------------------------------------------------------
 take (1, (xs, xxs))    = xs;
 take (1, xs)                   = xs;
+take ((ns, nns), xs)   = take(ns,xs), take(nns, xs);
 take (nn, (xs, xxs))   = take (nn-1, xxs);
 
 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to