-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I'm trying to create an advanced encoding script to process multiple files at once, but I am unable to get even one file to convert successfully this way. I'm not understanding some of the documentation and have some questions:
From the wiki, the heading on creating WAV files seems straightforward enough:
# Create a wav file
spcplay.exe -wav [[-s <channels: 1-8>]/[-m <channels: 1-8>]] [-v <volume %>]
[-o <.wav file path>] [-f] <.spc file path>
If I understand correctly, -wav is the command instructing SPC Play to encode as WAV, -s is for stereo and -m is for mono and both are represented by an integer (1-8), and -v is represented by an integer (1-100). Assuming I am understanding correctly, then an example should look like this:
spcplay -wav -s 8 -v 100 -o output.wav -f input.spc
If this is correct, the example script from the wiki is a bit confusing, and trying to implement it as well as making my own adjustments yields no success:
start spcplay.exe
timeout 1
FOR %%I IN (1 2 3 4 5 6 7 8) DO spcplay.exe -wav -s %%I -o output-%%I.wav input.spc
- I don't understand why the first two lines are used here if the third line already executes spcplay.exe...
- In a
forloop in Batch, the first parenthesis is used for the argument, and is usually whatever the input would be, so I don't understand what1 2 3 4 5 6 7 8is doing here... - I suppose this is more subjective, but typically in similar uses, the input file is provided before the output file in a command, so
-ocoming before-fis also confusing... I did try swapping the order, but it made no difference.
From my experience in writing scripts, how this would look in any other instance would be more like the following:
for %%i in (
input.spc
) do (
spcplay -wav -s 8 -v 100 -f %%i -o output.wav
)
Trying it this way also does not work. Worth noting, irrespective of how I write or rearrange my code, a consistent problem is that the script returns the following error:
Windows cannot find '-wav'. Make sure you typed the name correctly, and then try again.
This may be due to my use of double quote-wrapping things, but this is also necessary in Windows with scripting or commands if a path or file name contains spaces at any point.
I have even tried the following code, with all files specified in the working directory with no luck:
spcplay -wav -s 8 -v 100 -o title.wav -f title.spc
SPC Play runs but returns error 201.