Henrik Ekeus
2011-02-13 19:58:00 UTC
Hi Everyone!
I need to load the contents of a folder of sound files into
buffers. The folder of sounds has files named with the format
s<someNumber>nameoffile.aif .... i.e. s001AFile.aif,
s002Anotherfile.aif etc..
What I need to do is to have these sound files loaded into an
arrayOfBuffers, in the index that corresponds to the number in the
filename. So s005YetAnotherFile.aif should be stored in my
'soundFileBuffers' array at index 5.
So i'm trying to write my function 'loadSoundFileBuffers' that would
load my 'soundFileBuffers' array.. below is what I have so far..
loadSoundFileBuffers {
//Read the contents of a folder of sound files and load into the
array 'soundFileBuffer'
//use format: s001nameoffile.aif s002nameofotherfile.aif
var numberOfFiles;
//How do I get a directory listing or somesuch?
soundFileBuffers=Array.new(numberOfFiles);
//iterate through and fill the thing!
}
So i'm sure this is meant to be very easy, but it is eluding me for the
moment.. anybody out there fancy doing it in 140 characters or less? ;)
Any help is much appreciated, as always.
Cheers!
Henrik
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
I need to load the contents of a folder of sound files into
buffers. The folder of sounds has files named with the format
s<someNumber>nameoffile.aif .... i.e. s001AFile.aif,
s002Anotherfile.aif etc..
What I need to do is to have these sound files loaded into an
arrayOfBuffers, in the index that corresponds to the number in the
filename. So s005YetAnotherFile.aif should be stored in my
'soundFileBuffers' array at index 5.
So i'm trying to write my function 'loadSoundFileBuffers' that would
load my 'soundFileBuffers' array.. below is what I have so far..
loadSoundFileBuffers {
//Read the contents of a folder of sound files and load into the
array 'soundFileBuffer'
//use format: s001nameoffile.aif s002nameofotherfile.aif
var numberOfFiles;
//How do I get a directory listing or somesuch?
soundFileBuffers=Array.new(numberOfFiles);
//iterate through and fill the thing!
}
So i'm sure this is meant to be very easy, but it is eluding me for the
moment.. anybody out there fancy doing it in 140 characters or less? ;)
Any help is much appreciated, as always.
Cheers!
Henrik
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/