Attenuation in bit-padded source with SOX - diyAudio
Go Back   Home > Forums > Source & Line > PC Based
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 8th February 2011, 10:41 PM   #1
badman is offline badman  United States
Custom Title
diyAudio Member
badman's Avatar
Join Date: Sep 2003
Location: Sunny Tustin, SoCal
Default Attenuation in bit-padded source with SOX

Hi Guys:

Using SOX to upsample in software (prefer to do it file level rather than asking the Behringer DEQ I use to do it), and want to include a normalization at -12dB. Going from flac 44.1/16 to 48/24. My command string is as follows:

cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox --buffer 32768 %%A -b 24 "converted/%%~nxA" gain -n -12 rate -v 48000 dither -f low-shibata

Doesn't seem like I should lose anything with the dither (which I'm using purely for low-level artifact masking) or by tossing away a couple bits to get the attenuation (given the 8 padding bits). Seem okay?
"The dawn of Bose created the "Man Cave" and reduced testoterone levels worldwide by 18.5 per cent" Peteleoni

Last edited by badman; 8th February 2011 at 11:03 PM. Reason: increasing attenuation to add dither headroom
  Reply With Quote
Old 11th February 2011, 11:00 PM   #2
diyAudio Member
Join Date: Mar 2003
Location: Mountain View, CA
Hi badman,

I can't comment on SOX specifically, but so long as its a good resampler I think your use-case is reasonable. Does the output of your command sound alright? If so, it's probably fine.

In terms of purity, you'll of course get quantisation noise at the 24th bit due to the processing. Given that you've resampled, the gain step is the least of your worries. In any case, dithering the output quantisation is definitely the right thing so you don't get distortion - I'd probably use flat TPDF dither with 24 bits, but some noise-shaping is probably fine too.

However, if the resampler's internals use 32-bit floating-point, you'll get some extra distortion appearing on top of that when the signal amplitude is loud, so if you're a real purist you'll want to make sure that the processing is done at 64-bit floating-point before the output quantisation. It's almost certainly overkill, but "24-bit pure" is a nice, perfectly attainable performance level as far as DSP goes, and 32-bit floating-point doesn't provide it in all cases.
  Reply With Quote


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone hear this 32 bit/192Khz source ? ashok Digital Source 2 25th October 2009 06:00 AM
Sorry a tad-bit off topic usb power source pinnout shadiedog87 Power Supplies 4 10th December 2007 06:05 PM
24 bit I2S source to 16 bit DAC? chris719 Digital Source 5 18th June 2005 05:24 PM
Padded cone for time alignment nuppe Multi-Way 12 23rd March 2004 12:08 PM
use digital attenuation to improve 16-bit CD playback on 24 bit DAC capslock Digital Source 7 8th April 2002 11:18 PM

New To Site? Need Help?

All times are GMT. The time now is 02:53 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright 1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2