Okay guys!
So I am making a patch which should be able to play many files with certain random functions.
Before I used readanysf~ library to do that, but it has weird artefacts during playback at times, so I decided to try another approach and use tabplay.
Tabplay works out fine as far as playback goes, I was able to put together the patch pretty quickly. However, another problem arose - when you load files into sample players during playback, 50% of the time a click, when all audio stops momentarily, would occur. This, of course, is not what you need during a performance.
I have been pointed to this topic:
http://puredata.hurleur.com/viewtopic.php?pid=5382#p5382
I did attempt to use block~ with read and soundfiler commands, but the effect was actually worse - without a block 50% of the time I get no clicks, with block~ I get it 100% of the times, although I must admit, often the click is less noticeable.
I cannot load files in advance, because the whole point of this patch is to do spontaneous music, load samples and loops as it goes. Because I see that using readanysf~ produces no clicks whatsoever, I am sure the problem is somehow solvable, but I am not sure what to do at this point. Any advice would be welcome.
I submit the patch for your inspection.