Welcome to %s forums

BrainModular Users Forum

Login Register

a way to strip 0 (or any specific) values away from array?

I need help on a Patch
Post Reply
User avatar
x.iso
Member
Posts: 565
Location: RU, Saint-Petersburg
Contact:

a way to strip 0 (or any specific) values away from array?

Unread post by x.iso » 12 Nov 2019, 18:14

Basically, if I have an array where only few indexes are active and have non-zero value, and I want to track only indexes with those active values, I have to remove 0 values and make array compact. But I can't come up with solution to that, for instance I could use Remove Duplicate module, which would get rid of 0 values, but it would also remove any matching values which can happen as well and I don't want that. Having logic ">" module can give me array of 'gates', but The 'Pass' module doesn't work with arrays and I can't find what else to use to filter out 0 values.
join Hollyhock Usine Discord server: https://discord.gg/EdJarnE

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 12 Nov 2019, 21:19

Array delete will do the job ?

User avatar
x.iso
Member
Posts: 565
Location: RU, Saint-Petersburg
Contact:

Unread post by x.iso » 13 Nov 2019, 08:41

🤦‍♂️ oh man, how did I miss it? sure, that's exactly what I needed.
join Hollyhock Usine Discord server: https://discord.gg/EdJarnE

User avatar
oli_lab
Member
Posts: 1263
Location: Brittany, France
Contact:

Unread post by oli_lab » 27 Nov 2019, 12:37

a size 0 array on the input ?
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests