Page 1 of 1

Applying a script to multiple open/untitled files

Posted: Thu May 16, 2019 8:02 pm
by pegboardnerds
How would you go about applying a script to multiple open (but unsaved/Untitled) files?

Scenario: I have a long audio file with a bunch of sounds from a sound design session, that I sorted through, picked the ones I wanted, made rough selections and did "copy to new". Now I have a ton of Untitled files open that need surgical trimming of head/tail. I now have a script for this, but not a way to apply it effectively to all those files, it seems..

Oh and I tried using auto split for this, but it leaves several samples either before or after the sound, and I can't seem to make it behave the way I'd like it to..

Being able to iterate through every open file in a group via the script could possibly be an idea?

Or what if you could tie a keyboard shortcut to a chosen script, and apply it to any open file at hand (Right now it seems you need to be in the script and launch it from there, having it either affect the last file you had active, or any specific file called from the script)

I'll post the script in a separate thread for people to pick apart/use/reuse whatever you like. :)

Re: Applying a script to multiple open/untitled files

Posted: Thu May 16, 2019 8:47 pm
by MrSoundman
Are these just open wave edit windows, and strictly speaking, not yet files (as they haven't been saved)?

I started a thread about scripting some years ago, but it's now lost in the WaveLab 8 section:
WaveLab scripting questions
If you're on Windows, there you can see my first experiments using PowerShell to automate WaveLab. If you were working with actual files, you could use PowerShell to iterate through them; but it would be slow and would not scale well.

Perhaps we could have a top-level forum section for scripting? (i.e. not version-related)

Re: Applying a script to multiple open/untitled files

Posted: Thu May 16, 2019 9:00 pm
by pegboardnerds
Correct, they are!

Nice, I'll have a look, thanks!

I am, unfortunately, on Mac.. Or actually I do have a PC as well but for the time being I do all my work on my Mac, but it'll be interesting to look at nonetheless

Edit: Just saw the way to call a factory preset in your thread; awesome, I was having the exact same issue :)

A top level forum section for scripting would be cool..