PDA

View Full Version : Run External DSP and Sox



jaw2ek
04-06-2008, 02:39 PM
I've tried searching here and on google and can't find anything about this.

I am trying to use CD Ripper, using the "Run External" DSP to process the rip though sox before encoding. Problem is, I can't figure out how to do the commandline to make it work. I'm pretty sure I need to use stdin (and possibly stdout?) but can't figure out how. I'm particularly trying to use the compand feature in sox.

I've noticed a few mentions of sox in these forums, but no explanation of how it is done.

Anybody who can show me?

LtData
04-06-2008, 03:25 PM
You need to use [infile] and [outfile] for the input name and output name. These would be used for the input and output for the sox encoder. However, as for the specifics of this, I cannot help as I haven't used this feature of dMC nor the sox encoder.

jaw2ek
04-06-2008, 06:55 PM
I have tried [infile] and [outrile], but I am sure I am using them incorrectly with sox. Maybe somebody else has tried sox?

EDIT: BTW, I am running windows sox, but have also tried this running the ripper in ubuntu under wine (mostly because I didn't know there was a windows version of sox). In both cases, the ripper did its job, but sox did not. Also in both cases I can get sox to work from the command line itself, just not from within CD ripper.

LtData
04-06-2008, 07:22 PM
What kind of command-line does sox want when you use it by itself manually?

jaw2ek
04-06-2008, 08:11 PM
sox [global-options] [format-options] infile1
[[format-options] infile2] ... [format-options] outfile
[effect [effect-options]] ...

I have gotten this to work in using compand on a flac file:

sox infile.flac outfile.flac compand 0.3,1 6:-70,-60,-20 -5 -90 0.2The last part is the effect compand and some parameters. This works fine.
When I try it with cd ripper, I get a playable file, but without the effect (as the one I get on the commandline is moderately compressed)

I've tried so many versions now it is hard to remember what I've tried and what I have not, but I am reasonably sure I first tried pointing to sox and then:
[infile] [outfile] compand 0.3,1 6:-70,-60,-20 -5 -90 0.2Also, when replacing the file names with "-" tells sox to use stdin and stout, so I tried several variations of that as well.

The [format options] allows sox to receive raw or wav data, but I noticed I can pass the wave header when using the external dsp, so I figure that is not an issue here.

I tend to pick things up quickly, but there are too many variables here and I don't understand many of them that much. Any help would be appreciated.

LtData
04-06-2008, 08:16 PM
Put quotes around [infile] and [outfile], first of all, to compensate for filenames with spaces, and see if that helps any.

jaw2ek
04-06-2008, 08:41 PM
The [format options] allows sox to receive raw or wav data, but I noticed I can pass the wave header when using the external dsp, so I figure that is not an issue here.
Just remembered that this is in the CLI encoder, which I played around with as well.


Put quotes around [infile] and [outfile], first of all, to compensate for filenames with spaces, and see if that helps any.

I've tried this, but I think I might be onto something with sox...will update.

EDIT: Tried this:

-t wav "[infile]" -t wav "[outfile]" compand 0.3,1 6:-70,-60,-20 -5 -90 0.2

The "-t wav" indicates wave file type options.

Unsuccessful.

LtData
04-06-2008, 09:22 PM
Turn on debugging in dBpoweramp Configuration and see if it shows exactly what command line is passed to sox. To find dBpoweramp Configuration, see the "need to find your version?" link below. The debug box is at the bottom of the dMC tab.

jaw2ek
04-06-2008, 09:42 PM
Result of debug mode:

->-> [clDSP::BeginConversion]
Run Before Conversion DSP Effect, running: C:\Users\the2eks\Music\sox-14.0.1\sox.exe [clDSP::BeginConversion]
Command Line: "-" "C:\Users\the2eks\Music\TEST\flac_When the Angels Fall.flac.tmp.flac" compand 0.3,1 6:-70,-60,-20 -5 -90 0.2 [clDSP::BeginConversion]
<-<- [clDSP::BeginConversion]

Same old result.

LtData
04-06-2008, 09:59 PM
If you plug that command-line directly into sox (copy-paste), subsituting the input file for "-", does it work? Does it give an error, if it does not work?

jaw2ek
04-06-2008, 10:18 PM
Command Line: "-" "C:\Users\the2eks\Music\TEST\
flac_When the Angels Fall.flac.tmp.flac" compand 0.3,1 6:-70,-60,-20 -5 -90 0.2



Copied this into sox like this:

C:\Users\jaw2ek\Music\sox-14.0.1\sox.exe"
"C:\Users\jaw2ek\Music\TEST\flac_When the Angels Fall.flac"
"C:\Users\jaw2ek\Music\TEST\flac_When the Angels Fall.flac.tmp.flac"
compand 0.3,1 6:-70,-60,-20 -5 -90 0.2

Got this from sox as a result:

C:\Users\jaw2ek\Music\sox-14.0.1\sox.exe effects:
compand clipped 7292 samples; decrease volume?
C:\Users\jaw2ek\Music\sox-14.0.1\sox.exe sox:
C:\Users\jaw2ek\Music\TEST\flac_When the Angels Fall.flac.tmp.flac:
output clipped 4239 samples; decrease volume?

Playback sounds compressed (I'll figure out reducing the clipping when I get it to work the way I want)

jaw2ek
04-06-2008, 10:34 PM
Just to see if my dsp wasn't broken, I successful used lame.exe from "Run External DSP"

Spoon
04-07-2008, 03:02 AM
You cannot use infile as in this case (from cd ripper) it is using 'stdin', you have to use outfile and outfile.

jaw2ek
04-07-2008, 01:54 PM
Do you mean the command line options should read:


"[outfile]" "[outfile]" compand 0.3,1 6:-70,-60,-20 -5 -90 0.2
This doesn't work either.

jaw2ek
04-08-2008, 11:41 AM
While I was trying to google the answer, I read somewhere someone saying that sox has problems with stdin.

What I was trying to do was eliminate using a second program for post-processing. Looks like I'm out of luck for now.

I love the CD ripper since it added secure ripping and so will continue to use it. But I like using some compression for files on my ipod. I currently use vlevel in foobar. I like the ability to control the amount of compression. I was hoping to use sox compand becuase it looks even more user-controllable