Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: REACT 2 Released (Read 1273709 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

REACT 2 Released

Reply #825
Sorry if you're really going to start hating me here, I do have another question sad.gif. in the official version of react, I could set the @outroot@ variable to something like %userprofile%\desktop\ripped and when it was written to the batchfile, @outroot@ would literally be %userprofile%\desktop\ripped so when it was actually processed windows would pick up the variable. In your modified version, I'm finding it's getting written as %%userprofile%% -- is this a symptom of escaping illegal characters? if so, can I ... unescape them somehow?
You are correct, this was to resolve other issues.  I can't think of a workaround, but I will think some more on it.
I think it's safe if I don't escape values in [UserOutputNames].  In 2.0.ssb16k I will risk leaving that section unescaped, so you can continue to use %USERPROFILE%.  I think it makes sense using Window's tokens there, and wouldn't want to stop you doing so.  If a user has problems with a folder name there they will simply have to manually escape the value - at least it is in their control - unlike an artist or album name.
I'm on a horse.

REACT 2 Released

Reply #826
5. Eaclog filename wrong (and var pointing to it). Not copied to dest. folder.
Replicated.  When naming the log file in track mode EAC uses the format "<artist> - <album>" with any illegal characters replaced with a space.  REACT thought it was emulating this; however EAC treats the apostrophe as an illegal character also, which REACT did not.  I have now changed this, so that the REACT variable should match the name that EAC creates when an apostrophe is in the filename (artist and/or album name).
OK, I really am going mad now.

I've just done some more testing and EAC is not replacing the apostrophe at all

I resorted to testing with the same artist and album values that I used when I reported the above, and the apostrophe is there.

I'm reverting to not replacing the apostrophe, and taking a sabbatical.
I'm on a horse.

REACT 2 Released

Reply #827
I do sense a little hostility (maybe a little too agressive word choice) towards me.. hmm, don't know if I'm interpreting your posts wrongly Synthetic Soul.. but I know that I got an unwanted guest feeling at the moment.  Let's make it clear; I do not want to argue or raise any bad feelings whatsoever here. I just came here to share because I thought that I had something to give to the REACT development. I'm sorry if I have caused harm. It's sometimes hard to be clear and concise when you want to keep the post size down and at the same time you're trying to describe your problems/whatever understandably.. and of course there's the language barrier too (english is not my mother language).

Well, in any case, I honestly think that you, Synthetic Soul, should (if you want to) take over the REACT development with blessing from Tycho. You've been the real "driver" for a long time now. I really would like to see REACT progress, now the development is at stand still (well almost if you don't count your inputs to your mod).
-------
Ok, I'm posting couple of suggestion/insights and enhancements here:

- Add ini-setting based "Encodedby" setting.

- Add the whole REACT version to "Version" ini-setting and make the variable usable in cfg-files.

- track.cfg: Add "IF @Debug@==1 ECHO ON" command after every (except the first in line 1) "@ECHO OFF" command so that the debug spits out rest of the commands if "Debug=1" option is used.

- After I studied the REACT-image.cfg, I spotted that if you have given a "discname" then the "discnumber" and "totaldiscs" are not not written because there is a GOTO jump after the "discname"?! (GOTO :end_discnumber) I don't know if this is the way it was meant to be but I guess that somebody would like to have both "discname" and "discnumber" / "totaldiscs" tags written?

- using metaflac without glob.exe tool (remember to change the @Tools@ to point to the dir where metaflac is):
Code: [Select]
IF %add_rg%==1 (
    SETLOCAL ENABLEDELAYEDEXPANSION
    SET flacfiles=
    FOR %%f IN (*.flac) DO SET flacfiles=!flacfiles! "%%f"
    "@Tools@\metaflac.exe" %RG_MetaFlac% !flacfiles!
    SETLOCAL DISABLEDELAYEDEXPANSION
)


- Get Flac version from the executable. (remember to change the @Tools@ to point to the dir where flac is):
Use %Ver_Flac% where ever you like.
Put the following code after REM ============== Begin Main Script ================== line
Code: [Select]
REM ** Get flac version
SET Ver_Flac=
FOR /F "delims=" %%i IN ('"@Tools@\flac.exe" --version') DO SET Ver_Flac=%%i


- Use correct last track number in track mode if data track(s) are present in the CD. Makes sure that the post-processing works also.
1. You must have CreateAllCuesheets setting set to 1 in REACT.ini!
2. Change all @track@ and @numtracks@ variables to $track$ and %LastTrackNum%.
3. Put the following code before the TITLE @track@/@numtracks@ - "@album@" line in row 3.
Code: [Select]
REM ** Read the REAL last AUDIO track number from cuesheet. Number is zero-padded.
SET LastTrackNum=
IF EXIST "@albumfile@.[mg].cue" (
    FOR /F "tokens=2 delims= " %%i IN ('FINDSTR /R "TRACK.[0-9][0-9].AUDIO" "@albumfile@.[mg].cue"') DO SET LastTrackNum=%%i
) ELSE (
    SET LastTrackNum=@numtracks@
)


- Add tag about EAC and REACT
1. You must have CreateAllCuesheets setting set to 1 in REACT.ini!
2. Add ReactVersion=2.0.ssb16j (custom) line to [UserSettings] section of your REACT.ini. (You have to change it manually everytime you upgrade to new version.)
3. Use %Ripper% variable where ever you like. Example: -T ripper="%Ripper%" in flac file encoding.
4. Put the following code after REM ============== Begin Main Script ================== line
Code: [Select]
REM ** Get EAC (from cuesheet) & REACT (from REACT.ini) versions
SET EacVer=
IF EXIST "@albumfile@.[mg].cue" (
    SETLOCAL ENABLEDELAYEDEXPANSION
    FOR /F "tokens=4 delims= " %%i IN ('FINDSTR /R "REM.COMMENT..ExactAudioCopy.*" "@albumfile@.[mg].cue"') DO SET EacVer=%%i
    REM ** Remove trailing quote char
    SET EacVer=!EacVer:"=!
    SETLOCAL DISABLEDELAYEDEXPANSION
)
SET Ripper=EAC %EacVer% / REACT @ReactVersion@


Little OT but.. take your time Synthetic Soul, I hate to see somebody go mad or sad. Take a looooong break and spend more time with your lovely family (yes, I looked at your profile). I can't understand how you've so much time to dedicate to this project. THANKS A MILLION FOR YOUR WORK!

EDIT: Added more instructions to code samples.
EDIT2: Moved one problem description to another post #840.

REACT 2 Released

Reply #828
I do sense a little hostility (maybe a little too agressive word choice) towards me.. hmm, don't know if I'm interpreting your posts wrongly Synthetic Soul.. but I know that I got an unwanted guest feeling at the moment.  Let's make it clear; I do not want to argue or raise any bad feelings whatsoever here. I just came here to share because I thought that I had something to give to the REACT development. I'm sorry if I have caused harm. It's sometimes hard to be clear and concise when you want to keep the post size down and at the same time you're trying to describe your problems/whatever understandably.. and of course there's the language barrier too (english is not my mother language).

Well, in any case, I honestly think that you, Synthetic Soul, should (if you want to) take over the REACT development with blessing from Tycho. You've been the real "driver" for a long time now. I really would like to see REACT progress, now the development is at stand still (well almost if you don't count your inputs to your mod).
Much as I'd like to just drop this for now I can't really leave your post unanswered.

I will admit that I have been a little frustated in the past few days with bugs reports that are not actual bugs.  I have spent a lot of time testing code that didn't need testing.

That said, I did not mean to make you feel unwelcome, or that your input is not appreciated. It is.  I apologise if my responses have been curt; I had hoped I had curbed my frustration.

I think I will take a break this weekend on your advice. 

NB: You may want to take a look at 2.0.ssb16k. I have actually, I believe, improved the code that deals with creating and renaming the cuesheets.  REACT will now ensure that the main window is active before sending the key presses or menu commands, and (less importantly) I have changed the function that looks to move the cuesheets to wait for up to five seconds or the closure of the "Analyzing" dialogue.
I'm on a horse.

REACT 2 Released

Reply #829
Some one other than Synthetic Soul, since he does deserve a break from this. You really are a trooper of this forum. Thank you for your diligence as these are not even your problems!

I am getting some really funky behaviors from my cover downloader. I panned out the others, however these ones still persist. And I promise I did nothing to INI and CFGs that should be causing this behavior, if that is at all possible.

Whenever I save an image there is no suggested file name, and no selectable file formats for the image. I have to manually type in the name (or copy it in) and add .JPG to save it. Not much of a problem, but is a nuisance. I thought when I first began using REACT that it had default image formats and had <album name>.jpg for the suggested file name. Am I wrong?

