Jump to content
Macro Express Forums

Play WAV-Files randomly in Folder


Recommended Posts

Sorry i´m occupying the forum with my questions. At least the last 4 were mine. ;-)

 

I would like to play WAV-Files randomly which are located in a folder. I can use a workaround to create Random Numbers between 1 an 100, rename the soundfiles accordingly (EG "1.wav") and use a string variable to pick those files.

 

But i don´t want to rename the soundfiles. Is this possible? Maybe with one of those sophisticated "REPEAT WITH FOLDER" -Commands?

 

Thanks a lot once more!!!

Alexandra

 

P.S.: I sometimes get 0 when Creating Random Integer Var. between 1 and 12 (set to a random value). How come?

Link to comment
Share on other sites

Yeah. Count the number of files in the folder. Then create a random number between 1 and the number of files. Now Repeat with Folder and include a counter. When the counter equals the random number aborth the repeat with a break and play that file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...