Hi, how can i select a random wavefile from a folder withouth knowing the names of the files in my folder?
how can i read all the files names in a folder and then select one? which would be the best way of doing this?
thanks
A.
Le 2011-09-14 à 22:14:00, adam sanches a écrit :
Hi, how can i select a random wavefile from a folder withouth knowing the names of the files in my folder?
how can i read all the files names in a folder and then select one? which would be the best way of doing this?
[hcs/folder_list] then [list length] then [random] then [list split] then $1.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: adam sanches adam.sanches@gmail.com Cc: pd-list@iem.at Sent: Thursday, September 15, 2011 1:51 AM Subject: Re: [PD] Selecting random wavefile from folder without knowing the names
Le 2011-09-14 à 22:14:00, adam sanches a écrit :
Hi, how can i select a random wavefile from a folder withouth knowing the
names of the files in my folder?
how can i read all the files names in a folder and then select one? which
would be the best way of doing this?
[hcs/folder_list] then [list length] then [random] then [list split] then $1.
You were pwned by a misnomer.
[folder_list] outputs each file/dir as a symbol, so you'd need to accumulate a list from its output.
-Jonathan
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list