Question about sample rates from a user

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

It's worth keeping in mind that VSTPluginAnalyzer is not exactly the most stable thing on the planet, it sometimes gets into really weird states and/or plots utter garbage. So I wouldn't be surprised if you get it into a state where it says it's plotting 96kHz but it's still telling the plugin that it's running at 44.1kHz (although just testing that, at least setting the sample rate first and then loading a plugin seems to work).

There's also several problems with it's analysis methods. My favorite point of annoyance is that it's impossible to get a phase-plot with latency properly subtracted, because if you set the latency in the analyzer, then rather than compensating it in the curves, it'll throw away the first few samples. This then results in all the plots being completely wrong if the latency was there to allow for pre-ringing to get the desired response. Oh and if such a plugin reports latency, then you explicitly have to go into the window to set it back to zero to even get a proper magnitude plot!

Post

aciddose wrote:What Z1202 mentioned is also correct: while the signal is represented perfectly that doesn't mean it can be modified/transformed/processed or reconstructed perfectly.

Just that the statement about "recording and playback" is incorrect because those count as transformations.
As a total DSP layman with no technical knowledge, it's interesting to hear that perfect representation doesn't guarantee perfect reconstruction. Is this why resampling audio to a different sample rate can add grime (visible in spectrogram, if not necessarily audible)? Intuitively it seems like such a process should be lossless other than the requantisation as per bit depth, but we do see aliasing suggesting insufficient sample rate in some SRCs.

Post

Thanks for the info.

IIRC, VSTAnalyzer I'm using is probably one of the very 1st versions with samplerate setting (got it through e-mail from developer (must be a decade ago)) so there may be bugs then fixed in later versions.

Actually, I noticed this samplerate issue with Rubberfilter while recording vinyls couple of years ago. Had to re-record few tens of albums because of I had set the cutoff frequency to 30Hz for a steep HP filter ... while listening those recordings I did immediately notice missing low frequencies ... Voxengo SPAN showed this as well (all was gone from below ~65Hz area).
I did record using Reaper @ 96kHz and also checked if the same issue is present in Cubase SE ... and it was. Additionally tested few other HP plug-ins (which allowed high order filters) for the job but got same result.
IIRC, I managed to get Rubberfilter to work properly in Reaper @ 96kHz by just inserting it after opening the base project file.

Post

cron wrote:As a total DSP layman with no technical knowledge, it's interesting to hear that perfect representation doesn't guarantee perfect reconstruction. Is this why resampling audio to a different sample rate can add grime (visible in spectrogram, if not necessarily audible)? Intuitively it seems like such a process should be lossless other than the requantisation as per bit depth, but we do see aliasing suggesting insufficient sample rate in some SRCs.
I'd say that the perfect representation of the signal is more a theoretically proven possibility, rather than something which can be fully achieved in practice. Sound card ADC and various synthesis methods only approximate the perfect representation. ADC and high quality resamplers would usually do this pretty close to perfect, although there are also resamplers which are not so perfect. For synthesized waveforms the quality can drastically vary.

In principle I wonder, if any signal can be 100% correctly represented in discrete time form (unless we pull a trick by declaring the discrete signals that we have to be correct by definition). I mean even a sine below Nyquist will need to be time limited in practice, which makes it not bandlimited.

Post

I believe many of the papers published in the early 1900s (through 1950s) did go into detail about that. The signal must be windowed and the side-bands resulting from the window must result in a band-limited signal.

So practically speaking to get a perfect representation of a sampled signal it needs a cosine fade-in and fade-out (for example, to make it easy) at a frequency low enough so the sum + difference fit within the band.

For example 1 kHz sampled at 2 kHz with a 1 Hz fade will produce 1001 Hz and not be band-limited.

1 kHz sampled at 4 kHz with a 1 Hz fade will produce 1001 Hz, but this is still well within the band and so the sampled result is represented perfectly.

So while signals can be represented perfectly, those signals must be band-limited.

Even a signal which has been sampled and "chopped" will still be represented perfectly. It just can't be reconstructed near the edges because it is not band-limited. Such a signal can be reconstructed if it is first windowed, then interpolated at a higher rate so as to contain the additional sum+difference frequencies, then reconstructed as usual.

A good example is a single cycle "wavetable" waveform. Starting the waveform from an arbitrary phase may not be band-limited, but it is possible to fade (amplitude envelope) and interpolate the result in such a way as to ensure it is band-limited.

So the perfect representation can be one-way and impossible to exactly reproduce, but the measurement that is recorded is still a valid and exact measurement of the band-limited input during the time-period.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

You can't have a signal that has compact support in both signal and spectral domains, there's no point in even trying. What you can do though is push the aliasing arbitrarily low and at some point (eg. once it's below your dither or reconstruction noise floor) it doesn't really matter anymore.

Post

mystran wrote:You can't have a signal that has compact support in both signal and spectral domains, there's no point in even trying. What you can do though is push the aliasing arbitrarily low and at some point (eg. once it's below your dither or reconstruction noise floor) it doesn't really matter anymore.
OTOH, even in continuous time the switching off is not happening instantaneously. It's probably something like a very quick exponential decay. Thus, the signal which we want to reconstruct is not time-limited ;) But that's really academic, as in practice we won't have perfect sampling or reconstruction.

Post Reply

Return to “DSP and Plugin Development”