MP3 & Ogg Vorbis Encoder for Cakewalk (cwenc)

Version 1.2 - December 8th, 2002
(Helpfile updated April 5th, 2005)

Author: Mikkel Elmholdt

What is it?

The cwenc utility is primarily a tool for musicians working with Cakewalk music production software, such as Home Studio and Sonar. cwenc enables you to export your original music to a compressed audio file format, such as MP3 or Ogg Vorbis, from within the mentioned Cakewalk products.

cwenc can also be used as a stand-alone encoder, but is not optimized for this purpose. Other encoders are more optimized for either combined CD-ripping and encoding on-the-fly (such as AudioGrabber), or bulk encoding of a lot of WAV-files.

cwenc is a direct replacement for the time-limited demo-version of Cakewalk's commercial MP3 encoder program, which is packaged with both Home Studio and Sonar. Note that the cwenc setup program will overwrite the Cakewalk MP3 encoder (mp3enc.exe).

What will it do?

Most musicians are not technicians at heart, and would like to concentrate on making music. For the more technically minded who wants to be able to tweak every little detail themselves, I recommend using the LAME encoder and the associated user interface RazorLame directly. The techies would like to know that cwenc uses the --alt-preset settings of the LAME encoder, which is a predefined collection of recommended settings for the LAME MP3 encoder.

cwenc is fixed to use the default 44.1 kHz sampling, as no self-respecting musician would want his or her music any lower.

What does it cost?

cwenc is free software. This means three things:
  1. It does not cost anything to use it.
  2. If you are so inclined, you may change the software any way you like.
  3. You are free to re-distribute the (possibly modified) software.

Please refer to the License Section at the bottom for a more detailed explanation of the cwenc license.

How does it work?

Here's a step-by-step guide to creating high-quality compressed audio files of your Cakewalk work with cwenc.

Quick Guide

First, you need to whip up some kool tune, which you want to share with the world. I cannot help you with this part, so you're on your own here.

Once you're (reasonable) done, you select all tracks (for instance by pressing [Ctrl-A] in the Track View), and then you select "File -> Export Audio ..". You are now presented with the following screen:

  1. Select the place where you want the resulting compressed audio files to be placed in the directory chooser at the top.
  2. Enter the name of the resulting compressed audio files in the "File name:" field.
  3. Select file type "MP3" in the "Files of type" drop-down box.
  4. Keep the default "Export to Stereo File(s)" format selection.
  5. Keep the "Bit Depth" at 16.
  6. Optionally modify the "Mix Enables" settings. If you don't know what these settings do, then leave them all selected.
  7. Press the "Export" button once you're done.

Now your Cakewalk software will start mixing your project down to a single temporary track. Once it is done, you will see the main cwenc window, as shown below:

Make any selections in the windows to suit your purpose, and then press "OK". cwenc will now perform the requested encoding operations. You can follow the progress in the small status field with the light-blue background in the lower left of the window. Once the encoding has been completed, the status field will briefly display "Done", and then automatically return to the Cakewalk program.

Detailed Explanation

This section describes the various options offered by the cwenc program.

Input File: Displays the WAV file to encode. If cwenc has been called from within Cakewalk, this will point to a temporary file, which will be deleted by Cakewalk once the encoding is complete. You can make a copy of this file however, by selecting the "Keep WAV File" option. If you want to select another WAV-file, you can press the upper "Select" button, and navigate to the file you want to encode.
Output File: Shows the location and name of the resulting encoded audio files. If cwenc has been called from within Cakewalk, this will point to the file name and location you selected in the Cakewalk Export Audio dialog. You can however select another name and /or location by pressing the lower "Select" button, and makes the necessary changes. MP3 files will be saved with the extension ".mp3", whereas Ogg Vorbis files will be saved with extension ".ogg".
Create MP3 File Select this to create MP3 files. This is the default selection.
Create Ogg Vorbis File Select this to create Ogg Vorbis files. The default selection is "off".
Keep WAV File Select this to save a copy of the temporary WAV file created by Cakewalk. You can use this option, if you want to burn a proper CD. The WAV copy will be placed in the same directory as the MP3/Ogg files. The filename will be the same as for the compressed files, with the string "-saved" and extension ".wav" appended.

