Fractional Tables?

VST, AU, AAX, CLAP, etc. Plugin Virtual Instruments Discussion
Post Reply New Topic
RELATED
PRODUCTS

Post

aciddose wrote:toxik; how can a card produce a continuous signal from a discrete signal? it isnt possible without some kind of magic.
Okay, let me preface by saying I don't know more than I've read. But from what I understand the D/A converter uses the sinc algortihm (or some implementation of it) to "determine" what the values should be between the two discrete points.
aciddose wrote:the card simply upsamples the signal to a higher rate which the dac runs at. upsampling is exactly what you're discribing other than the "to a continuous signal" part which is nonsense.
It's not nonsense, it has to convert it to ANALOGUE (that's the whole "A" half of "D/A"), and CURRENT is considered a continuous signal (I guess at the subatomic level it's not but in modern convention)

What you're describing is the points reach the DA converter, it digitally converts them to MORE points, and then sends those points as discrete values of voltage out. Now, AFAIK the D/A converter serves the purpose of converting discrete digital signal into continuous current, meaning the sinc (or whatever) interpolation algorithm is used to calculate a sort of "vector" (bare with me), or path along which the voltage level should move when transitioning from one point to another. I could be wrong, though.

IF you want to know what kind of "magic" makes a continuous path from discrete points you should perhaps have a look at your waveform display from a page ago, where the software "knew" how to interpolate between points. What it does when drawing that line is the same thing that the D/A converter does when creating voltage values from samples.
Image

Post

that is possible but you wont be getting the perfect results that way. the dac could hold on to two samples, then calculate the required delta current to apply in order to linearly interpolate between the points yes, but sinc interpolation? i'll admit, it is possible yes. it has never been done before though, and i dont know if it is even reasonable with current technology to produce a circuit capable of doing it. linear interpolation would "fill in" the gaps, but it amounts to just filtering in the end anyway. you'll like i said just end up with a filtered version of the wrong signal, not the right signal.

the only possible implementation is one where you upsample the input applying sinc interpolation, and then simply output flat levels from the dac at the higher frequency.

going the linear interpolation route wouldnt be worth it. the cost of the circuits required to calculate the delta values and apply them would be tens of times (maybe a hundred) more than the cost of an analog filter performing equally as well or better.

modern dacs just do upsampling with sinc interpolation, then plain old stepped output.

"What it does when drawing that line is the same thing that the D/A converter does when creating voltage values from samples."

upsampling using sinc interpolation, digitally like i've been saying.

Post

Okay, I'll buy that. Though I'd imagine that the "stepped output" becomes more linear just by how DACs have to work.
Image

Post

>>In fact, you've sort of proved that, as 440Hz (your 'stable' A) doesn't even divide evenly into 44100hz. Therefore it shouldn't actually BE a sinkhole, but rather 441Hz... which I'm sure your tests will show "wobbles"

441 is stable. 440 is stable because it's a multiple of 5.

grease (is the word),

This is the equivalent of the wagon wheel. As it slows down, you "see" the sinkholes where the rational relations exist between the film speed and the wheel's angular rotation.

The wagon wheel is a good analogy. A Moire pattern is the same deal.

Imagine you have a bitmap that's 20 pixels wide and you repeat it across 1024 pixels with no filtering. You WILL see a repeating pattern, even though 20 doesn't divide evenly into 1024. If there's high frequency content in the bitmap, you'll see repeating Moire patterns.

Now do the same thing, but stretch it across 1023 pixels. Instead of repeat, you'll get a "crawl."

You can fix the problem somewhat with filtering. That's a Playstation game versus a PS2 game. I imagine that the sinc interpolator can largely fix the problem in the same way.

Post

aciddose wrote:linear interpolation would "fill in" the gaps, but it amounts to just filtering in the end anyway. you'll like i said just end up with a filtered version of the wrong signal, not the right signal.
Oh crap I'm getting confused by all of this...but anyway...

As far as the original sample (before digitization), and the "filtered version of the wrong signal" outputted by the DAC, they are indeed different signals. But don't they sound the same? I mean, as I understand it they have the same frequency content below Nyquist, and they differ only in higher harmonics that we can't hear. That is, as long as the sample rate is sufficient.

I think you guys are talking past each other...there's no disagreement it seems. D/A converters (and speakers) do indeed change discrete signals to continuous pressure waves (from start to finish), and if the various sample rates are high enough, the intended sound is faithfully reproduced as far as our ears can tell.

Post

Yes. His point was that the interpolation of the waves can cause amplitude changes, so it's necessary to upsample using the sinc interpolation to be accurate as the natural "smoothing" will be linear between two points, NOT based on the Sinc interpolation algorithm.

So sinc interpolation may reveal a high curve between two points which will be inaccurately represented by the linear interpolation of circuitry and transistors, which is why good D/A converters will upsample to a very high rate before output using Sinc (to keep this loss of accuracy to a minimum)
Image

Post

Toxikator wrote:Yes. His point was that the interpolation of the waves can cause amplitude changes, so it's necessary to upsample using the sinc interpolation to be accurate as the natural "smoothing" will be linear between two points, NOT based on the Sinc interpolation algorithm.

So sinc interpolation may reveal a high curve between two points which will be inaccurately represented by the linear interpolation of circuitry and transistors, which is why good D/A converters will upsample to a very high rate before output using Sinc (to keep this loss of accuracy to a minimum)
OK...I'm going to have to read up on sampling theory. It's interesting.

Anyway, one question I have is this: even with the clumsy linear interpolation between digital samples (and the associated amplitude changes), doesn't the signal sound the same? I'm not sure in what frequency range the differences occur. I'm sure there's plenty of reading out there for me to look up...if I had time...someday I will.

But anyway, I've realized that I have no idea how DACs work. I always imagined them to be linear interpolators. I guess that was rather simple-minded...

Post

grease wrote:Anyway, one question I have is this: even with the clumsy linear interpolation between digital samples (and the associated amplitude changes), doesn't the signal sound the same?
Well, not entirely. Sinc data can contain almost an entire curve within it between two points (it's calculated as a vector between two points using the Sinc algorithm).

the closer you get to 1/2 the sampling frequency (or the Nyquist frequency), the more that a linear representation will add overtones (think of a triangle wave compared to a square wave), create phase errors (without sinc, you can only have a waveform peaking when there is a sample present at the location of the peak), and create amplitude errors (since you can never represent a volume where there isn't a point, if you have one sample on the way UP a curve and one on the way DOWN a curve you'll never be able to represent the top of that curve).

It's pretty cool. I knew about sinc interpolation but never realized that "upsampling" was done digitally, I just assumed that the interpolation was worked into the analogue conversion. You learn something every day!
Image

Post

There's always going to be some noise down somewhere. As best I can determine, you're good as long as the noise doesn't become coherent and concentrated. I THINK what we're getting is a couple very subtle sidebands (like FM) when we're near rational proportions.

It's very quiet though. And probably only shows up on crummy cards at low rates.

I'm about done with this topic. I just wanted to get the most stable oscs I could, and ran into this. I suppose I could compensate for any periodic changes in energy at different harmonics. But at this point my attitude is "screw it." I have enough other things to do. This is more academic than practical.

Post

Toxikator wrote:
grease wrote:Anyway, one question I have is this: even with the clumsy linear interpolation between digital samples (and the associated amplitude changes), doesn't the signal sound the same?
Well, not entirely. Sinc data can contain almost an entire curve within it between two points (it's calculated as a vector between two points using the Sinc algorithm).
Right, but...can you hear it?
the closer you get to 1/2 the sampling frequency (or the Nyquist frequency), the more that a linear representation will add overtones (think of a triangle wave compared to a square wave), create phase errors (without sinc, you can only have a waveform peaking when there is a sample present at the location of the peak), and create amplitude errors (since you can never represent a volume where there isn't a point, if you have one sample on the way UP a curve and one on the way DOWN a curve you'll never be able to represent the top of that curve).
Yes, so this gets into the question of what sampling rate is "high enough" - because these errors will always be present in a digital signal, but at a high enough rate, the errors are completely imperceptible.

Anyway, I looked up some info on DACs...OK this is going to take me a while! I get the basic gist of all this, but of course there is quite a lot of theory and engineering behind the various DAC algorithms and circuitry. (By the way, I'm not sure that sinc algorithms are typical...from a cursory reading anyway.)

Something for me to read up on someday.

Post

mistertoast wrote: I'm about done with this topic. I just wanted to get the most stable oscs I could, and ran into this. I suppose I could compensate for any periodic changes in energy at different harmonics. But at this point my attitude is "screw it." I have enough other things to do. This is more academic than practical.
Hah! I'm almost there too...I wish I had more time to devote to all my various interests and curiosities. Something to read up on some other time.

In short, though, really and truly there should be nothing "stable" about a 440Hz tone - the "stability" you've described could really only be something you see in an FFT rather than something you hear. Really!

Post

>>In short, though, really and truly there should be nothing "stable" about a 440Hz tone - the "stability" you've described could really only be something you see in an FFT rather than something you hear. Really!

Oh stop it. I've given all my reasons that multiples of prime factors of 44100 are special "places." I have nothing more to say.

Post

We know. And you're wrong, because being a multiple of the sample rate just means that you have a point on the "zero crossing" at a regular interval, and says absolutely nothing about aliasing or signal quality (since you can have perfect waveforms represented without any points on the zero crossing ever)
Image

Post

mistertoast, can you suggest a musical application of whatever it is that you are saying here?
I mean, should you write all your music in the key of A?
Or what? What is the point of this discussion?
I mean, what do you suggest that we all do with this information?
--kr

Post

>>We know. And you're wrong, because being a multiple of the sample rate just means that you have a point on the "zero crossing" at a regular interval, and says absolutely nothing about aliasing or signal quality (since you can have perfect waveforms represented without any points on the zero crossing ever)

That's not what I'm saying. I'm saying with a limited number of points being hit, a very limited subset of the data is being usd. The data is not perfect, so you can have a frequency response that is not the average of the entire wave. With slight detuning, you crawl away from those points, with the results of a sinusoidal movement of the amplitude of the harmonics. And that's what you see visually with freakoscope.

>>mistertoast, can you suggest a musical application of whatever it is that you are saying here?
I mean, should you write all your music in the key of A?

I can't think of any musical ramifications, but I have a lot more respect for genuine analog equipment now. And also a lot more for high-sample rates in general, and nifty technologies like Super Audio CDs as well.

Also I think I should get a good sound card.

Post Reply

Return to “Instruments”