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: Need help creating a bat file for FinalCD batch resampling (Read 3609 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Need help creating a bat file for FinalCD batch resampling

I found the following bat code posted by a user in a different forum:

@Echo Off
FOR /F "tokens=*" %%k IN ('dir /b *.wav') DO "C:\Users\kiefe\Software\FinalCD/finalcd.exe" /f0 /d1 "%%k"
Echo Conversion Complete
Pause

Credit: Mr.S

It works well and i have set it to sharp and TPDF dither on using the /f and /d parameters. I've also got a copy with /d0 to disable the dither.
So basically, i'd like to have two different bat files. One with dither and one without dither (for resampling audio that is already 16bit but higher than 44.1kHz). But the script from Mr.S saves them in the same folder with a prefix to the file name. Since i use the filenames for sorting before manually adding tags that also isnt an option.
So basically if someone could explain to me how to change this bat file so that it saves the resampled files in a separate folder without changing the input filename (or putting changes at the end) i'd be delighted.
You can drag this file into a folder and double click it to compress all files in this folder but i also noticed that when dragging a single file onto the bat i does still resample all the files in the folder. So if that can be changed would also be very nice but not necessary since i can easily work around that.

Re: Need help creating a bat file for FinalCD batch resampling

Reply #1
All good programs will convert your files into 32-bit float to do processing.
After processing they will export 16-bit file so you will need dithering anyway.

This is not the answer you are looking for but anyway...

Most people here are using SoX resampler. You can use foobar2000 and SoX plugin here:
https://hydrogenaud.io/index.php?topic=67376.0

You can set it up to output files with the same name and keep folder structure.
If you are creating audio CD, you probably want all files to be equally loud, so you can use ReplayGain.

Now comes confusing part.
You said you are adding tags manually to files?
Normal audio CD does not have tags. You can use CD-Text but that is completely different thing.

Or you just want WAV files? That is not very good idea. WAV tagging is pretty much non existent.
In that case why not use FLAC to save size and have proper tagging support.
+ foobar2000 can transfer tags automatically.
gold plated toslink fan

Re: Need help creating a bat file for FinalCD batch resampling

Reply #2
I'm already using flac, i've got an extensive library. However before compressing i downsample all files to 16bit 44.1kHz because i like it that way. I am aware of other resamplers however i've chosen to go with finalCD since it outperforms almost any other resampler, even if it means i'll have to learn a little doing.

Re: Need help creating a bat file for FinalCD batch resampling

Reply #3
Aha, program is called FinalCD so I thought you were creating audio CD, my bad.

This is the most basic script I came up with. Is this good enough or you need something more advanced?
Put source WAV files in Input folder, run Script.bat, you will get 16/44 WAV files in Output folder with the same name.
I didn't add any safety checks so be careful.

Code: [Select]
echo off
cls
for %%a in (input\*.wav) do finalcd /f0 /d1 "%%a" "output\%%~nxa"

gold plated toslink fan

 

Re: Need help creating a bat file for FinalCD batch resampling

Reply #4
I am aware of other resamplers however i've chosen to go with finalCD since it outperforms almost any other resampler, even if it means i'll have to learn a little doing.
You can check and compare resamplers here, for your information.
Error 404; signature server not available.

Re: Need help creating a bat file for FinalCD batch resampling

Reply #5

Aha, program is called FinalCD so I thought you were creating audio CD, my bad.

This is the most basic script I came up with. Is this good enough or you need something more advanced?
Put source WAV files in Input folder, run Script.bat, you will get 16/44 WAV files in Output folder with the same name.
I didn't add any safety checks so be careful.

I'll try it out and get back to you, thanks a lot!


You can check and compare resamplers here, for your information.

Yep that's exactly the site i based my statement on

Re: Need help creating a bat file for FinalCD batch resampling

Reply #6
I'm already using flac, i've got an extensive library. However before compressing i downsample all files to 16bit 44.1kHz because i like it that way. I am aware of other resamplers however i've chosen to go with finalCD since it outperforms almost any other resampler, even if it means i'll have to learn a little doing.

I would not call it the best, look at these images.







Some aspects of it are not bad.

https://ibb.co/M5bF1hV
https://ibb.co/jR2Nt0Y
https://ibb.co/0DksSZs

Re: Need help creating a bat file for FinalCD batch resampling

Reply #7
@spoon check out the sharp filter, the one i am using, should be just below goldilocks in src check. Nigh identical to dbpoweramp except for the 1kHz tone where FinalCD performs better. And it's free. Goldilocks and gentle are less strong to reduce ringing. Nigh identical to dbpoweramp

Re: Need help creating a bat file for FinalCD batch resampling

Reply #8
This is the most basic script I came up with. Is this good enough or you need something more advanced?
Put source WAV files in Input folder, run Script.bat, you will get 16/44 WAV files in Output folder with the same name.
I didn't add any safety checks so be careful.

Code: [Select]
echo off
cls
for %%a in (input\*.wav) do finalcd /f0 /d1 "%%a" "output\%%~nxa"

Works perfect, i like the Input and Output folder method, like i had it before. Thanks a bunch!
What do you mean with safety checks? Like stop compression on error?

Re: Need help creating a bat file for FinalCD batch resampling

Reply #9
@spoon check out the sharp filter, the one i am using, should be just below goldilocks in src check. Nigh identical to dbpoweramp except for the 1kHz tone where FinalCD performs better. And it's free. Goldilocks and gentle are less strong to reduce ringing. Nigh identical to dbpoweramp

The sharp one is identical to dBpoweramp, so this means it is also based on SSRC likely. The 1KHz tone is also identical.

Re: Need help creating a bat file for FinalCD batch resampling

Reply #10
The sharp one is identical to dBpoweramp, so this means it is also based on SSRC likely. The 1KHz tone is also identical.

Almost identical ;)





Re: Need help creating a bat file for FinalCD batch resampling

Reply #13
While you care about inaudible differences between resamples, don't forget that there is possibility to get audible clicks between tracks after resampling if you are resampling tracks one-by-one and original transition between them was seamless.
https://hydrogenaud.io/index.php?topic=114960.msg947760#msg947760.

Currently, this problem can be avoided using foobar2000 as converter with option "Don't reset DSP between tracks" or/and using resamplers components available for foobar2000 that have extrapolation function - latest version of SoX resampler component or SRC resampler component.

Re: Need help creating a bat file for FinalCD batch resampling

Reply #14
While you care about inaudible differences between resamples, don't forget that there is possibility to get audible clicks between tracks after resampling if you are resampling tracks one-by-one and original transition between them was seamless.
https://hydrogenaud.io/index.php?topic=114960.msg947760#msg947760.

Currently, this problem can be avoided using foobar2000 as converter with option "Don't reset DSP between tracks" or/and using resamplers components available for foobar2000 that have extrapolation function - latest version of SoX resampler component or SRC resampler component.

I'm aware but since i regularely batch process hundreds of files there is no way to make sure the files come in order, joining and splitting them would be to much time and sometimes i have albums with only some tracks in a different samplerate so i wont be resampling the whole album, i chose to ingore that.