Example: A WAV file used for generating the MP3 file "C:\SomeDir\myfile.mp3" will be copied to the file "C:\SomeDir\myfile-saved.wav".

Main Output File section Here you can select the encoding quality options for the main (primary) output file.

Refer to the section about audio file formats below for a detailed explanation and some recommendations.

Create Secondary Files Select this if you want to create another copy at a different quality setting.
Secondary Output File section This section is similar to the Main section.
ID Tags Settings Use this block to attach various descriptive terms to your song. The fields are all rather self-explanatory. Regardless of what you enter, it will not affect the sound quality of the song.

Note: cwenc will generate ID3v2 tags only! If for some reason you need to use ID3v1 tags, then you have to use an external ID3 tag editor. You can then use the "Reuse data from existing file(s)" option described below.

Reuse data from existing file(s) If the output MP3/Ogg file(s) already exists, you can instruct cwenc to reuse any ID tags in these files, by selecting this checkbox. You might want to use this feature if you use an external ID tag editor for your files. The ID tag fields displayed in cwenc will be updated with the information found, but you will not be able to edit the ID tag fields in cwenc, as the fields will become read-only (i.e. "grayed-out").

If you are generating multiple files, and several of these selected output files already exists, there is of course a possibility of ID tag inconsistency between them (a tag which exists in the high-quality MP3 file, does not exist in the low-quality Ogg file, etc). In addition, MP3 will support some special tags (like icons) which is currently not supported by Ogg Vorbis.

The following rules apply:

   ID tags found in MP3 files will be used on MP3 files. Tags found in Ogg files will be used on Ogg files. Tags found in the main file will override any tags in the secondary file of the same type (MP3 or Ogg).
   MP3 files takes precedence with regard to updating the cwenc display. Regardless of this, the rule above is in effect, i.e. the Ogg files will contain the tags from the existing Ogg file, regardless of what the display indicates.
   cwenc currently only displays a subset of all the possible ID values. But all ID tags found in an existing file will be copied to the new file. Files created "from scratch" (i.e. with no existing file to copy tags from) will however only contain the ID tag information displayed.
   If you want to reuse information in the main MP3 file, but also want to enforce syncronization of tags between the file formats, you can simply select the "Reuse data ..." option, and then de-select it. In this way, the cwenc ID tag fields will be updated with data from the main MP3 file (if this exists and has been selected for generation, otherwise the main Ogg file is used). You can now edit the fields, and when you generate the files, they will all share the same information. Note however, that by performing this procedure, you will loose the value of all ID tag fields not displayed by cwenc.

MP3 Settings Pressing this button will open a new window with advanced MP3 settings. If you don't know what these settings mean, then you don't need to adjust them. Note: There are currently no equivalent settings for Ogg Vorbis.
Help button Displays this help text in the system default HTML browser.
About button Shows a nice little "About" dialog (you would never have guessed this ...)
OK & Cancel buttons Pressing OK will (as stated above) start the encoding process according to the selection made. Pressing Cancel will abort the procedure and return to the calling Cakewalk program.

Compressed Audio File Formats

cwenc supports two different audio formats, the MP3 and the Ogg Vorbis formats. Future versions may include suport for other formats, such as Windows Media and Real Audio, but this is by no means guaranteed. And since Cakewalk programs will export to these formats already, the need for this is perhaps limited.

Thw process of converting a (big) WAV file into a compressed audio format is normally called "encoding". To play the encoded file, you need a "decoder", also known as a "player". Some well-known audio players include WinAmp, Windows Media Player, XMMS (for Linux), and others.

