title
Products            Buy            Support Forum            Professional            About            Codec Central
 

add SoX deemphasis filter as a DSP effect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • biggles
    dBpoweramp Enthusiast

    • Jul 2010
    • 60

    add SoX deemphasis filter as a DSP effect

    For those of us with large numbers of CDs from the 80's, or even just a few from the 80's, pre-emphasis is a major issue. Enhancing CD Ripper to be able to run SoX's deemphasis filter as a DSP effect during the ripping process would save oodles of time for anyone with this issue.

    SoX is an application found here http://sox.sourceforge.net/Main/HomePage
  • Porcus
    dBpoweramp Guru

    • Feb 2007
    • 792

    #2
    Re: add SoX deemphasis filter as a DSP effect

    I've nagged about it:

    I think dBpoweramp is the best CD ripper and conversion utility out there. The reference edition with the multi-CPU support is a great time saver when ripping large libraries of CD's. Thanks for the excellent program. One question - Some CD's have the upper frequency range emphasized. CD players typically will recognize this

    I think dBpoweramp is the best CD ripper and conversion utility out there. The reference edition with the multi-CPU support is a great time saver when ripping large libraries of CD's. Thanks for the excellent program. One question - Some CD's have the upper frequency range emphasized. CD players typically will recognize this


    and even http://forum.dbpoweramp.com/showthread.php?t=17804 .

    Comment

    • EliC
      dBpoweramp Guru

      • May 2004
      • 1175

      #3
      Re: add SoX deemphasis filter as a DSP effect

      This is why I wish spoon would open up the DSP architecture, let end users develop for him for free.

      Comment

      • biggles
        dBpoweramp Enthusiast

        • Jul 2010
        • 60

        #4
        Re: add SoX deemphasis filter as a DSP effect

        I have no idea what it takes to implement this or any other change, but if opening up the architecture is not appealing to Spoon to deal with such features (and I respect whatever Spoon's concerns are on that), then maybe I could offer another general way for this or other options to address any such concerns.

        Perhaps not that insightful, original, or different enough from a true opening to make anything more viable for all, but maybe one could agree on a one-off arrangement with Spoon to develop this or other additional features. These would be offered as separate downloads for additional cost, ala cart, and the developer and Spoon would need to agree on how to split any revenues.

        What I have in mind would not be a true opening - no fancy documentation, development tools, or support by Spoon for the additional features, just the bare-bones info to allow someone to develop specific additional features. Spoon would reserve the right for final decisions on when something was sufficiently tested and ready (or caveat such features that its 'buyer beware'), and be comfortable that his proprietary information was kept confidential and not used without his permission.

        In short, I wonder if there is not something between the current state and a complete opening that is of sufficiently low overhead that everyone wins. To put it another way, this situation strikes me as more of a buisness model issue than a technical issue. If my instinct on that is accurate then perhaps the question is, "what business model would make it attractive to both Spoon and others to develop additional features for dBpoweramp applications?"
        Last edited by biggles; August 04, 2010, 07:01 PM.

        Comment

        • Spoon
          Administrator
          • Apr 2002
          • 44596

          #5
          Re: add SoX deemphasis filter as a DSP effect

          It is not a matter of opening up the DSP architecture because as it stands a DSP effect has no chance of knowing the pre-empth flag, unless CD Ripper was written to specifically tell that one DSP effect about it.
          Spoon
          www.dbpoweramp.com

          Comment

          • EliC
            dBpoweramp Guru

            • May 2004
            • 1175

            #6
            Re: add SoX deemphasis filter as a DSP effect

            NP, yes please (open dsp) and yes please (have cd ripper send pre-emph flag) ;-)

            But seriously, I really think that opening the DSP development up would help build community support and I think there are users and developers that could really take advantage of it.

            It would be nice to see the major development in R14 be greater end user control; open dsp architecture, customization of perfectmeta rules,...
            Last edited by EliC; August 05, 2010, 01:31 PM.

            Comment

            • Porcus
              dBpoweramp Guru

              • Feb 2007
              • 792

              #7
              Re: add SoX deemphasis filter as a DSP effect

              Originally posted by Spoon
              as it stands a DSP effect has no chance of knowing the pre-empth flag, unless CD Ripper was written to specifically tell that one DSP effect about it.
              But what about a log entry? Merely "Pre-emphasis detected" at the end of each track entry would be a real benefit.

              A Vorbis comment would also be A Good Thing.

              Comment

              • Spoon
                Administrator
                • Apr 2002
                • 44596

                #8
                Re: add SoX deemphasis filter as a DSP effect

                It is written to the log in R14 (if the technical column is enabled).
                Spoon
                www.dbpoweramp.com

                Comment

                • Jeff Flowerday
                  dBpoweramp Enthusiast

                  • Mar 2008
                  • 105

                  #9
                  Re: add SoX deemphasis filter as a DSP effect

                  Originally posted by Spoon
                  It is written to the log in R14 (if the technical column is enabled).
                  Thanks Spoon! This is really all that's needed, they are so far and few between that I have no problem running them manually through SOX.

                  Comment

                  • djs777

                    • Mar 2009
                    • 24

                    #10
                    Re: add SoX deemphasis filter as a DSP effect

                    Runnig SoX manually is not sufficient for me - I'd much rather have a DSP effect, or whatever else is needed within the dBpoweramp environment, to be able to detect and deemphasize dics with preemphasis.

                    Based on the info above, rather than re-writing Ripper, perhaps have a DSP effect read the cashed log information prior to conversion and deeemphasize prior to conversion. Perhaps start with the "run external" DSP and create a special version of "run external" to do this.

                    But I'm no programmer these days or have detailed knowledge of how the internals work for this application, so if the ideas above aren't fruitful, then perhaps this is doable another way.

                    If there is a way to use the "run external" DSP to do this without any modifications, then I'm all ears, but I've failed in my attempts to make SoX work via the existing "run external" DSP. Please note that what I and I believe others are asking for is to get dBpoweramp to work with just the preemphasis function of SoX, not the entire array of SoX functions.

                    I'd be happy with any improvement over the current method of having to run Ripper to detect such discs, manually running SoX externally and monkeying around with file names, moving files, renaming files again, running Ripper again on the deemphasized wav files, manually tagging results, and other steps currently required. Thanks for thinking about this.

                    Comment

                    • Porcus
                      dBpoweramp Guru

                      • Feb 2007
                      • 792

                      #11
                      Re: add SoX deemphasis filter as a DSP effect

                      Originally posted by djs777
                      I'd be happy with any improvement over the current method of having to run Ripper to detect such discs, manually running SoX externally and monkeying around with file names, moving files, renaming files again, running Ripper again on the deemphasized wav files, manually tagging results, and other steps currently required.
                      Let's stick to the following two steps:
                      1) having to run Ripper to detect such discs, and 2) running SoX externally
                      Obviously you have to run a CD ripper to rip those discs. And let us assume you run SoX manually.

                      And let us assume that your ripped files are
                      TrackA.flac
                      TrackB.flac
                      TrackC.flac
                      in the same folder.

                      What you do, is run a FOR loop: For all files F in the folder matching pattern *.flac, run
                      sox "$F" "$F.deemphed.flac" deemph .

                      This will create
                      TrackA.flac.deemphed.flac
                      TrackB.flac.deemphed.flac
                      TrackC.flac.deemphed.flac
                      with tags preserved.


                      At least, that's how it works with me.

                      Comment

                      • Arnold_Layne

                        • Nov 2009
                        • 38

                        #12
                        Re: add SoX deemphasis filter as a DSP effect

                        Originally posted by Porcus
                        Let's stick to the following two steps:
                        1) having to run Ripper to detect such discs, and 2) running SoX externally
                        Obviously you have to run a CD ripper to rip those discs. And let us assume you run SoX manually.

                        And let us assume that your ripped files are
                        TrackA.flac
                        TrackB.flac
                        TrackC.flac
                        in the same folder.

                        What you do, is run a FOR loop: For all files F in the folder matching pattern *.flac, run
                        sox "$F" "$F.deemphed.flac" deemph .

                        This will create
                        TrackA.flac.deemphed.flac
                        TrackB.flac.deemphed.flac
                        TrackC.flac.deemphed.flac
                        with tags preserved.


                        At least, that's how it works with me.
                        I'm lost when it comes to writing scripts. What is the proper format to run this script. I have made a batch file called deemph.bat but I'm unsure the exact text to put in the batch file to run sox.

                        A_L

                        Comment

                        • biggles
                          dBpoweramp Enthusiast

                          • Jul 2010
                          • 60

                          #13
                          Re: add SoX deemphasis filter as a DSP effect

                          I'm also confused on how to write and run the script. Can anyone clarify?

                          Comment

                          • biggles
                            dBpoweramp Enthusiast

                            • Jul 2010
                            • 60

                            #14
                            Re: add SoX deemphasis filter as a DSP effect

                            I'm struggling to get the following to work as a .ps1 file to do as Porcus suggested:

                            get-childitem -include *.flac
                            foreach ($_) {run sox "$_" "$_.deemphed.flac" deemph}

                            anyone see anything wrong with this or can fix it? thanks

                            Comment

                            • slainte

                              • Feb 2015
                              • 5

                              #15
                              Re: add SoX deemphasis filter as a DSP effect

                              here's an example based on what's been discussed above...

                              went to rip a used copy of tubular bells purchased earlier from my local record store. i use dbpoweramp. noticed that the 'track technical' column reported pre-emphasis. did some research and eventually found this thread. my example is on windows.

                              1. rip as you normally would to flac.
                              2. install sox - http://sox.sourceforge.net/
                              3. add sox to your path environment variable.
                              4. open up a command prompt (cmd).
                              5. navigate to where your flac files are.
                              6. run this command: for %f in (*.flac) do sox "%f" "%f.deemphed.flac" deemph
                              7. seems like it removed the album art so you may have to re-add that manually via dbpoweramp's built-in tagging tools.

                              looks like something like this:


                              C:\Users\slainte\Music\Mike Oldfield\Tubular Bells>dir
                              Volume in drive C is OS
                              Volume Serial Number is 6441-CC16

                              Directory of C:\Users\slainte\Music\Mike Oldfield\Tubular Bells

                              02/14/2016 12:08 AM <DIR> .
                              02/14/2016 12:08 AM <DIR> ..
                              02/14/2016 12:04 AM 137,969,451 01 Mike Oldfield - Part One.flac
                              02/14/2016 12:04 AM 120,875,037 02 Mike Oldfield - Part Two.flac
                              02/14/2016 12:04 AM 73,051 Folder.jpg
                              02/14/2016 12:04 AM 4,690 Mike Oldfield - Tubular Bells.txt
                              4 File(s) 258,922,229 bytes
                              2 Dir(s) 345,509,818,368 bytes free

                              C:\Users\slainte\Music\Mike Oldfield\Tubular Bells>for %f in (*.flac) do sox "%f" "%f.deemphed.flac" deemph

                              C:\Users\slainte\Music\Mike Oldfield\Tubular Bells>sox "01 Mike Oldfield - Part One.flac" "01 Mike Oldfield - Part One.flac.deemphed.flac" deemph

                              C:\Users\slainte\Music\Mike Oldfield\Tubular Bells>sox "02 Mike Oldfield - Part Two.flac" "02 Mike Oldfield - Part Two.flac.deemphed.flac" deemph

                              C:\Users\slainte\Music\Mike Oldfield\Tubular Bells>dir
                              Volume in drive C is OS
                              Volume Serial Number is 6441-CC16

                              Directory of C:\Users\slainte\Music\Mike Oldfield\Tubular Bells

                              02/14/2016 12:16 AM <DIR> .
                              02/14/2016 12:16 AM <DIR> ..
                              02/14/2016 12:04 AM 137,969,451 01 Mike Oldfield - Part One.flac
                              02/14/2016 12:16 AM 119,765,432 01 Mike Oldfield - Part One.flac.deemphed.flac
                              02/14/2016 12:04 AM 120,875,037 02 Mike Oldfield - Part Two.flac
                              02/14/2016 12:16 AM 104,211,746 02 Mike Oldfield - Part Two.flac.deemphed.flac
                              02/14/2016 12:04 AM 73,051 Folder.jpg
                              02/14/2016 12:04 AM 4,690 Mike Oldfield - Tubular Bells.txt
                              6 File(s) 482,899,407 bytes
                              2 Dir(s) 345,285,849,088 bytes free


                              from there you can rename the files. haven't played it yet. hoping i should be good.

                              thanks for the info shared here.

                              Comment

                              Working...

                              ]]>