Then I started getting bad pictures from WalMart so I decided to activate the google and discogs BOO. However I go to preview or to save and it gives me this strange error: "Capacity must be positive. Parameter name: capacity". It always does this pictures with ":" in the title. What happened?
OP can't edit initial post when a solution is determined  :'-(

REACT 2 Released

Reply #830
Let's buy SS a cake.


SamHain86: Are you using the original version of the cover downloader? Also, even if you're absolutely sure you've made no significant ini or cfg changes, try putting them aside and replacing them with the stock configs and see if the error persists. As far as the other download scripts go, I've never used them, it's possible they're outdated and are parsing things incorrectly.

REACT 2 Released

Reply #831
Hello all; forum noob but big REACT fan here. Hope this is the right place to post to ask about this query...

I'm using REACT to create both mp3 and flac tracks (not images) from CDs, using a PC with Core 2 Duo processor. I initially set EAC to use 2 simultaneous external compressor threads in EAC > EAC Options > Tools, thinking that this would make the most of the dual-core processor. However, things didn't go well; as soon as enough of a "queue" had built up for 2 instances of REACT to run simultaneoulsy, all the flacs were processed fine but the later temporary wav's from an album weren't converted to mp3's and weren't deleted.

I ran debug mode and saw the following; the name given for the temporary wav file for, say, track 4 was the same as for track 3 if the track 3 compressor thread was still running when track 4 started. The track 3 compressor thread would then close (presumably deleting this wav). By this time, the track 4 thread had usually created the flac but when it moved on to creating the mp3 it wouldn't be able to find the temporary wav and would stall.

Obviously the problem can be solved by allowing only 1 simultaneous external compressor thread in the EAC settings above, but this considerably slows down the process of ripping a CD.

Any ideas for solving this?! All help gratefully received!

Thanks,
Mark

REACT 2 Released

Reply #832
If you're keen on coding, try storing the internal temporary names as per-track settings instead of just one temp var.

so, instead of saying %temp%==track3.wav you could say, %temp3%==track3.wav so that when the next instance was called up it wouldn't overwrite the old one.

Edit: wait, so it gets it right for the FLAC, but usually not the mp3? I don't see how that is even possible, since the temporary name is going to be substituted in for @source@ before both encoders are called, it should be consistent... 

Maybe it involves the fact that it's just set to write to one batchfile. Maybe I could cook up a workaround where if a batchfile was in-use we could use a second batchfile ?

REACT 2 Released

Reply #833
@Nago-
-I second your proposal on getting Sythetic Soul a cake!

I has just reverted to the original coverdownloader files and am using the stock INI and CFGs, and there still are no options for the image and no default name. However, I thought it did this for me. From my tinkering, I have seen REACT looks for <album>.jpg as the cover and it does not work without that. I have never played with the cover settings in the CFGs, as far as I am aware.

I just enabled the google and discogs BOOs and same "parameter capacity" behavior as I described before. This time my computer did not give me all sorts of other errors though... Maybe it is just tired from crunching some F@H algorithms all night...  Soon my computer will want to take vacation time, I just know it!

UPDATE: I just discovered it is not limited to images with ":" in their titles, it is all images found with the discogs.boo. I searched other albums and all the images found in the discogs section give me this error. I dare not say the "B" word.    I kid you not, I think this is my computer's way of telling me it wants a vacation.

EDIT: My grammar is shot...
OP can't edit initial post when a solution is determined  :'-(

REACT 2 Released

Reply #834
I wonder if it could be a problem with the cover downloader itself? I think it stores some things in the registry, maybe it's got some rogue values that is throwing it off? If it's not something like that, I wouldn't know what. Try contacting the author of the cover downloader?

REACT 2 Released

Reply #835
I found an updated version of the cover downloader from source forge, actually. I am going to see what I can do about integrating it with REACT. The interface is different however it has all the same components as the one that comes standard with REACT. It states that all original command line parameters function in it, assuming that this is the same program. I'll keep you posted... since I have nothing better to do on a Friday night... lame...

EDIT: I forgot to mention, it works. :shakes head: ... Friggin scatter-brain.

UPDATE: It works! It has default information and a cooler interface than the current coverdownloader. The only negatives are that it takes longer to load up (about 15 seconds), and it tries to save to the directory D:\Temp (the one I want) with a file name F:\MEDIA\In Search of Sunrise, vol. 5- Los Angeles - CD2.jpg (my directory for when it actually works) ... a minor surprise feature.
OP can't edit initial post when a solution is determined  :'-(

REACT 2 Released

Reply #836
Nago, thanks for the reply.

I got the impression that it wasn't really a format-specific problem, just that a particular compression thread would have finished encoding the flac in time (as it does this before doing the mp3) before the previous track's thread closed and presumably deleted the wav which had ?been given the same name as the next thread's temporary wav?

When you say that only one batch file is used, do you mean that REACT takes the wav written by EAC and renames/moves it before processing it to whatever formats?

In any case, it may be that either your first suggestion or your second would work! How do I go about setting the internal temp names to per-track? Not a big coding expert but don't mind playing around with the cfg files if that's what's needed...

REACT 2 Released

Reply #837
UPDATE: It was all nicely working until I dropped the original REACT2.exe into my REACT_2.0.ssb16h, which was where all my current files were stored. The original EXE and configurations are in the REACT2 directory. Now nothing works as intended. It started using the INIs from the original directory but running tools from the modified directory.

I uninstalled everything, sicked CCleaner on my registry, even searched for some registry values and deleted them (after exporting them, of course) and still it persists looking in both directories. What am I doing wrong?
OP can't edit initial post when a solution is determined  :'-(

REACT 2 Released

Reply #838
In any case, it may be that either your first suggestion or your second would work! How do I go about setting the internal temp names to per-track? Not a big coding expert but don't mind playing around with the cfg files if that's what's needed...


I'm playing with it right now, if you give me a day or so I'll see if I can't have a patch based off of ssb16k banged out for you.

Edit: I've replicated what you were talking about, I think. I ripped a 5 track CD using burst mode and 2 compressor windows. the FLAC all came out fine (1-5) but the MP3 copies had duplicate tracks: two copies of song 2 and 3, and a copy of song 5, all labeled wrong.. though the filenames appeared correct.

I was able to fix this simply by changing the name of the batchfile that is written to include the tracknumber, REACT by default deletes the batchfile before it starts each track to get a clean slate each time, so this can mess up parallel stuff.

(Edit: See post below for fix)

REACT 2 Released

Reply #839
I was able to fix this simply by changing the name of the batchfile that is written to include the tracknumber, REACT by default deletes the batchfile before it starts each track to get a clean slate each time, so this can mess up parallel stuff.

Here's the modded EXE, based strictly on ssb16k: React2.0ssb16k+n1

to Synthetic-Soul: I only changed one line where;
Code: [Select]
$g_batfile = $g_logfile & ".bat"

to
Code: [Select]
$g_batfile = $g_logfile & "[" & $g_track & "].bat"

Great stuff! If Synthetic Soul decides to implement this in his mod, I can offer my solution to one rare problem:
- There is a possibility to "fudge" up the post-processing in track-mode ripping if "simultaneous external compressor thread(s)" -option is selected to use more than 1! WHY you ask? Well, if the last track is much shorter than the previous, the post-processing could start before all tracks are compressed.

Solution:
Put the following code after the IF NOT $track$==%LastTrackNum% GOTO end_post_process line in REACT-track.cfg.
Code: [Select]
REM ** Ensure that all other compression threads are closed before starting post-processing
:CheckForMultipleBatFiles
SET BatFilesCount=0
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%f IN (*.bat) DO SET /A BatFilesCount=!BatFilesCount!+1
SETLOCAL DISABLEDELAYEDEXPANSION
IF NOT %BatFilesCount%==1 GOTO Pause

AND put the following to the end of the same file
Code: [Select]
GOTO :EOF

REM Pause for 10000 milliseconds and return to :CheckForMultipleBatFiles
:Pause
@ECHO Waiting for all the other compression threads to finish...
PING 1.1.1.1 -n 1 -w 10000 >NUL
GOTO CheckForMultipleBatFiles

I did "dry" tests and it worked perfectly. Should work in REACT.. but it DOESN'T WORK currently, not until the change nago made is implemented.

REACT 2 Released

Reply #840
NB: You may want to take a look at 2.0.ssb16k. I have actually, I believe, improved the code that deals with creating and renaming the cuesheets.  REACT will now ensure that the main window is active before sending the key presses or menu commands, and (less importantly) I have changed the function that looks to move the cuesheets to wait for up to five seconds or the closure of the "Analyzing" dialogue.
The albumart.exe works now, thanks... BUT, I'm sorry to bring you bad news, the escape fixes you did for ssb16j version are reverted back to the buggy behaviour like in the ssb16i version (I guess that you already knew this). I don't understand why you said that "2.0.ssb16j was a disaster!" in changelog. It was almost perfect for me, it only had the albumart.exe bug. But I have to say that you probably know muchmuch better than me. I hope you can fix the problem.. again.

I'm putting here a comparison of the versions:
Code: [Select]
ssb16k & ssb16i
(variable values taken from dos window, removed dir paths)

@albumfile@.[mg].cue = Kiss Of Life (CDS)&%    '  äåö.[mg].cue
FILENAME            = Kiss Of Life (CDS)&%        äåö.[mg].cue

@cover@  = Kiss Of Life (CDS)&%    '  äåö.jpg
FILENAME = Kiss Of Life (CDS)&%        äåö.jpg

@eaclog@ = Supergrass&%    '  äåö - Kiss Of Life (CDS)&%    '  äåö.log
FILENAME = Supergrass&%        äåö - Kiss Of Life (CDS)&%        äåö.log

FILENAME = Supergrass&%    '  äåö - Kiss Of Life (CDS)&%    '  äåö.bat
Doesn't make a difference what filename this has...?

ssb16j

@albumfile@.[mg].cue = Kiss Of Life (CDS)&%        äåö.[mg].cue
FILENAME            = Kiss Of Life (CDS)&%        äåö.[mg].cue

@cover@  = Kiss Of Life (CDS)&%        äåö.jpg
FILENAME = Kiss Of Life (CDS)&%        äåö.jpg (Would be this if albumart.exe would run properly)

@eaclog@ = Supergrass&%        äåö - Kiss Of Life (CDS)&%        äåö.log
FILENAME = Supergrass&%        äåö - Kiss Of Life (CDS)&%        äåö.log

FILENAME = Supergrass&%        äåö - Kiss Of Life (CDS)&%        äåö.bat
Doesn't make a difference what filename this has...?
As you can see the variables are wrong again and all copy & delete commands fail.. +all other problems when I try to access cuefiles.

REACT 2 Released

Reply #841
And before I put my weary head to pillow I "must" report a new problem (I'm afraid to say *gasp* bug ).

"RunCoverDownloader" setting doesn't work properly in track rips.
Here's my test notes (CoverDownloaderXUI=1 set and using AlbumArtDownloaderXUI-0.10.1. Tested with 2.0.ssb16k.)
Code: [Select]
TRACK MODE:
    RunCoverDownloader=1 ... waits (OK)
    RunCoverDownloader=2 ... waits / doesn't wait (NOT OK!) I'm puzzled, sometimes waits, sometimes not, tried many different methods to reproduce the bug (start EAC, run image rip first then track, close EAC, start it, run track rip, then image, and then track again.. etc.) but it just works randomly. Don't know what can be done to it.. or should?
    RunCoverDownloader=3 ... waits (NOT OK!)
    RunCoverDownloader=4 ... doesn't wait (OK)

IMAGE MODE:
    RunCoverDownloader=1 ... doesn't wait (OK)
    RunCoverDownloader=2 ... waits (OK)
    RunCoverDownloader=3 ... waits (OK)
    RunCoverDownloader=4 ... doesn't wait (OK)

FROM http://wiki.hydrogenaudio.org/index.php?ti...ettings_Section
   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.

Bye, gotta go, I got a date with sandman..

REACT 2 Released

Reply #842
Phew. a lot to digest.

Your first post: This is an interesting concept for how to do this, but this wouldn't work properly with debug mode, since debug doesn't delete the batch files. It'd sit around and wait forever...

Maybe we can check to see if [a file] exists (like working.tmp) at the beginning of the batch file and create it if it isn't. at the end of our regular processing, we can delete this .tmp file ONLY if it was created by the very same batch file; e.g,

and please excuse my bad syntax, but you'll get the jist of it.

Code: [Select]
(at the very start)
if not exist working[@track@].tmp (
  echo "we're busy!" > working[@track@].tmp
)

(end of regular processing, just after tracks processing)
del working[@track@].tmp


(at beginning of post-processing, after if tracks==totaltracks)
:checktmp
  if exist working[*].tmp goto allProcsClear
  PING 1.1.1.1 -n 1 -w 10000 >NUL
  goto checktmp
)
:allProcsClear

(post processing)


..something like that. give me a bit to play with it, I'll make an updated cfg to go along with my updated exe. You can see if it works for you, MarkE/Akkurat.



Second post: I think he reverted the changes so that you could use environment variables in the .ini files, maybe it was a mistake, but maybe not. For now, let's accept that illegal characters are broken and we'll attack the issue later. There's a lot of information for SS to sift through right now and I think he's earned himself a weekend off, don't you?


Third post: I'm not sure I understand what "bug" you're talking about here? If I'm reading it right, sometimes the art downloader may not wait for you to pick an image, and track extraction will start anyway? is that right?

REACT 2 Released

Reply #843
Okay. I've made a quick fix for MarkE's error (no support for multiple processes at all) as well as a fix for Akkurat's multiple processes "Surprise Feature", wherein if the last track finishes before another track, post-processing gets messed up.

The end result is that now you should be able to run two or more processes safely. I do not know how well iTunesEnc will handle this, but any of the general command line tools should probably work OK.

The fixes are located in a new .cfg and .exe based strictly off of the ssb16k version, with a list of all edits included within. You can get ssb16k+n2 here.

Synthetic Soul: I included the modified sourcefile in that zip as well as a list of all changes if you're interested. I hopefully made it easy enough to follow. It's very minor stuff. I'm just trying to give you a break for once

REACT 2 Released

Reply #844
Wow, this thread has gone super-crazy!

There's too much for me to address right now, and I would like to drop REACT for at least a few hours, but I couldn't leave the apostrophe thing hanging, as it's been driving me crazy!

I'm sorry to bring you bad news, the escape fixes you did for ssb16j version are reverted back to the buggy behaviour like in the ssb16i version (I guess that you already knew this).
I've finally figured out why I was getting so confused.  There's two aspects to it:
  • The log file name is generated in two places in the code - once for the wrapper instance of REACT and once for the processing instance.
  • I forgot that EAC converts double quotes to apostrophes.  It wasn't apostrophes in the artist or album name that were causing the issue, but double-bloody-quotes again.
So, although the initial name generation was fine, the processing code is receiving the value with double quotes substituted with an apostrophe, and therefore leaving it (as an apostrophe is a valid character).  EAC was dealing with a double quote, and therefore replacing it.

The problem I have is this:  if the processing instance receives the artist and album name with double quotes already converted to apostrophes how does it know which apostrophes to convert to spaces?

2.0.ssb16j will replace any apostrophe with a space, whether it began as an apostrophe or a double quote.  That's just as wrong as 2.0.ssb16k, which leaves all apostrophes be.

I am currently thinking of a few options:
  • Record the true value from the wrapper instance (grabbed directly from the main dialogue) in the INI to read later.  This may have issues when considering the compression queue or dual processors.
  • Trawl the working directory for any ".log" file - if there's only one assume it is ours.  If there's more than one use an algorithm to detirmine which is most likely ours.  Yuck.
  • Maybe the processing instance can re-grab the value from the EAC dialogue... unsure.  Yuck II.
  • I'm sure  had another one, but it's gone...
"RunCoverDownloader" setting doesn't work properly in track rips.
Fixed.  Will be in 2.0.ssb16l.

@SamHain86 : I'm no sure that I understand your problem, but [a] REACT will always read the INI in the same directory as the EXE (IIRC) and the tools directory is set in the INI... maybe you need to change that.  Dunno, I am feeling a little REACT-shell-shocked at the moment...

I'll leave nago with the dual processor thing for now I think - that's too big a fish for me to fry this weekend.  Best of luck.
I'm on a horse.

REACT 2 Released

Reply #845
@ Synthetic Soul -
-You were right: simple problem, simple solution. I must have dropped an old LNK into my working directory to my old REACT, since I saw it making WavPack tracks... but then the coverdownloader didn't work... I haven't the foggiest idea what was happening with my head last night. I am going to sit back with some tea.
OP can't edit initial post when a solution is determined  :'-(

REACT 2 Released

Reply #846
@nago: thank you so much, this fix works perfectly for me! I set EAC to open 2 simultaneous external compressor threads then tried a CD; ripped to mp3 and flac, perfectly named and tagged, RPG analysed and all in 10 minutes flat!   

Task manager showed periods of 100% CPU usage when 2 compressor threads were open, so this seems to be getting the most out of a dual core processor. 

There is just one thing I can't figure out, although this is a completely different problem and was happening even before I brought up this issue; despite setting my mp3's to undergo RPG analysis in my .ini file, this information doesn't seem to make it onto the tag (as viewed in MediaMonkey). Here's a copy of the .ini and .cfg files I'm using:

.ini:
Code: [Select]
[Settings]
Version=2.0
ImageExt=wav
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
Tools=C:\Program Files\REACT2\tools
MinimizeCompressionWindow=1
ProcessPriority=5
Sla_Bks_Col_Qst_Bar_Quo_Ast_Lt_Gt=-|-|-||!|'|#|[|]

[UserTrackFormats]
Flac=1
Wavpack=0
LameMP3=1
NeroAac=0
iTunesAac=0
OggEnc2=0

[UserOutputNames]
OutRoot=D:\Music
ImageDir_Flac=@OutRoot@\FLAC-images\$cdartist$
ImageDir_Wavpack=@OutRoot@\WV-images\$cdartist$
ImageDir_MP3=@OutRoot@\MP3-images\$cdartist$
TrackDir_Flac=@OutRoot@\FLAC\$cdartist$\$album$
TrackDir_Wavpack=@OutRoot@\WV\$cdartist$\[$year$] $album$
TrackDir_MP3=@OutRoot@\MP3\$cdartist$\$album$
TrackDir_AAC=@OutRoot@\AAC\$cdartist$\[$year$] $album$
TrackDir_OGG=@OutRoot@\OGG\$cdartist$\[$year$] $album$
TrackName_SA=$track$ - $title$
TrackName_VA=$track$ - $artist$ - $title$
TrackName_SA_acdir=$n - $~t
TrackName_VA_acdir=$n - $~t [$~a]

[UserSettings]
Debug=0
Comment=Created with EAC/REACT2, @curdate@
EmbedCover=1
ReplayGain=1
ApplyAlbumGain=0
AdjustAlbumGain_dB=+3.0
AddCuesheetAG=0
UseWaveGainAG=0
Opt_Flac=-8 -V --replay-gain
Opt_Wavpack=-hmy
Opt_LameMP3=-V0 --vbr-new --replaygain --nohist
Opt_NeroAac=-lc -q 0.21
Opt_iTunesAac=-d -s 2000
Opt_OggEnc2=-q 3.0
Ver_Flac=1.1.3
Ver_Wavpack=4.40
Ver_LameMP3=3.97
Ver_NeroAac=1.0.0.2
Ver_OggEnc2=2.83 Lancer aoTuV b5


[DefaultMetaData]
discnumber=1
totaldiscs=1
discname=


And my .cfg;
Code: [Select]
@ECHO OFF
CHCP 1252 | PROMPT
TITLE @track@/@numtracks@ - "@album@"

REM Copyright © Tycho, 2006
REM
REM ** Create compressed audio tracks from ripped .wav tracks.
REM **
REM ** You may consider using image mode (F10)
REM ** as it supports creating tracks via acdir.exe,
REM ** and post-processing will always work (see below).
REM **
REM ** Flac requires flac.exe/metaflac.exe (v1.1.3)
REM ** NeroAac requires NeroAacEnc.exe/NeroAacTag.exe/AacGain.exe.
REM ** OggEnc2 requires OggEnc2.exe/VorbisGain.exe.
REM **
REM ** I prefer applying album gain 92dB to get a reasonable
REM ** volume for my DAP. The RG tags are still relative
REM ** to 89dB SPL, i.e. album gain will be about -3.0dB.


REM ============== Begin Main Script ==================


IF @Debug@==1 ECHO ON
REM ** Workaround for multi-processing, added by nago.
echo > processing[@track@].tmp
REM ** Create Disc-related tags if we have a set

REM If a disc name has been provided
IF "@discname@" EQU "" GOTO end_discname
SET discName=discname
SET discName=@%discname%@
IF "@discname@" EQU "%discName%" GOTO end_discname

REM Set tagging switches
SET Disc_Flac=-T "discname=@discname@"
SET Disc_Wavpack=-w "discname=@discname@"
REM SET Disc_MP3=--frame TSST:"@discname@"
SET Disc_MP3=--frame "TXXX[setsubtitle]:@discname@"
SET Disc_OggEnc2=-c "discname=@discname@"
SET Disc_Tak=-t "discname=@discname@"

REM Add disc name to folder path
SET trackDir=%trackDir%\$discname$

GOTO :end_discnumber

:end_discname

REM Ensure that we have numeric values
SET /A discNumber = @discnumber@ + 0
SET /A totalDiscs = @totaldiscs@ + 0

REM IF a valid disc number and total number of discs has been provided
IF %totalDiscs% LEQ 1 GOTO :end_discnumber
IF %discNumber% LEQ 0 GOTO :end_discnumber

REM Set tagging switches
SET Disc_Flac=-T "discnumber=@discnumber@" -T "totaldiscs=@totaldiscs@"
SET Disc_Wavpack=-w "discnumber=@discnumber@" -w "totaldiscs=@totaldiscs@"
SET Disc_MP3=--frame TPOS:"@discnumber@/@totaldiscs@"
SET Disc_NeroAac=--disk "@discnumber@/@totaldiscs@"
SET Disc_OggEnc2=-c "discnumber=@discnumber@" -c "totaldiscs=@totaldiscs@"
SET Disc_Tak=-t "discnumber=@discnumber@" -t "totaldiscs=@totaldiscs@"

REM Add disc number to folder path
SET trackDir=%trackDir%\Disc @discnumber@

:end_discnumber


SET TrackDir_Flac="@TrackDir_Flac@%trackDir%"
SET TrackDir_Wavpack="@TrackDir_Wavpack@%trackDir%"
SET TrackDir_MP3="@TrackDir_MP3@%trackDir%"
SET TrackDir_AAC="@TrackDir_AAC@%trackDir%"
SET TrackDir_OGG="@TrackDir_OGG@%trackDir%"
SET TrackDir_Tak="@TrackDir_Tak@%trackDir%"


SET TrackName=@trackname@

SET have_cover=0
SET embed_cover=0

IF EXIST "@cover@" (
SET have_cover=1
SET embed_cover=@EmbedCover@
)




REM ---- Track ----


IF NOT @Flac@==1 GOTO end_flac_tracks
IF NOT EXIST %TrackDir_Flac% MKDIR %TrackDir_Flac%
PUSHD %TrackDir_Flac%
IF @various@==1 SET VA_tag=-T "album artist=@VA@"
IF %embed_cover%==1 SET Cover_tag=--picture="|image/jpeg|||@cover@"
ECHO ON
@tools@\flac.exe @Opt_Flac@ %Cover_tag% %VA_tag% %Disc_Flac% -T artist="@artist@" -T album="@album@" -T tracknumber="@track@/@numtracks@" -T title="@title@" -T date="@year@" -T genre="@genre@" -T comment="@comment@" -T encoded-by="%USERNAME%" -T encoding="Flac @Ver_Flac@ @Opt_Flac@" "@source@" -o "%TrackName%.flac"
@ECHO OFF
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
POPD
:end_flac_tracks


IF NOT @Wavpack@==1 GOTO end_wavpack_tracks
IF NOT EXIST %TrackDir_Wavpack% MKDIR %TrackDir_Wavpack%
PUSHD %TrackDir_Wavpack%
IF @various@==1 SET VA_tag=-w "album artist=@VA@"
ECHO ON
@tools@\wavpack.exe @Opt_Wavpack@ %VA_tag% %Disc_Wavpack% -w artist="@artist@" -w album="@album@" -w track="@track@/@numtracks@" -w title="@title@" -w year="@year@" -w genre="@genre@" -w comment="@comment@" -w encodedby="%USERNAME%" -w encodersettings="Wavpack @Ver_Wavpack@ @Opt_Wavpack@" "@source@" "%TrackName%.wv"
@ECHO OFF
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
TITLE @track@/@numtracks@ - "@album@"
POPD
:end_wavpack_tracks


IF NOT @Tak@==1 GOTO end_tak_tracks
IF NOT EXIST %TrackDir_Tak% MKDIR %TrackDir_Tak%
PUSHD %TrackDir_Tak%
IF @various@==1 SET VA_tag=-t "album artist=@VA@"
ECHO ON
@tools@\takc.exe -e -overwrite @Opt_Tak@ "@source@" "%TrackName%.tak"
@tools@\tag.exe %VA_tag% %Disc_Tak% -t artist="@artist@" -t album="@album@" -t track="@track@/@numtracks@" -t title="@title@" -t year="@year@" -t genre="@genre@" -t comment="@comment@" -t encodedby="%USERNAME%" -t encodersettings="TAK @Ver_Tak@ @Opt_Tak@" "%TrackName%.tak"
@ECHO OFF
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
TITLE @track@/@numtracks@ - "@album@"
POPD
:end_tak_tracks


IF NOT @LameMP3@==1 GOTO end_lame_tracks
IF NOT EXIST %TrackDir_MP3% MKDIR %TrackDir_MP3%
PUSHD %TrackDir_MP3%
IF @various@==1 SET VA_tag=--user-text "[album artist]@VA@" --frame "TPE2:@VA@"
IF %embed_cover%==1 SET Cover_tag=--pict "{3}@cover@"
ECHO ON
@tools@\lame.exe @Opt_LameMP3@ "@source@" "%TrackName%.mp3"
@tools@\metamp3.exe %Cover_tag% %VA_tag% %Disc_MP3% --artist "@artist@" --album "@album@" --track @track@/@numtracks@ --title "@title@" --year "@year@" --genre "@genre@" --comment "@comment@" --frame TENC:"%USERNAME%" --frame TSSE:"LAME @Ver_LameMP3@ @Opt_LameMP3@" "%TrackName%.mp3"
@ECHO OFF
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
POPD
:end_lame_tracks


IF NOT @iTunesAac@==1 GOTO end_itunes_aac_tracks
IF NOT EXIST %TrackDir_AAC% MKDIR %TrackDir_AAC%
PUSHD %TrackDir_AAC%
IF %embed_cover%==1 SET Cover_tag=-r "@cover@"
ECHO ON
@tools@\iTunesEncode.exe @Opt_iTunesAac@ -e "AAC Encoder" %Cover_tag% -x @various@ -a "@artist@" -l "@album@" -n "@track@" -m "@numtracks@" -t "@title@" -y "@year@" -g "@genre@" -c "@comment@" -i "@source@" -o "%TrackName%.m4a"
@ECHO OFF
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
POPD
GOTO end_nero_aac_tracks
:end_itunes_aac_tracks

IF NOT @NeroAac@==1 GOTO end_nero_aac_tracks
IF NOT EXIST %TrackDir_AAC% MKDIR %TrackDir_AAC%
PUSHD %TrackDir_AAC%
IF @various@==1 SET VA_tag=--albumArtist "@VA@" --compilation true
IF %embed_cover%==1 SET Cover_tag=--artwork "@cover@"
ECHO ON
@tools@\neroAacEnc.exe @Opt_NeroAac@ -if "@source@" -of "%TrackName%.m4a"
@tools@\AtomicParsley.exe "%TrackName%.m4a" -o REACT_tmp.m4a %Cover_tag% %VA_tag% %Disc_NeroAac% --artist "@artist@" --album "@album@" --tracknum "@track@/@numtracks@" --title "@title@" --year "@year@" --genre "@genre@" --comment "@comment@" --encodingTool "neroAacEnc @Ver_NeroAac@ @Opt_NeroAac@"
@ECHO OFF
MOVE /Y REACT_tmp.m4a "%TrackName%.m4a"
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
POPD
:end_nero_aac_tracks


IF NOT @OggEnc2@==1 GOTO end_oggenc_tracks
IF NOT EXIST %TrackDir_OGG% MKDIR %TrackDir_OGG%
PUSHD %TrackDir_OGG%
IF @various@==1 SET VA_tag=-c "album artist=@VA@"
ECHO ON
@tools@\oggenc2.exe @Opt_OggEnc2@ %VA_tag% %Disc_OggEnc2% -c artist="@artist@" -c album="@album@" -c tracknumber="@track@/@numtracks@" -c title="@title@" -c date="@year@" -c genre="@genre@" -c comment="@comment@" -c encoded-by="%USERNAME%" -c encoding="OggEnc @Ver_OggEnc2@ @Opt_OggEnc2@" "@source@" -o "%TrackName%.ogg"
@ECHO OFF
IF %have_cover%==1 IF NOT EXIST folder.jpg COPY "@cover@" folder.jpg
POPD
:end_oggenc_tracks


REM ** Delete the source .wav
DEL "@source@"
REM ** More multiprocessing workaround --nago
DEL "processing[@track@].tmp"

REM ---- Post-processing ----


rem ** Scan and compute ReplayGain and add cover picture for supported formats.
rem ** NB: The following will only work if at least the last track is selected,
rem ** and it is a regular audio track.

IF NOT @track@==@numtracks@ GOTO end_post_process
REM ** More multiprocessing. Last edit. --nago
:checktmp
if not exist processing[*].tmp goto allProcsClear
  echo Waiting for all other processes to clear... If program hangs here and there are no other tracks being encoded, delete all processing[#].tmp files in your @source@ directory.
  PING 1.1.1.1 -n 1 -w 10000 >NUL
goto checktmp
:allProcsClear

SET add_rg=@ReplayGain@
SET aac_enc=@NeroAac@
IF @iTunesAac@==1 SET aac_enc=1

IF NOT @ReplayGain@==1 GOTO end_RG
SET RG_MetaFlac=--add-replay-gain
SET RG_MetaMP3=--replay-gain
:end_RG

IF NOT @ApplyAlbumGain@==1 GOTO end_apply_AG
SET RG_MetaMP3=--apply-gain album@AdjustAlbumGain_dB@
SET RG_AacGain=/a /o /c /d @AdjustAlbumGain_dB@
SET add_rg=1
:end_apply_AG


REM ** Audio Formats:

IF @Flac@==1 (
PUSHD %TrackDir_Flac%
IF %add_rg%==1 @tools@\Glob.exe -v -c @tools@\metaflac.exe %RG_MetaFlac% *.flac
REM COPY /Y "@eaclog@" "EAClog.txt"
POPD
)

IF @Wavpack@==1 (
PUSHD %TrackDir_Wavpack%
IF %add_rg%==1 @tools@\wvgain.exe -a *.wv
REM COPY /Y "@eaclog@" "EAClog.txt"
POPD
)

IF @LameMP3@==1 (
PUSHD %TrackDir_MP3%
IF %add_rg%==1 @tools@\metamp3.exe %RG_MetaMP3% *.mp3
REM COPY /Y "@eaclog@" "EAClog.txt"
POPD
)

IF %aac_enc%==1 (
PUSHD %TrackDir_AAC%
IF %add_rg%==1 @tools@\aacgain.exe %RG_AacGain% *.m4a > "gainlog.txt"
REM COPY /Y "@eaclog@" "EAClog.txt"
POPD
)

IF @OggEnc2@==1 (
PUSHD %TrackDir_OGG%
IF %add_rg%==1 @tools@\vorbisgain.exe -a *.ogg
REM COPY /Y "@eaclog@" "EAClog.txt"
POPD
)


REM ** Cleanup

DEL "@eaclog@"
DEL "@albumfile@.[*].cue"
DEL "@cover@"

:end_post_process


REM ================ End Main Script ===================


IF @Debug@==1 (
PAUSE
EXIT
)

REM ** Delete this .bat file:
DEL %0
Any bright ideas? I'm probably just missing something totally basic. Thanks guys.

REACT 2 Released

Reply #847
I am currently thinking of a few options:
  • Record the true value from the wrapper instance (grabbed directly from the main dialogue) in the INI to read later.  This may have issues when considering the compression queue or dual processors.
  • Trawl the working directory for any ".log" file - if there's only one assume it is ours.  If there's more than one use an algorithm to detirmine which is most likely ours.  Yuck.
  • Maybe the processing instance can re-grab the value from the EAC dialogue... unsure.  Yuck II.
  • I'm sure  had another one, but it's gone...
I think I remember #4, and it's the likely candidate at the moment.

Currently, due to the change in log file naming EAC introduced in 0.99 the code checks for both expected formats in a loop, and exits when one is found.  Using a couple of loops I could check each permutation of the filename with apostrophes replaced or not replaced.  If a match is found we have a winner.  Alternatively, and preferably, I would hope that I should be able to use a regular expression to match the filename, replacing ' with [' ], e.g.:

Code: [Select]
Synthetic 'Saddo' Soul

... to:

Code: [Select]
  Synthetic [ ']Saddo[ '] Soul


I'll let you know how I get on.
I'm on a horse.

REACT 2 Released

Reply #848
I am currently thinking of a few options:
  • Record the true value from the wrapper instance (grabbed directly from the main dialogue) in the INI to read later.  This may have issues when considering the compression queue or dual processors.
  • Trawl the working directory for any ".log" file - if there's only one assume it is ours.  If there's more than one use an algorithm to detirmine which is most likely ours.  Yuck.
  • Maybe the processing instance can re-grab the value from the EAC dialogue... unsure.  Yuck II.
  • I'm sure  had another one, but it's gone...
I think I remember #4, and it's the likely candidate at the moment.

Currently, due to the change in log file naming EAC introduced in 0.99 the code checks for both expected formats in a loop, and exits when one is found.  Using a couple of loops I could check each permutation of the filename with apostrophes replaced or not replaced.  If a match is found we have a winner.  Alternatively, and preferably, I would hope that I should be able to use a regular expression to match the filename, replacing ' with [' ], e.g.:

Code: [Select]
Synthetic 'Saddo' Soul

... to:

Code: [Select]
  Synthetic [ ']Saddo[ '] Soul


I'll let you know how I get on.

Bubblegum solution to 2.0.ssb16k.au3 file:

   LINE #1025 : $str = fStringReplaceForDOS($str, "@albumfile@", StringReplace($g_albumfile, "'", " "))
   LINE #1027 : $str = fStringReplaceForDOS($str, "@cover@", StringReplace($g_cover, "'", " "))
   LINE #1028 : $str = fStringReplaceForDOS($str, "@eaclog@", StringReplace($g_eaclog, "'", " "))
   
   Would that suffice? Only changes these variables in bat-file.

REACT 2 Released

Reply #849
Your first post: This is an interesting concept for how to do this, but this wouldn't work properly with debug mode, since debug doesn't delete the batch files. It'd sit around and wait forever...

You're absolutely right. What can I say? *doh*

Okay. I've made a quick fix for MarkE's error (no support for multiple processes at all) as well as a fix for Akkurat's multiple processes "Surprise Feature", wherein if the last track finishes before another track, post-processing gets messed up.

The end result is that now you should be able to run two or more processes safely. I do not know how well iTunesEnc will handle this, but any of the general command line tools should probably work OK.

The fixes are located in a new .cfg and .exe based strictly off of the ssb16k version, with a list of all edits included within. You can get ssb16k+n2 here.

Brilliant!!! Works like a charm. Tested with "Elbow - Leaders Of The Free World" cd. In my opinion, this mod should be included in Synthetic Soul's mod.. absolutely. Maybe it's time to also update the cfg-files?

One really minor change suggestion: @source@ variable shows the path & FILENAME. Use "@sourcedir@" instead. And I also added blank lines before & after the message so it would stand out more.
Code: [Select]
REM ** Compression threads workaround. Ensures that all compression threads are closed before starting post-processing.
:checkTmp
IF NOT EXIST processing[*].tmp GOTO allProcsClear
    ECHO.
    ECHO Waiting for all other processes to clear... If program hangs here and there are no other tracks being encoded, delete all processing[#].tmp files in your "@sourcedir@" directory.
    ECHO.
    REM ** Pause for 10000 milliseconds
    PING 1.1.1.1 -n 1 -w 10000 >NUL
    GOTO checkTmp
:allProcsClear


I think that REACT should be moved to sourceforge or similar. It's a pain to follow many different suggestions, bugs, etc. by reading this long forum topic. Also it's not ideal with scattered wiki pages for main REACT, mods, different articles with additional guides and who knows what else. Just my 2c.

OT: Sorry Synthetic Soul if I lured you back to this topic. Not my intention at all. Let's say that I have a remote control here that controls your computer and now I'm going to push the off-switch.. -click-