operation only on part of an incoming list if in specific range

F_Dos's icon

I have the following example list:

3.928571 5.075684 6.767578 9.023437 12.03125 17.678571 23.571428 31.428571 40.605469 54.140624 82.5 110. 141.428571 188.571426 251.428571 371.25

I want to make the following operation:

if numbers are below 10 - multiply those numbers by 8

if numbers between 10 - 15 - multiply those numbers by 4

if numbers between 15 - 30 - multiply those numbers by 2

if numbers above 30 - do nothing (pass as is)

Source Audio's icon

Iter, split/math , collect into list again

Wil's icon

then join, sort


F_Dos's icon

Thank you both, great!

F_Dos's icon

Only second press on list works fine. What am I missing?

Max Patch
Copy patch and select New From Clipboard in Max.

edit:

iter each split solved it

Source Audio's icon

no, you don't need multiple iters,

only multiple splits

or jasch multisplit object.

TFL's icon

...or as a single [vexpr]:


Max Patch
Copy patch and select New From Clipboard in Max.