That's how the sort comes out when there are no leading spaces in front of the number creating a fixed field size.
In Faust, I think there is no difference between %03i and %3i. As James guessed, I was thinking of C's printf format string. - Julius On Fri, Oct 23, 2020 at 9:38 AM Brandon Hale <bthaleproducti...@gmail.com> wrote: > Thanks James. That makes a lot more sense. I saw that in the manual, but > it didn't register for me until you put it more simply. If you replace the > "%03i" with just "%i", it goes from the sliders being laid out from 0-127, > to being laid out like: > Slider 0 > Slider 1 > Slider 10 > Slider 100 > Slider 101 > Slider 102 > > Basically numbered left to right, almost like binary. Why is that? > On 10/23/20 12:31 PM, James Mckernon wrote: > > On 10/23/20, Brandon Hale <bthaleproducti...@gmail.com> > <bthaleproducti...@gmail.com> wrote: > > Thanks Julius! Using i like that makes a lot of sense. I had no idea you > could substitute it like that. > > What does the %03i mean and how does that work? > > Brandon Hale > > Having just looked this up myself, I can perhaps answer for Julius. > From https://faust.grame.fr/doc/manual/index.html#variable-parts-of-a-label > : > > > Labels can contain variable parts. These are indicated with the sign % > followed by the name of a variable. During compilation each label is > processed in order to replace the variable parts by the value of the > variable. For example: > process = par(i,8,hslider("Voice %i", 0.9, 0, 1, 0.01)); > creates 8 sliders in parallel with different names while > par(i,8,hslider("Voice", 0.9, 0, 1, 0.01)) would have created only one slider > and duplicated its output 8 times. > The variable part can have an optional format digit. For example "Voice %2i" > would indicate to use two digit when inserting the value of i in the string.' > > So %03i means insert the variable i's value into the string here, > padding it (I guess with zeroes) to be three digits wide. > > -- "Anybody who knows all about nothing knows everything" -- Leonard Susskind
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users