SETUP:
MAR is very easy to set up:
1) Download MAR from
MAR Home Page (ony 30 kilobytes!):
OR better, use this direct link to JensRex (many thanks) mirror of it:
http://www.jensrex.net/mirror/mar.zipEAC:
2) Uncompress it under EAC's folder.
3) Set EAC Compression Options (F11) as follows:
_______ 1) Parameter passing scheme:
User Defined Encoder_______ 2) Program, including path, used for compression: (browse for)
mar.exe_______ 3) Add ID3 tag:
UNCHECKED_______ 4) Use file extension:
the file extension of the 1st format you are going to encode into_______ 5) Additional command line options:
EAC '%o' '%s' '%d' "%a" "%g" "%t" "%n" "%y" "%m"NOTE 1: %o, %s and %d are sourrounded with (') and the rest with ("). Don't ask me why, but EAC does something weird with the command line, and this is the way it works.
CDex:
2) Uncompress it under CDex's folder.
3) Set CDex Options -Settings (F4), Encoder as follows:
_______ 1) Encoder:
External Encoder_______ 2) Encoder path: (browse for)
mar.exe_______ 3) File Extension:
the file extension of the 1st format you are going to encode into_______ 4) Parameter string:
CDex "Destination_Path\%a - %b - %tn.- %t.xxx" "%1" "%2" "%a" "%b" "%t" "%tn" "%y" "%g"NOTE: CDex does not haves an option to send the full name of a track, as EACs %o option does, so you have to build it "by hand". In this case "Destination_Path\%a - %b - %tn. %t" means "Destination_Path\artis - cd name - track_number. track_name". A fake extension (for example: .xxx) is required also. Destination_Path is the fully qualified path where you want MAR to put your files (you can later use PathOverride if you need to).
4) Uncomment (remove the ";" from the from of the line) the lines you want to execute (or create your owns

).
HOW IT WORKS
After EAC/CDex finishes ripping a track, it would run MAR, passing it, on the command line, in this order:
ExecutingProgram ... FinalFileName ... Source_Filename ... Destination_Filename ... CD artist ... CD title ... Track title ... Track number ... Year ... Genre
MAR would then read the mar.ini file that must be located where mar.exe is, and for each ACTION LINE (an Action Line is any line that does not starts with a

, would replace all the LITERALS (specials strings codes that MAR recongnizes and that start and end with @) with the correct values, and would then execute the encode command.
HERE IS THE LIST OF LITERALS THAT MAR ACTUALLY RECOGNIZES AND THE VALUES THEY REPRESENT :
@program@ =[would be replaced with]=> Parameter Number 1 (should be: EAC or CDex respectivelly)
@finalname@ =[would be replaced with]=> Parameter Number 2 (should be: Encoded file Final File Name)
@source@ =[would be replaced with]=> Parameter Number 3 (should be: Source File Name)
@dest@ =[would be replaced with]=> Parameter Number 4 (should be: Destination File Name)
@artist@ =[would be replaced with]=> Parameter Number 5 (should be: CD Artist)
@cdname@ =[would be replaced with]=> Parameter Number 6 (should be: CD Title)
@songname@ =[would be replaced with]=> Parameter Number 7 (should be: Track Title)
@track@ =[would be replaced with]=> Parameter Number 8 (should be: Track number)
@year@ =[would be replaced with]=> Parameter Number 9 (should be: Year)
@genre@ =[would be replaced with]=> Parameter Number 10 (should be: Music Genre)
@11@ =[would be replaced with command line paramenter number]=> 11
..
@xx@ =[would be replaced with command line paramenter number]=> xx
@ownpath@ =[would be replaced with ]=> the full path to MAR, WITHOUT the the *ending* backslash (\) *
@fullname@ =[would be replaced with ]=> the full temporal name WITH the new extension
@pathonly@ =[would be replaced with ]=> the full temporal path, WITHOUT the *ending* backslash (\)
@nameonly@ =[would be replaced with ]=> the new temporal name, WITHOUT any extension
@extonly@ =[would be replaced with ]=> the new extension WITHOUT the dot
NOTE: It is not required to use @ownpath@, a fully qualified path name can be used instead.
As i said, the "ACTION LINES" are the actual commands MAR would run (after replacing all the LITERALS as described above). An Action Line must contain:
ExtensionOfTheEncodedFile TextBetweenFinallEncodedNameAndExtension OverridePathName CommandToRunWithParameters
- ExtensionOfTheEncodedFile:
the string that identifies the encoded files. For example, the encoder produces ogg files, this should be ogg.
- TextBetweenFinallEncodedNameAndExtension:
this string is used to add some text to the final name of the enconded file name, and file extension, for example. It is used if you want to encode with the same encode, but with diferent qualities. For example, suppose you want to encode with LAME, in Extreme and Insane qualities, the file "mana_song1.wav". EAC and MAR would try to generate two "mana_song1.MP3" files, which is not posible, so, if we define the text_between_finall_encoded_name_and_.extension of the second Action Line to be _extreme, MAR would rename this file to "mana_song1_extreme.MP3"! VERY IMPORTANT: if you don't want to add text between the file name and the file extension, put NONE, but you must include anything.
- OverridePathName:
here you can set a diferent path where MAR would put the encoded file of the specific encoder. It must be a fully qualified Path Name. Also, instead of spaces, use the _.
- CommandToRunWithParameters:
this is the real command that MAR would execute, after replacing all the LITERALS with the correspongin values.
A REAL USE EXAMPLE:
Suppose that our INI file contains this 2 Action Lines:
mp3 NONE NONE "@ownpath@\lame.exe" --alt-preset standard -Z @source@ @dest@
ogg NONE C:\Portable_Player @ownpath@\oggenc.exe --quality 5 @source@ --output=f"@dest@"
and that we are ripping the song: Emma Shapplin - Etterna - 12 - La Notte Etterna.wav
MAR would take the 1st Action Line:
mp3 NONE NONE "@ownpath@\lame.exe" --alt-preset standard -Z @source@ @dest@
convert it to:
"c:\watever\lame.exe" --alt-preset standard -Z c:\xxx\abreviated_song_name.wav c:\xxx\abreviated_song_name.mp3
and then execute it.
Then, it would take the Action Line:
ogg NONE C:\Portable_Player @ownpath@\oggenc.exe --quality 5 @source@ --output=f"@dest@"
convert it to:
"c:\watever\oggenc.exe" --quality 5 c:\xxx\abreviated_song_name.wav --output=f"c:\xxx\abreviated_song_name.ogg"
At this point, he would rename the file:
c:\xxx\abreviated_song_name.ogg
to
C:\Portable Player\Emma Shapplin - Etterna - 12 - La Notte Etterna.OGG.
Note how MAR used the "C:\Portable_Player" string on the Action Line to override the original destination Path.
MAR would then terminate, and pass control back to EAC/CDex, who, in turn, would rename c:\xxx\abreviated_song_name.mp3 to Emma Shapplin - Etterna - 12 - La Notte Etterna.MP3.
INI FILE:
On the INI file, i have put settings for Ogg Vorbis, LAME MP3 and MPC for practicall and exemplary use.
TESTING:
MAR has been developed and tested under Windows 2000. I would really appretiate confirmation that it runs on XP, NT, 95, 98, ME.
MAR Home Page