How to sort 12 values?

Options
KoaN
KoaN Member Posts: 105 Advisor

Hi guys,

I am trying to use the module Herw created in this old thread...

It is sorting 5 values like this...

I am trying to expand it to sorting 12 values....and i don't quite get how that works,i can recognize the pattern somewhat and create more chains but i have no idea how many to add and where to stop...

It shouldn't be that complicated but my brain gets lost in there...hehe.

Here is the original ensemble from Herw in case someone wants to check.

Thanks.

Best Answer

  • KoaN
    KoaN Member Posts: 105 Advisor
    Answer ✓
    Options

    That seems to do it using the ones without comparators :)

    All is good!

Answers

  • KoaN
    KoaN Member Posts: 105 Advisor
    Options

    "My approach was based on finding the max value in the set, and then continuing this with a decreasing set. Eg. Find max out of 4, then find max out of the remaining 3, then 2, etc, etc."


    Oh i think i get it...but damn it means i need to use 12+11+10+9+8+7+6+5+4+3+2... = around 77 modules? That is getting huge,and Reaktor hangs from too many routers,i will try the version without comparators,second one from Herw.

  • KoaN
    KoaN Member Posts: 105 Advisor
    Answer ✓
    Options

    That seems to do it using the ones without comparators :)

    All is good!

  • colB
    colB Member Posts: 823 Guru
    Options

    For more than a few items, doing it this way without iteration of some kind is going to be expensive. I guess it depends on the external context - e.g. what data is being sorted and for what use.

    Herwig's version should be ok for the compiler because it generates a merged trigger event at the start, and then uses that again at the end. That gives the compiler a clue that the event always originates from that start position, so it doesn't need to build a complex graph from all the routers. Should be fine. Still a lot of modules though, so lots of memory used - nasty for an audio rate process.

  • KoaN
    KoaN Member Posts: 105 Advisor
    edited April 2022
    Options

    Luckily it's just for one time calculation at the start and when changing a knob value so i guess i am ok.

    The compare/router version was making the compiler freeze at some point,i used the other version with + and x instead. All is fine for now.

Back To Top