[PD] Selecting random wavefile from folder without knowing the names

Jonathan Wilkes jancsika at yahoo.com
Thu Sep 15 09:53:15 CEST 2011


----- Original Message -----

> From: Mathieu Bouchard <matju at artengine.ca>
> To: adam sanches <adam.sanches at gmail.com>
> Cc: pd-list at 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 at iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>



More information about the Pd-list mailing list