Sample Rate Conversion

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
With a properly band-limited signal sampled at more than twice the bandwidth, you can reconstruct EXACTLY the band-limited signal again. We'll ignore amplitude quantisation here but remind people that quantising in time is not exactly analogous to quantising in amplitude.

Why acknowledge one source of error but not the other? There is no real world implementation that produces exact results. You will get errors due to quantization, you will get errors due to filtering.
 
Last edited:
I have Art of digital audio on the shelf along side 'sound recording practice ' , kinda timeless as everything contained within still holds true, RDH4 is just as relevant as ever to tube design despite being close on 70 years old .

I have tried Reapers sample rate conversion , its an offline process where you can select the accuracy which determines processing time , but it still only takes a matter of seconds to process a song. I always record at 48khz 24 ,or above , often its just a listening copy that I transfer to CD for the artist if their not computer literate . I did look at standalone modern software for format conversion , it does appear on paper at least to do a better job , but on a CD played over a boom-box to old ears it makes little difference compared to my 20 year old Akai DPS24's built in SRC algo , although it takes minutes instead of seconds to compute , what I loose in processing time i gain from not having to dump things over to pc .
 
I've gotten enough information out of this thread to improve my understanding of the process, and his... but he took his ball and went home. He called me a bad name and blocked me.

Not that i have much particularly constructive to add, but...
 

Attachments

  • 274571916_7018960034841892_6724933110681268299_n.jpg
    274571916_7018960034841892_6724933110681268299_n.jpg
    73 KB · Views: 18
Last edited:
Oh, them guitar-people are a breed of their own, between tonewoods and "magical" ancient opamps and whatnot... [groan...]
 
Oh, them guitar-people are a breed of their own, between tonewoods and "magical" ancient opamps and whatnot... [groan...]
One of the youtube guys I follow Jim Lill did an experiment with pickups and a 2 x 4 to see where the "tone" really comes from...he went so far as to string a set of guitar strings across 2 workbenches in the barn to compare it to the "tone-wood" in his electric...it wasn't exactly scientific but pretty darn close in a barn...the results (through U-tubeless compression) were really quite remarkable...it seems a good 90%+ of the tone we hear in an electric guitar is purely the pickups...they don't care it its balsa wood or air the strings are hanging over.

Of course you will never convince a guy who bought a $2000 Les Paul to sound like Jimmy Pages tele that the sound he seeks is not wearing a Gibson truss rod cover.
 
I saw that video (and the tonewood, or lack thereof, one) the other week - great work there, which only went on to reinforce, well, y'know... LOGIC 😁
 
Why acknowledge one source of error but not the other? There is no real world implementation that produces exact results. You will get errors due to quantization, you will get errors due to filtering.
In a well designed system they will both manifest as noise way below the noise floor you have already in the original analogue signals.

I made the point of separating the two because lots of people imagine a stair-step or pixelation effect due to sampling in time, and it simply isn't so.
 
In a well designed system they will both manifest as noise way below the noise floor you have already in the original analogue signals.

I made the point of separating the two because lots of people imagine a stair-step or pixelation effect due to sampling in time, and it simply isn't so.
That's the other big thing you have to fight with these people who don't understand digital audio. There are no stairsteps. I show them this video:



And the other thing, which this thread was an attempt to help me understand was about the 96/44.1 thing.
 
That's the other big thing you have to fight with these people who don't understand digital audio. There are no stairsteps. I show them this video:

That video always makes its rounds but really needs to be taken with a grain of salt. Fine as an introduction, but clearly from someone who hasn't designed converters in the real world.

Regarding stairsteps they do actually exist, stairstep with filter (or not) is a perfectly valid reconstruction method (there are others).

Digital is like any other electronics we deal with, it's not perfect, there are compromises and tradeoffs. The circuits, clocking, filters, sample rate, all matter.
 
It has been a long time since I did my degree. I'm curious: how do you get from stairsteps to audio without a filter?
air is a LP filter... +the brain does lots of processing on raw data.

