Kyma Forum
  Kyma Support
  Fill an array w/ file dialogue

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Fill an array w/ file dialogue
metalbox
Member
posted 12 May 2002 06:08         Edit/Delete Message   Reply w/Quote
Hi.

How could I fill an array with filenames by selecting a folder thru a dialogue box ? Rather than one file at a time.

I'd like to use this for auditioning my control structures, and access the 'filenames' in scripting.

Thanks,

Michael

IP: Logged

SSC
Administrator
posted 12 May 2002 12:26         Edit/Delete Message   Reply w/Quote
The following code snippet will give you a collection of file names (strings with the full path to each file) found in same directory as the sample file that you have selected with the dialog box. You would ordinarily use this in a script to make a series of Sounds, each with one of these file names substituted into the Sample or Wavetable field of a Sound.

===================================================

| anyFile fileList sampleFiles |

anyFile := HostDriverInterface getFileWithPrompt: 'Please choose a file in the directory of interest' fileTypes: HostDriverInterface sampleFileTypes ifCancel: [^ self abortForKyma].

fileList := anyFile fileNamesInSameDirectory.

sampleFiles := fileList select: [ :fileName | HostDriverInterface filenameIsSampleFile: fileName asFile].

[This message has been edited by SSC (edited 12 May 2002).]

IP: Logged

metalbox
Member
posted 12 May 2002 12:48         Edit/Delete Message   Reply w/Quote
Thanks !

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c