Cakewalk MP3 Shell

For the Lame MP3 Encoder

Warning

If you're reading this prior to downloading or installing the program, be warned that it will overwrite Cakewalk MP3 Encoder, and that a restoration of that software can not be guaranteed.

Download

If you're looking for the download of the shell, look at my music page.

Introduction

The Cakewalk MP3 Shell is an odd little creature. The main reason I started to write it was that I wanted to create MP3's from inside Cakewalk Sonar without having to start up other applications, but I didn't want to use Cakewalks own MP3 encoder (it costs money, it is slow, and I prefer Lame anyway).

So here's a shell that can call Lame instead. It doesn't give any interactivity at all, so many users will probably find it a lot worse than using Cakewalks encoder, but I like it this way and I wrote it

After I'd done this, I suddenly realised that it is a hassle to have to export the wave date twice or thrice just because I want to create two MP3 files with different quality and also save the wav-file. Because of this I made this little app able to call the Lame encoder multiple times with different settings for the same input wave file, and to also copy the temporary wave file to anotrher name and location.

This whole thing is in text mode, and not interactive at all, as I said at the beginning. It is, however, configurable, and below comes some sort of explanations about configuring it. Before going into that, some of you might see the possibility to extend it to allow other decoders as well. That is a clear possibility, but it will only happen if I suddenly decide to implementet for my own needs or if other people uses this app, thanks me for it, and kindly asks me to implement it. The same goes for any other developments of it.

Configuration

The app is configured solely with the help of an ini file. The inifile must reside in the same directory as this applicatioin, and must have the same name though it should en with ".ini" instead of ".exe". A default configuration and three example files should have been installed together with this application. The files are:

Current: The file the application uses right now.
This will only be correct if you're reading this documentation from an installed version of the shell.
Sample 1: Creates one decent MP3 file.
Sample 2: Creates one decent and one not so decent MP3 file.
Sample 3:

Creates one decent and one not so decent MP3 file, and copies the wav file.

The configuration file consists of a number of sections, at least two. One section, callad Global is for setting up the shell, the rest are for creating files, one for each out put file to create. The only obvious restriction on header names is that the name Global is reserved for the global section. The main syntax of the file is:

[Header name]
Setting=value
Setting=value

[Header name]
Setting=value
Setting=value

Lines beginning with ";", ":" or "#" are considered comments.

The Global Section

The following settings can be done in the Global section:

Command value type Description Aliases
Lame path to lame.exe If lame.exe (or another encoding accepting the same commandline options) resides on the "path", this does not need to be the full path, otherwise it must be the full path to the file the shell shall call. If Lame was installed together with the shall, this should automagically have been correctly setup by the installation.
NoSpace yes or no Replaces space characters with underscore in file names. UnderScore
SpaceToUnderScore
Wait yes or no If yes, the shell will wait for a key-press after each file operation. Pause
Debug yes or no If yes, there will most probably be lots of text and waiting for key-presses.

The Files Sections

There can be as many sections for creating files as you like, and they can be named anything you like as long as it is not Global, does not contain "[" or "]" and does not exceed 254 characters.

The following settings can be done for each file:

Command value type Description Aliases
Name file-name The output file name. If this is not specified, the name given by Cakewalk will be used.
Macro-chars can be used in the file name (see below).
File
FileName
KeepID3 yes or no If the out put mp3 file allready exists and contains an Id3-tag (v1 or v2), the tag will be copied to the new mp3-file. KeepTag
KeepId
KeepId3Tag
CopyId3 file-name Copy the Id3 tag from the file file-name if it exists. If both this and KeepId3 is used, this one takes precedence.

CopyTag
CopyId
CopyId3Tag

NoSpace yes or no Replaces space characters with underscore in the file name. UnderScore
SpaceToUnderScore
Wait yes or no If yes, the shell will wait for a key-press after the file is done. Pause
Param parameters for Lame Whatever you specify here will be sent as command line parameters to lame. For the syntax of available parameters consult the documentation for the commandline version of the Lame MP3 Encoder.
Macro-chars can be used in the parameters (see below).
Params
Parameter
Parameters
Option
Options
Wav yes or no If yes, the temporary wav-file created by Cakewalk will simply be copied to the name specified in the same file section. Lame will not be called for this file section (though it can still be called by other sections). Copy
NoMP3
NoLame

Macro-chars

The following macro's are available in Name and Param, using information from Cakewalk:

Macro Meaning
%P The path, excluding the name and extension, of the output file.
%N The name, excluding path and extension, of the output file.
%E The extension of the output file.
%F The name, excluding path but including extention, of the output file.
%* or %? The complete file path of the output file.
%% The "%" character.
$A The author of the file.
$T The title of the file.
$Y The year of the file.
$C The files comments.
$$ The "$" character.

End

That's all the documentation there is about this little thingy. If you like it, please tell me so by mailing jonas@truls.org. The newest version of this thing might be available at my music page.

Regards

/Jonas