Hi everyone. I try to use PlayBuf to read semi-randomly some soundfiles, but the program randomly allocates numbers to the files according to the order in which it loads them into the buffers (there is 53 soundfiles).
Is there any way to force it to load them into the buffer in the order they appear in my folder (here named /voix)?
The catch here is that there might not be an intrinsic order in the filesystem. It’s very likely that your system’s file browser is sorting the filenames according to one set of rules, while pathMatch is sorting by different rules. (A plain ASCII string comparison considers "5-a" > "25-a" while a comparison that takes leading numbers into account would see "5-a" < "25-a".)
If order matters, then it makes sense to create filenames where the sort order is unambiguous. An easy way is a numeric prefix with leading zeros: 00-abc, 01-def etc. Then a numeric-aware and plain ASCII would get the same result. This is easier than trying to write a fancier string comparator.