Song Mixer

Plugins


CD Track ripping, MP3 encoding, and CD burning in Song Mixer is handled with the use of third party softwares which can be changed out by you, the user, and reconfigured.


To help you understand how to do that I'll walk you through the process of setting up the default ripper and encoder which came with Song Mixer when you installed it.


Go into settings ("File" -> "Settings") and select the "Plugins" tab.
In the text boxes you will define a list of commands needed to rip or encode one track from a cd.


Predefined variables

There are predefined variables which you can use, Song Mixer will replace these with the appropriate text before running the commands.  All predefined variables start with $


The Script - Ripper

The script is basically a batch file, which if you're an old school dos user you may be familiar with.  Each line is a dos-like command, which may execute a program with certain options.  Let's examine the default ripper script:


$D:
md "$A\ripTemp"
cd "$A\ripTemp"
del $I.wav
"$A\plugins\cdda2wav.exe" -dev=$V,0 -track=$# $I
del $I.inf


Line 1:
$D:
$D is replaced, by Song Mixer, with C, the result is 'C:'
This command sets the working drive to your C drive.

Line 2:
md "$A\ripTemp"
md means Make Directory, $A is replaced by C:\Program Files\Song Mixer, the result is MD "C:\Program Files\Song Mixer\ripTemp"
NOTE: It is important to enclose directory and filenames in quotes (") because if there is a space either in the path or the filename the command will not work, unless it is enclosed within quotes.
This line creates (if it doesn't already exist) a temporary working folder to hold the .WAV file extracted from the CD.

Line 3:
cd "$A\ripTemp"
cd means Change Directory.
This line sets the current working directory to the temporary directory we created in the previous line.

Line 4:
del $I.wav
del means Delete a file.
This line will attempt to delete, if it exists, a file which may exist (but probably doesn't) from a previous attempt to rip this track.

Line 5:
"$A\plugins\cdda2wav.exe" -dev=%V,0 -track=$# $I
This is the main call to the 3rd party program, cdda2wav, to read the track from the CD and write it to a .wav file.  Notice that everything from the start to the end of the exe filename is enclosed in quotes.  The $# refers to the track number, and the $I asks cdda2wav to give it the song's unique ID number as a filename (it will add a .wav extention automatically)
The -dev=$V,0 refers to the appropriate CD-Rom device number.

Line 6:
del $I.inf
cdda2wav creates an inf file for each track it rips which contains information we don't need, so we'll delete this file to keep our filesystem from getting cluttered.


The Script - Encoder

This script is run after the ripper script, but is not run for cd audio tracks added to the Mix Disc mode, as songs in that mode are being prepared for burning onto an audio cd.


$D:
cd "$A\ripTemp"
"$A\plugins\lame.exe" -V0 $I.wav $I.mp3
del $I.wav
del "$M\$I.mp3"
move $I.mp3 "$M"


Line 1:
$D:
Again, just sets the working drive to your hard drive where Song Mixer is installed.

Line 2:
cd "$A\ripTemp"
agian, sets the working directory to the temporary directory where the previous plugin, the ripper, placed our .wav file

Line 3:
"$A\plugins\lame.exe" -V0 $I.wav $I.mp3
Calls LAME to encode the mp3 file using the wav file (the -V0 means to use the highest quality setting)

Line 4:
del $I.wav
deletes the intermediate wav file, now that it isn't needed and is probably taking up a large chunck of hard drive space.

Line 5:
del "$M\$I.mp3"
deletes a file (if any) that might be in the way of the command following this one.  If you had previously attempted to import this track then this file might be there.

Line 6:
move $I.mp3 "$M"
moves the mp3 file to the 'My Imported Music' folder


What now?

After the ripper and encoder processes are done Song Mixer will look for the song by it's id number.  For example c:\Program Files\Song Mixer\My Imported Music\1248753.mp3
if the file is there, it will be added to the appropriate list.
 
Additionally, Song Mixer will attempt to rename the file to something more appropriate than the id number, such as either the song title, or the artist name, album name, and song title, depending on the guess mode.
 
For mix discs, if the disc type is a type that uses file size modifiers, Song Mixer assumes you are burning an audio cd, and therefore all of your songs will be converted to WAV at some point by some program, therefore going through the encode to mp3 process would not only be a waste of time but would lower the quality of your music.  In this case Song Mixer will skip the mp3 encoding and import the .WAV file, moving it to your 'My Mix Disc' folder.


NOTE: If you've made a mistake and can't seem to return the scripts to working condition, deleteing the registry keys for the scripts (HKCU\Software\VB and VBA Program Settings\songMixer\plugins), and then restarting Song Mixer will cause Song Mixer to recreate the scripts.  If you don't know about registry editing, do not attempt this, one false move editing your system registry could damage other parts of your system! In that case your best bet is to copy/paste the sample scripts shown here in this help document.


CD Burning

Song Mixer is shipped without a built in CD Burning plugin, however it can be configured to use 3rd party programs such as Nero (comercial) http://www.nero.com.


Notice to users attempting to use the free CD authoring tool CDBurner XP (http://www.cdburnerxp.se):  Although this is a great CD authoring tool, and it does include a command line version, in testing we were unable to successfully burn any CDs or ISO images.  Although your results may differ depending on your system or considering future versions of CDBurner XP.


This example script should help you configure Song Mixer for use with Nero, you can use it to get an idea on how to configure Song Mixer to work with other programs as well:


Example script for AUDIO burning plugin script

"C:\Program Files\Nero 7\Core\nerocmd" --write --drivename e --real --artist $r --title $l --audio "$x\*" --close_session


Example script for DATA burning plugin script

"C:\Program Files\Nero 7\Core\nerocmd" --write --drivename e --real --title $l "$x\*" --close_session



See Also

Working with Audio CDs

The Mix Disc


Contents