[PD] loading random samples

Alexandros Drymonitis adrcki at gmail.com
Fri Feb 12 17:04:59 CET 2016

[readsf~] outputs a bang out its right outlet when the current sample it's
playing has finished. You can send that bang to [random] (the argument of
which will be the number of your samples) and the output of [random] to a
message [open ./samples/P$1.wav, 1(
I don't think that you can use 01, 02, etc., but 1, 2, etc. If you really
want to name your samples like that, your message could be [open
./samples/P0$1.wav, 1(, but any sample greater than 9 would have to be
named P010.wav. There should be a work around that though.
In this example there's a directory called "samples" in the directory of
the patch.

On Fri, Feb 12, 2016 at 5:31 PM, Pagano, Patrick <pat at digitalworlds.ufl.edu>

> ​you need a folder playlist object attached to a file player
> i suggest the browser/folder from the MTL abstractions and the player~
> external from Eric lyon Potpourri
> *Patrick Pagano B.S, M.F.A*
> Audio and Projection Design Faculty
> Digital Worlds Institute
> University of Florida, USA
> (352)294-2020
> ------------------------------
> *From:* Pd-list <pd-list-bounces at mail.iem.at> on behalf of Spyros
> Polychronopoulos <spypolymail at gmail.com>
> *Sent:* Thursday, February 11, 2016 6:50 PM
> *To:* pd-list at mail.iem.at
> *Subject:* [PD] loading random samples
> Hi list,
> I have a question if you could enlighten me:
> I would like to make a patch that loads randomly a sample from a folder
> (if I can make it open randomly any file begging with P01 ie. P01*.wav) and
> when the sample ends loads automatically another sample randomly (ie.
> P02*.wav).
> thank you in advance
> --
> Spyros Polychronopoulos
> Music Composer / BSc / PhD
> www.spyweirdos.com
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160212/e9b13e29/attachment-0001.html>

More information about the Pd-list mailing list