How to sort a coll with multiple data points?

    Jul 01 2022 | 3:01 am
    Hi, all, I'm (still) trying to perfect a coll-based system of playing back a pattern of stored MIDI data. Each "note" or entry of the coll contains multiple data that help determine the note. Each entry is: "scale degree", octave, tonic, mode, velocity. I am trying to add in the ability to sort it low-to-high, or high-to-low, but since each resulting note is a product of degree/octave/tonic, I can't just use the coll's sort function. My best option seems to be calculating the resulting pitches separately, then using zl.sort to get an indexes list, but I now can't figure out how to re-order the coll according to that list. Example attached. Thanks!

    • Jul 01 2022 | 8:17 am
      One way might be to append the pitches to the coll, then sort the coll according to this column.
    • Jul 03 2022 | 12:55 am
      Figured it out! Posting an abstracted version here for posterity.