Is there a way to smooth a list?

Hi sorry to ask for help twice in one session, hope that’s ok. I mostly use Vuo to make audio visualizers and a common problem I encounter is that the final product is just too fast and jittery. Typically I use hold list which creates a frame rate type of effect and this is generally ok. However an alternate, maybe better, approach would be to average the data over a few milliseconds. I tried using process list in conjunction with “smooth with duration” etc but this operates sequentially, so I wouldn’t expect that to work. I feel like there could be something obvious I’m missing. Any ideas?

One approach here would be to create a queue and then average that. See image…it’s just a few nodes to achieve. Is that what you are hoping for?Screen Shot 2021-06-03 at 12.48.27 pm.png

Hmm, not really… I’m starting with a list, potentially hundreds of numbers constantly changing. I want to create a new list which is a real time average of these values. For example an average over 50milliseconds.

I think that solving this should require List of list FQ implemented. If instead you’d be satisfied by a solution that gives average over last n values received for every elemet of the list, this is doable IMHO.  

Iteration: Turn most nodes into iterators by allowing single-value ports to accept lists is the request to vote for I think.

There was an “Average List” node by Karl Henkel (parabox nodes), but it doesn’t’ work in the latest versions of Vuo if I’m right.

1 Like

This is a bit ugly, but would scale for a buffer of, say, 3, values. I haven’t tested. It should work :slightly_smiling_face:

If you’re after more values, then I think doing something with Tables would be the way. But for some reason not apparent to me, Tables don’t accept Lists as input.

Average List.vuo (3.81 KB)

1 Like

@Jstrecker correct me here if I’m wrong!

I looked into this a couple times for the list tools, but I hit a wall since it seems you can’t dynamically create instances (the “memory” of a node) for a node. So while you could average a set number of “steps” in a list with a custom node, there would be no way to change it from 4 to 80 “steps” (your averaging timeframe). Vote for lists in lists, it would make this trivial.

But; what is your end goal? There might be some way to do it without averaging lists. Is it mainly audio data you want to smooth?

Oh, and @keithlang; Tables are two-dimensional, lists are one-dimensional. You can have a list as an input for a Row or Column, but not as a table in itself.

OK, this should do the trick.

Although I believe I discovered a bug where Get Table Row returns the inverse Row number. So I’ve inverted that manually for now.

How to use:

Send your list of values to ‘Send data here’ Share node.
Change the Is Greater Than to be the buffer you want.
The output on the right will be an averaged list.

turnTheTables.vuo (5.11 KB)

Another way to smooth a list: the Keep Average (List) node added in Vuo 2.4.0. See its accompanying “Smooth Audio Frequencies” example composition, listed in the node documentation panel.

(@video_piglet, as you requested, I deleted your recent duplicate post about this.)

1 Like