*solved* Select from list A based on values in list B

[size=150]What I want to do[/size]

List A contains 100 random numbers between 0 and 100.

List B contains 100 random numbers between 0 and 1.

If a cell in list B is greater than 0.5, I want to select the element with the corresponding index in list A.

I also want to get the index.

[size=150]What I’ve tried[/size]

Here’s what I want to do, in vvvv:

Here’s what I’ve got so far in TD, but I can’t figure out what to do next.

I know it can be done with Python, but I’m sure there must be a simple way to do it with nodes.

Edit: Right-click and open images to view in full size.

Sortings.tox (1.81 KB)

Something like this?

A tiny eense of python, but the drag and drop varierty, nothing you need to type.

Mostly procedural, similar to what you described I think.

I’ll have to look more at your patch later, but I solved the problem!

I used a ramp to generate the index numbers, and by using the select node, I can get the list that I wanted:

The CHOPs on top do the same thing, only without an index.

(How do I get images to auto-resize? This forum feels ancient :smiley:)


select-random-numbers-with-index.toe (4.21 KB)

now with TD 99 you can also use the deleteCHOP and delete by samples based on the value of your 0/1 channel.