Login / Register
 
Work in progress - Prototype for SoX Sample Rate Converter GUI
New Reply
Subscribe
JustMastering
Thread Starter
#1
23rd December 2012
Old 23rd December 2012
  #1
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Work in progress - Prototype for SoX Sample Rate Converter GUI

Hello,

I am working on a GUI interface for SoX to make it easier/quicker to use for sample rate and format conversion operations (including batch conversions). For anyone that uses SoX, your feedback on what I have created so far, is most appreciated.

You can download a free copy of the working prototype, here. Please note that the prototype is Microsoft Excel-based (who said you couldn't have fun with spreadsheets!), so you will need to have Excel 2007 or higher to run it. If this prototype turns out to be popular, I am planning to convert it over to a standalone application at some point.

Thanks so much in advance, please feel free to reply with any questions or contact me directly.

Happy Holidays !
Rob
__________________
Rob Stewart


the Audio Mastering Checklist

Trust me, a great mix has almost nothing to do with your converters ! Read my four most critical mix tips to achieving clear, dynamic and musical mixes.
#2
24th December 2012
Old 24th December 2012
  #2
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
This is a good start. What really makes SoX usable for me is the ability to "tune" the SRC. I'd like to see some more variable options like in the SoX Foobar plugin as shown in the attachment. If I want a really steep cut-off filter, I can do that, but I find being able to change the slope and the phase response fairly fluidly allows for much less intrusive filtering for different material. As you can see here, it's set for fully linear phase, 91% bandwidth, which starts rolling off the high end at 20KHz in this case. No joke, 91% bandwidth has about 1/10th the preringing of the default setting and that's more important to me than preserving bandwidth most people can't hear. I might even like to see the bandwidth option go down to 80% or so for when I need to convert something with very little high end (electric guitar etc.)

It may be a good idea to add some more "under the hood" settings as well. SoX is extremely flexible and high quality, which is why I use it.
Attached Thumbnails
Work in progress - Prototype for SoX Sample Rate Converter GUI-sox_foobargui.gif  
__________________
Stephen Baldassarre
www.gcmstudio.com
JustMastering
Thread Starter
#3
24th December 2012
Old 24th December 2012
  #3
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Quote:
Originally Posted by wado1942 View Post
It may be a good idea to add some more "under the hood" settings as well.
Hi Stephen,

Thanks so much for your feedback and ideas. I am in the process of learning a bit more about those passband, phase response and other settings, and will plan to make an update to this prototype early in the new year.

Thanks again !
Rob
Babaluma
Verified Member
#4
25th December 2012
Old 25th December 2012
  #4
Lives for gear
 
Babaluma's Avatar
 
Joined: Feb 2006
Location: Milan
Posts: 1,113
My Recordings/Credits

Verified Member
Babaluma is offline
Looking forward to seeing this finished! Agree, the more options the merrier, within reason.
JustMastering
Thread Starter
#5
10th January 2013
Old 10th January 2013
  #5
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Hey Everyone, Happy 2013!

Thanks again for your feedback, so far. I have created V1.1, and incorporated several new features based on feedback I have received so far. EDIT - V1.2 now complete with even more features.

Wado1942, I think I incorporated what you were looking for. You can set the bandwidth as low as 74% (won't work for all settings, some you have to have a minimum of 85), and you can choose any phase response value from 0 to 100. I haven't had a lot of time to test this out yet. If you have a chance to give it a try, please, and confirm for me that it's doing what you'd expect, I'd appreciate it very much.

Here's the link to the download page. Please refer to the "V1.1 Enhancements" tab within the tool, for details on the changes I made.

I have more updates planned, such as specifying fixed vs floating point output files, and also incorporating bandpass filters (Butterworth etc).

Any additional feedback/comments are welcome.
Cheers!
Rob
#6
11th January 2013
Old 11th January 2013
  #6
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
It looks right, but I can't seem to do anything with it. The "Output File Folder" has some kind of error, which I can't read because the buttons next to it cover the text and I can't seem to resize the cells.

BTW, I hadn't actually tested the earlier version you posted because it didn't sport the options needed to make it better than what I already use.
JustMastering
Thread Starter
#7
12th January 2013
Old 12th January 2013
  #7
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Hi,

Thanks, what OS and version of MS-Excel do you have? I'll see what I can do to fix that (I wrote it using Excel 2007 on Windows 7 Pro 64-bit.

.... Just thought of something, I think it's the "pause" feature (which leaves the command window open until you press a key) interfering with subsequent operations. If I'm right, I should be able to fix that easily by getting excel to write separate batch files for each button pressed (currently, everything gets written to c:\Sox.bat, so if any command windows are left open when you press another button you'll get an error).

I'll get back to you soon, thank you for giving it a try!
cheers,
Rob

Rob
JustMastering
Thread Starter
#8
12th January 2013
Old 12th January 2013
  #8
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Greetings!

I have posted version 1.3 with several changes. Here is the link. I believe I have solved the issue with the buttons that was happening for some users.

I have tested this version on Excel 2007 and Excel 2010, but this is (unfortunately) only designed for the Windows platform. If I get any funding to really develop this tool into a true standalone GUI, I will certainly look at creating both Mac and PC versions, but for now it is PC only.

I have also added two helpful features:

1. Option to choose the output file encoding (fixed/floating, u-law etc.)
2. "Visual Feedback" (the actual command line that will be used is shown on screen and updates as you make changes, so you can see how the choices you make affect the command line)

I have also added a "Troubleshooting" tab, which has some things you can try if you cannot get the tool to work for any reason.

Thanks again!
Rob
#9
13th January 2013
Old 13th January 2013
  #9
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
Good move showing the command lines. Here's what happens when I run it. First it tells me the path already exists (yeah, I know, I made so I had a place to put the source file) and then it tells me it can't find the path it just told me already exists.
Attached Thumbnails
Work in progress - Prototype for SoX Sample Rate Converter GUI-sox_gui_fail.gif  
JustMastering
Thread Starter
#10
13th January 2013
Old 13th January 2013
  #10
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Hey Stephen,

Thank you for not giving up on this. I think we're almost there. Could you try leaving the "input file type" blank, please? This will let SoX auto detect the format.

That should work in this case, as long as there is only one file in the input folder. (the "convert it" button won't do bulk conversion, yet, but the "create bulk batch" option is away around that for the time being).

The other "already exists" errors are normal, but in future versions I'll see if I can somehow suppress those from appearing.

Thanks again!

Rob
JustMastering
Thread Starter
#11
13th January 2013
Old 13th January 2013
  #11
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Hi Again,

I have replicated your exact settings to see what happens on my side.

That red error box is warning that the output folder is the same as the input folder (which shouldn't matter as far as making the conversion work), but I'll make sure to move that in the next version so it's visible.

I can't get it to give me the same "can't find path specified" error. It could be doing that based on the input file specs (*.wav) though.

Question, if you do the "Create bulk batch" feature, does that work? (should be able to just drag the file onto the icon on the desktop and it will throw the converted version into the output folder.

I will work on this and will get back to you.

Thanks again!
Rob
JustMastering
Thread Starter
#12
13th January 2013
Old 13th January 2013
  #12
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Greetings everyone,

Version 1.4 is now posted (click here).

Stephen, I think I have narrowed it down to being either an issue with some extra spaces that were getting added to the command line, or possibly an issue with the long file name.

Could you try the exact same path and SRC settings using v1.4, please? If it still does not work, the next thing to try is entering the exact same command line at the command prompt which is:

"C:\Program Files (x86)\sox-14-4-0\sox.exe" -S -V2 "C:\sweeptest\*.wav" -b 32 "C:\sweeptest\Converted UserDef ( -v -b 80) 32Bit 44100 TPDF.wav" rate -v -b 80 44100 stats

If it doesn't work when entering it manually at the command prompt, then we can eliminate the GUI tool from the equation, and likely conclude that the issue is with the long output file name. Next, if you could also try this, please (Same command line, only with a shortened output file name):

"C:\Program Files (x86)\sox-14-4-0\sox.exe" -S -V2 "C:\sweeptest\*.wav" -b 32 "C:\sweeptest\Converted.wav" rate -v -b 80 44100 stats

If this second option works from a command prompt, I will need to update the GUI tool create file names that are generic (and possibly shorter). I thought having the longer names with details in them would be helpful from an auditing perspective but some OS's or configurations might have issues with them.

Thanks once again!
Rob
#13
13th January 2013
Old 13th January 2013
  #13
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
Well, something must be wrong with SoX, because when I open it, it just flashes the prompt on screen and disappears all withing about two refresh periods.
JustMastering
Thread Starter
#14
13th January 2013
Old 13th January 2013
  #14
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Hmm, even when running that second string from the command prompt (shortened file name)? Yes that is definitely weird because if it was an issue with the command syntax, SoX would report that back.

I am stumped for the time being. I have tested your exact settings on two PCs and it works great for me, but I will keep thinking (I love a good puzzle).

.... At the command prompt, if you type CD\, and then enter (which takes you back to a the root of c), first, and then run the SoX command, does that make any difference? If that works, I can add that as a step in the batch, to make sure that the command is started from the root of c:.

EDIT: Just checking.. Are you using SoX 14.4.0, and have it installed in the same folder specified in the string? If you have it installed in a different folder, you can change that in the "Config" tab within the GUI tool.

Rob
#15
14th January 2013
Old 14th January 2013
  #15
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
No, 14-3-1
JustMastering
Thread Starter
#16
14th January 2013
Old 14th January 2013
  #16
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Thanks Stephen,

We're 99% there. There are two ways to resolve this (both will work, but I am recommending option 1, below):

1) (Best option) - download and install SoX 14.4.0. It installs to "C:\Program Files (x86)\sox-14-4-0\" by default, which is where the GUI is pointing to by default. This is the best option because I built the GUI based on features/commands for version 14.4.0 (it might work fine with older versions but unfortunately I can't guarantee that at this stage).

2) Change the value in cell B2 on the "Config" tab in the GUI, from "C:\Program Files (x86)\sox-14-4-0\sox.exe" to "c:\sox-14-3-1\sox.exe" (assuming you have it installed in the default location). This points the GUI to using version 14.3.1, which installs in a completely different location than the current version.

I just installed 14.3.1, changed cell B2 in Config and tested your exact setting, and it works, but, I'm not sure what other differences there are between the SoX versions which is why I consider option 1, above, the better option.

Cheers
Rob
JustMastering
Thread Starter
#17
25th January 2013
Old 25th January 2013
  #17
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Hey Everyone, - just a quick update

Stephen, I hope the prototype is working for you, now. I sincerely owe you a huge thanks for your involvement in this. It was your initial feedback that inspired the "Under The Hood" tab with the additional features. So thank you very, very much!

I have updated my SoX GUI download page with some "Readme"-type details near the download link, to make it easier for anyone downloading the tool to get it working on their system.

If anyone else has used this prototype and has any feedback on it, please feel free to share.

Thanks again !
Rob
#18
26th January 2013
Old 26th January 2013
  #18
Gear maniac
 
david1103's Avatar
 
Joined: Dec 2005
Location: Brighton UK
Posts: 230

david1103 is offline
I am very interested in what you are doing, but i regret i don't have or want Office (Excel) 2007 or higher.

Fingers crossed for a GUI version that runs by itself, if that is not possible making it work with Libre Office would mean anyone could use it (being free)

Out of interest, Audacity 2.0.3 just had SoX built into it, I am in the process of chatting to the developers on their forum to try to get them to add features. Maybe someone could join in

Audacity Forum • View topic - SoX Quality Settings (Inc Phase)

cheers.
#19
26th January 2013
Old 26th January 2013
  #19
Gear maniac
 
david1103's Avatar
 
Joined: Dec 2005
Location: Brighton UK
Posts: 230

david1103 is offline
Quote:
Originally Posted by wado1942 View Post
If I want a really steep cut-off filter, I can do that, but I find being able to change the slope and the phase response fairly fluidly allows for much less intrusive filtering for different material. As you can see here, it's set for fully linear phase, 91% bandwidth, which starts rolling off the high end at 20KHz in this case. No joke, 91% bandwidth has about 1/10th the preringing of the default setting and that's more important to me than preserving bandwidth most people can't hear. I might even like to see the bandwidth option go down to 80% or so for when I need to convert something with very little high end (electric guitar etc.)
Could you elaborate? How exactly does lowering the bandwidth reduce pre-ringing so much in 100% linear phase mode? Is this clearly audible in a 96 > 44.1 conversion? How did you test this and come up with the 1/10th figure?

Also, when would you move away from a linear phase response and what would you be listening for? CHEERS, this is very interesting.
JustMastering
Thread Starter
#20
27th January 2013
Old 27th January 2013
  #20
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Quote:
Originally Posted by david1103 View Post
I am very interested in what you are doing, but i regret i don't have or want Office (Excel) 2007 or higher.

Fingers crossed for a GUI version that runs by itself, if that is not possible making it work with Libre Office would mean anyone could use it (being free)

Out of interest, Audacity 2.0.3 just had SoX built into it, I am in the process of chatting to the developers on their forum to try to get them to add features. Maybe someone could join in

Audacity Forum • View topic - SoX Quality Settings (Inc Phase)

cheers.
Hi David,

Thank you for this, I wasn't aware of Libre Office. Unfortunately, I'm a long time user of Microsoft Office (going back before there was ever an "Office" suite - ha), and admittedly I built the prototype for my own use/gain before deciding to share it with others. That said, if the Libre Spreadsheet product supports existing Excel macros/buttons, has the same ability to make use of VB scripts (and the same interpretation/support that Excel has), then there's a chance that this tool will work in Libre too, I just haven't had a chance to test it. (Realistically, I think it's a slim chance it will work unfortunately - no knock against Libre at all, just the reality of competing software packages and cross-compatibility at that level can likely only go so far).

That is encouraging news about Audacity. Certainly, in my view that's a better option. If they incorporate all of SoX's features into their product, and keep up with the changes, then there's no reason for me to reinvent the wheel .

Re your question to Stephen, I'm not certain but I think he might be using a gentler slope as well, to reduce the ringing. I'll leave that for him to confirm, but that's how I originally interpreted it, so when I added the "Under the Hood" tab, I set it up so that when you select a lower bandwidth setting, you lose the ability to specify steep filtering, and the GUI just assumes if you're asking for say 88% bandwidth that you do not want the steep filter. Baring that in mind, if there is reason for users to combine lower bandwidth + steep filtering, it is an easy change for me to make to the GUI (i.e. do not hide that option if the user selects limited bandwidth).

..... I have learned wayyyy too much about Excel, VBscript, Macros and other "stuff" than I ever wanted to know in the last month ! But I am happy to say that the GUI prototype seems to be working really well. It is unfortunate that it's limited to MS-Excel users on a PC, but I will definitely keep this thread updated if the prototype turns into a real product someday (if Audacity doesn't beat me to it).

All the best !
Rob
#21
27th January 2013
Old 27th January 2013
  #21
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
Yes, correct (sorry, it's been a busy week and I haven't had much time to play). When I chose a lower bandwidth, the slope of the filter is less steep. The less steep the filter is, the less damage is done to the audio. I don't know if it's exactly 1/10th the preringing, but it's significantly reduced. It's not something you normally hear per say, but transients sound softer with really steep filters and there's just no reason for it. I find 91% to be ideal for conversion in mastering for instance, because the response starts to droop right around 20KHz and reaches full attenuation at 22KHz. Less processing happens behind the scenes and the sound is more natural because of it.
#22
29th January 2013
Old 29th January 2013
  #22
Gear maniac
 
david1103's Avatar
 
Joined: Dec 2005
Location: Brighton UK
Posts: 230

david1103 is offline
Cheers guys!

Rob, best wait till LibreOffice 4.0 out next week if you would like to test compatibility. Portable version will be available too, just go to download and scroll down to 'packages'

Do i need to alter any other SoX parameters to get a gentler filter slope, or will just lowering the bandwidth do the job? I will give this a listening test soon, i can't find anyone on-line talking about changing the bandwidth settings... that's a pretty cool discovery!
JustMastering
Thread Starter
#23
29th January 2013
Old 29th January 2013
  #23
Gear addict
 
JustMastering's Avatar
 
Joined: Aug 2012
Location: Canada
Posts: 375

Thread Starter
JustMastering is offline
Quote:
Originally Posted by david1103 View Post
Cheers guys!

Rob, best wait till LibreOffice 4.0 out next week if you would like to test compatibility. Portable version will be available too, just go to download and scroll down to 'packages'

Do i need to alter any other SoX parameters to get a gentler filter slope, or will just lowering the bandwidth do the job? I will give this a listening test soon, i can't find anyone on-line talking about changing the bandwidth settings... that's a pretty cool discovery!
Thanks,

Just the "-b" option is all you need (the "-s" option is used to specify steep filter), so if you do -v -b 90, you have SoX's "Very High Quality" SRC setting, with 90% bandwidth, but no steep filter.

Cheers!
Rob
#24
3rd March 2013
Old 3rd March 2013
  #24
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
I just downloaded the newest version of your sheet and SoX and it still doesn't work. I think the path is the issue in this case but I can't alter it to match the version I have.
#25
4th March 2013
Old 4th March 2013
  #25
Gear maniac
 
david1103's Avatar
 
Joined: Dec 2005
Location: Brighton UK
Posts: 230

david1103 is offline
Hello wado1942, have you experimented with option "allow aliasing" on and off?

From reading the manual it seems its a good idea to allow aliasing (ie in the foobar plugin have 'allow aliasing ticked')

SoX

Quote:
If the ?a option is given, then aliasing/imaging above the pass-band is allowed. For example, with 44.1kHz sampling rate, and a resampling band-width of 95%, this means that frequency content above 21kHz can be distorted; however, since this is above the pass-band (i.e. above the highest frequency of interest/audibility), this may not be a problem. The benefits of allowing aliasing/imaging are reduced processing time, and reduced (by almost half) transient echo artefacts. Note that if this option is given, then the minimum band-width allowable with ?b increases to 85%.
What i can't understand is WHY you would NOT allow aliasing above the pass-band with the the halving of the transient echo?! Surely its not audible by definition as the aliasing is above the pass-band?

I have been reading up on forums on this, and no-one seems to be able to give a clear answer on this subject. People just say its best to allow aliasing, but it 'might' not be?
#26
4th March 2013
Old 4th March 2013
  #26
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
I've tried the "allow aliasing" option in SoX and I do not suggest it because you have no control over HOW MUCH aliasing to allow. The idea is that you can use a gentler filter to alleviate some of the side effects. The anti-aliasing filters used in ADCs do that somewhat, because they're all designed with the idea of working at 44.1KHz and they just CAN'T make filters steep enough to allow 22KHz bandwidth and NOT have aliasing. I've found, however, that allowing aliasing with SoX affects the audible band and instead decided to use lower bandwidth. I don't need it to be flat up to 21.8KHz or whatever, a .5dB droop at 20KHz is fine (about 91% bandwidth) with no aliasing allowed.
#27
4th March 2013
Old 4th March 2013
  #27
Gear Head
 
Joined: Oct 2008
Posts: 58

bandpass is offline
At 44kHz+ rates, neither aliasing nor transient artefacts should be audible, as they both occur at 20kHz+.
inlinenl
Verified Member
#28
4th March 2013
Old 4th March 2013
  #28
Lives for gear
 
inlinenl's Avatar
 
Joined: May 2005
Location: Netherlands
Posts: 2,093

Verified Member
inlinenl is offline
well done Rob, great initiative ... thnx !
#29
4th March 2013
Old 4th March 2013
  #29
Gear maniac
 
david1103's Avatar
 
Joined: Dec 2005
Location: Brighton UK
Posts: 230

david1103 is offline
Thanks wado1942, that was just the info i was looking for! Would you use the exact same settings to up-sample and down-sample between 44.1 and 96k?

You seem an expert on sampling theory, so I would like to ask if you could help clarify the information in this Lavry Engineering white paper?

http://lavryengineering.com/pdfs/lav...troduction.pdf

He talks about 'connecting the dots' and the fact that the 'non technical' person assumes that the more dots (higher sample rate) the more accurate the re-creation of the waveform. He then goes on to explain further about RZ/NRZ and concludes:

Quote:
Steps = Wave + Error,
Removing error by subtruction yield:
Steps - Error = Wave+ Error - Error = Waves.
I have searched everywhere for more information on exactly what is going on here, but all I can find is equations I have no idea about!

I still can't get my head around HOW with the limited samples the waveforms can be recreated *perfectly*.

This post by DistortingJack says the same thing as Lavry:

Nyquist–Shannon sampling theorem: please stop murdering it.

Quote:
When people see the samples in an audio signal, they think the fact it's a series of dots means there is information missing between them. Obviously, there is lots of stuff "in between" the samples that never made it inside the computer. But what the very elegant Whittaker–Shannon interpolation formula proves is that all the stuff in between the sample dots can be reconstructed by the computer if need be. And any signal whose frequency is below half the sampling rate, is not only fully recoverable from the discreet samples, but perfectly so.
There is no error in the mathematical processes that convert the discreet samples into the fully reconstructed equation, this is, at least, in an ideal world.
These SOS articles are very well written, but just gloss over this area that is causing me the confusion:

All About Digital Audio, Part 1
All About Digital Audio, Part 2

Is it just that the maths is so advanced its impossible to explain without formula? Its driving me crazy, but i haven't got time to quickly go and do a 4 year maths degree How does something come out of nothing?

* edit just got the best quote yet, straight from John Watkinson's book 'Introducing Digital Audio', still don't get it:

Quote:
If the cut-off frequency of the filter is one-half of the sampling rate, the impulse passes through zero at the sites of all other samples. It can be seen from Figure 4.6(c) that at the output of such a filter, the voltage at the centre of a sample is due to that sample alone, since the value of all other samples is zero at that instant. In other words the continuous time output waveform must join up the tops of the input samples. In between the sample instants, the output of the filter is the sum of the contributions from many impulses, and the waveform smoothly joins the tops of the samples. It is a consequence of the band-limiting of the original anti- aliasing filter that the filtered analog waveform could only travel between the sample points in one way. As the reconstruction filter has the same frequency response, the reconstructed output waveform must follow the same path. It follows that sampling need not be audible. The reservations expressed by some journalists about ‘hearing the gaps between the samples’ clearly have no foundation whatsoever
You have been very helpful already with the SoX info, thanks again
#30
5th March 2013
Old 5th March 2013
  #30
Lives for gear
 
wado1942's Avatar
 
Joined: Jan 2009
Location: Boise, Idaho
Posts: 2,697

wado1942 is offline
Quote:
Originally Posted by bandpass View Post
At 44kHz+ rates, neither aliasing nor transient artefacts should be audible, as they both occur at 20kHz+.
And yet they are when you click "allow aliasing".



Quote:
You seem an expert on sampling theory, so I would like to ask if you could help clarify the information in this Lavry Engineering white paper?
I'm hardly an expert, but I know a bit.



Quote:
He talks about 'connecting the dots' and the fact that the 'non technical' person assumes that the more dots (higher sample rate) the more accurate the re-creation of the waveform.
The basic idea is that a sine wave is one frequency, pure and unpolluted. All other variations of waveforms are multiple frequencies combined (look up Fourier Transform). It's not quite the absolute truth... I mean, you can't feed a bunch of sine waves together to get a perfect square wave, but if you filter a square wave down to its fundamental, only a sine wave will be left. A sine wave has a positive peak and a negative peak, so you should be able to sample a 20KHz wave with only a 40KHz sample rate. That's one sample for the peak and one sample for the trough. The output will still be 20KHz. A 20KHz wave sampled at 40KHz would yield a triangle wave, but a low-pass filter will get rid of the digital "junk". If you have a 10KHz sine wave digitally sampled at 40KHz, you still have a triangle wave on the output, right? Well, that triangle wave still contains the original information (10K sine wave), but it's been polluted by false, odd harmonics. The first harmonic of a 10K triangle wave is 30KHz, so if you filter out everything above 20KHz, it's a sine wave again.

There's also a matter of quantization distortion. Since you only have so many levels to represent your signal, they're not perfect representations of the input signal. Since those steps are discrete and predictable, they can somewhat be reversed by subtracting the calculated error from the output signal.


Quote:
Is it just that the maths is so advanced its impossible to explain without formula? Its driving me crazy, but i haven't got time to quickly go and do a 4 year maths degree How does something come out of nothing?
When did "maths" become a word? I'm not insulting you, I just see it a lot now when I never did a few years ago. It's explainable without math, but that's not how engineers think I guess.


Quote:
edit just got the best quote yet, straight from John Watkinson's book 'Introducing Digital Audio', still don't get it:
This is tougher to explain in layman's terms. He's talking about oversampling DACs. Go back to our 40KHz sample rate. The input signal has been limited to 20KHz by the magical "perfect" anti-aliasing filter, which is really just a filter that blocks absolutely everything above a certain frequency without harming anything in the audible range. Perfect filters don't exist and they never can, but let's pretend they do. If you convert this 40KHz signal to analogue directly, it takes an equally "perfect" reconstruction filter (yet another low-pass filter) at 20KHz to get rid of the junk. On top of false harmonics, you have the reverse of aliasing, which is imaging. Anything BELOW the Nyquist frequency (20KHz in this case) is reflected above the Nyquist frequency, so 10KHz is now output as both 10KHz and 30KHz. Still, a perfect filter doesn't exist for reconstruction either. What they do is over-sample the signal, usually by 8x, so now 40KHz is 320KHz. This creates an "impulse" of sorts where you have a spike in the signal that represents the 40KHz digital signal followed by seven samples of "zeroes". Issues have been pushed 8x out into no-man's-land where very simple filters can gracefully dispose of them. The original signal only contained audio below 20KHz, so all that information has been smoothed into something recognizable.

I'm giving the quick'n'dirty of all this stuff, but that's the jest of it. I know some people "in the know" will tear me apart because I even seen experts tear each other apart for trying to paraphrase. Of course, it all works well assuming you have perfect A/D conversion and perfect D/A conversion. In reality, there is no perfection and I really do think 96KHz sounds better than 44.1KHz in almost all situations. The main reason for that, of course, is because more of the errors introduced by the ADC and DAC are well beyond your hearing range. On that note, I think it's hilarious that the same people who created 64x (and higher) oversampling ADCs, 8X oversampling DACs and oversampling plugins claim anything higher than 44.1KHz is stupid. "Really? So as long as the A/D converters are running at 2.8MHz, the D/A converters at 352.8KHz and anything doing any processing is running at, say 176.4KHz, 44.1K is totally perfect for everything. It sounds like you guys are saying 44.1K SUCKS!" Now I KNOW I'm going to get it for that!
New Reply Submit Thread to Facebook Facebook  Submit Thread to Twitter Twitter  Submit Thread to LinkedIn LinkedIn  Submit Thread to Google+ Google+ 
 
Topic:
Thread Tools
Search this Thread
Search this Thread:

Advanced Search
Similar Threads
Thread
Thread Starter / Forum
Replies
6777 / High end
69
norman_nomad / Low End Theory
23
paulbankier / Studio building / acoustics
2
evangelista / Post Production forum!
0

Forum Jump

SEO by vBSEO ©2011, Crawlability, Inc.