title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Run External DSP and Sox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaw2ek

    • Apr 2008
    • 9

    Run External DSP and Sox

    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
    dBpoweramp Guru

    • May 2004
    • 8288

    #2
    Re: Run External DSP and Sox

    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.

    Comment

    • jaw2ek

      • Apr 2008
      • 9

      #3
      Re: Run External DSP and Sox

      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.
      Last edited by jaw2ek; April 06, 2008, 11:59 PM.

      Comment

      • LtData
        dBpoweramp Guru

        • May 2004
        • 8288

        #4
        Re: Run External DSP and Sox

        What kind of command-line does sox want when you use it by itself manually?

        Comment

        • jaw2ek

          • Apr 2008
          • 9

          #5
          Re: Run External DSP and Sox

          Originally posted by (taken from sox readme)
          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:
          Code:
          sox infile.flac outfile.flac compand 0.3,1 6:-70,-60,-20 -5 -90 0.2
          The 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:
          Code:
          [infile] [outfile] compand 0.3,1 6:-70,-60,-20 -5 -90 0.2
          Also, 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.

          Comment

          • LtData
            dBpoweramp Guru

            • May 2004
            • 8288

            #6
            Re: Run External DSP and Sox

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

            Comment

            • jaw2ek

              • Apr 2008
              • 9

              #7
              Re: Run External DSP and Sox

              Originally posted by jaw2ek
              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.

              Originally posted by LtData
              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:
              Code:
              -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.
              Last edited by jaw2ek; April 07, 2008, 01:44 AM.

              Comment

              • LtData
                dBpoweramp Guru

                • May 2004
                • 8288

                #8
                Re: Run External DSP and Sox

                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.

                Comment

                • jaw2ek

                  • Apr 2008
                  • 9

                  #9
                  Re: Run External DSP and Sox

                  Result of debug mode:
                  Code:
                  ->->  [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.

                  Comment

                  • LtData
                    dBpoweramp Guru

                    • May 2004
                    • 8288

                    #10
                    Re: Run External DSP and Sox

                    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?

                    Comment

                    • jaw2ek

                      • Apr 2008
                      • 9

                      #11
                      Re: Run External DSP and Sox

                      Originally posted by jaw2ek
                      Code:
                      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:
                      Code:
                      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:
                      Code:
                      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)
                      Last edited by jaw2ek; April 07, 2008, 03:20 AM. Reason: flow

                      Comment

                      • jaw2ek

                        • Apr 2008
                        • 9

                        #12
                        Re: Run External DSP and Sox

                        Just to see if my dsp wasn't broken, I successful used lame.exe from "Run External DSP"

                        Comment

                        • Spoon
                          Administrator
                          • Apr 2002
                          • 44507

                          #13
                          Re: Run External DSP and Sox

                          You cannot use infile as in this case (from cd ripper) it is using 'stdin', you have to use outfile and outfile.
                          Spoon
                          www.dbpoweramp.com

                          Comment

                          • jaw2ek

                            • Apr 2008
                            • 9

                            #14
                            Re: Run External DSP and Sox

                            Do you mean the command line options should read:

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

                            Comment

                            • jaw2ek

                              • Apr 2008
                              • 9

                              #15
                              Re: Run External DSP and Sox

                              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

                              Comment

                              Working...

                              ]]>