Forums > MaxMSP

readfolder message problem with polybuffer~

Mar 20 2013 | 11:22 am


so I have that 12 slots sampler working quite ok: sampling, playing sounds perfectly.

My only problem is when I use writetofolder and readfolder:

let me explain: that sampler is the engine powering a 4 x 3 midi carpet. You record 12 samples, then you can replay them walking on the carpet.

WHen I save a samples set with writetofolder, the files are stored in a folder with no problem at all, but when I reload them with "readfolder", they’re loaded but in the opposite order of what I want: Instead of having my samples from 1 to 12 assigned to my carpet slots 1 to 12, they’re loaded from 12 to 1.

I’ve noticed that clearing twice the polybuffer~ could improve that, but it’s still very random… and I need it to be perfect.

any advice ?

Mar 20 2013 | 11:31 am

here is my messy patch, if it can help

  1. tapisrecres.maxpat
Mar 20 2013 | 10:47 pm

Thanks for the example. The problem is that the polybuffer~ gets the name ordered alphabetically so tapis.1.aif is followed by tapis.11.aif, not tapis.2.aif. I attached a way to fix it in the patcher by loading each file individually in the alpha numerical order.

Mar 21 2013 | 11:36 am

ok thanks a lot !

so I guess if I rename my buffer like this: 01, 02, 03, and so on, it will fix the problem as well ? am I wrong ?

Thanks for the trick !

Mar 21 2013 | 2:04 pm

You’re correct, but writefolder doesn’t write the files with this format. It might actually be easier to save the files directly in the correct format.

May 16 2013 | 2:20 am

oh ok I get it.
crazy you need to make such a subpatch just to get the files in the right order… max/msp is really disappointing sometimes, especially when you’re more a musician than a programmer.

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP