Difference between revisions of "REACT"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
m (Removed a dead link.)
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
REACT ('''R'''un '''EAC''' '''T'''asks) can be used in conjunction with [[Exact Audio Copy]] (EAC), as an external compressor.
 
REACT ('''R'''un '''EAC''' '''T'''asks) can be used in conjunction with [[Exact Audio Copy]] (EAC), as an external compressor.
  
It is, however, not an encoder, but an interim application that provides a scripting facility to call muliple encoders or pre-/post-encoding applications to process the [[WAV|WAVE]] files created by [[Exact Audio Copy|EAC]], or the files created by the script itself.  '''In short''', REACT allows you to run multiple tasks on the audio extracted, instead of only one.
+
It is, however, not an encoder, but an interim application that provides a scripting facility to call multiple encoders or pre-/post-encoding applications to process the [[WAV|WAVE]] files created by [[Exact Audio Copy|EAC]], or the files created by the script itself.  '''In short''', REACT allows you to run multiple tasks on the audio extracted, instead of only one.
 +
 
 +
'''REACT is designed to work only with whole album extraction/ripping.'''
  
 
REACT integrates with [[Exact Audio Copy]], adding some hotkeys combinations to access often used functions more quickly.  It will also alter the default name for image files according to your INI settings, and close the extraction dialogue in order for the logfile to be created and used from within your script.  It can auto-configure [[Exact Audio Copy|EAC]], updating the external compression options so that [[Exact Audio Copy|EAC]] is ready to run REACT immediately.  This feature is extremely useful for novice users.
 
REACT integrates with [[Exact Audio Copy]], adding some hotkeys combinations to access often used functions more quickly.  It will also alter the default name for image files according to your INI settings, and close the extraction dialogue in order for the logfile to be created and used from within your script.  It can auto-configure [[Exact Audio Copy|EAC]], updating the external compression options so that [[Exact Audio Copy|EAC]] is ready to run REACT immediately.  This feature is extremely useful for novice users.
Line 7: Line 9:
 
REACT is configured using an INI file and config files.  The commands used within the config files are command line/DOS commands, with the addition of numerous variables which REACT makes available.  For example, any instance of '''@artist@''' in the script will be replaced by the [[freedb]] artist name, while '''$artist$''' will be replaced with a ''filename-friendly'' version of the artist name (with illegal characters replaced according to your requirements).
 
REACT is configured using an INI file and config files.  The commands used within the config files are command line/DOS commands, with the addition of numerous variables which REACT makes available.  For example, any instance of '''@artist@''' in the script will be replaced by the [[freedb]] artist name, while '''$artist$''' will be replaced with a ''filename-friendly'' version of the artist name (with illegal characters replaced according to your requirements).
  
 +
'''From REACT v2.0 Final, most configuration can be done by editing the INI file only'''. Only advanced users should edit the .cfg files.
 +
 +
REACT v2.0 as published does not currently work with EAC 0.99 prebeta 1-4 due to a naming scheme mismatch between old and new EAC versions. This has been solved in [[REACT:Mods#Synthetic_Soul.27s_Mod|Synthetic Soul's Mod]] or [[REACT:Mods#Akkurat.27s_Mod|Akkurat's Mod]] of REACT. Using EAC 0.99 prebeta 5 is only supported by [[REACT:Mods#Akkurat.27s_Mod|Akkurat's Mod]]. The mods have also fixed a number of known bugs and introduced new features. Before using a mod, install the original REACT 2.0 (download links at the bottom of this page).
  
=Hotkeys=
+
==Hotkeys==
  
 
REACT adds a few useful hotkeys to EAC:
 
REACT adds a few useful hotkeys to EAC:
Line 20: Line 25:
 
| Ctrl-F2 || Configure EAC to be used with REACT.
 
| Ctrl-F2 || Configure EAC to be used with REACT.
 
|-
 
|-
| Alt-F2 || Open REACT.ini in notepad.
+
| Alt-F2 || Edit REACT.ini in notepad.
 
|-
 
|-
| Alt-F3 || Browse Config files directory.
+
| Alt-F3 || Edit REACT-image.cfg in notepad.
 
|-
 
|-
| F4 || Copy selected tracks. This activates the function Shift-F5 in EAC by default. You may edit REACT.ini and set TracksHotVal=+{F6} if you want to do Test & Copy instead of Copy only. If the INI key SaveTracksCuesheets=1, all four cuesheet types are saved as different files as well.
+
| F4 || Activates Shift-F5 in EAC (Copy selected tracks - Compressed). Optionally, it also starts CoverDownloader\albumart. You may edit REACT.ini and set TracksHotVal=+{F6} if you want to do Test & Copy instead of Copy only. If the INI key CreateAllCuesheets=1, all four cuesheet types are saved as different files as well.
 
|-
 
|-
 
| F10 || Shortcut to menu "Action - Copy Image and Save CUE Sheet - Compressed...". REACT will fill in the image name, as defined in the ImageNaming INI key (template). REACT will also close the Save Wavform dialog automatically if you have configured EAC to extract to a fixed directory.
 
| F10 || Shortcut to menu "Action - Copy Image and Save CUE Sheet - Compressed...". REACT will fill in the image name, as defined in the ImageNaming INI key (template). REACT will also close the Save Wavform dialog automatically if you have configured EAC to extract to a fixed directory.
 +
|-
 
|}
 
|}
  
 +
==Configuration Files==
  
=Available Variables=
+
There are three configuration files in total; The INI file, one CFG file for copying to audio track files, and one for copying to an audio image with cuesheet. The config files are stored in the REACT folder, and are named:
 +
 
 +
{| border="0" cellpadding="0" cellspacing="4"
 +
! style=padding-right:24px;| File || Description
 +
|-
 +
| REACT.ini || Regular INI file with key=values pairs. Defines variables used by the CFG files.
 +
|-
 +
| REACT-tracks.cfg || - Used for "Copy Selected Tracks Compressed", default shortcut : F4
 +
|-
 +
| REACT-image.cfg || - Used for "Copy Image & Create CUE Sheet Compressed", default shortcut : F10
 +
|-
 +
|}
 +
 
 +
==The REACT.INI File==
 +
There are four sections in the REACT.ini file. The first [Settings] section has global definitions that REACT uses. The next three [User...] sections have keys that are simply passed through to the .cfg configurations files. I.e. any KEY=VALUE defines a variable @KEY@ which gets expanded to VALUE in the .cfg files.
 +
 
 +
Note that you may add arbitrary keys to the [User...] sections, and they will expand to their values when used as variables in the .cfg files.
 +
 
 +
===Settings Section===
 +
 
 +
The first section in the INI file sets some global keys, which can be used in any or all encoder configs.  These variables refer to high level settings, like the path to [[Exact Audio Copy|EAC]], rather than encoder-specific settings. Here is an example:
 +
<pre>
 +
[Settings]
 +
Version=2.0
 +
ImageExt=flac
 +
ImageNaming=$artist$ - [$year$] $album$
 +
ImageHotKey={F10}
 +
TracksHotKey={F4}
 +
TracksHotVal=+{F5}
 +
VA=Various Artists
 +
CreateAllCuesheets=0
 +
RunCoverDownloader=1
 +
CoverDownloader=C:\Program Files\REACT2\coverdownloader\albumart.exe
 +
EAC=C:\Program Files\Exact Audio Copy\EAC.exe
 +
MinimizeCompressionWindow=1
 +
ProcessPriority=1
 +
Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt=-|-|-||!|'|#|[|]
 +
</pre>
 +
 
 +
Some of the keys are obvious, and some you really don't need to bother with unless you are a REACT Ninja, but here's a few to watch out for:
  
 
{| border="0" cellpadding="0" cellspacing="4"
 
{| border="0" cellpadding="0" cellspacing="4"
 
! style=padding-right:24px;| Variable || Description
 
! style=padding-right:24px;| Variable || Description
 
|-
 
|-
| '''PATHS''' ||  
+
| ImageExt || Copy Image mode only (F10). The format extension for the compressed image file + cuefile. E.g. flac, wv, or mp3. Set to wav when no compressed image is desired.
 
|-
 
|-
| @reactdir@ || The path to the directory in which REACT resides
+
| ImageNaming || This variable detirmines how image files, and their cuesheets, will be named when REACT is used in copy image mode.  Variables available are: $album$; $artist$; $year$; $genre$; and $freedb$.  These are populated from the values of EAC's textboxes, and therefore do not strictly relate to the extended variables available within your config.<br />'''Please note:''' Your scheme ''must'' begin "$artist$ -" in order for Various Artists discs to be recognised properly.
 
|-
 
|-
| @encdir@ || The path to the directory in which the encoders reside. Set within the INI file
+
| VA || Default set to 'Various Artists'. The variable @va@ holds this string. See @cdartist@ below for further details.
 
|-
 
|-
| @mydocumentsdir@ || The path to your My Documents folder
+
| CreateAllCuesheets || If set to 1, all four availabe types of cuesheets will be saved to the extraction directory, which must be preconfigured in EAC. The cuesheet base name can be accessed using the @albumfile@ variable.
 
|-
 
|-
| @musicdir@ || The path to your music folder. Set within the INI file. Used as a root for other paths
+
| RunCoverDownloader || If set to 1, run the albumart.exe application. Simply double click the cover you want (select close after save in settings in albumart). In Copy Tracks mode, albumart will wait until it is closed before starting copying. You may set RunCoverDownloader=2 to make it wait in both modes, 3 to wait only in Image Copy mode, or 4 to never wait.
 
|-
 
|-
| @sourcedir@ || The path to the folder in which the source files are located ([[WAV]]/LOG/CUE)
+
| Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt || Some characters cannot be used in file or folder names.  This variable allows you to specify what these characters should be replaced with.  Slash; Backslash; Colon; Question Mark; Bar (Pipe); Quotes; Asterisk; Less Than; Greater Than. It is also possible to convert Space to e.g. _ by appending a Bar and a _ (after the Gt convert character).
 +
|}
 +
 
 +
===UserTrackFormat Section===
 +
This section enables/disables output audio formats to be created.
 +
 
 +
===UserOutputNames Section===
 +
Here the track names and the output paths are defined for the different output audio formats.
 +
OutRoot is the common directory used under many file naming schemes. Individual directories and naming schemes for each format are set with respective ImageDir_Flac, TrackDir_AAC, etc. When saving formats to different drives OutRoot must be replaced with address spelled out. <br>
 +
Different naming schemes are available for Various Artist CDs. see variable options under METADATA<br>
 +
TrackName_NA - file naming for single artist <br>
 +
TrackName_VA - file naming for various artist<br>
 +
TrackName_SA_acdir=$n - $~t - ACDIR is used when ripping an image and splitting it into tracks. It will be passing [http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=35158&view=findpost&p=327260 EAC variables] directly through. The tilde [http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html replaces illegal filename characters with a space].<br><br>
 +
 
 +
File naming schemes are largely up to personal usage and preference but some examples are<br>
 +
[http://www.hydrogenaudio.org/forums/index.php?showtopic=956 example 1]
 +
[http://www.hydrogenaudio.org/forums/index.php?showtopic=47558 example 2]
 +
[http://www.hydrogenaudio.org/forums/index.php?showtopic=31698 example 3]
 +
 
 +
===UserSettings Section===
 +
Set various variables for more detailed configuration.
 +
{| border="0" cellpadding="0" cellspacing="4"
 +
! style=padding-right:24px;| Variable || Description
 
|-
 
|-
| @basename@ || The name of the file being created, excluding extension
+
| Debug || If you are having problems with your config file setup, set this value to 1.  REACT will then pause before exiting, so you can examine the console output to attempt to determine where your process fell down.
 
|-
 
|-
| @removabledriveN@ || The path to your removable drive number N. Set within the INI file
+
| Comment || Override the default @comment@ variable (taken from EAC)
 
|-
 
|-
| @destdirN@ || Directory path N used within your script. Set within the INI file
+
| EmbedCover || Select if you want your cover pictures embeded into the audio files, or only copied to the target directory as 'folder.jpg'.
 
|-
 
|-
| @destN@ || File path N, used within your script. Set within a config file
+
| ReplayGain || Enable/Disable ReplayGain calculation and tagging.
 
|-
 
|-
| @Various-destN@ || The file path to use if it is a Various Artists CD. Set within a config file
+
| ApplyAlbumGain || Apply the album gain to the files, so they are played back with a consistent volume across the albums on every player.
 +
|-
 +
| AdjustAlbumGain_dB || If you want to adjust the album gain from 89.0 dB when applying to the audio, set adjustment in dB here.
 +
|-
 +
| AddCuesheetAG || Add Album gain/Album peak values to the cuesheet as REM lines. This implies that WaveGain is ran.
 +
|-
 +
| UseWaveGainAG || Instruct to use WaveGain to calculate AlbumGain values on the wav image file. The values will be transferred to the various compressed formats, rather than calculating them via other tools. If ApplyAlbumGain=1, LAME and OggEnc2 will use the --scale option to apply the album gain scale factor calculated by WaveGain.
 +
|-
 +
| Opt_... || Variables that defines options for each encoder used.
 +
|-
 +
| Ver_... || Variables that defines the version number for each encoder used.
 +
|}
 +
 
 +
==Editing the CFG files (advanced)==
 +
Because most of the configuration settings are moved to the INI file, it is seldom required to modify the .cfg files. Only advanced users that knows DOS scripting well should attempt to make significant changes. Following are the replacement variables available (excluding those defined in the [User...] sections of the INI file):
 +
 
 +
{| border="0" cellpadding="0" cellspacing="4"
 +
! style=padding-right:24px;| Variable || Description
 +
|-
 +
| '''PATHS AND FILES''' ||
 +
|-
 +
| @reactdir@ || The path to the directory in which REACT resides
 +
|-
 +
| @tools@ || The path to the directory in which the encoders reside. Set within the INI file
 +
|-
 +
| @mymusic@ || The path to your 'My Music' folder
 +
|-
 +
| @sourcedir@ || The path to the folder in which the copied source files are located ([[WAV]]/LOG/CUE)
 +
|-
 +
| @basename@ || The name of the file being created, excluding folders and extension
 
|-
 
|-
 
| @source@ || The path to the temporary source [[WAV|WAVE]] file
 
| @source@ || The path to the temporary source [[WAV|WAVE]] file
 
|-
 
|-
 
| @image@ || The path to the final image file, when used in '''Copy Image''' mode
 
| @image@ || The path to the final image file, when used in '''Copy Image''' mode
 +
|-
 +
| @imageext@ || The extension of the compressed target image, e.g. flac
 
|-
 
|-
 
| @sourcecuesheet@ || The path to the (temporary) source [[Cuesheet|cuesheet]], when used in '''Copy Image''' mode
 
| @sourcecuesheet@ || The path to the (temporary) source [[Cuesheet|cuesheet]], when used in '''Copy Image''' mode
Line 67: Line 166:
 
| @eaclog@ || The path to the log file created by [[Exact Audio Copy|EAC]]
 
| @eaclog@ || The path to the log file created by [[Exact Audio Copy|EAC]]
 
|-
 
|-
| @trackscuesheet@ || (from v0.999) The path to the cuesheet files without extension, created by [[Exact Audio Copy|EAC]] when hitting F4 and SaveTracksCuesheets=1 in the INI file. E.g, "@trackscuesheet@.[mg].cue" is the multiple wav files cuesheet with gaps.  
+
| @cover@ || The path to the cover/album art picture file, dowloaded with CoverDownloader.
 +
|-
 +
| @albumfile@ || The base path to the cuesheet files without extension, created when CreateAllCuesheets=1 in the INI file. E.g, "@albumfile@.[mg].cue" is the multiple wav files cuesheet with gaps.  
 
|-
 
|-
 
|  ||  
 
|  ||  
Line 73: Line 174:
 
| '''METADATA''' ||  
 
| '''METADATA''' ||  
 
|-
 
|-
| @cdartist@ || The name of the CD artist. Use $cdartist$ in paths
+
| @cdartist@ || The name of the CD artist. If @various@=1 @cdartist@ equals the variable @va@, otherwise @artist@. Use $cdartist$ in file paths
 
|-
 
|-
 
| @artist@ || The name of the track artist.  Use $artist$ in paths
 
| @artist@ || The name of the track artist.  Use $artist$ in paths
Line 83: Line 184:
 
| @track@ || The track number. Use $track$ to zero-pad the track number, i.e.: turn 9 into 09  
 
| @track@ || The track number. Use $track$ to zero-pad the track number, i.e.: turn 9 into 09  
 
|-
 
|-
| @numtracks@ || The total number of tracks
+
| @numtracks@ || The total number of tracks. Use $numtracks$ to zero-pad the number
|-
+
| @islast@ || Whether the current track is the last, for track mode
+
 
|-
 
|-
 
| @genre@ || The album genre.  Use $genre$ in paths
 
| @genre@ || The album genre.  Use $genre$ in paths
Line 98: Line 197:
 
|-
 
|-
 
| '''OTHER''' ||  
 
| '''OTHER''' ||  
 +
|-
 +
| @various@ || Is 1 if the EAC 'Various' checkbox was checked. Otherwise 0
 +
|-
 +
| @va@ || The name of VariousArtist. Default 'Various Artists'.
 
|-
 
|-
 
| @crc@ || The [[CRC]] of the file
 
| @crc@ || The [[CRC]] of the file
Line 107: Line 210:
  
  
=Global INI Keys=
+
==Links==
 
+
The first section of the REACT INI sets some global keys, which can be used in any or all encoder configs.  These variables refer to high level settings, like the path to [[Exact Audio Copy|EAC]], rather than encoder-specific settings.
+
 
+
Here is an example:
+
 
+
<pre>
+
[Settings]
+
Config=FLAC
+
Version=1.0
+
EAC=C:\Program Files\Exact Audio Copy\EAC.exe
+
musicdir=C:\My Music
+
encdir=C:\Program Files\REACT\Encoders
+
LogFile=
+
CodePage=1252
+
MinimizeCompressionWindow=1
+
ProcessPriority=1
+
TracksHotKey={F4}
+
TracksHotVal=+{F5}
+
SaveTracksCuesheets=0
+
ImageHotKey={F10}
+
ImageNaming=$artist$ - ($year$) $album$
+
Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt=-|-|-||!|'|#|[|]
+
Debug=0
+
</pre>
+
 
+
==A Few Of The Important INI Keys==
+
 
+
Some of the keys are obvious, and some you really don't need to bother with unless you are a REACT Ninja, but here's a few to watch out for:
+
 
+
{| border="0" cellpadding="0" cellspacing="4"
+
! style=padding-right:24px;| Variable || Description
+
|-
+
| Config || The encoder config file that REACT should process in the Config folder.
+
|-
+
| musicdir || The root directory for all your music.  If you are encoding to "C:\My Music\WavPack" and "C:\My Music\MP3" then you can set musicdir to "C:\My Music" and use this variable when setting your @destdirN@ variables.  this helps maintain clarity within your INI file.
+
|-
+
| encdir || REACT installs many encoders in a folder called "Encoders".  Again, this variable can be used when referencing these applications, to maintain clarity.
+
|-
+
| LogFile || If you set a value to this variable a REACT log will be created with that name, e.g.: react.txt.  If left blank no log will be written.  This does not affect [[Exact Audio Copy|EAC]]'s log file.
+
|-
+
| SaveTracksCuesheets || If set to 1, all four availabe types of cuesheets will be saved to the extraction directory, which must be preconfigured in EAC. This only happens when pressing F4, or whatever the key TracksHotkey is set to. The cuesheet base name can be accessed using the @trackscuesheet@ variable.
+
|-
+
| ImageNaming || This variable detirmines how image files, and their cuesheets, will be named when REACT is used in image mode.  You can use meta data variables here, e.g.: "$artist$ - $album$" to name the image using the artist and album name (filename-friendly values).
+
|-
+
| Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt || Some characters cannot be used in file or folder names.  This variable allows you to specify what these characters should be replaced with.  Slash; Backslash; Colon; Question Mark; Bar (Pipe); Quotes; Asterisk; Less Than; Greater Than. It is also possible to convert Space to e.g. _ by appending a Bar and a _ (after the Gt convert character).
+
|-
+
| Debug || If you are having problems with your config file setup, set this value to 1.  REACT will then pause before exiting, so you can examine the console output to attempt to determine where your process fell down.
+
|}
+
 
+
 
+
=The Encoder Config Files=
+
 
+
The initial REACT INI contains a global settings section. This contains a key named Config=<ENCODER> which refers to configuration files in the Config folder.  There are two config files for each encoding; one for ripping to track files, and one for ripping to an image with cuesheet.
+
 
+
The config files are stored in <REACT dir>\Config folder, and are named:
+
 
+
<ENCODER>-tracks.txt
+
 
+
<ENCODER>-image.txt
+
 
+
The first part, '''ENCODER''', is simply a unique name which indentifies the encoder tasks; however it makes sense to use the name of the encoder being used, like "FLAC" or "WAVPACK".  This part of the section header is referred to by the global variable, '''[[REACT#A_Few_Of_The_Important_Ones|Config]]'''.
+
 
+
The second part (tracks or image) describes whether to perform when ripping to '''tracks''', or to an '''image'''.
+
 
+
The encoder section consists of two parts:
+
 
+
==Variable Initialisation==
+
 
+
In the beginning of each config file you can set some variables.
+
 
+
{| border="0" cellpadding="0" cellspacing="4"
+
! style=padding-right:24px;| Variable || Description
+
|-
+
| !Description || A description of the processes within the section.
+
|-
+
| !ImageExt || The file extension of the image file, e.g.: "wv".  Image sections only.
+
|-
+
| !CuesheetExt || The extension given to the cuesheet by [[Exact Audio Copy|EAC]], e.g.: ".wv.cue".  Image sections only.
+
|-
+
|!WaveGainAnalysis || Set to 1 to enable a pre-run WaveGain analysis. Makes variables @gain@, @peak@ and @scale@ available for config scripts.
+
|}
+
 
+
It is likely that you will also need to set file and folder path variables, like @destN@ and @destdirN@. E.g.:
+
 
+
<pre>destdir1=@musicdir@\FLAC\$cdartist$\($year$) $album$
+
dest1=@destdir1@\$track$ - $title$</pre>
+
 
+
The above will set the folder path @destdir1@ using the global variable @musicdir@, and artist, year and album meta data.  It then sets the file path @dest1@ using @destdir1@ and the track and title meta data.  So, considering the following values for those variables:
+
 
+
{| border="0" cellpadding="0" cellspacing="4"
+
! style=padding-right:24px;| Variable || Description
+
|-
+
| musicdir|| C:\My Music
+
|-
+
| albumartist|| Ben Folds Five
+
|-
+
| album|| Whatever and Ever Amen
+
|-
+
| year|| 2000
+
|-
+
| track|| 03
+
|-
+
| title|| Brick
+
|}
+
 
+
... we end up with:
+
 
+
<pre>destdir1=C:\My Music\FLAC\Ben Folds Five\(2000) Whatever and Ever Amen
+
dest1=C:\My Music\FLAC\Ben Folds Five\(2000) Whatever and Ever Amen\03 - Brick</pre>
+
 
+
Obviously the values of $track$ and $title$ will change per track.  Remember, $track$ will zero-pad the track number.
+
 
+
==Config Tasks==
+
 
+
Each line '''not''' starting with a "!" will be part of the config task script.
+
 
+
The task script is simply a list of command line statements, utilising the variables that REACT exposes within the code.
+
 
+
As an example, here is the default MP3-tracks.txt file.  Notice that all REACT variables are surrounded by two ampersands (@), or two dollar signs ($); all other code is standard DOS command line syntax.  With this in mind you will find working with REACT a lot easier if you are happy executing applications from the command line, more so if you have an understanding of batch files or command line scripting (what I think of as 'DOS scripts').
+
 
+
MP3-tracks.txt:
+
<pre>!Description=LAME -V2 mp3 track files, RG album gain, APE2 and id3v1 tags
+
 
+
!destdir1=@musicdir@\MP3\$cdartist$\($year$) $album$
+
!dest1=@destdir1@\$track$ - $title$
+
!Various-dest1=@destdir1@\$track$ - $title$ ($artist$)
+
 
+
echo.> "@dest1@.mp3.tmp"
+
@encdir@\Tag.exe --nocheck --ape2 -t "ARTIST=@artist@" -t "ALBUM=@album@" -t "TRACK=@track@" -t "TITLE=@title@" -t "YEAR=@year@" -t "GENRE=@genre@" -t "TOTALTRACKS=@numtracks@" -t "FREEDB=@freedbid@" -t "CRC=@crc@" "@dest1@.mp3.tmp"
+
move "@source@" "@dest1@.wav"
+
 
+
if @islast@==1 (
+
  move "@eaclog@" "@destdir1@\eaclog.txt"
+
  move "@trackscuesheet@.[*].cue" "@destdir1@"
+
  start @encdir@\albumart.exe "@artist@" "@album@" "@destdir1@\cover.jpg"
+
  cd /d "@destdir1@"
+
  @encdir@\WaveGain.exe -a *.wav --exec @encdir@\lame.exe -V2 --vbr-new --scale %%ALBUM_SCALE%% --tc "AG appl:%%ALBUM_GAIN%%,TG:%%TRACK_GAIN%% dB" "%%INPUT_NAME%%.wav" "%%INPUT_NAME%%.mp3"
+
  for %%i in (*.mp3) do @encdir@\Tag.exe --force id3v1 --force ape2 --fromfile "%%i.tmp" "%%i"
+
  del "*.mp3.tmp" "*.wav"
+
)</pre>
+
  
 +
Ask REACT questions in this thread : http://www.hydrogenaudio.org/forums/index.php?showtopic=50273
  
=Links=
+
Download REACT from this thread : http://www.hydrogenaudio.org/forums/index.php?showtopic=50259
  
Ask REACT questions in this thread : http://www.hydrogenaudio.org/forums/index.php?showtopic=35158
+
Download [[User:Synthetic Soul|Synthetic Soul's]] or [http://www.hydrogenaudio.org/forums/index.php?showuser=48750 Akkurat's] mod (for EAC 0.99 support and more) from this page : [[REACT:Mods]]
  
Download REACT from this thread : http://www.hydrogenaudio.org/forums/index.php?showtopic=36261
+
[[Category:CD ripping]]

Latest revision as of 23:27, 27 April 2011

REACT (Run EAC Tasks) can be used in conjunction with Exact Audio Copy (EAC), as an external compressor.

It is, however, not an encoder, but an interim application that provides a scripting facility to call multiple encoders or pre-/post-encoding applications to process the WAVE files created by EAC, or the files created by the script itself. In short, REACT allows you to run multiple tasks on the audio extracted, instead of only one.

REACT is designed to work only with whole album extraction/ripping.

REACT integrates with Exact Audio Copy, adding some hotkeys combinations to access often used functions more quickly. It will also alter the default name for image files according to your INI settings, and close the extraction dialogue in order for the logfile to be created and used from within your script. It can auto-configure EAC, updating the external compression options so that EAC is ready to run REACT immediately. This feature is extremely useful for novice users.

REACT is configured using an INI file and config files. The commands used within the config files are command line/DOS commands, with the addition of numerous variables which REACT makes available. For example, any instance of @artist@ in the script will be replaced by the freedb artist name, while $artist$ will be replaced with a filename-friendly version of the artist name (with illegal characters replaced according to your requirements).

From REACT v2.0 Final, most configuration can be done by editing the INI file only. Only advanced users should edit the .cfg files.

REACT v2.0 as published does not currently work with EAC 0.99 prebeta 1-4 due to a naming scheme mismatch between old and new EAC versions. This has been solved in Synthetic Soul's Mod or Akkurat's Mod of REACT. Using EAC 0.99 prebeta 5 is only supported by Akkurat's Mod. The mods have also fixed a number of known bugs and introduced new features. Before using a mod, install the original REACT 2.0 (download links at the bottom of this page).

Hotkeys

REACT adds a few useful hotkeys to EAC:

Key Function
F1 Wiki page for EAC.
Alt-F1 Wiki page for REACT (this page).
Ctrl-F2 Configure EAC to be used with REACT.
Alt-F2 Edit REACT.ini in notepad.
Alt-F3 Edit REACT-image.cfg in notepad.
F4 Activates Shift-F5 in EAC (Copy selected tracks - Compressed). Optionally, it also starts CoverDownloader\albumart. You may edit REACT.ini and set TracksHotVal=+{F6} if you want to do Test & Copy instead of Copy only. If the INI key CreateAllCuesheets=1, all four cuesheet types are saved as different files as well.
F10 Shortcut to menu "Action - Copy Image and Save CUE Sheet - Compressed...". REACT will fill in the image name, as defined in the ImageNaming INI key (template). REACT will also close the Save Wavform dialog automatically if you have configured EAC to extract to a fixed directory.

Configuration Files

There are three configuration files in total; The INI file, one CFG file for copying to audio track files, and one for copying to an audio image with cuesheet. The config files are stored in the REACT folder, and are named:

File Description
REACT.ini Regular INI file with key=values pairs. Defines variables used by the CFG files.
REACT-tracks.cfg - Used for "Copy Selected Tracks Compressed", default shortcut : F4
REACT-image.cfg - Used for "Copy Image & Create CUE Sheet Compressed", default shortcut : F10

The REACT.INI File

There are four sections in the REACT.ini file. The first [Settings] section has global definitions that REACT uses. The next three [User...] sections have keys that are simply passed through to the .cfg configurations files. I.e. any KEY=VALUE defines a variable @KEY@ which gets expanded to VALUE in the .cfg files.

Note that you may add arbitrary keys to the [User...] sections, and they will expand to their values when used as variables in the .cfg files.

Settings Section

The first section in the INI file sets some global keys, which can be used in any or all encoder configs. These variables refer to high level settings, like the path to EAC, rather than encoder-specific settings. Here is an example:

[Settings]
Version=2.0
ImageExt=flac
ImageNaming=$artist$ - [$year$] $album$
ImageHotKey={F10}
TracksHotKey={F4}
TracksHotVal=+{F5}
VA=Various Artists
CreateAllCuesheets=0
RunCoverDownloader=1
CoverDownloader=C:\Program Files\REACT2\coverdownloader\albumart.exe
EAC=C:\Program Files\Exact Audio Copy\EAC.exe
MinimizeCompressionWindow=1
ProcessPriority=1
Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt=-|-|-||!|'|#|[|]

Some of the keys are obvious, and some you really don't need to bother with unless you are a REACT Ninja, but here's a few to watch out for:

Variable Description
ImageExt Copy Image mode only (F10). The format extension for the compressed image file + cuefile. E.g. flac, wv, or mp3. Set to wav when no compressed image is desired.
ImageNaming This variable detirmines how image files, and their cuesheets, will be named when REACT is used in copy image mode. Variables available are: $album$; $artist$; $year$; $genre$; and $freedb$. These are populated from the values of EAC's textboxes, and therefore do not strictly relate to the extended variables available within your config.
Please note: Your scheme must begin "$artist$ -" in order for Various Artists discs to be recognised properly.
VA Default set to 'Various Artists'. The variable @va@ holds this string. See @cdartist@ below for further details.
CreateAllCuesheets If set to 1, all four availabe types of cuesheets will be saved to the extraction directory, which must be preconfigured in EAC. The cuesheet base name can be accessed using the @albumfile@ variable.
RunCoverDownloader If set to 1, run the albumart.exe application. Simply double click the cover you want (select close after save in settings in albumart). In Copy Tracks mode, albumart will wait until it is closed before starting copying. You may set RunCoverDownloader=2 to make it wait in both modes, 3 to wait only in Image Copy mode, or 4 to never wait.
Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt Some characters cannot be used in file or folder names. This variable allows you to specify what these characters should be replaced with. Slash; Backslash; Colon; Question Mark; Bar (Pipe); Quotes; Asterisk; Less Than; Greater Than. It is also possible to convert Space to e.g. _ by appending a Bar and a _ (after the Gt convert character).

UserTrackFormat Section

This section enables/disables output audio formats to be created.

UserOutputNames Section

Here the track names and the output paths are defined for the different output audio formats. OutRoot is the common directory used under many file naming schemes. Individual directories and naming schemes for each format are set with respective ImageDir_Flac, TrackDir_AAC, etc. When saving formats to different drives OutRoot must be replaced with address spelled out.
Different naming schemes are available for Various Artist CDs. see variable options under METADATA
TrackName_NA - file naming for single artist
TrackName_VA - file naming for various artist
TrackName_SA_acdir=$n - $~t - ACDIR is used when ripping an image and splitting it into tracks. It will be passing EAC variables directly through. The tilde replaces illegal filename characters with a space.

File naming schemes are largely up to personal usage and preference but some examples are
example 1 example 2 example 3

UserSettings Section

Set various variables for more detailed configuration.

Variable Description
Debug If you are having problems with your config file setup, set this value to 1. REACT will then pause before exiting, so you can examine the console output to attempt to determine where your process fell down.
Comment Override the default @comment@ variable (taken from EAC)
EmbedCover Select if you want your cover pictures embeded into the audio files, or only copied to the target directory as 'folder.jpg'.
ReplayGain Enable/Disable ReplayGain calculation and tagging.
ApplyAlbumGain Apply the album gain to the files, so they are played back with a consistent volume across the albums on every player.
AdjustAlbumGain_dB If you want to adjust the album gain from 89.0 dB when applying to the audio, set adjustment in dB here.
AddCuesheetAG Add Album gain/Album peak values to the cuesheet as REM lines. This implies that WaveGain is ran.
UseWaveGainAG Instruct to use WaveGain to calculate AlbumGain values on the wav image file. The values will be transferred to the various compressed formats, rather than calculating them via other tools. If ApplyAlbumGain=1, LAME and OggEnc2 will use the --scale option to apply the album gain scale factor calculated by WaveGain.
Opt_... Variables that defines options for each encoder used.
Ver_... Variables that defines the version number for each encoder used.

Editing the CFG files (advanced)

Because most of the configuration settings are moved to the INI file, it is seldom required to modify the .cfg files. Only advanced users that knows DOS scripting well should attempt to make significant changes. Following are the replacement variables available (excluding those defined in the [User...] sections of the INI file):

Variable Description
PATHS AND FILES
@reactdir@ The path to the directory in which REACT resides
@tools@ The path to the directory in which the encoders reside. Set within the INI file
@mymusic@ The path to your 'My Music' folder
@sourcedir@ The path to the folder in which the copied source files are located (WAV/LOG/CUE)
@basename@ The name of the file being created, excluding folders and extension
@source@ The path to the temporary source WAVE file
@image@ The path to the final image file, when used in Copy Image mode
@imageext@ The extension of the compressed target image, e.g. flac
@sourcecuesheet@ The path to the (temporary) source cuesheet, when used in Copy Image mode
@cuesheet@ The path to the final cuesheet, when used in Copy Image mode
@eaclog@ The path to the log file created by EAC
@cover@ The path to the cover/album art picture file, dowloaded with CoverDownloader.
@albumfile@ The base path to the cuesheet files without extension, created when CreateAllCuesheets=1 in the INI file. E.g, "@albumfile@.[mg].cue" is the multiple wav files cuesheet with gaps.
METADATA
@cdartist@ The name of the CD artist. If @various@=1 @cdartist@ equals the variable @va@, otherwise @artist@. Use $cdartist$ in file paths
@artist@ The name of the track artist. Use $artist$ in paths
@album@ The name of the album. Use $album$ in paths
@title@ The song title. Use $title$ in paths
@track@ The track number. Use $track$ to zero-pad the track number, i.e.: turn 9 into 09
@numtracks@ The total number of tracks. Use $numtracks$ to zero-pad the number
@genre@ The album genre. Use $genre$ in paths
@year@ The album year
@comment@ The comment. Use $comment$ in paths
@freedbid@ The freedb ID
OTHER
@various@ Is 1 if the EAC 'Various' checkbox was checked. Otherwise 0
@va@ The name of VariousArtist. Default 'Various Artists'.
@crc@ The CRC of the file
@bitrate@ The value of the Bitrate dropdown on EAC's External Compressor dialogue
@curdate@ The current date


Links

Ask REACT questions in this thread : http://www.hydrogenaudio.org/forums/index.php?showtopic=50273

Download REACT from this thread : http://www.hydrogenaudio.org/forums/index.php?showtopic=50259

Download Synthetic Soul's or Akkurat's mod (for EAC 0.99 support and more) from this page : REACT:Mods