hi, I tried only using fexpr~, here's what I got

Imagem inline 1

#N canvas 627 57 454 302 10;
#X obj 352 105 v n_\$0;
#X floatatom 352 74 5 0 0 0 - - -, f 5;
#X obj 59 117 v count_\$0;
#X obj 132 112 fexpr~ count_\$0 = $y2[-1] + 1 \; if(count_\$0 > n_\$0
\, 1 \, count_\$0);
#X obj 34 153 fexpr~ max($x1[0] \, if($x2[-1] \, $y1[-1] \, -1)) \;
;
#X obj 270 195 samphold~;
#X obj 321 154 expr~ $v1 != 1;
#X obj 34 25 noise~;
#X text 80 25 <= input;
#X text 342 249 <= output;
#X obj 270 246 else/display~;
#X text 177 73 'n' number of samples ====>;
#X connect 1 0 0 0;
#X connect 3 1 6 0;
#X connect 4 0 5 0;
#X connect 5 0 10 0;
#X connect 6 0 4 1;
#X connect 6 0 5 1;
#X connect 7 0 4 0;


2018-02-04 12:56 GMT-02:00 Dario Sanfilippo <sanfilippo.dario@gmail.com>:
That's certainly the way to go for efficiency: 256 rpole~ objects are about 10% load against 44% load of the PD-implemented counterpart.

D


On 4 February 2018 at 14:41, Matt Davey <hard.off@gmail.com> wrote:
Really at that point, you’d have to be asking youself if there is any way to use an external.  


On Sunday, February 4, 2018, Dario Sanfilippo <sanfilippo.dario@gmail.com> wrote:
Hi, Roman. I guess that fexpr~ implies block 1 but probably a few other things too: 256 instantiations of the feedback loop in my abstractions are around 44% load whereas the same number of [fexpr~ max($x1[0], $y[-1]*$x2[0])] are peaking at 95%.

D


On 4 February 2018 at 12:33, Roman Haefeli <reduzent@gmail.com> wrote:
On Fre, 2018-02-02 at 18:31 +0000, Dario Sanfilippo wrote:
> There's an implementation of a peak holder in this blog post: http://
> dariosanfilippo.tumblr.com/post/162523174771/lookahead-limiting-in-
> pure-data. 

BTW: the peak envelope part could be also implemented using fexpr~:

[fexpr~ max($x1[0], ($y[-1]*$f2)]

This has the advantage of not requiring a re-blocked subpatch with
blocksize=1. However, I wonder which is computationally less expensive.
Is there a rule of thumb whether [fexpr~] or [block~ 1] is faster?

Roman

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list




_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list