Forums > MaxMSP

How does Multislider order divisions of pixels ?

October 16, 2012 | 3:38 pm

I have recently discovered live.line and have decided that it is a good way of overlaying lines over a multislider for reasons which I don’t want to go into just now. Best thing is to view my patch attached – I have some javascript which divides the multislider width by the number of sliders and rounds them into two groups of integers, so say the width of my multislider is 160 px and it is showing 9 sliders, then the widths of each slider will either be 26 or 27 px, but Multislider orders these widths in a precise way, which I cannot figure out. If you have say a list of 9 elements e.g A A A B B B B B B how do you order them so that they have the fairest distribution. Multislider seems to go for A B B A B B A B B ? I would like the live.lines to line up exactly with the start of each multilsider slider.

All the Best,
Des

Attachments:
  1. msliderdivider.zip

Viewing 1 post (of 1 total)