hey there, I just had a hard time figuring out, why my patch wouldn't work on bela IDE even though it runs perfectly in PD. I found out that the error was due to a list object in my patch. Looks like the bela IDE can't handle a list when it is displayed ("command, 4" in PD). Is that something that can be fixed? If not it would be great to have a little info somewhere in the "Using Bela / Languages / Pure Data" informations.
best, seo.
listbox in pure data not working
Whatever gets visualised in the IDE is just a preview and it doesn't affect the patch's functionality. The patch should work as expected even if it doesn't display well.
Is it not behaving as expected?
- Edited
when I use a list in the patch, the whole patch doesn't get visualized in the IDE. It works when I upload it, but not the part, where I use the list. I also get a error "select: no method for 'bang". When I delete the list it get's visualized in the IDE and everything is working just fine. You can see the two different patches attached. the list is in on the left with the pack object.
- We don't know what's inside [pd listsum]
- The fanning out method to reset it to 0 is problematic. Likely a message order error there.
- The approach is "unconventional". Can you describe the behaviour you would expect of this patch?
Like I said, the patch is working fine without the list object. I know it is a bit unconvencinal there, but that is not the problem. I deleted different parts of the patch so I could narrow it down to the list. You can try it with this little patch. same thing. doesn't work with the list.
working:
#N canvas 188 232 513 466 12;
#X obj 183 170 pack 0 0 0;
#X obj 181 123 t f f f;
#X obj 182 245 unpack 0 0 0;
#X floatatom 177 284 5 0 0 0 - - - 0;
#X floatatom 223 284 5 0 0 0 - - - 0;
#X floatatom 269 286 5 0 0 0 - - - 0;
#X obj 177 25 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 176 1 loadbang;
#X obj 78 301 osc~ 440;
#X obj 69 434 dac~ 1 2;
#X msg 180 94 1;
#X obj 177 314 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
#X obj 180 61 metro 1000;
#X obj 176 343 delay 200;
#X msg 181 370 0;
#X obj 77 377 *~;
#X obj 78 331 *~ 0.4;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 1 1 0 1;
#X connect 1 2 0 2;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 2 2 5 0;
#X connect 3 0 11 0;
#X connect 3 0 15 1;
#X connect 6 0 12 0;
#X connect 7 0 6 0;
#X connect 8 0 16 0;
#X connect 10 0 1 0;
#X connect 11 0 13 0;
#X connect 12 0 10 0;
#X connect 13 0 14 0;
#X connect 14 0 15 1;
#X connect 15 0 9 0;
#X connect 15 0 9 1;
#X connect 16 0 15 0;
not working:
#N canvas 208 242 450 300 12;
#X obj 183 170 pack 0 0 0;
#X obj 181 123 t f f f;
#X obj 182 245 unpack 0 0 0;
#X floatatom 177 284 5 0 0 0 - - - 0;
#X floatatom 223 284 5 0 0 0 - - - 0;
#X floatatom 269 286 5 0 0 0 - - - 0;
#X obj 177 25 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 176 1 loadbang;
#X obj 78 301 osc~ 440;
#X obj 69 434 dac~ 1 2;
#X msg 180 94 1;
#X obj 177 314 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
#X obj 180 61 metro 1000;
#X obj 176 343 delay 200;
#X msg 181 370 0;
#X obj 77 377 *~;
#X obj 78 331 *~ 0.4;
#X listbox 187 212 20 0 0 0 - - - 0;
#X connect 0 0 17 0;
#X connect 1 0 0 0;
#X connect 1 1 0 1;
#X connect 1 2 0 2;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 2 2 5 0;
#X connect 3 0 11 0;
#X connect 3 0 15 1;
#X connect 6 0 12 0;
#X connect 7 0 6 0;
#X connect 8 0 16 0;
#X connect 10 0 1 0;
#X connect 11 0 13 0;
#X connect 12 0 10 0;
#X connect 13 0 14 0;
#X connect 14 0 15 1;
#X connect 15 0 9 0;
#X connect 15 0 9 1;
#X connect 16 0 15 0;
#X connect 17 0 2 0;
- Edited
The object listbox
was introduced in Pd 0.52-0. Likely this is the culprit and your Bela shipped with an earlier version of Pd.
Latest pd you can install on Bela is 0.51, but I may have a 0.54 build somewhere... Btw, that should print an error "couldn't create listbox" which would have made troubleshooting more straightforward.
ah ok. I got PD 0.54. I flashed the bela SD card today with the newest version v0.3.8h. but who knows. Anyway, I know what to avoid now and just wanted to let the developers know, that there might be a problem. thanks for looking into it.
- Edited
good to know, but the terminology is rather confusing. as is the title of this thread
i mean, lists themselves work just fine.
the [listbox]
object, however, does not, apparently.
too bad, and a pain to figure out i can imagine. but it's rather useless in a finished Bela/IDE patch, i would think?
yes definetly rather useless and working perfectly fine without it. Coming from Max I was just used to work with them and confused why my patch didn't work. Sorry for the terminology, I didn't know that it was called listbox...
listbox
is what one sees from the pd source code:
seo #X listbox 187 212 20 0 0 0 - - - 0;
I never saw that before either ... but it turns out that's what you get when you go to Put -> List in the Pd menu. Also that's what you'd get printed when you run the patch on Bela (which you may have not seen), but it must have been there:
error: canvas: no method for 'listbox'