polybuffer~ and Gen
Hi Max/Gen Experts,
The background of my question as follows:
I have a patch that instantiates a [polybuffer~ audioFiles] in javascript. The polybuffer is used because it is never certain how many audio files will be used within the project, and I do not want to create a buffer~ bank of a maximum number. Secondly, one can dynamiclly reference an individual buffer~ within the audioFiles polybuffer~ object using a combination of "combine", "#<int>", and "set" on a [Groove] object.
I'd like to move this framework into a Gen~ patch for greater audio accuracy.
However, trying to access audioFiles.1 buffer~ from a [polybuffer~ audioFiles], by referenceing the [buffer audioFiles audioFiles.1] within Gen does not seem possible.
Is this a known limitation? If so, is it intended, and could someone explain why?
Thanks in advance!
Stay healthy and safe,
Tom
Hi, i just tried, and it seems to work for me(gen~ can access individual buffer~s inside of polybuffer~ for me), this patch was my test:
if you're still having probs, post the patch, i can check it out(i agree, gen~ should work with polybuffer~, but i think it does: maybe it's getting confused since your inner gen~ buffer is named the same as the global outer polybuffer~(?)).
(sounds like a signature-quote :
"get in touch with your inner gen~")
Hi RAJA,
Thanks for the tip, the naming convention was indeed the error.
Having seen that if the second name which corresponds to the Max environment is not specified, it would use the first, led me to a wrong conclusion. I thought I could just declare the single buffer~ name and it would identify it. However, it seems the working buffer~ name within Gen in this case, cannot conflict with the Max environment buffer~... ?
Maybe my false interpretation, or maybe not so clear.
Anyway, thanks for your lighting help!
Best - Tom.
Well this stil does not seem quite ideal, because one still have to reference all the files inside the polybuffer by name, rather than index. So currently I have this, which doesn't work either:
Buffer w1("wavs.1"), w2("wavs.2"), w3("wavs.3"), w4("wavs.4"), w5("wavs.5"),
w6("wavs.6"), w7("wavs.7"), w8("wavs.8"), w9("wavs.9"), w10("wavs.10"),
w11("wavs.11"), w12("wavs.12"), w13("wavs.13"), w14("wavs.14"), w15("wavs.15"),
w16("wavs.16"), w17("wavs.17"), w18("wavs.18"), w19("wavs.19"), w20("wavs.20"),
w21("wavs.21"), w22("wavs.22"), w23("wavs.23"), w24("wavs.24"), w25("wavs.25"),
w26("wavs.26"), w27("wavs.27"), w28("wavs.28"), w29("wavs.29"), w30("wavs.30"),
w31("wavs.31"), w32("wavs.32"), w33("wavs.33"), w34("wavs.34"), w35("wavs.35"),
w36("wavs.36"), w37("wavs.37"), w38("wavs.38"), w39("wavs.39"), w40("wavs.40"),
w41("wavs.41"), w42("wavs.42"), w43("wavs.43"), w44("wavs.44"), w45("wavs.45"),
w46("wavs.46");
wav = selector(waveset +1,
w1, w2, w3, w4, w5, w6, w7, w8, w9, w10,
w11, w12, w13, w14, w15, w16, w17, w18, w19, w20,
w21, w22, w23, w24, w25, w26, w27, w28, w29, w30,
w31, w32, w33, w34, w35, w36, w37, w38, w39, w40,
w41, w42, w43, w44, w45, w46);Doesn't seem like polybuffer provides much better a programmatic solution than individual named buffers, does it, lol.
+1000 about the non programmatic solution here.
trying to work around it.