Running average with changing amount
I've been trying to create a running average using bucket or zl.stream but I can't figure how to maintain the contents either when I update the quantity of numbers that it holds. I want to increase from say an average of 24 numbers to 25 numbers but I don't want the contents to disappear. Is there an object fit for this?
the object "mean"?
a parallel zl reg which is copied into a coll?
thank you again Roman that has been effective!
before zl.stream existed, [110.scrollcoll] did the job quite well.
i dont remember the exact reason, but there was a good reason why it makes more sense that changing the lenght also erases the buffer content.
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 214 151 36 196617 + 1;
#B color 9;
#P newex 517 101 89 196617 i $1;
#B color 9;
#P newex 517 133 89 196617 110.defarg 10;
#B color 9;
#P newex 517 52 59 196617 loadbang;
#B color 9;
#P hidden newex 212 52 108 196617 bgcolor 150 250 50;
#P newex 136 178 89 196617 110.split 0 10;
#B color 9;
#N comlet int - set length of buffer (# of coll elements);
#P inlet 374 52 15 0;
#P outlet 259 239 15 0;
#N comlet bang - clears coll;
#P inlet 447 52 15 0;
#N comlet int - outputs current content at index;
#P inlet 136 52 15 0;
#N comlet anything - will be stored automatically;
#P inlet 32 52 15 0;
#P newex 447 178 46 196617 t clear;
#P newex 295 151 89 196617 list remove 10;
#P newex 259 111 46 196617 t l b;
#N coll ;
#P newobj 259 196 78 196617 coll;
#P newex 32 93 94 196617 prepend insert 1;
#P connect 14 0 13 0;
#P lcolor 10;
#P connect 12 0 14 0;
#P lcolor 10;
#P connect 7 0 4 0;
#P connect 13 0 15 0;
#P lcolor 10;
#P connect 13 0 3 1;
#P connect 9 0 3 1;
#P connect 2 1 3 0;
#P connect 1 0 8 0;
#P connect 10 1 1 0;
#P lcolor 10;
#P connect 4 0 1 0;
#P connect 2 0 1 0;
#P connect 3 0 1 0;
#P connect 6 0 1 0;
#P connect 0 0 2 0;
#P connect 15 0 10 2;
#P lcolor 10;
#P connect 5 0 0 0;
#P window clipboard copycount 16;
Now I've got this strange issue. I want to send a bang by sending just a single value into a comparator, in this case >, but it outputs a bang regardless of the truth of the test. I see it works to turn toggles on and off, but I need to only get a bang when the test is valid. Is there another object to do that?
sel 1?
that's a very good point florent thank you
Is there a simple object that I can feed midi data into to display like a sequencer? It does not need to be used for editing MIDI. Any quick n dirty solution
check out the live.step
very awesome thank you florent
Now I am trying to create a tap tempo machine. I have a collection with the ms times that the drums hit. At the end, to stop the analysis, I have an entry just marked "end." When I dump the collection into another, it sends all the numbers, but it won't dump strings. What should I do?
it would be easier to help you if you posted a patch
you might need to use the pack or dict objects