Forum

Random audiofile player


#1

Dear All,

i am sitting the whole afternoon on this audioplayer.

I have 6 audiofiles in one folder and want them to be played randomly. It seems to work but after a few minutes it stops playing. Only after i play with the “bin size” value of the “GetSlice” Node it starts again playing but in a totaly strange way.

Could somebody please explain me what i am doin wrong or if there is a better way to do a random audiofileplayer.

Thanks in advance!

randomaudioplayer.v4p (7.4 KB)


#2

The duration and position values might not always match up super exactly. This can be the reason for your loop to break at some point. Check these to debug when it all stops. If it is the case use a small epsilon value on the equal node or use the greater equal node (=>). And kind of obvious but still, make sure all the files you load are really playable. Its also good practice to use the mask pin on the dir node so you won´t load non playable files accidentialy.
When you play with the binsize pin (any value that is not 1) you actually feed multiple files at once and make them play so this will sound strange i guess ;)


#3

@tgd

Thank you so much!

Exactly!

I used the (>=) Node and everything worked perfectly.