WaveLab scripting questions

All topics on WaveLab 8 and WaveLab Elements 8
User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

WaveLab scripting questions

Post by MrSoundman » Fri Aug 30, 2013 11:16 pm

What's the correct way to de-select any current selection? Can I use this:

Code: Select all

activeWave.select(0,0)
(editted to correct title)
Last edited by MrSoundman on Sat Aug 31, 2013 9:51 am, edited 2 times in total.
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting question

Post by PG » Sat Aug 31, 2013 6:13 am

no,

Code: Select all

select(0, -1)
Philippe

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting question

Post by MrSoundman » Sat Aug 31, 2013 9:50 am

And to select the entire wave, is this the best way:

Code: Select all

activeWave.select(0,activeWave.size())
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Sat Aug 31, 2013 11:15 am

Yes
Philippe

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting questions

Post by MrSoundman » Sat Aug 31, 2013 9:15 pm

Apologies if this is turning into a scripting tutorial .... but is there any way to specify to use the factory presets for a function? For example, this fails unless I first load the factory preset and save it in my own profile:

Code: Select all

activeWave.normalize("EBU R-128 Recommendation")
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Sat Aug 31, 2013 10:08 pm

Indeed, the user preset location is searched, not the factory preset location. Maybe something to improve.
Philippe

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Sat Aug 31, 2013 10:30 pm

No, in fact there is a solution, do this:

Code: Select all

activeWave.normalize("%factory%/EBU R-128 Recommendation")
Philippe

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting questions

Post by MrSoundman » Sun Sep 01, 2013 10:15 pm

Excellent -- thank you!
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

theoldman
New Member
Posts: 30
Joined: Sat Aug 27, 2011 7:16 am
Contact:

Re: WaveLab scripting questions

Post by theoldman » Wed Sep 04, 2013 12:03 am

so secret code. is there a place to get some info on scripting.for the scriptingly challenged :oops:
Nuendo 6 Wavelab 7 Bfd2 Drumagog Amek 2000/2500 Uad P.C W7

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Wed Sep 04, 2013 6:28 am

All the info is on the documenation. If something is not clear, ask here...
Philippe

orchiddoug
New Member
Posts: 3
Joined: Sat Jan 04, 2014 11:41 pm
Contact:

Re: WaveLab scripting questions

Post by orchiddoug » Wed Oct 25, 2017 12:47 am

I have looked everywhere for DEFINITIONS on Scripting. The documentation gives EXAMPLES but does not DEFINE what each number represents in the script. For example.. right now I'm trying to figure out what each NUMBER represents in the following command:

activeWave.select(0, 10 * activeWave.sampleRate());

What does the "0" represent? I have changed it and experimented, and it doesn't seem to do anything. The result is always the same.

I'm trying to automatically select 30 seconds INTO a wave to start, and then the next 30 seconds. I thought it would be 30,30 but it still is selecting the BEGINNING of the SONG.

Can someone please explain!??

orchiddoug
New Member
Posts: 3
Joined: Sat Jan 04, 2014 11:41 pm
Contact:

Re: WaveLab scripting questions

Post by orchiddoug » Wed Oct 25, 2017 12:53 am

This is my complete code to make a 30 second sound clip. I thought it would start 30 seconds in and select the next 30 seconds... so starting at 30 seconds to 60 seconds into the song. Then save that bit only, cutting off the beginning and the ending. then do the fade in and fade out. But it still is ending up to be the FIRST 30 seconds of the song... 0 - 30 seconds. What am I doing wrong? Here's my code:

activeWave.select(30, 30 * activeWave.sampleRate());
activeWave.trim();
activeWave.select(0,2*activeWave.sampleRate());
activeWave.fadeIn(linear);
activeWave.select(activeWave.size() - (2 * activeWave.sampleRate()), activeWave.size());
activeWave.fadeOut(linear);

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Wed Oct 25, 2017 9:05 am

The value represent a number of samples.
Hence if you want to specify X second, then you have to specify (X * activeWave.sampleRate())
Hence if you want to specify X millisecondd, then you have to specify ((X * activeWave.sampleRate()) / 1000)
Philippe

orchiddoug
New Member
Posts: 3
Joined: Sat Jan 04, 2014 11:41 pm
Contact:

Re: WaveLab scripting questions

Post by orchiddoug » Mon Oct 30, 2017 9:55 pm

Awesome! I can't believe I didn't realize that I had to do it again for the 1st number. LOL

Three more questions:
A) Is there a command that would trigger an "OPEN" to open a file, or even multiple files in the same folder?
B) Is there a command that would then trigger a "SAVE AS" command to automatically bring up the save window for me to type a name into?
C) Is there a command that would trigger "SAVE" instead, if I want to keep the name the same, but automatically save it?

