WaveLab scripting questions

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

Re: WaveLab scripting questions

Post by MrSoundman » Thu Nov 02, 2017 9:37 pm

PG wrote:
Thu Nov 02, 2017 9:15 am
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
Thanks, that's working now! (needs to be run once, as Administrator). To help those who are getting started, on Windows you can also control WaveLab from PowerShell:

Code: Select all

# Hello-64.ps1

$app = New-Object -ComObject WaveLabPro9_5.Application
while (!$app.IsReady())
{
    Start-Sleep -Milliseconds 100
} 
$app.Hello()
$app.Quit()
This does not need to be run as Administrator. Note that the name of the ComObject will vary depending on what version of WaveLab you have -- this example is for WaveLab Pro 9.5
Windows 10 • Cubase 9.5.50 • WaveLab 9.5.50 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

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

Re: WaveLab scripting questions

Post by MrSoundman » Sun Dec 10, 2017 12:50 pm

Here's the PowerShell equivalent to convert a wave file to an MP3:

Code: Select all

# ConvertToMp3.ps1

$ObjNameApp  = "WaveLabPro9_5.Application" # adjust to your version of WaveLab Pro
$ObjNameWave = "WaveLabPro9_5.Wave"
$fileToConvert = "E:\Audio\Awsome.wav" # the name of the source file
$targetFormat = "%factory%\Encoded\Mp3\Mp3 FH 128k cbr" # the format you want to convert to (preset)

$app = New-Object -ComObject $ObjNameApp
while (!$app.IsReady()) # wait for the application to load
{
    Start-Sleep -Milliseconds 100
} 

$wave = New-Object -ComObject $ObjNameWave # create a new wave editor
$wave.Open($fileToConvert) # load the source file
$wave.SaveAs($fileToConvert,$targetFormat) # convert and save in the target format
$wave.Close()
$app.Quit()
The first two lines may need to be adjusted for your specific version of WaveLab Pro. The next two lines should be self-explanatory -- the source file and the format you want to convert it to. The destination file is placed in the same folder as the source file.
Windows 10 • Cubase 9.5.50 • WaveLab 9.5.50 • SpectraLayers 6.0.10 • HALion 6.3.0 • Groove Agent 5.0.10 • Midex

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

Re: WaveLab scripting questions

Post by misohoza » Wed May 29, 2019 5:47 pm

Anyone using Visual Studio Code as external script editor for WaveLab?

I'm trying to put together a type declaration file to provide tooltips and auto-complete suggestions for WaveLab specific scripting functions. It's more the less ready and available here: https://github.com/misohoza/wavelab

I have a few questions that probably only PG can answer:
  • What version of ECMAScript is it? ES5?
  • In documentation examples is a function waitsUntilAllTasksFinished which isn't documented. Are there more undocumented functions or features?
  • I'm trying to "type" function arguments and return values. I'm not quite sure with clipId and fileId. Is clipId a number and fileId an object?
Thanks in advance.
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: 6633
Joined: Wed Dec 15, 2010 6:15 pm
Contact:

Re: WaveLab scripting questions

Post by PG » Wed May 29, 2019 7:49 pm

What version of ECMAScript is it? ES5?
I think this is version 3.
The list of functions independent from WaveLab is there:
https://doc.qt.io/qt-5/ecmascript.html
In documentation examples is a function waitsUntilAllTasksFinished which isn't documented. Are there more undocumented functions or features?
No. But the number of functions will grow. FY, this script engine is used to test some parts of WaveLab.
I'm trying to "type" function arguments and return values. I'm not quite sure with clipId and fileId. Is clipId a number and fileId an object?
No, just integer IDs.

Philippe
Philippe

Post Reply

Return to “WaveLab 8 | WaveLab Elements 8”

Who is online

Users browsing this forum: gvalos and 2 guests