hey! as far as I can tell the [file] object is not supported in Bela, at least natively, is that right?

Is there any way of getting it to work? Or any suggestions for an alternative approach? I think maybe the [pdcontrol] object is available, so I might be able to do what I'm trying to do with that, but I thought I'd check here.

what I'm trying to do: have a folder of sounds and load a random sound with the press of a button. the [file] object lets me check how many sounds there are in the folder, enabling easy random selection.

There's pd 0.51 on latest Bela, which doesn't seem to support [file] yet. [pdcontrol] seems to create without error, though, so that may help. One alternative is to have the files named in a predictable way (e.g.: numbers) and pick a random number

    not native, but i used [folder_list] from the hcs library to do the same thing.

    giuliomoro One alternative is to have the files named in a predictable way (e.g.: numbers) and pick a random number

    that works great if you know for sure how many files there are - and you don't want to recode your patch every time you change the number of files. if you want to be able to add even a single file afterwards, having a way to automatically list (or count) the files present is more futureproof. šŸ™‚

    that said, will check [pdcontrol].
    (edit: still on 0.49.1, no go.)

      Remork that works great if you know for sure how many files there are - and you don't want to recode your patch every time you change the number of files

      Hmm you could use [textfile] to store the number of files in an external text file, so you don't need to hardcoded it in the patch ...

      I had forgotten that [file] was a relatively recent thing. are there any plans to update the version of Pd that is included on Bela?

        yannseznec are there any plans to update the version of Pd that is included on Bela?

        that'd be nice, but do you want to try any of the other options first?

          giuliomoro yeah I already have tried both of the approaches described above before and they work just fine, but the [file] object is undeniably very handy! I have become really used to having it since it got added to the standard vanilla Pd distribution. So Iā€™m just asking more generally.

          giuliomoro aw that would be amazing but also there's really no rush! I'm just being selfish šŸ˜ƒ