Thanks for your help! I truly appreciate it, as I have HUNDREDS of files to edit to small sound clips.

Doug :)

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Mon Oct 30, 2017 11:17 pm

I must say WaveLab 8.x is old for me, and I can only comment on WaveLab 9.5
In WaveLab 9.5, there is a command to open a file by its name (certain also in 8)
There is no save/save-as command, but there is a "render" function that allows you to render the files anyway you like. This is new to WaveLab 9.5, hence not in 8.
WaveLab 9.5 has a better scripting documentation too.
Philippe

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting questions

Post by MrSoundman » Tue Oct 31, 2017 11:48 am

PG wrote:
Mon Oct 30, 2017 11:17 pm
WaveLab 9.5 has a better scripting documentation too.
Where, please? Currently mentioned here, but no actual documentation.
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Tue Oct 31, 2017 12:45 pm

If you have WaveLab 9.5, you get the full doc from the WaveLab scripting window (help button).
copy here:
scripting_doc.zip
(9.03 KiB) Downloaded 216 times
For the online help, hmm, I don't find it. I will ask the concerned person. But this should be the same as above.
Philippe

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting questions

Post by MrSoundman » Tue Oct 31, 2017 10:41 pm

OK got it, thanks!
On Windows (ActiveX), since upgrading to 9.5, the COM Object WaveLabPro9_5.Application is not registered .... is there a way to register this?
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting questions

Post by MrSoundman » Thu Nov 02, 2017 1:53 am

PG wrote:
Tue Oct 31, 2017 12:45 pm
If you have WaveLab 9.5, you get the full doc from the WaveLab scripting window (help button).
copy here: scripting_doc.zip
For the online help, hmm, I don't find it. I will ask the concerned person. But this should be the same as above.
It's now online here, thanks!
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

User avatar
MrSoundman
Senior Member
Posts: 2353
Joined: Fri Dec 24, 2010 3:27 am
Contact:

Re: WaveLab scripting questions

Post by MrSoundman » Thu Nov 02, 2017 1:54 am

MrSoundman wrote:
Tue Oct 31, 2017 10:41 pm
On Windows (ActiveX), since upgrading to 9.5, the COM Object WaveLabPro9_5.Application is not registered .... is there a way to register this?
Perhaps I should start a scripting thread in the WL9 forum, or can this thread be moved?
Windows 10 • Cubase 10.0.50 • WaveLab 10.0.0 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Thu Nov 02, 2017 8:08 am

On Windows (ActiveX), since upgrading to 9.5, the COM Object WaveLabPro9_5.Application is not registered .... is there a way to register this?
I am currently looking at this, and there seems to be a registration issue.
I am not a specialist of ActiveX, but maybe you can make use of the tlb file:
C:\Program Files\Steinberg\WaveLab Pro 9.5\Tools\Windows Scripting\WaveLab.tlb
Philippe

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Thu Nov 02, 2017 9:15 am

Actually, it works when installing... but you have to run the script from a 64 bit application (like File Explorer, and unlike the file manager I was using).

If you need to register again, you can run this small .bat file:

Code: Select all

cd /d "C:\Program Files\Steinberg\WaveLab Pro 9.5"
"C:\Program Files\Steinberg\WaveLab Pro 9.5\WaveLabPro9_5.exe" /regserver
Philippe

misohoza
Member
Posts: 867
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: WaveLab scripting questions

Post by misohoza » Thu Nov 02, 2017 11:59 am

Great thread.

Not a lot of info about Wavelab scripting out there.

May I ask one question?
I've noticed you can use firstClip() and nextClip() to cycle through all clips in the montage. Is something similar possible in wave editor? So you could use the loop to run the script on all open files in a File group.

There is a openWave() which can be used for this but as I understand it needs a full path as argument.
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 9, Wavelab Pro 9, Halion 6, Dorico,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

PG
Moderator
Posts: 6952
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Thu Nov 02, 2017 12:38 pm

I've noticed you can use firstClip() and nextClip() to cycle through all clips in the montage. Is something similar possible in wave editor? So you could use the loop to run the script on all open files in a File group.
Not possible. But why not adding it, if you argument me a good use case.
Philippe

misohoza
Member
Posts: 867
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: WaveLab scripting questions

Post by misohoza » Thu Nov 02, 2017 2:40 pm

Scripting is supposed to help with repetitive tasks. If you could avoid selecting next audio file open in the editor and running the same script again, it would speed up the workflow even more. Like batch processing with a script.

Thinking about some real life use cases, a lot is already possible with batch processor (trimming, normalising, dc offset,...), but certain things like adding markers, processing a specific range, is not.
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 9, Wavelab Pro 9, Halion 6, Dorico,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

Post Reply

Return to “WaveLab 8 | WaveLab Elements 8”

Who is online

Users browsing this forum: No registered users and 5 guests