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: Wack, the next generation of Flacattack (Read 56857 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wack, the next generation of Flacattack

Reply #25
There we go! Thanks John33.

Wack, the next generation of Flacattack

Reply #26
This is great. Another suggestion is an option to apply album gain only (the only useful gain IMO). I don't know if this is easy to implement, since you seem to haven't figured out album gain yet, but just wanted to let you know I would like it (and probably a few others too). 

Wack, the next generation of Flacattack

Reply #27
Quote
This is great. Another suggestion is an option to apply album gain only (the only useful gain IMO). I don't know if this is easy to implement, since you seem to haven't figured out album gain yet, but just wanted to let you know I would like it (and probably a few others too). 
[a href="index.php?act=findpost&pid=299956"][{POST_SNAPBACK}][/a]


Yeah, this is on the to-do list. I'm sure it is doable with some tweaking and additional variables.

Wack, the next generation of Flacattack

Reply #28
Quote
This is great. Another suggestion is an option to apply album gain only (the only useful gain IMO). I don't know if this is easy to implement, since you seem to haven't figured out album gain yet, but just wanted to let you know I would like it (and probably a few others too). 
[a href="index.php?act=findpost&pid=299956"][{POST_SNAPBACK}][/a]


FYI the wavegaining method added in version 0.30 works with album gain... if you're using MP3 or any other codec that will take a --scale style value try it out!

Wack, the next generation of Flacattack

Reply #29
Could you post an example here of what that would look like in the encoders.ini file?

Wack, the next generation of Flacattack

Reply #30
Well that's what you're doing right now, right? Passing a SINGLE result from wavegain to each instance of the encoder. Voila! Album gain. Unless you AREN'T doing that and i'm missing something... but i think you are, right?

Furthermore I suppose you could just pass %x to the replaygain parameters and use that instead of doing an analysis (if the implementation supports it). That'll do what you want. Or if your replaygain implementation is just like an APE tag or something, just pass %x to an APE tagger and consider yourself replaygained.

For the wavegain thing, doing TRACK gain would be the tough part!

Wack, the next generation of Flacattack

Reply #31
Well, let's see. The way that replaygain (track) is being applied right now is that after an individual file is encoded, if the user has chosen to apply replaygain, then the replaygain executable is run with the name of the current file (the one that was just encoded). So, replaygain is just executed on that one file (not a list of files or a directory.

To be able to calculate the album gain, all of the files from the album have to already be encoded (meaning after the last track has been encoded). Then album gain would be calculated using either a listing of all the files or a directory name (whichever is supported by that particular replaygain utility.)

Unless, as you say, the value given by wavegain (scale or dB) can be used by the replaygain utility. I haven't looked at each utility, but it just may be that they all can take a value like this as a parameter. That would be great!  I'll look into it right now. This way either track or album gain can be really be implemented with a track by track approach.

Wack, the next generation of Flacattack

Reply #32
By the way, i've noticed that if you don't have "Use CD-Text information in CUE sheet generation" Checked, at least with the whole wavegain -> lame thing, no track titles are stored in the CUE sheet and the whole thing quits right after wavegain finishes. Also, "Retrieve UPC / ISRC codes in CUE sheet generation" seems to crash Wack.

Should probably mention those in your documentation. Actually the UPC thing should probably be treated as a bug.

Wack, the next generation of Flacattack

Reply #33
Quote
Well, let's see. The way that replaygain (track) is being applied right now is that after an individual file is encoded, if the user has chosen to apply replaygain, then the replaygain executable is run with the name of the current file (the one that was just encoded). So, replaygain is just executed on that one file (not a list of files or a directory.

To be able to calculate the album gain, all of the files from the album have to already be encoded (meaning after the last track has been encoded). Then album gain would be calculated using either a listing of all the files or a directory name (whichever is supported by that particular replaygain utility.)

Unless, as you say, the value given by wavegain (scale or dB) can be used by the replaygain utility. I haven't looked at each utility, but it just may be that they all can take a value like this as a parameter. That would be great!  I'll look into it right now. This way either track or album gain can be really be implemented with a track by track approach.
[a href="index.php?act=findpost&pid=300028"][{POST_SNAPBACK}][/a]


Yep! Only slight problem is that the values are for the source wave file, so they aren't going to be like EXACTLY the same after encoding. But since replaygain isn't accurate at any precision (not a perfect measure of preceived loudness, only a good estimation), a loss in precision this small is hardly important. (google the difference between "precision" and "accuracy" if i've lost you.)

Wack, the next generation of Flacattack

Reply #34
Quote
By the way, i've noticed that if you don't have "Use CD-Text information in CUE sheet generation" Checked, at least with the whole wavegain -> lame thing, no track titles are stored in the CUE sheet and the whole thing quits right after wavegain finishes. Also, "Retrieve UPC / ISRC codes in CUE sheet generation" seems to crash Wack.

Should probably mention those in your documentation. Actually the UPC thing should probably be treated as a bug.
[a href="index.php?act=findpost&pid=300029"][{POST_SNAPBACK}][/a]


Okay. What you say makes sense. I'll make the necessary changes.

Wack, the next generation of Flacattack

Reply #35
Quote
Quote
Once EAC has written the WAVE it pauses, waiting for WACK to become free again. Once I finally notice that I still have a WACK console open I close it. WACK begins as it should, but WavSplit throws an error, cancelling the whole operation. I don't know whether the previous instance of WACK hasn't had chance to release the hold on it or something.

One of the last things that Wack does is delete the source WAV and cuesheet. So, in your case EAC writes over the existing WAV and cuesheet (for the next CD), then when you close the first instance of Wack, it deletes these files. The next instance of Wack begins and immediately can't find the source WAV and cuesheet because they were just deleted.

A workaround is to name each source WAV and cue something different when prompted by EAC. It doesn't matter what its named because its just temporary anyway and will get renamed by Wack according to your naming scheme in encoders.ini.

Good thinking.  That makes perfect sense now.

If you intend to make future versions of Wack close themselves then this won't be an issue.

Perhaps you could implement some global switches in Wack (i.e.: not encoder specific) - e.g.: CloseAfterProcessing=1 - so that users have the option.  You could add WaveGain=1 in there so that users can have Wack and WaveGain in the same folder without it setting Wack to calculate the scale value.  I'm sure there's others that could be used.
I'm on a horse.

Wack, the next generation of Flacattack

Reply #36
Quote
Quote
Quote
Once EAC has written the WAVE it pauses, waiting for WACK to become free again. Once I finally notice that I still have a WACK console open I close it. WACK begins as it should, but WavSplit throws an error, cancelling the whole operation. I don't know whether the previous instance of WACK hasn't had chance to release the hold on it or something.

One of the last things that Wack does is delete the source WAV and cuesheet. So, in your case EAC writes over the existing WAV and cuesheet (for the next CD), then when you close the first instance of Wack, it deletes these files. The next instance of Wack begins and immediately can't find the source WAV and cuesheet because they were just deleted.

A workaround is to name each source WAV and cue something different when prompted by EAC. It doesn't matter what its named because its just temporary anyway and will get renamed by Wack according to your naming scheme in encoders.ini.

Good thinking.  That makes perfect sense now.

If you intend to make future versions of Wack close themselves then this won't be an issue.

Perhaps you could implement some global switches in Wack (i.e.: not encoder specific) - e.g.: CloseAfterProcessing=1 - so that users have the option.  You could add WaveGain=1 in there so that users can have Wack and WaveGain in the same folder without it setting Wack to calculate the scale value.  I'm sure there's others that could be used.
[a href="index.php?act=findpost&pid=300084"][{POST_SNAPBACK}][/a]


I would definitely prefer a switch, ala CloseAfterProcessing. One of the big problems I had with flacattack was that every once in a great while it would fail - but with the window closing immediately afterward, I couldn't figure out what the problem was.

In one case, it was due to the fact that the freedb album title began with "..." - which kind of screwed up the directory structure. I finally figured out what was going on, but it would have been super-obvious from the filename descriptor written out to the console and the error message coming out of FLAC.exe.

I'm looking forward to checking out Wack - it seems like it's really close to something I had considered building myself. Does it have the ability to work from pre-existing FLACs? It could also make a great batch transcoder - assuming, of course, that you can pull the tags out of the FLACs and add them to the transcoded files.

Wack, the next generation of Flacattack

Reply #37
I'll most likely make that switch available. Wack, like Flacattack will only work in conjunction with EAC (unless you want to manually pass it all the album information  ).

I recently found an issue similar to yours (... in file name). Flacattack will have problems if the album title ends in "?". The "?" gets replaced with a space in the filename path and that causes problems when you have a directory structure like %artist - %album\%tracknumber - %artist - %title. So, you end up with a space ar the end of a directory name. Some encoders don't like this.

Wack, the next generation of Flacattack

Reply #38
Just tried out the setup with the Special Wack v0.30 Bundle from RareWares set up to use lame.exe with
Quote
ARGUMENTS=--preset standard --scale %x --replaygain-accurate -c %s %d
Ripped three albums. Afterwards I replaygained them in foobar2000 0.8.3. Two albums got the expected +0.00 dB for AG, but one of them got +1.14 dB for AG. Guess this is a WaveGain issue, WaveGain and fb2k replaygainscanner not agreeing. But is this usual? Some of the point might be lost if........

Also, a switch to choose whether Wack console window should close or not when encoding finishes could be nice for a future version, I see it's discussed, but sometimes you might want it to remain open for debugging purposes, most often you would want it to terminate automaticly, so it would be nice if it was made an option.....
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Wack, the next generation of Flacattack

Reply #39
Quote
Two albums got the expected +0.00 dB for AG, but one of them got +1.14 dB for AG. Guess this is a WaveGain issue, WaveGain and fb2k replaygainscanner not agreeing. But is this usual? Some of the point might be lost if........

In the few experiments I've done using this setup (Wavegain to --scale) I've only got a 0.0 value once or twice.

Isn't this to do with the scale value being attained from the WAVE, and the RG value from the compressed file?

I'm not that up on dBs etc. to know how relevant a difference of +/- ~1dB is.
I'm on a horse.

Wack, the next generation of Flacattack

Reply #40
Well I know that for example MP3Gain goes in 1.5dB steps which are just barely audible, so i wouldn't worry about it. Don't forget - even having all your files showing EXACTLY the same replaygain value doesn't mean they'll sound the same... replaygain is just an approximate estimation of perceived volume anyhow. Hell, you could probably write an alogrithm that says "all CDs recorded since 1998 get reduced by 10dB, all CDs from 1990 through 1998 get reduced 6dB, all the rest get left alone". My guess is that would be pretty darn close to accurate.

I ran an MP3Gain analysis of all my CDs (which were encoded using --scale) just to check for clipping, and discovered that out of 300 or so CDs, MP3Gain recommended 0dB changes on all but 2 albums. Those two were 1.5dB changes. So I would say that these results are pretty insignificant and can probably be attributed to the difference between post- and pre- gain calculation, as Synthetic Soul suggested.

Wack, the next generation of Flacattack

Reply #41
Hi,

Thanks very much for Wack.  It's going to make the digitizing my hundreds of CD's a much nicer project.  I'd like to report the few problems I've had with Wack, in hopes that it will help others use it, and perhaps help you make it even better.

1. Vorbisgain could not find files if the path contained spaces.  Resolved this by enclosing the REPLAYGAINARGUMENTS string in two sets of double quotes.

2. Wack will not return to the EAC "Extracting Audio Data" window unless I press ENTER in the DOS encoder window.  This problem did not recur after I placed Flac (with replaygain) first instead of last among the uncommented blocks in enoders.ini.
Edit: ...or so I thought.  Is this actually an intentional feature?

3. Encoding to a Flac image-cue set, the cue sheet points to "CDImage.wack" instead of the proper .flac file.  I bet this issue can be worked around by entering the final name of the Flac file in the dialog box when you hit Action -> Copy Image and Create CUE Sheet -> Compressed, but that would be kinda tedious.  Is there something else I should do different to fix this one?

Also, may I make a humble suggestion?  Before each new task, Wack should print what it is about to do.  When I was debugging problem #1, it was not immediately clear to me what was returning the file not found error.  If Wack had said, "Applying vorbisgain..." at that stage, it would have been very clear what was happening.  Similarly, when I tested that workaround for problem #2, I was worried that I had made it worse.  For after the Flac file was encoded, the command window appeared to be hung.  It wasn't printing anything new, and it wasn't responding when I pressed ENTER.  Well, it turns out that replaygain just doesn't say anything when it's working on a file.

Thanks again!
ks

Wack, the next generation of Flacattack

Reply #42
This might seem like a dumb question, and I apologize in advance, but do I have to use Copy Image and Create CUE Sheet with Wack or can I use another command?  I currently use MAREO and I usually rip with Test and Copy --> Compressed with the drive set to  Burst Mode.  Will that work?  I haven't actually tried out Wack since my setup works fine, but I'm quite curious.
WavPack 4.31 / LAME 3.98 alpha 3 -V9 -vbr-new

Wack, the next generation of Flacattack

Reply #43
Quote
This might seem like a dumb question, and I apologize in advance, but do I have to use Copy Image and Create CUE Sheet with Wack or can I use another command?  I currently use MAREO and I usually rip with Test and Copy --> Compressed with the drive set to  Burst Mode.  Will that work?  I haven't actually tried out Wack since my setup works fine, but I'm quite curious.
[a href="index.php?act=findpost&pid=304201"][{POST_SNAPBACK}][/a]


You have to use Copy Image and Create Cuesheet. For using Test and Copy I created the Aftermath (and MLog) program. I just haven't uploaded it or made a web page for it.  It's purpose is like that of Wack -- to allow you to rip to whatever format you want, or multiple formats, but to allow you to use Test & Copy. It keeps a log file of what you have ripped (to WAV) and where it is (using MLog), then you run a second program (Aftermath)after you are done ripping which will actually do the encoding using parameters you have specified in an .ini file. It is like Wack, but for people who want to use Test & Copy. I couldn't find any good tools for people who like to use Test & Copy (which can be much faster if you have CDs in good condition), so I wrote this set of programs. Hopefully I'll soon upload Aftermath and create a website.

Wack, the next generation of Flacattack

Reply #44
Quote
Hi,

Thanks very much for Wack.  It's going to make the digitizing my hundreds of CD's a much nicer project.  I'd like to report the few problems I've had with Wack, in hopes that it will help others use it, and perhaps help you make it even better.

1. Vorbisgain could not find files if the path contained spaces.  Resolved this by enclosing the REPLAYGAINARGUMENTS string in two sets of double quotes.


Could you please post an example of your REPLAYGAINARGUMENTS line from the ini file?

Quote
2. Wack will not return to the EAC "Extracting Audio Data" window unless I press ENTER in the DOS encoder window.  This problem did not recur after I placed Flac (with replaygain) first instead of last among the uncommented blocks in enoders.ini.
Edit: ...or so I thought.  Is this actually an intentional feature?


Yeah, this was mentioned a couple of times in earlier posts. You have to press some key in the "DOS" window to get it to close. I'm most likely going to change this behavior or make a switch to let the user choose.

Quote
3. Encoding to a Flac image-cue set, the cue sheet points to "CDImage.wack" instead of the proper .flac file.  I bet this issue can be worked around by entering the final name of the Flac file in the dialog box when you hit Action -> Copy Image and Create CUE Sheet -> Compressed, but that would be kinda tedious.  Is there something else I should do different to fix this one?


Initially, yes, this is how EAC creates the cuesheet (it is an error). However, Wack alters the cuesheet to point to the encoded file, whatever format it may be. Are you maybe looking at the initial cuesheet before it gets copied and moved to the destination directory? What version of Wack are you using? I added this feature in Wack 0.20.

Quote
Also, may I make a humble suggestion?  Before each new task, Wack should print what it is about to do.  When I was debugging problem #1, it was not immediately clear to me what was returning the file not found error.  If Wack had said, "Applying vorbisgain..." at that stage, it would have been very clear what was happening.  Similarly, when I tested that workaround for problem #2, I was worried that I had made it worse.  For after the Flac file was encoded, the command window appeared to be hung.  It wasn't printing anything new, and it wasn't responding when I pressed ENTER.  Well, it turns out that replaygain just doesn't say anything when it's working on a file.

Thanks again!
ks
[a href="index.php?act=findpost&pid=303583"][{POST_SNAPBACK}][/a]



Valid point. I'll add more output information so the user knows what is going on.

Wack, the next generation of Flacattack

Reply #45
Quote
Quote

1. Vorbisgain could not find files if the path contained spaces.  Resolved this by enclosing the REPLAYGAINARGUMENTS string in two sets of double quotes.

Could you please post an example of your REPLAYGAINARGUMENTS line from the ini file?

Code: [Select]
[OGG]
REPLAYGAINARGUMENTS=""D:\Music\%a\%g (%y)\%n. %t.ogg""


Note the double-double quotes.

Quote
Quote
3. Encoding to a Flac image-cue set, the cue sheet points to "CDImage.wack" instead of the proper .flac file.

Initially, yes, this is how EAC creates the cuesheet (it is an error). However, Wack alters the cuesheet to point to the encoded file, whatever format it may be. Are you maybe looking at the initial cuesheet before it gets copied and moved to the destination directory? What version of Wack are you using? I added this feature in Wack 0.20.


Nope, I am looking in the destination directory.  I am using v.0.30, with wack.exe dated May 19, 2005.  I'll paste the Flac block of my encoders.ini:

Code: [Select]
[FLAC]
EXEPATH=C:\flac\flac.exe
ARGUMENTS=-8 -o %d -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" %s
FILEPATH=i:\flac\albums\%a - %g (%y)\%a - %g
EXTENSION=.flac
FILETYPE=2
APPLYREPLAYGAIN=true
REPLAYGAINEXEPATH=C:\flac\metaflac.exe
REPLAYGAINARGUMENTS=--add-replay-gain "D:\flac\%a - %g (%y)\%a - %g.flac"


I am in XP Pro, by the way.

Thanks again,
ks

Wack, the next generation of Flacattack

Reply #46
Quote
You have to use Copy Image and Create Cuesheet. For using Test and Copy I created the Aftermath (and MLog) program. I just haven't uploaded it or made a web page for it.  It's purpose is like that of Wack -- to allow you to rip to whatever format you want, or multiple formats, but to allow you to use Test & Copy. It keeps a log file of what you have ripped (to WAV) and where it is (using MLog), then you run a second program (Aftermath)after you are done ripping which will actually do the encoding using parameters you have specified in an .ini file. It is like Wack, but for people who want to use Test & Copy. I couldn't find any good tools for people who like to use Test & Copy (which can be much faster if you have CDs in good condition), so I wrote this set of programs. Hopefully I'll soon upload Aftermath and create a website.
[{POST_SNAPBACK}][/a]


many thanks for the explanation, ponchorage. I think I have an early copy of Aftermath and MLog lying around (from the HA Uploads section [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=32850&hl=aftermath]here[/url]), I just haven't gotten around to testing it.  I'll go give it a try.
WavPack 4.31 / LAME 3.98 alpha 3 -V9 -vbr-new

Wack, the next generation of Flacattack

Reply #47
Quote
Quote
Quote

1. Vorbisgain could not find files if the path contained spaces.  Resolved this by enclosing the REPLAYGAINARGUMENTS string in two sets of double quotes.

Could you please post an example of your REPLAYGAINARGUMENTS line from the ini file?

Code: [Select]
[OGG]
REPLAYGAINARGUMENTS=""D:\Music\%a\%g (%y)\%n. %t.ogg""


Note the double-double quotes.


I'll have to try this out and see if I get the same results.

Quote
Quote
Quote
3. Encoding to a Flac image-cue set, the cue sheet points to "CDImage.wack" instead of the proper .flac file.

Initially, yes, this is how EAC creates the cuesheet (it is an error). However, Wack alters the cuesheet to point to the encoded file, whatever format it may be. Are you maybe looking at the initial cuesheet before it gets copied and moved to the destination directory? What version of Wack are you using? I added this feature in Wack 0.20.


Nope, I am looking in the destination directory.  I am using v.0.30, with wack.exe dated May 19, 2005.  I'll paste the Flac block of my encoders.ini:

Code: [Select]
[FLAC]
EXEPATH=C:\flac\flac.exe
ARGUMENTS=-8 -o %d -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" %s
FILEPATH=i:\flac\albums\%a - %g (%y)\%a - %g
EXTENSION=.flac
FILETYPE=2
APPLYREPLAYGAIN=true
REPLAYGAINEXEPATH=C:\flac\metaflac.exe
REPLAYGAINARGUMENTS=--add-replay-gain "D:\flac\%a - %g (%y)\%a - %g.flac"



Same goes here, but I know this has never been an issue for me. Does this happen with every CD or has it just been one or two?

By the way, I just noticed I messed up in the documentation. For FILETYPE it should be 0 or 1, not 1 or 2 where 0 => image file and 1=> individual files. That may be what is causing some of your problems. Could you please change that and let me know if any of your problems go away?

Wack, the next generation of Flacattack

Reply #48
well, if Wack is passing the flags as a quoted string withing a quoted string, then yes you need double-quotes to escape the inside ones. For instance:

someString = "lame --preset standard -tc ""this song rocks!"""

It would probably be better though if you had Wack detect such situations and substitute "" over every ". Users shouldn't be expected to know that.

Wack, the next generation of Flacattack

Reply #49
Code: [Select]
[FLAC]
EXEPATH=C:\flac\flac.exe
ARGUMENTS=-8 -o %d -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" %s
FILEPATH=i:\flac\albums\%a - %g (%y)\%a - %g
EXTENSION=.flac
FILETYPE=2
APPLYREPLAYGAIN=true
REPLAYGAINEXEPATH=C:\flac\metaflac.exe
REPLAYGAINARGUMENTS=--add-replay-gain "D:\flac\%a - %g (%y)\%a - %g.flac"


Something else is wrong here. Your file path is I:\flac.... but then for the replaygain line you use D:\flac...