What do stair steps sound like (rhetorical, please don't answer)?

Some things are not worth inspecting too closely expecting to gain expertise...(like covid, climate change, etc).

JR
 
It has been a long time since I did my degree. I'm curious: how do you get from stairsteps to audio without a filter?

In the frequency domain the reconstruction will look like the original signal plus higher order images all with a sinc based amplitude envelope. So really the filter needs to reject the images and compensate for the in band amplitude droop. Is it strictly necessary? I've read stories of some people actually preferring the sound without the filter. It's not unreasonable, especially if you consider higher sample rates. The in band droop will be minimal and the images will be lower level and far out of band. The inherent low pass filtering of the playback system and ear take care of the rest.
 
So I ordered the Art of Digital Audio (I did not order the latest revision which cost more than my "Art of Electronics" I figure the early versions will give me enough stuffing to satisfy my hunger...

But while I wait...if there is a simple explanation...for sampling...


The analog signal is going to be basically a sine wave of some form...so in Nyquist we take a sample of that wave at 2x the highest frequency we intend to capture...so there is some clocking that is happening in whatever silicone A to D we are using...pretty darn fast clocks setting a baseline for the sample process...DIGITAL implies a binary grid, a language or sorts to identify each sample taken with a value...which probably includes another identifier for how loud the signal is at that sample point...

Is this event (the sample) just basically a digital snapshot of information flowing through the AD and then stored as a bit (byte, whatever) in some sort of ram in the AD then shuffled out to the application host?

In my thinking I'm imagining a flow of water down a tube and a cup grabbing a sample of the water at a specific clocking interval and then dumping that water into ram...and if we do that at TWICE the speed of the water in the tube we can get an accurate picture of whats in ALL the water passing through the system?


I'm trying to wrap my head around the actual physical process...not just the digital one...


Sound waves hit the microphone capsule, that gets converted to a micro-AC voltage which travels down the cable to a preamp and then to the audio device, once the voltage gets to the AD there is probably some filtering but eventually that AC signal is loaded into some grid/sieve that identifies the frequencies and how loud or quiet they are at a given moment in time...then that moment is converted to a digital representation, a "token" of the frequency with amplitude and that is parsed off to RAM and exported to the DAW...?
 
The Nyquist-Shannon 2x sampling criteria is because less than two samples per complete up/down waveform period could miss either the up or down information and would be misinterpreted as a lower frequency. We have probably heard alias/birdies from under sampling.

JR
 
Note that the sampling theorem requires that the sample rate be strictly GREATER then twice the bandwidth of the sampled signal, not EQUAL TO, GREATER THEN, this removes the ambiguity inherent in taking exactly two samples.

I would also note that sampling is conceptually distinct from quantisation (The reality gets a little blurred in real parts), you can build a sampler with nothing more then a clock, a jfet and a cap and it will exhibit all of the classical sampled system behaviours.
 
that AC signal is loaded into some grid/sieve that identifies the frequencies and how loud or quiet they are at a given moment in time.
No frequency identification required, audio samples are just a representation of the signal amplitude at the moment of the sampling clock. You just get a stream of numbers representing the signal level at each instant.
 
But while I wait...if there is a simple explanation...for sampling...
The simplest to explain the concept would be take a look at a wavy line (analogue signal) drawn on fine grid graph paper.

The x-axis is time. Each little grid square is a sample period. Each sample is the y axis value at the x-axis grid points.

So long as your time axis grid points are more than twice as close together as the fastest wiggle in your wavy line, you can reconstruct the wavy line again later from the stream of numbers you read off the y-axis.
 
In the frequency domain the reconstruction will look like the original signal plus higher order images all with a sinc based amplitude envelope. So really the filter needs to reject the images and compensate for the in band amplitude droop. Is it strictly necessary? I've read stories of some people actually preferring the sound without the filter. It's not unreasonable, especially if you consider higher sample rates. The in band droop will be minimal and the images will be lower level and far out of band. The inherent low pass filtering of the playback system and ear take care of the rest.
Thanks. Bits of my degree are starting to come back now plus, in later life, we used deliberate under-sampling as a way to down-convert IF to baseband in WiFi and 4G systems. Basically grabbing one of the image repetitions.

So, the answer to how you get stair-steps back to audio without a filter is with a filter (somewhere). I thought as much.
 
Back
Top