The overall quality of the audio file depends directly on the bitrate. The more bits used for encoding, the better quality the audio will have, but the bigger the files will be. For Internet streaming a bitrate of 128 kbit/sec is normal, but lower rates are also commonly found, especially for smaller "sound bites". For a pleasant listening experience in your home you probably want a higher rate however, typically around 160 - 192 kbit/sec. Only if you have very good audio equipment and/or very good ears would you need to go to higher rates.

Bit Rate Types

These descriptions apply to both MP3 and Ogg Vorbis files.
Constant Bit Rate (CBR) The simplest bit rate encodig technique. All audio passages are encoded using the same amount of bits, not taking the audio dynamics (i.e. quiet and loud passages) into accont at all. This gives a 100% predictable file size, as the file size is directly proportional to the length of the song. For this reason CBR encoding is typically preferred for Internet audio streaming. But this also means that CBR at lower bitrates provide a similar low quality.

CBR encoding at a very high bitrate (320 kbit/sec) can be the preferred type for your own high-quality audio files, if you are not concerned about file size and are having problems with playing VBR.

Average Bit Rate (ABR) ABR attempts to take the audio dynamics into account, by allowing the bitrate to vary over the length of the song, while still maintaining an specified average bitrate. But the encoding is typically "bounded", i.e. restricted to move between a minimum and a maximum settings, and will typically not attain the same level of quality as VBR at higher bitrates. ABR can thus be vieved as a compromize between CBR and VBR encoding. ABR will definitely provide better results than CBR at lower bitrates.
Variable Bit Rate (VBR) The most advanced encoding technique, which fully takes the dynamics of the music into account. This setting will give the best results at higher bitrates, but will also produce somewhat larger files. It also takes somewhat longer to encode than CBR.

VBR levels are not expressed in bitrates, as this rate varies quite a lot over the course of a song. Instead the term "quality" is used. cwenc supports three levels of quality: "Reasonable" (lowest), "Standard" and "Extreme" (highest). Only people with extremely good ears should ever need to use the "Extreme" setting.

Some (cheaper?) MP3 players has been reported to have problems playing VBR files, so if you are planning on distributing your files to others, VBR may not be a good choice. But if your own player can handle it, VBR should be the preferred encoding technique for your own high-quality audio collection.

Recommended settings

MP3 versus Ogg Vorbis

MP3 is by far the most widespread compressed audio format in use today. So why is cwenc also supporting this obscure Ogg Vorbis format? Well, here's a couple of things to consider:

If you are still not convinced that Ogg Vorbis is something you need to concern yourself with, then you can just choose not to generate this format and stick with MP3.

System Requirements

Software: Hardware:


Copyright (c) 2002 Mikkel Elmholdt. All rights reserved.

cwenc is distributed under a modified Apache Software License version 1.1, where only the name of the copyright holder has been changed. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by Mikkel Elmholdt (". Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.

  4. The names cwenc and "Mikkel Elmholdt" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact

  5. Products derived from this software may not be called cwenc, nor may cwenc appear in their name, without prior written permission of Mikkel Elmholdt.


You can see the original Apache licence here.

The full source code for cwenc is available for download from the cwenc project homepage The software has been developed with Microsoft Visual C++ 6.0 (SP5).


cwenc uses the following software components:

Lame MP3 encoder version 3.93.1

Ogg Vorbis 1.0 for Windows

ID3Lib version 3.8.0
Inno Setup version 3.0.3

cwenc is inspired by another utility created by Jonas Eckerman.

About the Author

Mikkel Elmholdt lives and works in Denmark. He was born in 1962, which makes him 40 years old at the time of writing. He works as a professional software developer, mainly in the telecommunications sector. In his spare time, he fiddles around with Cakewalk Home Studio XL, a guitar and a cheap Yamaha keyboard. You can listen to some of his creations at SoundClick

Mikkel can be contacted at
For up-to-date versions of this software, check the cwenc project home page at SourceForge.