#N canvas 47 36 645 632 10; #X declare -lib cyclone; #X text 29 515 rms--computes the square root of the average of the sample values squared.; #X text 29 490 absolute--averages the absolute values of the samples. ; #X text 29 476 bipolar--averages the sample values.; #X text 15 35 reports various forms of average value of signal; #X obj 202 71 cycle~ 2; #X obj 135 71 cycle~ 100; #X floatatom 311 174 0 0 0 0 - - -; #X msg 358 132 rms; #X msg 242 132 bipolar; #X msg 298 132 absolute; #X obj 172 115 *~; #X text 337 174 int sets averaging interval \, in samples; #X text 385 132 change modes with messages:; #X text 20 374 optional arguments: int - sets maximum averaging interval. default is 100 symbol - sets mode \, as shown above. default is bipolar. ; #X text 20 424 average~ reports the running mean amplitude of a signal \, averaged over a specified number of samples. There are three methods of averaging available:; #X text 19 552 RMS values are often used to measure signal levels. The RMS mode of the average~ object is considerably more CPU intensive than the absolute mode. The absolute mode often works as well as the RMS mode in many level-detection tasks.; #X obj 22 224 Scope~ 130 130 256 3 128 -1 1 0 0 0 0 102 255 51 135 135 135 0; #X obj 421 23 import cyclone; #X obj 172 201 average~ 1000; #X floatatom 172 236 5 0 0 0 - - -; #X connect 4 0 10 1; #X connect 5 0 10 0; #X connect 6 0 18 0; #X connect 7 0 18 0; #X connect 8 0 18 0; #X connect 9 0 18 0; #X connect 10 0 16 0; #X connect 10 0 18 0; #X connect 18 0 19 0;