So today I decided to look at Post Process XML scripts.
On Windows they are located in the folder:
c:\ProgramData\Steinberg\Audio Export Post Process Scripts\
I took an existing aepp script and modified it to make a mp3 copy of an exported Wav file:
<?xml version="1.0" encoding="UTF-8"?>
Make a mp3 copy using Lame
lame.png
Lame
3.99.5
C:\Lame\lame.exe
"$PATH"
false
false
I made an icon for it, the lame.png 32x21 pixels (the others where 32x32 pixels that I assume is the max)
The rest should be fairly self explanatory.
My problem that I have not been able to figure out is to parse settings along to Lame.
Right now it renders the wav and Lame encodes a mp3 copy to the same folder as the file destination chosen in the Export path setting, and that is fine.
But it always uses the Lame default setting, 128kbps.
I want to put a " -b 320 " setting in there. something like “Lame.exe -b 320 audio.wav” where it now does a “Lame.exe audio.wav”
Anyone familiar with XML, that could give me a hint ?
I can’t find any documentation on these .aepp scripts so I’ve done some experimenting on Windows, so I lazily copied ExplorerFolder.png and called it CommandLine.png, then created a new file called CommandLine.aepp with the following content:
The idea is to open a command line (the /k parameter keeps it open) and print out whatever is contained in the $PATH variable. The result is that a single line is printed which is the fully-qualified rendered filename, so including the drive, path and extension, but annoyingly with a trailing quote. So the logic for constructing the string which is passed to the OS for execution appears to be:
Thanks will have a look, I have been slammed at work and have only had time to install some monitoring tools to determine what arguments actually gets passed. You idea using cmd is a much better approach, that gives me something to work with.
Thank you so much.
Ok finally got it working.
I had to do a little workaround on that one.
Your suggestion using :
C:\Lame\lame.exe -b 320
Did not work, Cubase refuse to display the aepp in the pulldown menu.
I spend a few hours trying all combination of quotes in front, in the middle, after. The command box would open for a millisecond and the nothing
The solution was pretty simple, run Lame from a .cmd file.
I made a lamebat.cmd file that has the following inside it:
This now actually has potential, the batch file “lamebat.cmd” can easily be expanded on to do encoding in other formats or sample rate conversion.
So export one time and get 96k, 48k, 44.1k wavs, mp3, mp4, flac and what not in one swoop. (after figuring out how not to overwrite same format files)
The same must be possible on Mac, I am not familiar with the command line interface it uses, so no idea how to do it on a Mac.
Going to clean it up a little and post a new thread, add links to Lame, and ZIP aepp and the cmd files.
Thanks for your input, helped a lot.