Re: [music-dsp] Non-linearity or filtering

2015-08-20 Thread Theo Verelst
Thanks to all the participants in this thread, I hope it was at least a 
little educational, except maybe for some that seem to take everything 
as a test to their imaginations of themselves being little computers, 
and not human being with normal associations and lasting affections for 
serious subjects in the field of digital signal processing.


When I first got on the World Wide Web, must have Mosaic in about '93, 
after having used email for half a decade and enjoying participating on 
bulletin boards and so on, it required a serious scientific workstation 
and a serious network connection to be able to actually browse the 
information on ftp and early http sites, and I counted myself lucky to 
have those facilities at my disposal.


In the now, a list like this can be done on an old computer with a 
un-optimal modem connection, and you're fine! Lot's have changed about 
what people are used to, and what people get sued over on Twitter, etc., 
but some things remain the same: science isn't a dirty subject on the 
big internet, and being able to download and view all kinds of 
information has a democratizing effect, in the west, the 2d world, and 
hopefully even the third world.


It seems still hard to distinguish though what people would for instance 
sum up a scientific subject properly when history seems to call for it, 
and win a Nobel Prize (like a Dutchman in the 90s for Physics), and what 
people are only good for, say a government job to teach first year 
technical studies, or who deserve to run a multinational or become a 
famous professor in say the humanities, and I feel that that is because 
a lot of fundamental science questions have been put in certain corners 
since the Information Technology worlds has become more popular than 
most of it's constituents deserved, and somewhat that applies here as 
well, which is a pity, because good teachers valuable, leading 
professors that come out right are scarce in the field of computers and 
computer design, and frankly, the digital audio world isn't as much a 
success as many people hope for!


Anyhow, nothing much to personally interest me in the subject of this 
thread, except I'm more than average interested (and capable) in proper 
scientific theories, and it happens to be an essential subject for 
instance for first year (academic and otherwise, I'm sure) technical 
science students, and for good reason. How are those FIR filters to be 
considered non-linear, and how are those FFT effects going to filter 
like a linear system ? Just saying.


Ir (M.Sc.) T. Verelst

___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-14 Thread Steven Cook

This happened to me about ten days ago.

Steven Cook.

-Original Message- 
From: Charles Z Henry 
Sent: Thursday, August 13, 2015 8:04 PM 
To: A discussion list for music-related DSP 
Subject: Re: [music-dsp] Non-linearity or filtering 


On Thu, Aug 13, 2015 at 1:05 PM, Tom Duffy tdu...@tascam.com wrote:

WTF, who is trying to unsubscribe me:

---
Mailing list removal confirmation notice for mailing list music-dsp

We have received a request from 92.103.69.51 for the removal of your
email address, tdu...@tascam.com from the
music-dsp@music.columbia.edu mailing list.  To confirm that you want
to be removed from this mailing list, simply reply to this message,
keeping the Subject: header intact.  Or visit this web page:


whois.arin.net search for 92.103.69.51 - RIPE (Europe)
https://apps.db.ripe.net/search - someplace in France

inetnum: 92.103.69.0 - 92.103.69.255
netname: GOTO-SOFTWARE
descr:   SAINGHIN EN MELANTOIS
country: FR
admin-c: FC9113-RIPE
tech-c:  FC9113-RIPE
status:  ASSIGNED PA
mnt-by:  COMPLETEL-MNT
created: 2011-01-19T10:27:20Z
last-modified:   2011-01-19T10:27:20Z
source:  RIPE # Filtered
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-13 Thread Peter S
On 13/08/2015, Peter S peter.schoffhau...@gmail.com wrote:

 Bonus experiment: try to see if you can hear the difference between
 sine_fadeout16_noise.wav and sine_fadeout8_noise.wav in a blind ABX
 test. If not, then having extra bits of noise make zero sense.

I did a blind ABX test between them. Despite both signals have a -36
dB noise floor, I could discern the difference, the quantized signal
sounding slightly more noisy.

I examined the noise (quantization error) in detail. Here is how it sounds like:
http://morpheus.spectralhead.com/wav/quantization_noise.wav

This is 1-bit of white noise, which is the quantization error. Its
spectrum looks entirely flat:
http://morpheus.spectralhead.com/img/quantization_noise_spectrum.png

The bump at 0 Hz is caused by a DC offset, since it was truncated
and not rounded, so the error is not symmetrical between -0.5 .. 0.5
bit, but is rather between -1 .. 0 bit.

The waveform - when normalized to 0 dB, looks entirely like white noise:
http://morpheus.spectralhead.com/img/quantization_noise_waveform.png

Its spectrogram also looks like white noise - there are absolutely no
harmonics or signal-related artifacts, it looks like fully
uncorrelated, pure white noise:

http://morpheus.spectralhead.com/img/quantization_noise_spectrogram.png

The amplitude of the error is 1 LSB, which - in the case of 8-bit
quantization - means -42 dB amplitude. Since 42 dB is a small SNR, I
could discern the difference in blind ABX tests, though the difference
is quite minor (do an ABX test yourself to hear yourself).

If the quantization were to 24 bits instead of 8 bits, the amplitude
of the quantization error in a similar situation would be -140 dB (= 1
LSB at 24 bits precision). That is absolutely beyond both every
soundcards' dynamic range, and the human hearing's dynamic range.

Since discerning the difference in a signal quantized to 8-bits was
already not trivial and needed careful listening, I am absolutely 100%
convinced that the difference in a 24-bit signal would be absolutely
imperceptible in a blind ABX listening test under ideal listening
conditions with the most high-end gear available.

Therefore, based on two different tests, I still hold my original
opinion that having extra 8 bits of noise in a properly dithered
converter beyond the 24th bit is absolutely useless, and makes
absolutely zero practical difference.

There is not even a single soundcard on the planet that could even
properly reproduce signals with -140 dB amplitude (most high-end ones
have an SNR of only around 115-127 dB), therefore this couldn't even
be properly tested. And even if there were an equipment capable of
such precision, it is already beyond the dynamic range of the human
hearing, which is around 120 decibels (excluding signal levels beyond
the pain threshold), beyond which, the signal is perceived as
noise-free. If it's already noise-free, there is no way of getting
any better than that...

-P
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-13 Thread Tom Duffy

WTF, who is trying to unsubscribe me:

---
Mailing list removal confirmation notice for mailing list music-dsp

We have received a request from 92.103.69.51 for the removal of your
email address, tdu...@tascam.com from the
music-dsp@music.columbia.edu mailing list.  To confirm that you want
to be removed from this mailing list, simply reply to this message,
keeping the Subject: header intact.  Or visit this web page:
-

On 8/13/2015 9:41 AM, Tom Duffy wrote:
Here's an experiment that I always wanted to do:

NOTICE: This electronic mail message and its contents, including any attachments hereto 
(collectively, this e-mail), is hereby designated as confidential and 
proprietary. This e-mail may be viewed and used only by the person to whom it has been sent 
and his/her employer solely for the express purpose for which it has been disclosed and only in 
accordance with any confidentiality or non-disclosure (or similar) agreement between TEAC 
Corporation or its affiliates and said employer, and may not be disclosed to any other person or 
entity.



___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-13 Thread Tom Duffy

Here's an experiment that I always wanted to do:

The dither added is 1 bit (or 2 if doing TPDF),
so generating it from a PRNG is easy, you get
one bit at a time, and the bits are all completely
uncorrelated to each other - white noise spectrum.
When implemented in DSP, sometimes you get a
PRNG for free in the hardware, cutting down on
the overhead required in dithering by a good
few steps.
In modern ARM chips, this is not as easy at it
seems, the random generator is buried in with
the security features, and it does this off-line
thing where it generates a table (e.g. 4K) of
random data that is then made available to the
rest of the chip.  The datasheet doesn't really
say how long this takes.   That's fine for feeding
a driver that supplies entropy to /dev/random in
an embedded linux OS, but not deterministic enough
for dithering a constant 44.1kHz stream of data,
let alone 64 of them (which is my goal)

So, for reducing 24 bits (or more) down to 16 bits,
can you assume that the bottom 4-ish bits (which are
mostly noise from the original ADC converter) are
uncorrelated to each other?
e.g. use bit 24 as the first dither addition bit
to add at bit 17, and then bit 23 to add at bit 17
for TPDF.
Bits 23 and 24 surely have sufficiently low
correlation to each other and the signal that they
drive the dither mechanism effectively?
This would be computationally very effective,
and if the signal is already 16 bit truncated,
would not add additional noise.

i.e, what is the self correlation of the top
16 bits of an ADC signal with the bottom N bits?

My thought is that it's not going to work as
well as I hope, and the only true solution is to
get proper white noise bits, which is why I've
never spent any time on the experiment.

Tom.

NOTICE: This electronic mail message and its contents, including any attachments hereto 
(collectively, this e-mail), is hereby designated as confidential and 
proprietary. This e-mail may be viewed and used only by the person to whom it has been sent 
and his/her employer solely for the express purpose for which it has been disclosed and only in 
accordance with any confidentiality or non-disclosure (or similar) agreement between TEAC 
Corporation or its affiliates and said employer, and may not be disclosed to any other person or 
entity.



___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-13 Thread Sampo Syreeni

On 2015-08-09, robert bristow-johnson wrote:

1) a dithered sigma-delta converter is typically better quality than 
one without dithering


Correct.


there is and always had been **some** discussion and controversy about 
that every time i seen it discussed at an AES convention. i remember 
hearing (and talking with) Stan Lipshitz about it.


The Lipshitz and Vanderkooy analysis was a total eye opener for me. It 
really does show with certainty that dithering is needed within the loop 
(unless you do some really wonky deterministic algebraic stuff, which 
nobody really understands even today), and then you can't dither the 
loop properly if it's 1-bit. ADC and DAC manufacturers responded even 
beforehand by going to higher bit depths within the delta-sigma loop. 
Which works *fully* even at 3 bits. 2 bits is iffy. But just 3 can be 
perfect with perfect in-loop dither. At the time they already used a 
full nibble, and now I don't know what they do. (Databooks with 
descriptions of the innards aren't as easy to come by as they once used 
to be.)


and 1-bit converters are a different class than multibit converters. 
1-bit converters don't have a step-size (on the x-axis) where you can 
derive meaning for the width of the TPDF dither that *does* make sense 
for multibit uniform quantization (like what we do when we round 2's 
comp numbers).


Precisely. That is why they originally went with 1-bit delta-sigma 
converters: those have no differential nonlinearity whatsoever. Only a 
constant DC offset dictated by the mismatch between the 0 and 1 states 
of the input quantizer. It's a nice theoretical advantage, but the LV 
paper showed dithering concerns trump that.


the overstatement is not terribly bad: with multibit converters, TPDF 
dither will decouple the mean (the mean error will always be zero) and 
decouple the variance, the power of the AC component of the 
quantization error from the input signal. and, as far as we know, we 
ain't hearing any of the higher-order statistics.


But just try and do something other than listening to the result. Let's 
say, cepstral processing or fitting some higher order Volterra series to 
the signal. Suddenly the higher order moments matter a great deal.


and, i think commercially, they use really high-order feedback filters 
(i thought something like 6th-order or more, i have a MATLAB program 
that does it for 2nd-order).


Typically 5th to 7th order elliptical with numerically optimized phase 
response over the quantization loop, as I recall. They have to fiddle 
with that separately because off of concerns with nonlinear 
self-oscillation/idle tones.


i don't think anyone has demonstrated that some particular p.d.f. is 
better than another.


Correct. Only fully algebraic solutions really do the job. MASH was the 
first step towards those solutions, but I don't think any truly viable, 
general solutions have been published in the open literature even now.


i remember Stan pointing out that to really decouple the moments of 
the error signal from that input, you had to crank your dither up to 
the level of the rails of the comparator.


Their reasoning was basically that as soon as you apply any dither at 
all to the one bit quantizer, signal plus dither starts to be 
asymmetrically rounded out and that overdriving mucks up the loop. What 
you want is enough overhead so that that doesn't happen, but that is 
then not possible without at least three quantizer steps, and usually 
more.


The only truly optimal dither is the 1RPDF *subtractive* one. It's 
immediately perfect for every momentum,


really?? is that true?


Yes, and that's not even all of it. The result is that a class of 
subtractive dithers to which 1RPDF belongs not just decorrelates some 
momenta of the error signal but achieves full statistical independence 
of the error itself. The proof is reprinted with comments in Lishitz, 
Wannamaker and Vanderkooy's survey ( 
http://www.ece.rochester.edu/courses/ECE472/resources/Papers/Lipshitz_1992.pdf 
) , while the original is from Widrow ( put it up for a little while at 
http://decoy.iki.fi/temp/Dither%20Signals%20and%20Their%20Effect%20on%20Quantization%20Noise.pdf 
) .


if the input signal is a very slow ramp and you're half-way between 
adjacent quantization levels, you'll have a helluva lot more AC power 
in your error signal than you would if the input signal was resting on 
top of a quantization level.


Not after the coherent subtraction step; it not just removes the extra 
noise we put in, it in a sense also complementarily adds back the energy 
that would be lost in small signal conditions, making the total noise 
floor constant. One way to see what's happening is to turn the problem 
around: since the dither is now subtracted out, in toto the operation is 
equal to moving the quantization lattice about. Precisely at 1RPDF the 
locations where the midsteps land become equidistributed -- the 
distributions of two successive quantization 

Re: [music-dsp] Non-linearity or filtering

2015-08-13 Thread Charles Z Henry
On Thu, Aug 13, 2015 at 1:05 PM, Tom Duffy tdu...@tascam.com wrote:
 WTF, who is trying to unsubscribe me:

 ---
 Mailing list removal confirmation notice for mailing list music-dsp

 We have received a request from 92.103.69.51 for the removal of your
 email address, tdu...@tascam.com from the
 music-dsp@music.columbia.edu mailing list.  To confirm that you want
 to be removed from this mailing list, simply reply to this message,
 keeping the Subject: header intact.  Or visit this web page:

whois.arin.net search for 92.103.69.51 - RIPE (Europe)
https://apps.db.ripe.net/search - someplace in France

inetnum: 92.103.69.0 - 92.103.69.255
netname: GOTO-SOFTWARE
descr:   SAINGHIN EN MELANTOIS
country: FR
admin-c: FC9113-RIPE
tech-c:  FC9113-RIPE
status:  ASSIGNED PA
mnt-by:  COMPLETEL-MNT
created: 2011-01-19T10:27:20Z
last-modified:   2011-01-19T10:27:20Z
source:  RIPE # Filtered
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-12 Thread robert bristow-johnson

On 8/10/15 10:02 AM, Peter S wrote:

On 10/08/2015, robert bristow-johnsonr...@audioimagination.com  wrote:

the thing that i *think* Peter is missing in this is the same as some of
the early manufacturers when they truncated the 30-bit words (or
whatever they had in the decimation filters) to 18 meaningful bits.
that simply adds one more source of quantization noise. and, especially
when our DSPs were 24 bits or more, we could make use of those bits.
i'd much rather have a 24-bit word, even if the dynamic range divided by
6.02 is only 18 or 20.

Are you *sure* truncating adds extra quantization noise?


  [sigma-delta modulator][decimation filter][quantizer]---

adds extra quantization noise to:

  [sigma-delta modulator][decimation filter]


  When the
lowest bits are already noise,


they're not completely noise.  they are signal buried in noise.

try this:  take a flute solo or some other monophonic lick and fade it 
down by a rate of, i dunno, 3 dB per second.  eventually it will hit 
your quantization floor.  do that and tell us you can't hear a 
difference.  there will be a point where the quantized output will be 
buzzing because your flute solo has become a square wave and then 
silence, but in the unquantized version, you can still hear it (but it's 
buried in noise of some spectral shape).


a way to *really* hear it is to compute the net error signal (output 
minus input) and listen to that.  and boost the error signal by 40 dB 
just so that you can scrutinize the difference.  i have some old .wav 
files and MATLAB code for you (and a powerpoint from 2008 that spells it 
out).


there is no reason to bother zeroing those bottom 4 or 6 or 8 bits (if 
your normal word width is 24 bits).  give the DSP whatever word width is 
natural for the DSP.  those bouncing bottom bits are actually useful for 
most audio DSP processing.  sometimes we have to *add* dither to the 
input so that non-linear breakpoints get to be a little rounded.  i 
would much rather have the *less* noisy input that also has the least 
significant bits bouncing around keeping them discontinuities (like 
internal clipping or quantization) in my algorithm in check.


another common experiment: reduce your amplitude by a factor of 
32767/32768, quantize to the word size, then bump it back up with the 
reciprocal factor.  and subtract the original and listen to the error 
signal boosted by 40 dB.



  I highly doubt that truncation would
add harmonic distortion or limit cycle oscillations. I tested the
difference, and if the noise floor is high enough, in blind ABX tests,
I personally hear no difference between the non-truncated and the
truncated signal (whatever bit depth).

Have you measured the difference? Do you actually hear the difference?
Can your ear distinguish between the two in blind listening tests?
Mine doesn't, and my analysis shows no difference in harmonic
distortion, so I believe that those lowest, discarded bits of noise
practically add nothing to the signal, and they can be discarded
without any loss of quality or any introduced artifacts.

That's my belief, and I base this on analysis and blind ABX listening
tests between the two.



i have a better idea (it's also what we should force the Monster Cable 
folks to do, or maybe the DSD folks):


AB testing.  the subject is asked to determine if A and B are the same 
or different.  have as many trials where A and B are identical as trials 
where they are different.  remove any bias from the subjects by 
subtracting the number of false positives from the number of times the 
subject correctly identifies a positive.  same for false negatives.  
then see if the subjects do better than random guessing.



there is *still* a part of your signal in those bottom 6 bits.  why
ditch them?

Because adding further bits of noise add no perceptional difference.


you didn't say anything about the audio level.  if you claim this for 
*any* level of audio, including audio that is going down into the noise 
floor, you're decidedly mistaken.




--

r b-j  r...@audioimagination.com

Imagination is more important than knowledge.



___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-12 Thread Peter S
On 13/08/2015, robert bristow-johnson r...@audioimagination.com wrote:

 Are you *sure* truncating adds extra quantization noise?

[sigma-delta modulator][decimation filter][quantizer]---

 adds extra quantization noise to:

[sigma-delta modulator][decimation filter]

Okay, this is the VERY LAST time I'll show this demonstration.
If you want to understand this, then pay attention VERY closely:

Here is a fading out 440 Hz sine wave at 16 bits precision:
http://morpheus.spectralhead.com/wav/sine_fadeout16.wav

Here is its spectrogram - a single sinusoid at 440 Hz:
http://morpheus.spectralhead.com/img/sine_fadeout16_spectrogram.png

If you simply truncate it to 8 bits, here is what you get:
http://morpheus.spectralhead.com/wav/sine_fadeout8.wav

As expected, the spectrogram shows harmonic distortion:
http://morpheus.spectralhead.com/img/sine_fadeout8_spectrogram.png

This is because the sinewave gets distorted, and starts looking like a
square wave, having harmonic spectral artifact, as expected.

...HOWEVER

*IF* the signal is already noisy, say, from the thermal noise of the
converter, *THEN* this will NOT happen!!!

To demonstrate this, here is a -36 dB white noise floor:
http://morpheus.spectralhead.com/wav/noise_36db.wav

If we mix this with the original sine wave, we got this:
http://morpheus.spectralhead.com/wav/sine_fadeout16_noise.wav

It is a fading out 440 Hz sine wave, buried in a -36 dB white noise
floor. If we quantize this to 8 bit, this is what we get:

http://morpheus.spectralhead.com/wav/sine_fadeout8_noise.wav

Do you hear harmonic distortion in this signal? ABSOLUTELY NOT!!!

To prove, here is the spectrogram of this 8-bit noisy signal:
http://morpheus.spectralhead.com/img/sine_fadeout8_noise_spectro.png

Do you see harmonic distortion on the spectrogram? ABSOLUTELY NOT!!!

A/B spectrogram comparison between quantization with no noise floor,
and quantization with -36 dB white noise floor:

http://morpheus.spectralhead.com/img/sine_fadeout_8_vs_16.png

The original, non-noisy sinusoid, quantized to 8 bit, then converted
back to 16 bit, subtracted from the original signal, normalized to -16
dB (= the harmonic noise from the quantization, amplified, without the
original signal):

http://morpheus.spectralhead.com/wav/sine_fadeout_quant_noise.wav

The noisy sinusoid, quantized to 8 bit, then converted back to 16 bit,
subtracted from the original signal, normalized to -16 dB (= the error
from the quantization, amplified, without the original signal):

http://morpheus.spectralhead.com/wav/sine_fadeout_noise_quant.wav

Conclusion: when there is a loud enough noise floor present in the
signal, then there's no harmonic distortion from the quantization!!!
Nope, nil, nada, zilch, zero, null!! The white noise floor eliminated
it completely! That's the whole purpose of dithering... The error
in the case of a quantized noisy sinusoid is almost like white noise.

It would be good if - after multiple demonstrations, and giving you 30
external references - you could finally understand that noise from
either dithering or a thermal noise floor eliminates harmonic
distortion from the quantization step.

Bonus experiment: try to see if you can hear the difference between
sine_fadeout16_noise.wav and sine_fadeout8_noise.wav in a blind ABX
test. If not, then having extra bits of noise make zero sense.

-P
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-10 Thread Theo Verelst

robert bristow-johnson wrote:

On 8/9/15 6:23 PM, Sampo Syreeni wrote:

1) a dithered sigma-delta converter is typically better quality than
one without dithering


Correct.

there is and always had been **some** discussion and controversy about
that every time i seen it discussed at an AES convention.  i remember
hearing (and talking with) Stan Lipshitz about it.



I'm glad some people might not hold the gospel, but at least keep some 
tabs on the subject.


Now a serious concern: it has come to my attention that some people seem 
to deem it appropriate to talk about their favorite subject, without any 
self-scrutiny concerning which communication thread they abuse for that. 
It could be clear to only reasonably intelligent people that trying to 
convince everybody that all DSP is ancient message encoding and some 
privatized form for file compression is not just a sign of weakness and 
lack of intelligence or perhaps knowledge about the subject at hand, but 
also a nuisance to people that might discuss subject like reasonable 
adults instead of sophist zealots. It might even be that people miss the 
point of actually interesting subjects being brought forward, and that 
can not be the general intention of internet communication in the free 
west, IMO.


The main point I was trying to make is that I appreciate efforts that 
keep various traditional filter and (non-) linear subjects what they 
are, and I prefer to be able to describe the effects a piece of DSP code 
has, which appears often to be not as clear as it seems at first sight.


Trying to quantify all kinds of errors as encoded signals is not a 
solution to any of the inaccuracies at hand, because DSP versus ideal 
filter congruence, (re-) sampling related inaccuracies, analog error 
correction in DSP domain, noise suppression or (proper) signal recovery 
are all served by strong analytical thinking and explicit methods for 
most of which accurate mathematical underpinning exists (like I said 
some of it for EE undergrads, and I don't like people researching those 
subjects as if they can be claimed as new, but that's another 
discussion). Messing about with error coding schemes that can hardly 
predict di-grams has nothing whatsoever to do with proper engineering in 
those fields, let alone with proper science.


I understand some people can feel a bit embarrassed about some subjects 
I raised, but I've worked enough on theoretics to know how to behave 
myself, and have a genuine interest in the some DSP subjects I have 
results with at high levels of aggregation and some serious digital 
audio equipment, and in the theoretical progress I think is possible 
here. Engineering knowledge is hard to get, in some countries maybe not 
even possible, but that's no reason to devaluate the main lines it can 
offer, or hide the higher education under a burden of non-sense.


T.V.
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-10 Thread Tom Duffy


On 8/10/2015 10:49 AM, Peter S wrote:

On 10/08/2015, Sampo Syreeni de...@iki.fi wrote:

Do notice that we're in the business of producing audio systems and
software. Not all of them are meant for pure human consumption. For
example, in audio forensics work, you'd like your signal chain to be
pure enough to pick up line hum at -60dB or even -80dB below the already
low noise floor, given enough integration time.



Here is a little 'audio forensics' challenge for you.



I created a -30 dB white noise signal:
http://morpheus.spectralhead.com/wav/noise_30db.wav


Opening the file in Audacity, the 30dB noise signal is visible.
Run a FFT on it, and with 65536 size (maximum selectable), the
noise floor drops to about 80dB, 48dB of forensic visibility.
Not enough to find your sines though.   10log(65536) = 48
Since the files are 3 seconds long, a 131072 size FFT would give us
another ~3dB of visibility.
To get to the -60 and -80dB signals, we'd need to run a FFT of
about 13 million bins, so if you can give us a 50 minute sample file,
it should be doable.

line hum would generally be a 60Hz signal, so sampling at 44100Hz
already gives us a 25dB headstart in finding that due to oversampling,
in which case just 7 seconds of source file should be enough.

http://www.analog.com/media/en/training-seminars/tutorials/MT-001.pdf

---
Tom.

NOTICE: This electronic mail message and its contents, including any attachments hereto 
(collectively, this e-mail), is hereby designated as confidential and 
proprietary. This e-mail may be viewed and used only by the person to whom it has been sent 
and his/her employer solely for the express purpose for which it has been disclosed and only in 
accordance with any confidentiality or non-disclosure (or similar) agreement between TEAC 
Corporation or its affiliates and said employer, and may not be disclosed to any other person or 
entity.



___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-10 Thread Peter S
On 10/08/2015, Sampo Syreeni de...@iki.fi wrote:

 Correct. But notice that the main dither talked about in the papers is
 always done within the quantization loop, so that its power spectrum
 becomes dependent on the loop's high order highpass response. Its
 spectrum can and will be driven off the utility audio band, and so
 effectively only used to linearize the loop itself.

Never fully - some percentage of the noise still lies in the audio
band, even with a lot of oversampling.

 Sometimes an extra TPDF dither is added in front of the loop as a
 traditional dither, but as somebody already mentioned, in high end
 converters that comes for free from thermal noise, so that no additional
 noise is necessary.

Yes, I mentioned it. Yet that doesn't mean there's no noise floor, and
then the noise floor's spectrum is not shaped.

 4) dithering eliminates signal-dependent quantization artifacts, hence
 the noise floor becomes entirely independent of the input

 No it does not. And now you are the one who doesn't get dither, I think.
 ;)

I showed how to encode a -60 dB sinewave in a 8-bit signal (with a
theoretical dynamic range of 48 dB) without any harmonic distortion
whatsoever, using dithering. So yes, it definitely does eliminate
harmonic distortion. If you think it doesn't, you need more to prove
that, and define your model of error.

 So it does, and you just forgot to make the distinction between dither
 introduced within the coding loop and in its input.

In both case, you have a noise floor.

 Now, what is *really* interesting and germane to your point about
 noise floors and converter depths is that you didn't make a proper
 distinction between input thermal noise floor and the noise induced by
 the delta-sigma coding loop. This is crucial, because only one of them
 is really noise: the input floor.

False. Dithering is literally 'added noise', and noise from the
dithering is also a 'noise floor'. Even with high amount of
oversampling and noise shaping, there's a definite noise floor left in
the audio band. If you're in doubt, try to record the input of any
sound card without any input (or with a closed loopback from its
output), and see what you get. You'll get a constant noise floor in
virtually all 16-bit sound cards. It *is* noise, from the dithering.
Afaik there's no modern sound card where the lowest bits aren't going
to be noise, they all have a noise floor (from thermal or dithering
noise).

 What the (undithered) loop does is completely different: it introduces
 all kinds of wild modulation phenomena which are only *modelled* as
 noise of certain power. If you do not suppress those over the utility
 band, you can get the funniest whines, or even free running limit cycle
 oscillations with enough power and harmonic content to be heard from
 -30dB below the noise floor. Especially you can get harmonics production
 from stuff similarly far down below the input noise floor.

Now, this is also false, and I showed this using a sine wave buried in
rectangular PDF white noise, which was free of any harmonic distortion
after quantization. If your signal already has enough noise (from
thermal noise or from whatever added noise), then you won't have
quantization artifacts and limit cycle oscillations you describe. If
you're in doubt - try it yourself, and see what you get. I've shown it
already, I don't want to repeat myself all over. (This is assuming you
have enough thermal noise present in the input.)

 So, there are several reasons to engineer for below input noise floor
 purity. Don't neglect them.

I think no one argued that.

 Do notice that we're in the business of producing audio systems and
 software. Not all of them are meant for pure human consumption. For
 example, in audio forensics work, you'd like your signal chain to be
 pure enough to pick up line hum at -60dB or even -80dB below the already
 low noise floor, given enough integration time.

I doubt you'll ever pick up any signal at -80 dB below the noise
floor. That's 10^(-80/20) = 0.0001 times the amplitude of the noise,
meaning the noise is 10,000x louder than the signal you're trying to
pick up. Good luck trying to do that.

 you shouldn't be too swift at dismissing
 beyond-human audio processing either.

I merely said, dismissing supersonic noise by lowpass filtering also
changes the shape of the waveform.

 Beyond that, Peter, I actually agree with you. 24 bits is beyond what we
 can dissolve. In fact I'd go with the Acoustic Renaissance for Audio
 paper which argues that a properly executed, noise shaped, 55kHz @~
 18bpS ought to be enough.
 https://www.meridian-audio.com/meridian-uploads/ara/araconta.htm#precision

Since the human hearing's dynamic range is practically around 120 dB
(or 20 bits), there's not much point in ever going beyond 24 bits
(unless you're trying to record some extra quiet signal). According to
a research at Ampex labs in 1981, a dithered signal with a dynamic
range of 118 dB is enough for a subjectively 

Re: [music-dsp] Non-linearity or filtering

2015-08-10 Thread Peter S
On 10/08/2015, robert bristow-johnson r...@audioimagination.com wrote:

 the thing that i *think* Peter is missing in this is the same as some of
 the early manufacturers when they truncated the 30-bit words (or
 whatever they had in the decimation filters) to 18 meaningful bits.
 that simply adds one more source of quantization noise. and, especially
 when our DSPs were 24 bits or more, we could make use of those bits.
 i'd much rather have a 24-bit word, even if the dynamic range divided by
 6.02 is only 18 or 20.

Are you *sure* truncating adds extra quantization noise? When the
lowest bits are already noise, I highly doubt that truncation would
add harmonic distortion or limit cycle oscillations. I tested the
difference, and if the noise floor is high enough, in blind ABX tests,
I personally hear no difference between the non-truncated and the
truncated signal (whatever bit depth).

Have you measured the difference? Do you actually hear the difference?
Can your ear distinguish between the two in blind listening tests?
Mine doesn't, and my analysis shows no difference in harmonic
distortion, so I believe that those lowest, discarded bits of noise
practically add nothing to the signal, and they can be discarded
without any loss of quality or any introduced artifacts.

That's my belief, and I base this on analysis and blind ABX listening
tests between the two.

 there is *still* a part of your signal in those bottom 6 bits.  why
 ditch them?

Because adding further bits of noise add no perceptional difference.
In blind ABX tests, I cannot distinguish the signal if I discard the
lowest bits of noise, and it doesn't introduce any harmonic distortion
either.

(And since the human hearing's dynamic range is around 20 bits (120
dB), the bits below the 20th bit wouldn't add much useful anyways, so
I can understand the choice of a manufacturer to truncate to ~18-20
bits.)

-P
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-10 Thread Peter S
What I don't understand, is why don't you guys pay attention. I showed
all these already using various demonstrations and tests, so having to
repeat the same over and over again feels quite pointless...
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-08-09 Thread Sampo Syreeni

On 2015-07-23, Peter S wrote:


LSB Dithering in MASH Delta–Sigma D/A Converters
http://petrified.ucsd.edu/~ispg-adm/pubs/Pamarti_TCAS1_200704.pdf


This is a nice list of references, some of which even I hadn't seen 
before. Thank you!



1) a dithered sigma-delta converter is typically better quality than

one without dithering

Correct. But notice that the main dither talked about in the papers is 
always done within the quantization loop, so that its power spectrum 
becomes dependent on the loop's high order highpass response. Its 
spectrum can and will be driven off the utility audio band, and so 
effectively only used to linearize the loop itself.


2) dithering means adding noise to the signal (usually white noise, or 
a modified spectrum via noise shaping)


Sometimes an extra TPDF dither is added in front of the loop as a 
traditional dither, but as somebody already mentioned, in high end 
converters that comes for free from thermal noise, so that no additional 
noise is necessary.


4) dithering eliminates signal-dependent quantization artifacts, hence 
the noise floor becomes entirely independent of the input


No it does not. And now you are the one who doesn't get dither, I think. 
;)


Every progressive addition of additive rectangular probability 
distribution function (RPDF) dither of one least bit peak-to-peak 
amplitude to a signal before a conventional step quantizer causes a 
single momentum of the quantization error to be decoupled from the 
utility signal.


When you add a single RPDF flat dither, you remove distortion in the 
average. When you add two -- equaling the usual TPDF dither you call 
optimal -- you also remove dependence on variance, i.e. most 
significantly noise power modulation at small amplitudes. That's where 
we usually stop, because it's perceptually enough. But in actual fact 
decoupling all of the momenta would call for ever increasing additions 
of further and further RPDF's of equal power, eventually leading to the 
noise swamping out the signal.


The only truly optimal dither is the 1RPDF *subtractive* one. It's 
immediately perfect for every momentum, and at the same time has minimum 
power, amplitude, all of the dual measurables. ;)


5) dithering is usually placed inside the feedback loop of the noise 
shaping (One criticism of the 1 bit converter [...] is that because 
only 1 bit is used in both the signal and the feedback loop, adequate 
amounts of dither cannot be used in the feedback loop and distortion 
can be heard under some conditions.)


Yes, that's the Lipshitz and Vanderkooy critique which killed one bit 
converters and there by Sony's naïve DSP implemenation, already. Now 
they use multibit converters with a bit of headroom, which makes the 
dithered delta-sigma loop immune to the argument. Also to the early 
MASH-papers. Plus the Sony failing has lead to converters which optimize 
algebraically, with the theory then being applied to usual baseband 
oriented delta-sigma loops, with deterministic error bounds.


Failure to understand dithering will result in failure to understand 
noise shaping, since noise shaping is almost exclusively used together 
with dithering (= adding noise to the signal).


So it does, and you just forgot to make the distinction between dither 
introduced within the coding loop and in its input.


Now, what is *really* interesting and germane to your point about 
noise floors and converter depths is that you didn't make a proper 
distinction between input thermal noise floor and the noise induced by 
the delta-sigma coding loop. This is crucial, because only one of them 
is really noise: the input floor.


What the (undithered) loop does is completely different: it introduces 
all kinds of wild modulation phenomena which are only *modelled* as 
noise of certain power. If you do not suppress those over the utility 
band, you can get the funniest whines, or even free running limit cycle 
oscillations with enough power and harmonic content to be heard from 
-30dB below the noise floor. Especially you can get harmonics production 
from stuff similarly far down below the input noise floor.


That is then the reason you want to make your ADC and DAC much better 
than the prevailing noise floor: we can hear stuff there, to at least 
something like -20dB, and we don't want the modulator loop to fuck that 
stuff up. It will, unless its specs are down there as well.


Not to mention some of those wonky edge case signals, like the one 
Robert Bristow-Johnson mentioned just a couple of months ago, the 
DAC-designer's nightmare: ..., +1, -1, +1, +1, -1, +1, ... Even if you 
bury something like that well within noise, it's going to pop up upon 
proper reconstruction, and not pop up if you fucked up your modulator 
loop.


So, there are several reasons to engineer for below input noise floor 
purity. Don't neglect them.


Hence, for the purpose of human perception, we actually haven't 
removed any of the noise, since we only removed 

Re: [music-dsp] Non-linearity or filtering

2015-08-09 Thread robert bristow-johnson

On 8/9/15 6:23 PM, Sampo Syreeni wrote:
1) a dithered sigma-delta converter is typically better quality than 
one without dithering


Correct.
there is and always had been **some** discussion and controversy about 
that every time i seen it discussed at an AES convention.  i remember 
hearing (and talking with) Stan Lipshitz about it.



But notice that the main dither talked about in the papers is always 
done within the quantization loop, so that its power spectrum becomes 
dependent on the loop's high order highpass response. Its spectrum can 
and will be driven off the utility audio band, and so effectively only 
used to linearize the loop itself.


2) dithering means adding noise to the signal (usually white noise, 
or a modified spectrum via noise shaping)


Sometimes an extra TPDF dither is added in front of the loop as a 
traditional dither, but as somebody already mentioned, in high end 
converters that comes for free from thermal noise, so that no 
additional noise is necessary.


and 1-bit converters are a different class than multibit converters.  
1-bit converters don't have a step-size (on the x-axis) where you can 
derive meaning for the width of the TPDF dither that *does* make sense 
for multibit uniform quantization (like what we do when we round 2's 
comp numbers).  for the 1-bit converters, if you're adding any dither at 
all, there is no mathematical reason that TPDF would be indicated over 
something else.  in multibit quantization, triangular p.d.f. makes 
sense.  that's the dither that decouples the first to moments of the 
quantization error from the input signal.  but you don't have that with 
1-bit sigma delta converters.


4) dithering eliminates signal-dependent quantization artifacts, 
hence the noise floor becomes entirely independent of the input


No it does not. And now you are the one who doesn't get dither, I 
think. ;)


he's overstating the result that you get with multibit quantization.

the overstatement is not terribly bad:  with multibit converters, TPDF 
dither will decouple the mean (the mean error will always be zero) and 
decouple the variance, the power of the AC component of the quantization 
error from the input signal.  and, as far as we know, we ain't hearing 
any of the higher-order statistics.


but that's multibit.  1-bit sigma-delta is a whole 'nother thing.  as 
mentioned above the math that tells you how loud the dither should be is 
different.  it becomes signal level dependent rather than a function of 
the step-size of the quantizer because there *is* *no* stepsize.  in 
fact, based on the signal level, there is this notion of the gain of 
the comparator which is not in the multibit quantization model.  and, i 
think commercially, they use really high-order feedback filters (i 
thought something like 6th-order or more, i have a MATLAB program that 
does it for 2nd-order).  with that non-linearity and high-order 
feedback, the behavior gets pretty chaotic.  and while we see that the 
output of the delta-sigma model will have an LPF mean that is something 
like what the input value is, the model of the thing that gets added to 
it is messy and chaotic.  i don't think anyone has demonstrated that 
some particular p.d.f. is better than another.  it's still a big-friggin 
mess.  i don't think they got that nailed for 1-bit at all like they do 
for multibit.


i remember Stan pointing out that to really decouple the moments of the 
error signal from that input, you had to crank your dither up to the 
level of the rails of the comparator.  (makes sense, the rails of a 
1-bit quantizer is the same as the *stepsize*.  that's what is 
qualitatively different for 1-bit.)  you would have to dither it as loud 
as your input.




Every progressive addition of additive rectangular probability 
distribution function (RPDF) dither of one least bit peak-to-peak 
amplitude to a signal before a conventional step quantizer causes a 
single momentum of the quantization error to be decoupled from the 
utility signal.


yup, we know that.  rectangular p.d.f. decouples the mean, but not the 
variance, from the input.




When you add a single RPDF flat dither, you remove distortion in the 
average. When you add two -- equaling the usual TPDF dither you call 
optimal -- you also remove dependence on variance, i.e. most 
significantly noise power modulation at small amplitudes. That's where 
we usually stop, because it's perceptually enough. But in actual fact 
decoupling all of the momenta would call for ever increasing additions 
of further and further RPDF's of equal power, eventually leading to 
the noise swamping out the signal.


The only truly optimal dither is the 1RPDF *subtractive* one. It's 
immediately perfect for every momentum,


really??  is that true?  if the input signal is a very slow ramp and 
you're half-way between adjacent quantization levels, you'll have a 
helluva lot more AC power in your error signal than you would if the 
input signal was 

Re: [music-dsp] Non-linearity or filtering

2015-07-29 Thread Theo Verelst
Again, I don't respond to certain derailers I at some point don't miss 
content-wise when not reading.


I started this thread, like quite a while ago I coined the basics of 
sampling on this list, because as both practically and theoretically 
inclined (and talented and educated) I felt a lot of people, from 
serious hobbyists to professionals were missing the accuracy mark on this.


Now, what was i writing this particular thread about ? Not about 
ADC/DACs no matter how I like that subject (I seem to recall me asking 
for some attention to use higher sampling rates quite a while ago, I'm 
glad that caught on, in fact since then I read that there's even going 
to be consumer support for rates I find interesting: up to 1.5 mega 
sample per second in HDMI 2.0, but, that aside). Also not about 
dithering, which I understand fine, is mainly a rounding matter 
(preferably with an eye for frequency distributions and power control), 
but IMHO has nothing to do with what I was talking about.


I wrote about the difference between Non-Linearities and Linear 
Filtering in DSP, with as one of the main motivations the possibility to 
correct electronics circuits and mechanical devices that exhibit 
non-linearities and filtering aspects that are correctable to an extend 
by Digital Signal Processing. And more over, there are circuits known in 
the DSP sphere, which I think exhibit an amount of non-linearity 
(distortion) while filtering, and possible sampling issues when acting 
as non-linear effects.


For me still first year materials (which I still like, but they're 
basic), in fact the linearity definitions in my school was a high school 
subject, there's a complete difference between a system, or a circuit, 
or a mathematical operation (like in differential equations) which does 
linear filtering, think perfect equalizer and a circuit or it's 
simulation, which distorts!


T.V.

___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-28 Thread Peter S
On 27/07/2015, Steven Cook stevenpaulc...@tiscali.co.uk wrote:
 I *think* I've got it now, but just in case, could you explain the whole
 thing again from the start because I wasn't listening?

Depends, how much will you pay?
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-27 Thread Peter S
Said in other words, by adding extra bits of noise, you gain pretty
much nothing. You could create a 48-bit, 64-bit, 128-bit etc.
converter, and while technically you have a 48/64/128-bit converter,
in reality, all you do is just add extra bits of useless noise. Unless
you use cryogenics and superconductive materials, the thermal noise
will be the same. Hence, in your 128-bit converter, the lowest 106-108
bits will be noise, most of which will be entirely useless. For any
bit depth, only the highest 20-22 bits are usable, below that, you go
into the noise floor, and your signal soon gets lost in noise.

And no matter what bit depth converter you make, it won't produce a
signal that couldn't be produced virtually identically by a 24-bit
converter, since -127 dB noise floor means that using 24 bits, the
lowest 3 bits are already noise, which also dithers the signal,
extending the dynamic range to around 150-160 dB. By adding further,
extra bits of noise, you basically gain nothing - the quality or SNR
or dynamic range won't increase, and a dithered signal already has a
(theoretically) infinite dynamic range (until the noise masks the
signal). Hence, a 24 bit converter is practically enough, there's no
further gain to go to higher bit depths (at least until such new
materials are invented that would allow a SNR above 140 dB, which I
don't expect to happen tomorrow).
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-27 Thread Steven Cook
I *think* I've got it now, but just in case, could you explain the whole 
thing again from the start because I wasn't listening? (Emmet, The Lego 
Movie)


Steven Cook.

-Original Message- 
From: Peter S

Sent: Monday, July 27, 2015 2:43 PM
To: music-dsp@music.columbia.edu
Subject: Re: [music-dsp] Non-linearity or filtering

Said in other words, by adding extra bits of noise, you gain pretty
much nothing. You could create a 48-bit, 64-bit, 128-bit etc.
converter, and while technically you have a 48/64/128-bit converter,
in reality, all you do is just add extra bits of useless noise. Unless
you use cryogenics and superconductive materials, the thermal noise
will be the same. Hence, in your 128-bit converter, the lowest 106-108
bits will be noise, most of which will be entirely useless. For any
bit depth, only the highest 20-22 bits are usable, below that, you go
into the noise floor, and your signal soon gets lost in noise.

And no matter what bit depth converter you make, it won't produce a
signal that couldn't be produced virtually identically by a 24-bit
converter, since -127 dB noise floor means that using 24 bits, the
lowest 3 bits are already noise, which also dithers the signal,
extending the dynamic range to around 150-160 dB. By adding further,
extra bits of noise, you basically gain nothing - the quality or SNR
or dynamic range won't increase, and a dithered signal already has a
(theoretically) infinite dynamic range (until the noise masks the
signal). Hence, a 24 bit converter is practically enough, there's no
further gain to go to higher bit depths (at least until such new
materials are invented that would allow a SNR above 140 dB, which I
don't expect to happen tomorrow).
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp 


___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-27 Thread Peter S
On 27/07/2015, Peter S peter.schoffhau...@gmail.com wrote:

 http://morpheus.spectralhead.com/wav/noise120db_vs_sine160db_norm.wav

Sorry, this link gave a 404 error.
Fixed now.
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-27 Thread andy mucho
And this, is why i love thus making list :)
Xxx

On Monday, 27 July 2015, Steven Cook stevenpaulc...@tiscali.co.uk wrote:

 I *think* I've got it now, but just in case, could you explain the whole
 thing again from the start because I wasn't listening? (Emmet, The Lego
 Movie)

 Steven Cook.

 -Original Message- From: Peter S
 Sent: Monday, July 27, 2015 2:43 PM
 To: music-dsp@music.columbia.edu
 Subject: Re: [music-dsp] Non-linearity or filtering

 Said in other words, by adding extra bits of noise, you gain pretty
 much nothing. You could create a 48-bit, 64-bit, 128-bit etc.
 converter, and while technically you have a 48/64/128-bit converter,
 in reality, all you do is just add extra bits of useless noise. Unless
 you use cryogenics and superconductive materials, the thermal noise
 will be the same. Hence, in your 128-bit converter, the lowest 106-108
 bits will be noise, most of which will be entirely useless. For any
 bit depth, only the highest 20-22 bits are usable, below that, you go
 into the noise floor, and your signal soon gets lost in noise.

 And no matter what bit depth converter you make, it won't produce a
 signal that couldn't be produced virtually identically by a 24-bit
 converter, since -127 dB noise floor means that using 24 bits, the
 lowest 3 bits are already noise, which also dithers the signal,
 extending the dynamic range to around 150-160 dB. By adding further,
 extra bits of noise, you basically gain nothing - the quality or SNR
 or dynamic range won't increase, and a dithered signal already has a
 (theoretically) infinite dynamic range (until the noise masks the
 signal). Hence, a 24 bit converter is practically enough, there's no
 further gain to go to higher bit depths (at least until such new
 materials are invented that would allow a SNR above 140 dB, which I
 don't expect to happen tomorrow).
 ___
 music-dsp mailing list
 music-dsp@music.columbia.edu
 https://lists.columbia.edu/mailman/listinfo/music-dsp
 ___
 music-dsp mailing list
 music-dsp@music.columbia.edu
 https://lists.columbia.edu/mailman/listinfo/music-dsp

___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-27 Thread Peter S
On 27/07/2015, Peter S peter.schoffhau...@gmail.com wrote:

 Mixture of -24 dB noise floor and -48 dB sine wave, at 16 bits precision:
 http://morpheus.spectralhead.com/wav/noise24db_vs_sine48db.wav

 Same thing converted to 8 bit:
 http://morpheus.spectralhead.com/wav/noise24db_vs_sine48db_8bit.wav

 To me, they sound exactly identical, I cannot hear any difference
 whatsoever. Their spectrum also looks exactly identical

Here is an interesting observation. If you compare their waveforms,
the 16 bit one looks smooth, and the 8 bit one looks quantized and
having the typical stairstep pattern:

http://morpheus.spectralhead.com/img/dithered_sine_16_vs_8bit.png

Despite this, they both sound identical, and their spectrum also looks
identical. Despite having a quantized, stairstep waveform, the
quantized signal represents the smooth, curved sinewave without any
distortion at all - there are no harmonics visible on the spectrum
whatsoever, it's a single sinusodial peak at 1 kHz. This is the
advantage of dithering - by adding noise, the quiet, smooth sinusoidal
signal blends with the noise, eliminating any distortion that would
otherwise result from the quantization. Since I simply used white
noise, the above excercise is equivalent to using 4 bits of dithering
with rectangular PDF.

Adding more bits of noise to make the noise smoother does not
improve the representation or the perception of the signal - the above
signal quantized to 8 bits sounds exactly identical to the 16 bit
signal. My ear cannot hear the slightest difference, despite one
signal is a quantized stairstep pattern, and the other one is
seemingly smooth. I tried to do a blind ABX test between them, to see
whether I can differentiate between them - here are the test results:


File A: noisy_sine_8bit.wav
File B: noisy_sine_16bit.wav

17:14:15 : Test started.
17:16:12 : 01/01
17:16:28 : 01/02
17:16:53 : 01/03
17:17:21 : 02/04
17:17:43 : 03/05
17:17:58 : 04/06
17:18:21 : 04/07
17:18:38 : 04/08
17:19:23 : 04/09
17:19:51 : 04/10
17:20:28 : 04/11
17:20:53 : 05/12
17:21:08 : 05/13
17:22:16 : 05/14
17:22:57 : 05/15
17:23:31 : 05/16
17:23:31 : Test finished.

 --
Total: 5/16
Probability that you were guessing: 96.2%


Out of 16 blind ABX listening trials, I could correctly tell which is
which only 5 times. In other words, my ear doesn't hear the difference
between the 8-bit quantized and the 16-bit version of this noisy sine
wave signal. (Feel free to repeat this test yourself.)

In theory, a 2-bit triangular PDF dither is enough to represent the
signal without any distortion at all, hence more bits of dithering (=
noise) is unnecessary, and there is not much you can gain further from
having more bits of noise. All you get, is a smoother looking noise,
and nothing else.
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-26 Thread Peter S
On 25/07/2015, Tom Duffy tdu...@tascam.com wrote:
 You didn't change the bandwidth.

I did. Probably you mean the 'sampling rate'.

 If the target signal is max 30Hz and you have a 192kHz sampler, you low
 pass
 at 2x your max frequency (60Hz, but lets say 100Hz for convenience) using
 a brick wall digital filter (processed at 192kHz).   Then you do a
 downsampling
 of the signal from 192kHz to 100Hz.   Then you end up with lower noise
 on the 30Hz signal,  but you need to play it back with a 100Hz DAC.

Yes, and then you end up with a very imperfect 30 Hz saw wave. Imagine
how a 30 Hz saw wave sounds after you brickwall lowpass filter it at
100 Hz. It will only have 3 partials, hence it won't be a saw wave,
or anything remotely similar.

This will sound like this:
http://morpheus.spectralhead.com/wav/saw30_100hz.wav

Its spectrum will look like this:
http://morpheus.spectralhead.com/img/saw30_100hz_spectrum.png

Therefore, this will work only for sub-bass signals, but not for
general broadband signals.

Also, note that RBJ said measure a 30 Hz waveform, not measure a
sub-bass waveform bandlimited to 30 Hz, which are two markedly
different class of signals. A 30 Hz waveform could be a 30 Hz
non-bandlimited saw wave, hence this won't work for an arbitrary 30 Hz
waveform, which was claimed.

Also, to be fully precise, for a 100 Hz DAC you'd need to brickwall
lowpass filter it at 50 Hz not 100 Hz, since a signal of frequency F
needs a sampling rate of 2*F. By brickwall filtering at 100 Hz and
using a 100Hz rate DAC, the 60 Hz partial would alias to 40 Hz, and
the 90 Hz partial would alias back to 10 Hz.

If I actually resample the 100 Hz brickwall-filtered saw wave to 100
Hz, the resulting spectrum looks like this:

http://morpheus.spectralhead.com/img/saw30_100hz_resampled.png

Alias frequenices from the improper filtering are visible at 40 and 10
Hz (from partials at 60 and 90 Hz), hence, you'd need an 50 Hz lowpass
filter to eliminate aliasing. So the 30 Hz saw wave, when properly
resampled to a 100 Hz rate, would become a single sine wave at 30 Hz,
because the second partial at 60 Hz is already filtered out.

Not a very good way to perfectly reconstruct a saw wave.
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-26 Thread Peter S
On 23/07/2015, Peter S peter.schoffhau...@gmail.com wrote:
 Robert, what you say, simply makes no sense. You speak about imaginary
 converters with imaginary components that do not exist in the real
 world.

 If your imaginary converters were real, then we could simply have 138
 dB dynamic range with dithering in any 24-bit sound card, no noise
 shaping would even be needed at *all*.

 Yet that doesn't happen There's no converter on the planet that
 has 138 dB dynamic range Hence, your imaginary converters with
 perfect components do not exist.

 Hence, your assumption that the major source of noise in a converter
 is numerical error, is flawed.

 The major sources of noise in any converter:

 1) analog noise from the components
 2) dithering noise

Here's how Nigel Redmon expressed the same:

Yes, Mark, it’s true that we have 24-bit converters now. But not really.

That is, each additional bit gives us half of what the previous bit
gave us. By the time you get to the 24th bit, its contribution is so
small, that it’s now below the thermal noise of any real circuit we
can put it in. For instance, if one bit gives us one volt, the 24th
bit would give us one ten-millionth of a volt. Considering that the
background noise of your circuit needs to be quieter than that in
order for it to be effective, you’ll need to resort to cryogenics.

But that’s not to say that we might as well use 20-bit converters.
Converters are typically spec’d based on the accuracy of their
least-significant bit. So, the 20th bit of a 24-bit converter is
likely to be more accurate (maybe 16 times more accurate, at the same
spec) than the 20th bit of a 20-bit converter. So we might as well use
24-bit converters, whether we think we can hear the last couple of
bits or not.

Other than that, we’re at the limits of physics here—the thermal noise
of atoms isn’t going to change any time soon. So if someone tries to
sell you a 32-bit converter 5 years from now, claiming a breakthrough
in knowledge, just have a good chuckle about it.

At 24 bits—144 dB dynamic range—distortion in the lowest bit will be
buried under the noise floor of any electronics that you will play it
through.[2]

The good news: Pretty much anything you record will come with its own
dither signal for free, because electronics of any kind generates more
thermal noise than the 24-bit floor.[3]

You can’t hear the error in a signal truncated to 24 bits because
it’s buried in the thermal noise of the 24-bit converters and
subsequent electronics.[3]



Consider the words: thermal noise, real circuit, one
ten-millionth of a volt, background noise, cryogenics, limits of
physics, thermal noise of atoms, noise floor of electronics.

If you disagree, please discuss it further with Nigel Redmon. You will
find him on this mailing list, and hopefully he can teach you a few
things about converters. I don't have much patience with slow
learners.

Source: What is dither?
http://www.earlevel.com/main/1996/10/20/what-is-dither/

[1] comment at February 11, 2011 at 5:02 pm
[2] comment at April 8, 2012 at 2:09 pm
[3] comment at February 20, 2013 at 11:29 am

- Peter

___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-26 Thread richard

So, just to add further spice to this already hot mixture:

127dB 768kHz/32-bit 2ch Premium ADC
http://www.akm.com/akm/en/product/detail/0055/

and, just a tad slower,
Analog Devices AD7177-2 32-Bit Sigma-Delta ADC
http://www.analog.com/en/products/analog-to-digital-converters/precision-adc-10msps/ad7177-2.html

and:
http://www.ti.com/product/ads1262?DCMP=pdcldrads1262HQS=hpa-pa-dsig-pdcldrads1262-pr-pf-ads1262-en

enjoy!

Richard Dobson


On 26/07/2015 17:32, Peter S quoted:

...

Other than that, we’re at the limits of physics here—the thermal noise
of atoms isn’t going to change any time soon. So if someone tries to
sell you a 32-bit converter 5 years from now, claiming a breakthrough
in knowledge, just have a good chuckle about it.


___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-26 Thread Peter S
On 25/07/2015, robert bristow-johnson r...@audioimagination.com wrote:

 and that's not counting noise-shaping.

Since noise shaping merely changes the shape of the noise floor,
that's pretty much irrelevant. Noise shaping is equivalent to applying
a filter to the noise floor, for example a first order noise shaping
will simply change the noise floor to a -6 dB/oct slope, like applying
a first order highpass filter to white noise (like I demonstrated
earlier). The overall difference will be minor (but feel free to
repeat the experiment using a different noise floor, and present your
results).

(Also note that upsampling does not involve noise shaping at all,
unless it also involves quantization.)

 Seems the conceptual misunderstanding here is that dithering does not
 mean that the error is described as noise.

 oh dear.  that's the whole point of it.

 do you understand what the difference between rectangular pdf dither and
 triangular pdf dither?

I could ask the same from you.

 what it does to the quantization signal?  the
 whole purpose is to take whatever nasty non-linearity (which a staircase
 function is) and turn it into something that is white (or bandlimited
 white), and with it's first two moments decoupled from the value of the
 input signal.

Yes, by adding noise (using triangular, rectangular, or whatever
probability distribution dither function).

Sure, trivially you can describe noise as noise, since it is noise
(what else), but it comes from _added_ noise from a noise generator,
_not_ the noise from the quantization (step) function.

   Rather, dithering means
 that we deliberately *add* noise to the signal (because that has
 advantages, see the literature).

 sigh

You cannot dither a signal if you only have a step function. That won't work.
You *must* need a noise generator, hence, you're adding external noise
to the signal.

sigh is a really convincing technical argument, you almost
convinced me. But let's see some sources:

Quote from https://en.wikipedia.org/wiki/Dither:

Dither is an intentionally applied form of noise used to randomize
quantization error

[...] Lipshitz and Vanderkooy pointed out that different noise types,
with different probability density functions (PDFs) behave differently
when used as dither signals, and suggested optimal levels of dither
signal for audio.[10][11] Gaussian noise requires a higher level for
full elimination of distortion than rectangular PDF or triangular PDF
noise. Triangular PDF noise has the advantage of requiring a lower
level of added noise to eliminate distortion and also minimizing
'noise modulation'.

RPDF stands for Rectangular Probability Density Function,
equivalent to a roll of a dice. Any number has the same random
probability of surfacing.

TPDF stands for Triangular Probability Density Function, equivalent
to a roll of two dice (the sum of two independent samples of RPDF).

Gaussian PDF is equivalent to a roll of a large number of dice. The
relationship of probabilities of results follows a bell-shaped, or
Gaussian curve, typical of dither generated by analog sources such as
microphone preamplifiers. If the bit depth of a recording is
sufficiently great, that preamp noise will be sufficient to dither the
recording.

Consider the meaning of the the words: intentionally applied form of
noise, randomize, noise types when used as dither signals,
triangular PDF noise, added noise, random probability, analog
sources, preamp noise.

Let's try what happens when I dither a 16-bit constant zero signal to
a 8-bit dithered signal.

16-bit constant zero signal (all samples are zero):
http://morpheus.spectralhead.com/wav/zero16bit.wav

Same thing dithered to 8-bit, using triangular dither (no noise shaping):
http://morpheus.spectralhead.com/wav/zero8bit_dithered.wav

Its spectrum looks like uniform distribution white noise:
http://morpheus.spectralhead.com/img/zero8bit_dithered_spectrum.png

By applying logic, consider how is it possible that the original
signal was a constant zero signal (all samples zero), and the
resulting dithered signal looks and sounds exactly like white noise.

Some further sources to confirm:

Dithering is described in Section 5.1.2.5 as the addition of
low-amplitude random noise to an audio signal as it is being
quantized. The purpose of dithering is to prevent neighboring sample
values from quantizing all to the same level, which can cause breaks
or choppiness in the sound. Noise shaping can be performed in
conjunction with dithering to raise the noise to a higher frequency
where it is not noticed as much.[1]

The concept of dither is to add some random noise to the waveform in
order to break up the statistical determineability of the stair
stepped waves. We do this by literally adding noise to the signal.[2]

To dither means to add noise to our audio signal. Yes, we add noise
on purpose, and it is a good thing.[3]

Consider the meaning of the words: addition of low-amplitude random
noise, add some random noise, 

Re: [music-dsp] Non-linearity or filtering

2015-07-26 Thread Michael O'Bannon

Peter,

I've been a lurker on this list for many years, and I've learned a lot 
from the conversations.  I've learned a great deal from your posts on 
this topic.


Let me point out, though, that *the list doesn't waste your time*. You 
choose to waste your time or to use it ways you consider valuable.  Your 
choice.


Best regards,
Michael

R. Michael O'Bannon, Ph.D.
Atlanta, GA  USA

On 7/26/2015 9:13 AM, Peter S wrote:

So, I'm finally quitting this discussion, there's no point in trying
to argue a person who fails to understand even the basics of dithering
and noise shaping, and apparently lives in an alternate universe. I've
shown how dithering and noise shaping works a zillion ways, there is
no point in repeating this further - there is nothing left to add.
Further details are found in the literature (I gave 30+ references),
I'm not wasting any more time on this. This mailing list is a waste of
time.
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp




___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-25 Thread Peter S
Okay, a few more thoughts:

On 23/07/2015, robert bristow-johnson r...@audioimagination.com wrote:
 okay, since there is no processing, just passing the signal from A/D to
 D/A converter, there is only one quantization operation, at the A/D.

That's only true *if* it's a non-dithered converter (read: a converter
from the previous century).

 if it's properly
 dithered, the error will be well described as noise that's white with
 DC=0 and AC power decoupled from the input value.

Seems the conceptual misunderstanding here is that dithering does not
mean that the error is described as noise. Rather, dithering means
that we deliberately *add* noise to the signal (because that has
advantages, see the literature).

Failure to understand dithering will result in failure to understand
noise shaping, since noise shaping is almost exclusively used together
with dithering (= adding noise to the signal). This will result in
failure to understand converters, and failure to understand that all
audio converters made in this century have a constant noise floor that
is independent of the signal.

 depends on what we have available for sample rates. essentially we are
 only limited by the laws in Information Theory. if i have a 192 kHz
 system and i only need to measure a 30 Hz waveform, there is a lot i can
 do to mitigate noise.

Let's consider this question further. Let's consider that the 30 Hz
waveform is a perfect saw wave, exactly as the one suggested in the
post that started this thread (linearly up to a fixed point,
virtually zero time back to a given voltage, and then very linearly up
again), and the goal is to reconstruct that waveform perfectly.

By saying there is a lot i can do to mitigate noise, I assume you
probably mean to do some lowpass filtering to filter out supersonic
frequencies of the signal. If you meant that, here is why it will
worsen your reconstruction and your results:

A perfect analog saw wave is (in theory) not bandlimited, meaning it
will have signal energy up to infinte frequency. Therefore, if you
apply any kind of lowpass filtering to a theoretically perfect saw
wave, you will

1) remove some energy from the signal
2) make it bandlimited
3) create ripples in the waveform (see Gibbs effect)

Therefore, if you sample a saw wave at 192 kHz and filter it at say,
20 kHz to remove components above 20 kHz, then what you essentially
do, is you remove partials above 20 kHz, causing ripples, therefore
adding error to the reconstruction. If you compare it to your
original, perfect analog saw, then your measurement will not be
better, but rather worse, so you didn't improve the reconstruction,
but rather, worsened it.

(This is assuming the goal was to reconstruct a perfect analog saw
wave as perfectly as possible, if I understand right the starting
post.)

But in reality, this is not so simple, as you also have a noise floor,
using whatever representation. Using 16 bit, the theoretical noise
floor is at -96 dB, using 24 bits, it is at -144 dB. And in practice,
the noise floor is typically above that, in reality, around -120 dB
for a high quality sound card, corresponding to about 20 bits
precision.

Knowing that a saw waveform has partials with amplitudes decreasing at
 6 dB/oct, it is expected that at some point, the ampltiude of a
partial will fall below the noise floor. Let's calculate the frequency
at which this happens, assuming the saw wave is a full-scale (0 dBFS)
saw wave at 30 Hz, and the sound card is has 24 bits, having 20 bits
dynamic range (-120 dB noise floor)!

In that case, the amplitude of the partials will be:

30 Hz: 0 dB
60 Hz: -6 dB
120 Hz: -12 dB
240 Hz: -18 dB
480 Hz: -24 dB
960 Hz: -30 dB
...
3,932,160 Hz: -102 dB
7,864,320 Hz: -108 dB
15,728,640 Hz: -114 dB
31,457,280 Hz: -120 dB
62,914,560 Hz: -126 dB
...

So, it means, that - assuming a noise floor of -120 dB - in order to
be able to actually _improve_ the reconstruction of a 30 Hz full scale
0 dBFS perfect saw waveform by lowpass filtering, you would need to
use a sampling rate of at least 63 MHz, that is, _mega_hertz, not
kilohertz. Above that rate, the amplitude of the noise floor is higher
than the amplitude of the partials, so if you filter out that, you'll
actually improve your reconstruction (because you removed more noise
than signal energy).

By using any less sampling rate, by doing lowpass filtering you're
removing partials from the signal that are louder than the noise, so
you're worsening your reconstruction not improving it, and you'll have
a worse reading on your measurement. (That is, assuming your
measurement equipment is not bandlimited, and has a theoretical
bandwidth of infinity, or at least up to several dozen MHz. Also, by
reconstructing the signal, you're adding another -120 dB noise floor
from the DAC, so it is questionable if this filtering would actually
result in an actual improvement in your readings, unless your DAC is

Re: [music-dsp] Non-linearity or filtering

2015-07-25 Thread robert bristow-johnson

On 7/25/15 10:57 AM, Tom Duffy wrote:

You didn't change the bandwidth.

If the target signal is max 30Hz and you have a 192kHz sampler, you 
low pass

at 2x your max frequency (60Hz, but lets say 100Hz for convenience) using
a brick wall digital filter (processed at 192kHz).   Then you do a 
downsampling

of the signal from 192kHz to 100Hz.   Then you end up with lower noise
on the 30Hz signal,  but you need to play it back with a 100Hz DAC.



but you can virtually noiselessly upsample it back up to 192 kHz.

just the LPF (done at 192 kHz) is enough to lower the noise on the 30 Hz 
bandlimited signal.


and that's not counting noise-shaping.


On 7/25/15 3:25 AM, Peter S wrote:

Okay, a few more thoughts:

On 23/07/2015, robert bristow-johnsonr...@audioimagination.com  wrote:

okay, since there is no processing, just passing the signal from A/D to
D/A converter, there is only one quantization operation, at the A/D.

That's only true *if* it's a non-dithered converter (read: a converter
from the previous century).


if it's properly
dithered, the error will be well described as noise that's white with
DC=0 and AC power decoupled from the input value.

Seems the conceptual misunderstanding here is that dithering does not
mean that the error is described as noise.


oh dear.  that's the whole point of it.

do you understand what the difference between rectangular pdf dither and 
triangular pdf dither?  what it does to the quantization signal?  the 
whole purpose is to take whatever nasty non-linearity (which a staircase 
function is) and turn it into something that is white (or bandlimited 
white), and with it's first two moments decoupled from the value of the 
input signal.



  Rather, dithering means
that we deliberately *add* noise to the signal (because that has
advantages, see the literature).


sigh



--

r b-j  r...@audioimagination.com

Imagination is more important than knowledge.



___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-25 Thread Tom Duffy

You didn't change the bandwidth.

If the target signal is max 30Hz and you have a 192kHz sampler, you low pass
at 2x your max frequency (60Hz, but lets say 100Hz for convenience) using
a brick wall digital filter (processed at 192kHz).   Then you do a 
downsampling

of the signal from 192kHz to 100Hz.   Then you end up with lower noise
on the 30Hz signal,  but you need to play it back with a 100Hz DAC.

On 7/25/2015 2:22 AM, Peter S wrote:

On 25/07/2015, Peter S peter.schoffhau...@gmail.com wrote:

On 23/07/2015, robert bristow-johnson r...@audioimagination.com wrote:


depends on what we have available for sample rates. essentially we are
only limited by the laws in Information Theory. if i have a 192 kHz
system and i only need to measure a 30 Hz waveform, there is a lot i can
do to mitigate noise.

By saying there is a lot i can do to mitigate noise, I assume you
probably mean to do some lowpass filtering to filter out supersonic
frequencies of the signal. If you meant that, here is why it will
worsen your reconstruction and your results: [...]




___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-25 Thread Peter S
On 25/07/2015, Peter S peter.schoffhau...@gmail.com wrote:
 On 23/07/2015, robert bristow-johnson r...@audioimagination.com wrote:

 depends on what we have available for sample rates. essentially we are
 only limited by the laws in Information Theory. if i have a 192 kHz
 system and i only need to measure a 30 Hz waveform, there is a lot i can
 do to mitigate noise.

 By saying there is a lot i can do to mitigate noise, I assume you
 probably mean to do some lowpass filtering to filter out supersonic
 frequencies of the signal. If you meant that, here is why it will
 worsen your reconstruction and your results: [...]

Since the numbers do not lie, let's test this experimentally.

First, here's a 192 kHz saw waveform (for simplicity, only 16 bits):
http://morpheus.spectralhead.com/wav/saw30.wav

(It's a trivial, non-bandlimited saw wave, but that doesn't change the results.)

Now, let's simulate the A/D converter's noise floor by adding some
noise. To actually hear the noise, I'll add -48 dB white noise
(because if I added -120 dB noise, you wouldn't hear it). For
simplicity, I'll use uniform distribution noise. Here's the noise I am
adding to the signal:

http://morpheus.spectralhead.com/wav/noise.wav

After mixing the 30 Hz saw wave with this noise, here's what I get (noisy saw):
http://morpheus.spectralhead.com/wav/saw30_noise.wav

So, we have a noisy saw wave. Let's assume that we want to eliminate
some of that noise. So do what RBJ suggested, and let's do some
lowpass filtering at 20 kHz to eliminate supersonic noise! (well, he
didn't actually suggest this, but I think that is what he meant, so
let's test it).

After applying a 8th order lowpass Butterworth filter tuned to 20 kHz,
here's what we have:
http://morpheus.spectralhead.com/wav/saw30_filtered.wav

If you listen to this, it will sound pretty much the exact same as the
original noisy signal, since we only removed supersonic frequencies
that the human ear doesn't hear. So they should identical (if they
don't, then it means that there's some nonlinearity in the system you
use to reproduce it).

Hence, for the purpose of human perception, we actually haven't
removed any of the noise, since we only removed noise that we didn't
hear anyways. (Technically we removed about 3/4 of the noise,
specifically the noise in the supersonic bands.)

Let's see how the waveforms look before and after filtering:

http://morpheus.spectralhead.com/img/saw30_waveform.png
http://morpheus.spectralhead.com/img/saw30_filtered_waveform.png

Apparently, the only notable difference is that we added a ripple at
the transition. This is the error or artifact of this noise
removal (which by the way, didn't remove any audible noise), hence we
added this error to the signal.

To see the error (difference) between the original and the filtered,
let's subtract the original signal from the filtered, to see the
error that this operation caused. If we check the resulting
waveform, it looks like this:

http://morpheus.spectralhead.com/img/saw30_diff_waveform.png

This is the ripple from the filtering we applied, causing this
artifact to appear. If we zoom in, here's how it looks from a
close-up view:

http://morpheus.spectralhead.com/img/saw30_diff_closeup.png

If you want to listen how this error sounds, here's the difference
between the original noisy saw and the filtered saw wave:

http://morpheus.spectralhead.com/wav/saw30_filtered_diff.wav

That's the error we introduced to the signal by doing the filtering,
so this is the artifact of this noise removal. Since the original
noise amplitude was -48 dBFS, and the amplitude of the error of the
filtering is 0 dBFS, it means that the error we introduced is about
250 times louder than the original error from the noise. That's the
cost of removing ~3/4 of the original noise present in the
supersonic bands using this method - we instead added a large ripple
to the signal.

Conclusion: FAIL

As expected, this method does not improve the reconstruction, because
it introduces significantly more error than it removes, by causing
large ripples at the transitions that are lot higher in amplitude than
the amplitude of the noise it removes. So what we end up with, is
worse than what we started with, as it has several hundred times more
overall error, because we removed a lot more signal energy, than the
amount of noise we removed.

Best regards,
Peter
___
music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-24 Thread Peter S
Since there's this contant behavioral pattern on this mailing list,
namely that irregardless of the topic, there's always some person who
basically has no clue, but tries to prove me wrong and teach me a
lesson, it's getting extremely boring.

Yes, those comments were excellent quality, if you discard that they
only apply to soundcards that are several decades old and belong to
the museum, hence off by about 20 years.

Since this behavioral pattern happens all the time, and is so
extremely boring, I decided to take a break from participating in this
mailing list. I've yet to decide whether I premanently unsubscribe, or
just take a break.

Have a nice discussion.

Best regards,
Peter Schoffhauzer
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread padawa...@obiwannabe.co.uk
Awesome collection of links on dither and noise shaping, thanks.
And talking of noise, chaps, please do keep it civil and show respect to one
another, its getting a 
bit noisyin the list.
 
best 2 all
Andy

 On 23 July 2015 at 21:38 Peter S peter.schoffhau...@gmail.com wrote:


 On 23/07/2015, Johannes Taelman johannes.tael...@gmail.com wrote:

  That document discusses high-speed converters, not sigma-delta. E2V does
  not produce audio converters.
  RBJ gave far better external literature references.

 LSB Dithering in MASH Delta–Sigma D/A Converters
 http://petrified.ucsd.edu/~ispg-adm/pubs/Pamarti_TCAS1_200704.pdf

 Dither and noise modulation in sigma delta modulators
 https://www.eecs.qmul.ac.uk/~josh/documents/ReissSandler-2003-AES115.pdf

 Statistics of the Quantization Noise in 1-Bit Dithered
 Single-Quantizer Digital Delta–Sigma Modulators
 http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.211.3140rep=rep1type=pdf

 Why 1-Bit Sigma-Delta Conversion is Unsuitable for High-Quality Applications
 http://sjeng.org/ftp/SACD.pdf

 A Comparison of Dithered and Chaotic Sigma-Delta Modulators
 http://www.scalatech.co.uk/papers/dunn_sandler_jaes_1996.pdf

 Dithering method for sigma-delta analog-to-digital converters
 http://www.google.com/patents/US6825784

 Binary dithered oversampling analog to digital converter
 http://gradworks.umi.com/34/53/3453006.html

 New Approach to Optimize a Sigma Delta Modulator
 http://paper.ijcsns.org/07_book/200706/20070634.pdf

 Multiple-Description Coding by Dithered Delta-Sigma Quantization
 http://www.eng.tau.ac.il/~zamir/papers/delta_sigmaMD.pdf

 A Novel Implementation of Dithered Digital Delta-Sigma Modulators via
 Bus-Splitting
 http://ims.unipv.it/~franco/ConferenceProc/321.pdf

 Using Dither to Improve the Performance of Lossy Sigma–Delta
 Modulators
 https://prof.hti.bfh.ch/fileadmin/home/jmm1/Papers/delta06.pdf

 Dithered Chaotic Sigma Delta Modulator
 https://allenlu2007.wordpress.com/2015/01/30/dithered-sigma-delta-modulator/

 Efficient Dithering in MASH Sigma-Delta Modulators for Fractional
 Frequency Synthesizers
 http://65.54.113.26/Publication/27026927/efficient-dithering-in-mash-sigma-delta-modulators-for-fractional-frequency-synthesizers

 A Theory of Non-Subtractive Dither
 http://robertwannamaker.com/writings/ieee.pdf

 Method and apparatus for dithering in multi-bit sigma-delta
 digital-to-analog converters 
 https://www.google.com.ar/patents/US8085176

 Tone-free dithering methods for sigma-delta DAC
 http://www.google.je/patents/US20040036636

 Multiple-Description Coding by Dithered Delta-Sigma Quantization
 http://arxiv.org/pdf/0708.1859

 High-Performance Delta-Sigma Analog-to-Digital Converters
 http://web.engr.oregonstate.edu/~moon/research/files/Jose_Silva.pdf

 Effective dithering of sigma-delta modulators
 http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=230265

 Dithering and its effects on sigma-delta and multistage sigma-delta
 modulation
 http://ieeexplore.ieee.org/iel1/18/2617/00079906.pdf?arnumber=79906

 A new dithering method for sigma-delta modulators
 http://link.springer.com/article/10.1007%2FBF00195563

 Method and apparatus for dithering in multi-bit sigma-delta
 digital-to-analog converters
 http://www.google.ee/patents/WO2010048362A3?cl=en

 Sigma delta and multi-stage sigma delta modulation with inside loop
 dithering
 http://www.computer.org/csdl/proceedings/icassp/1991/0003/00/00031953.pdf

 Efficient Shaped Quantizer Dithering Implementation for Sigma Delta
 Modulators
 http://www.researchgate.net/publication/269702218_Efficient_Shaped_Quantizer_Dithering_Implementation_for_Sigma_Delta_Modulators

 Randomly dithered quantization and sigma–delta noise shaping for finite
 frames
 https://www.sciencedirect.com/science/article/pii/S1063520307001376

 Digital-Domain Dithering'of Sigma-Delta Modulators Using Bit Flipping
 http://www.aes.org/e-lib/download.cfm?ID=7852

 Enhancing the Resolution of Incremental Converters with Dither
 http://mit.bme.hu/~markus/pubs/ms2003.pdf

 Dithering in Analog-to-digital Conversion
 http://www.e2v.com/shared/content/resources/File/documents/broadband-data-converters/doc0869B.pdf

 A-D Conversion with Dither Signal-Possibilities and Limitations
 http://www.measurement.sk/PAPERS/Domanska.pdf

 AN-804 Improving A/D Converter Performance Using Dither
 http://www.ti.com.cn/cn/lit/an/snoa232/snoa232.pdf

 ADCs Oversampling  Dithering
 http://www.eecs.umich.edu/eecs/courses/eecs373/Lec/F13Student/Oversampling_and_Dithering.pdf

 You're welcome.
 --
 dupswapdrop -- the music-dsp mailing list and website:
 subscription info, FAQ, source code archive, list archive, book reviews, dsp
 links
 http://music.columbia.edu/cmc/music-dsp
 http://music.columbia.edu/mailman/listinfo/music-dsp
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
After checking at least the first half dozen papers I linked, it
should be apparent that

1) a dithered sigma-delta converter is typically better quality than
one without dithering

2) dithering means adding noise to the signal (usually white noise, or
a modified spectrum via noise shaping)

3) dithering adds a constant noise floor to the signal

4) dithering eliminates signal-dependent quantization artifacts, hence
the noise floor becomes entirely independent of the input (*)

5) dithering is usually placed inside the feedback loop of the noise
shaping (**)

(*) Such dithering, with the optimal triangular probability density
function (TPDF) dither, in principle completely eliminates all
distortion, noise modulation, and other signal-dependent artifacts,
leaving a storage system with a constant, signal-independent, and
hence benign noise floor.[1]

(**) One criticism of the 1 bit converter [...] is that because only
1 bit is used in both the signal and the feedback loop, adequate
amounts of dither cannot be used in the feedback loop and distortion
can be heard under some conditions.[1][2] Most A/D converters made
since 2000 use multi-bit or multi-level delta sigma modulators that
yield more than 1 bit output so that proper dither can be added in the
feedback loop. For traditional PCM sampling the signal is then
decimated to 44.1 ks/s or other appropriate sample rates.[3]



So, I would expect the overwhelming majority of sigma-delta based
soundcards to be dithered, since those are better quality.

Hence, RBJ's assumptions about sigma-delta converters only apply to a
small subset of sigma-delta converters, namely the low quality,
non-dithered converters, that are not used in modern sound cards
(maybe only in some old and obsolete, pre-2000 sound cards).

Therefore, my assumptions about the signal-independent, constant noise
floor of converters was correct, since the overwhelming majority of
sigma-delta converters are expected to use dithering.

Best regards,
Peter

References:
[1] Why 1-Bit Sigma-Delta Conversion is Unsuitable for High-Quality
Applications
http://sjeng.org/ftp/SACD.pdf

[2] Why Professional 1-Bit Sigma-Delta Conversion is a Bad Idea
http://peufeu.free.fr/audio/extremist_dac/files/1-Bit-Is-Bad.pdf

[3] https://en.wikipedia.org/wiki/Noise_shaping
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread robert bristow-johnson

On 7/23/15 4:38 PM, Peter S wrote:


...


 https://en.wikipedia.org/wiki/The_Paradox_of_Choice


You're welcome.


 http://www.imdb.com/title/tt1386011/


--

r b-j  r...@audioimagination.com

Imagination is more important than knowledge.



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Johannes Taelman
On Thu, Jul 23, 2015 at 8:17 PM, Peter S peter.schoffhau...@gmail.com
wrote:

 There's even literature specifically on dithering in A/D, example:

 Dithering in Analog-to-digital Conversion

 http://www.e2v.com/shared/content/resources/File/documents/broadband-data-converters/doc0869B.pdf


That document discusses high-speed converters, not sigma-delta. E2V does
not produce audio converters.
RBJ gave far better external literature references.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Charles Z Henry
*snores*

Please have a civil conversation, and don't feed the trolls.  If this
isn't fun, what's it good for?
A simple rhyme to remember: Make it moot and don't refute!

Nobody reads every email on a mailing list.  If you have a personal
problem, consider a technical solution: email filtering
Please spare the rest of us from your flaming.


On Thu, Jul 23, 2015 at 2:09 PM, Peter S peter.schoffhau...@gmail.com wrote:
 On 23/07/2015, Theo Verelst theo...@theover.org wrote:
 I'm not answering much to treacherous psychopaths (from the use of words
 and the content of the communication here, anyway)

 Okay, I think this was the last case when I tried to teach you
 anything about digital signal processing or waste my valuable time to
 try to demonstrate some DSP processes to those small handful of
 readers who read these threads.

 Good luck figuring out the mysteries of DSP, learning what dithering
 and noise shaping is, etc. You clearly don't need the advice of
 psychopaths, you can learn all that without me as well.

 Best regards,
 Peter
 --
 dupswapdrop -- the music-dsp mailing list and website:
 subscription info, FAQ, source code archive, list archive, book reviews, dsp 
 links
 http://music.columbia.edu/cmc/music-dsp
 http://music.columbia.edu/mailman/listinfo/music-dsp
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread robert bristow-johnson

On 7/23/15 1:12 AM, Peter S wrote:

On 23/07/2015, robert bristow-johnsonr...@audioimagination.com  wrote:

okay, since there is no processing, just passing the signal from A/D to
D/A converter, there is only one quantization operation, at the A/D. if
it's an old-fashioned conventional A/D, the quantization operation is,
essentially, a non-linear staircase operation and the error is a
measurable and then predictable function of the input. if it's properly
dithered, the error will be well described as noise that's white with
DC=0 and AC power decoupled from the input value. with noise-shaping,
the noise wouldn't have to be white, but the AC power level would
increase. sigma-delta (Σ-Δ or Δ-Σ) converters might have a similar
signal+noise model. that's N1.

Let me point out to some very important detail that you've just missed
- I was not talking about quantization noise at *all*. I implied that
in the clause among other noises, without giving any detail about
quantization noise _whatsover_.


well, then you're missing something.  that's the main noise.  if it 
ain't, then the hardware design is dirty.


and what i was missing is semiconductor noise or whatever crap we get 
from dirty power supplies and the like.  i am leaving that to the 
circuit designer and layout designer.


if one is trying to model the A/D and D/A as a wire, and trying to 
subtract the input from the output to see the error, while delay might 
be something to worry about, semiconductor noise is *not* what i would 
worry about.  if i had to worry about it, there is something else deeply 
wrong in the hardware circuit.



  I was talking about the noise _floor_,
which is a remarkably different type of noise.



sigh



If you have any converter and plug in some cable, without any actual
input/output,


you mean an open circuit on the other end of the cable?


  what you'll measure is *noise* (both on the ADC and the DAC).


well, there's hum and there's noise.  not the same thing.

if the hum, due to a floating open circuit, isn't bad then the major 
component of noise you should be seeing is the actual quantization noise 
of the A/D and if the D/A is also sigma delta, there is another noise 
source there.  and this noise has a numerical root.



  I was talking about _that_ (noise floor), not the noise from the
quantization.


better look up sigma-delta converters.


  Yes, there's *also* quantization noise, which I was not
even mentioning at all, so it's not in the formulas that I wrote,
which would be:

 S + N1 + Q1 + N2 + Q2

where Q1 and Q2 are the _quantization_ noise from the ADC and DAC, and
N1/N2 are the noise from the noise _floor_ of the ADC and DAC.


more of the noise _floor_ of A/D and D/A converters comes from numerical 
operation of these 1-bit converters that from noisy analog front end 
or back end.




there *is* error at the D/A, due to non-linearity, but i wouldn't call
that noise.

There is _definitely_ a noise floor. Which is, pretty much just noise.
If you record the input of your 24 bit sound card without plugging in
*anything*, you pretty much get just noise (whatever exact
distribution, possibly depending on the noise shaping of the converter
and other factors).


and it's a function of the input.

The noise floor is definitely NOT a function of the input.


the error due to non-linearity of the A/D is a function of the input.

the noise floor, due to an open circuit, might include hum, because your 
open circuit cable might be a little antenna.


if it's a quiet short-circuited input, if the noise from the analog 
front end exceeds the noise from the converters, some might say that the 
front end needs attention.



  Even if you
have no input at all (= you plug in _nothing_), you *will* get noise
in the lowest bits of a 24-bit converter. *Irregardless* of the input.


the last statement you made is inconsistent with the no input at all 
statement.



Even using the most high-end sound cards. The lowest 3-4 bits will
*always* be noise. Feel free to test this experimentally, if you doubt
my words If there's *no* noise floor, then why don't we have
32-bit converters with near 192 dB dynamic range?


one reason is that we cannot make parts with the tolerances necessary.


  According to what
you say, just apply some noise shaping, and voila! ~192 dB dynamic
range! Yet that doesn't happen.


if the required bandwidth of the input is low enough, yes you can.  if 
you want to measure DC (if you don't have a blocking cap and your A/D 
can handle DC), you can with averaging, get to very high S/N for just DC 
and the few Hz (or tenths of Hz) around 0.  since pure DC has a very low 
bandwidth, an arbitrarily low bandwidth, you can widen the window of 
averaging to as wide as necessary and get 192 dB S/N.




   In order to be able to fix that
noise, you'd need to be able to predict that noise.

or make use of the statistics of that noise (known in advance).

You cannot use the statistics of the noise floor to 

Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
On 23/07/2015, Peter S peter.schoffhau...@gmail.com wrote:
 sorry to point out, but also having invalid assumptions - tell me,
 have you ever tried to record something with no input using a 24-bit
 converter? Have you ever looked what you have at the lowest bits? Do
 you understand what the term noise floor means?).

In case you never did that in your life, have never heard about noise
floor, and you don't have an actual soundcard to test this, here's
what happens when you record input without connecting any actual
input. I tested this using a 16-bit sound card, by selecting Line In
as input, without connecting anything.

After normalizing what I recorderd to -3 dBFS, where's what I got:
http://morpheus.spectralhead.com/img/linein.png

Here's what it's averaged spectrum looks like (after normalization):
http://morpheus.spectralhead.com/img/linein_spectrum.png

Here is its spectrogram (Y axis = 20..22050 Hz):
http://morpheus.spectralhead.com/img/linein_spectrogram.png

And here is how it sounds like:
morpheus.spectralhead.com/wav/linein.wav

To me, this pretty much looks and sounds like, near uniform
distribution white noise, mixed with some small amplitude constant hum
(which is a particular feature of this low quality 16-bit converter).
Other than that hum, it's pretty much just noise.

This is *definitely* not a function of the input, since I connected no
input at all, yet what I got, is very similar to white noise. This is
practically unpredictable, so no way to fix this for a broadband
signal.

This is what we call noise floor, and literally every sound card has
this. In any 24-bit sound card, typically the lowest 3-4 bits will be
noise. I wonder you never heard about this. Example: in this Sound
Blaser Live! 24-bit analysis test, the noise floor looks like near
uniform distribution noise at around -133 dB (second graph titled
Noise level):

http://www.gmaptool.eu/audio/rmaa/SBL2-24-48.htm

Since -133 dB is defnitely above -144 dB, it implies that the lowest
bits will contain this near uniform distribution noise (and if you
actually look at the bits of a recording of no input, you'll basically
see random bits with near uniform distribution).

If you have an imaginary converter that uses imaginary Area 51 alien
technology that has superconductive electrical components cooled by
liquid oxygen, then you may get a 0 bit noise floor (-144 dB at 24 bit
precision). If you leave the imaginary land, and get back to the real
world, then you pretty much *always* have a noise floor irregardless
of input, using whatever real-world technology, and that typically
looks quite similar to uniform distribution noise.

 well, then you're missing something.  that's the main noise.  if it
 ain't, then the hardware design is dirty.

The hardware design is always dirty, unless it's some imaginary
alien technology that doesn't exist on Earth and haven't yet been
invented.

 while delay might be something to worry about,

Yes, error from the mismatched delay is another interesting error source.

 semiconductor noise is *not* what i would worry about.

Maybe you don't worry about it, yet it is *always* there.

 if i had to worry about it, there is something else deeply
 wrong in the hardware circuit.

Or it just means it is a real-world circuit, and not an imaginary circuit.

 you mean an open circuit on the other end of the cable?

Yes.

 well, there's hum and there's noise.  not the same thing.

The noise is always there, and it cannot be predicted.

 and this noise has a numerical root.

Yes, but not *all* noises in the signal have numerical root.

 better look up sigma-delta converters.

Better look up real-world circuits.

 the error due to non-linearity of the A/D is a function of the input.

Yes. And the noise _floor_ of the converter is *not* a function of the input.

 the noise floor, due to an open circuit, might include hum, because your
 open circuit cable might be a little antenna.

Exactly. That doesn't mean it doesn't have a noise component, which is
unpredictable, thus unfixable.

 one reason is that we cannot make parts with the tolerances necessary.

Hence, you'll *always* have noise floor from the components. I'm glad
you finally admit.

 no, i just know something about oversampling.

And surely sound card manufacturers never heard about oversampling...

 to what degree you reduce noise depends on the bandwidth of interest of
 your signal and the sampling rate of the A/D and D/A.

We were speaking about broadband signals, as far as I know.

 do you understand the sources of that noise floor?

Do you?

 exactly what audio codecs are you using?  if they're sigma-delta (which
 are, now-a-daze, nearly ubiquitous in audio), the major component of the
 noise floor is actually from the operation of the converter and has a
 numerical root.

Major component != only component

 that is louder than the noise from the analog front end

Quantization noise being louder doesn't mean that the noise from the
analog front-end 

Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
On 23/07/2015, robert bristow-johnson r...@audioimagination.com wrote:
 Peter, do you know how a sigma-delta (or delta-sigma, people don't
 always agree on the semantics) converter works?

 like how a sigma-delta modulator works?  oversampling?  possible
 dithering?  noise-shaping?  decimation (involving low-pass filtering and
 downsampling)?

 do you have any idea what i am talking about (or writing about)?

Yes I do. Do you have any idea that 'dithering' means adding noise to
the signal?

Do you realize that -110 dB is a *lot* louder than the theoretical
noise floor of an 1-bit dithered 24-bit signal without noise shaping,
which would be at -138 dB?

If - according to you - they could have a  -138 dB noise floor, why do
they have a -110 dB noise floor instead? Ever wondered that? That
makes zero sense.

Do you realize that noise shaping *increases* the amplitude of the noise?

 also, even in the least-significant bits, there is signal embedded (or
 buried) in the noise.  it's not as if they appended 4 noisy bits to the
 right of a 20-bit word.  they didn't do that.

Despite that, it's still *noise*, hence it is unpredictable, hence it
is unfixable. If you have an 1-bit amplitude signal, and embed it
in 4 bits of noise, then you won't hear that 1-bit amplitude signal
because the 4 bits of noise will mask it entirely. Hence, your lowest
bits are unusable, because the noise entirely masks it.

-P
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
If noise shaping with oversampling actually worked to eliminate the
noise floor, then 24-bit sound cards would have 160 bit dynamic range.

Yet for *some* reason, they have 110-115 dB dynamic range instead, not
even approaching the theoretical 144 dB range of a 24 bit signal.

Think about that.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
Robert, what you say, simply makes no sense. You speak about imaginary
conveters with imaginary components that do not exist in the real
world.

If your imaginary converters were real, then we could simply have 138
dB dynamic range with dithering in any 24-bit sound card, no noise
shaping would even be needed at *all*.

Yet that doesn't happen There's no converter on the planet that
has 138 dB dynamic range Hence, your imaginary converters with
perfect components do not exist.

Hence, your assumption that the major source of noise in a converter
is numerical error, is flawed.

The major sources of noise in any converter:

1) analog noise from the components
2) dithering noise

 Do you realize that 'dithering' basically means: adding noise?

 to what end?  why do you think they would they be adding that noise?  how 
 would that help?

By asking that question, it seems that you do not understand the
purpose of dithering, at all. Specifically it is to eliminate the
quantization noise (and turn it into a noise floor instead), and to
increase the dynamic range.

Quote from Noise shaping page from Wikipedia:

Noise shaping must also always involve an appropriate amount of
dither within the process itself so as to prevent determinable and
correlated errors to the signal itself. If dither is not used then
noise shaping effectively functions merely as distortion shaping —
pushing the distortion energy around to different frequency bands, but
it is still distortion. If dither is added to the process as

y[n] = x[n] + A_1*e[n-1] + dither

then the quantization error truly becomes noise, and the process
indeed yields noise shaping.

Source:
https://en.wikipedia.org/wiki/Noise_shaping

So probably you should at least understand the basics of noise shaping
and dithering first.

-Peter
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
On 23/07/2015, Theo Verelst theo...@theover.org wrote:
 I'm not answering much to treacherous psychopaths (from the use of words
 and the content of the communication here, anyway)

Okay, I think this was the last case when I tried to teach you
anything about digital signal processing or waste my valuable time to
try to demonstrate some DSP processes to those small handful of
readers who read these threads.

Good luck figuring out the mysteries of DSP, learning what dithering
and noise shaping is, etc. You clearly don't need the advice of
psychopaths, you can learn all that without me as well.

Best regards,
Peter
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
 On 23/07/2015, Johannes Taelman johannes.tael...@gmail.com wrote:
 RBJ's comments are of excellent quality, and are not about obsolete or
 imaginary technologies.

Also, 16-bit converters are pretty much obsolete (if you want
high-quality audio).
Also, 24-bit converters with near zero noise floor are currently
nonexistent (=imaginary).

Hence, these are either obsolete or not yet existing technologies.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Theo Verelst

robert bristow-johnson wrote:

Peter...

 ...

it's you that are applying concepts of the old or conventional
converters here.
..
I'm not answering much to treacherous psychopaths (from the use of words 
and the content of the communication here, anyway) because that doesn't 
contribute much, and it is (in all honesty) not what inspired me to the 
obvious enough subject for this communication.



also, even in the least-significant bits, there is signal embedded (or
buried) in the noise.  it's not as if they appended 4 noisy bits to the
right of a 20-bit word.  they didn't do that.


Of course, agreed, an clear. In fact, the same is true for some forms of 
Johnson noise and certainly for microphone air induced noise patterns, 
reception of signals through connecting wires (including ground current 
induced noise), expert use of studio equipment appears to break a lot 
of simplistic rules that of course certain people are satisfied with for 
everyday use. It's almost as if the matrix of using a microphone + 
pre-amp+ AD+ computer + DA + amplification favors certain correlations!


To stay a proper theoretician (albeit, seriously, not necessarily 
condescendingly, undergrad basic material) it's essential, in the face 
of the possible sample based processing errors, and the limited 
reconstruction filtering induced errors (which require a little, but not 
that much more, measurement and normalizing for human perception), I was 
breaking a lance for distinguishing between a curve in a signal coming 
from a non-linearity, meaning the amplitude is somehow determining the 
amplification factor for instance, and (linear in normal EE language) 
filtering of some order, both in the analog and in the digital domain, 
though there are differences, I mean just in general. A proper circuit 
analysis depends on understanding that difference, which can lead to 
interesting conclusions about DSP.
Lest we sit with our feet in a bowl of water with a cat on out lap for 
something interesting to take place.


T
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
Noise shaping is a filtering process that shapes the spectral energy
of quantization error, typically to either de-emphasise frequencies to
which the ear is most sensitive or separate the signal and noise bands
completely. If dither is used, its final spectrum depends on whether
it is added inside or outside the feedback loop of the noise shaper:
if inside, the dither is treated as part of the error signal and
shaped along with actual quantization error; if outside, the dither is
treated as part of the original signal and linearises quantization
without being shaped itself. In this case, the final noise floor is
the sum of the flat dither spectrum and the shaped quantization noise.
While real-world noise shaping usually includes in-loop dithering, it
is also possible to use it without adding dither at all, in which case
the usual harmonic-distortion effects still appear at low signal
levels.

Source:
https://en.wikipedia.org/wiki/Dither#Digital_audio

I think it is clear from the above that without dithering, you get
your regular quantization errors that accompany low amplitude signals.
Hence, noise shaping is usually used in combination with dithering, in
that case, you add noise to the signal to increase dynamic range and
eliminate the quantization noise, and get a fixed noise floor instead.
Noise shaping basically just modifies the spectrum of the noise, at
the expense of increasing the amplitude of the noise.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Johannes Taelman
Peter,

RBJ's comments are of excellent quality, and are not about obsolete or
imaginary technologies.
Try to learn from his comments, that would gain you more respect here
rather than trying to prove him wrong, really!


On Thu, Jul 23, 2015 at 7:16 PM, Peter S peter.schoffhau...@gmail.com
wrote:

 Robert, what you say, simply makes no sense.
 ...
 So probably you should at least understand the basics of noise shaping
 and dithering first.

 -Peter

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread robert bristow-johnson

On 7/23/15 3:36 AM, Peter S wrote:

Also if you fail to notice that the current year is 2015, and the
rules you learned 20 years ago for 8-bit and 16-bit converters do not
necessarily apply for today's typical 24-bit converters (that usually
have several bits of noise in the lowest bits),


Peter, do you know how a sigma-delta (or delta-sigma, people don't 
always agree on the semantics) converter works?


like how a sigma-delta modulator works?  oversampling?  possible 
dithering?  noise-shaping?  decimation (involving low-pass filtering and 
downsampling)?


do you have any idea what i am talking about (or writing about)?

it's you that are applying concepts of the old or conventional 
converters here.


the *major* component of audible noise is coming from the numerical 
processes inside the codec, unless it's a conventional A/D or D/A, which 
i highly doubt in audio (but there are some expensive audio gear that 
use conventional converters and oversampling).


also, even in the least-significant bits, there is signal embedded (or 
buried) in the noise.  it's not as if they appended 4 noisy bits to the 
right of a 20-bit word.  they didn't do that.



--

r b-j  r...@audioimagination.com

Imagination is more important than knowledge.



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
Here is a somewhat random selection of 24-bit sound cards with SNR
data included:

http://sound-cards-review.toptenreviews.com/

Output SNR:
a) 124 dB
b) 124 dB
c) 109 dB
d) 112 dB
e) 117 dB
f) 109 dB
g) 100 dB
h) 113 dB

Input SNR:
a) 118 dB
b) 118 dB
d) 98 dB
e) 115 dB
g) 100 dB
h) 113 dB

Let's calculate how many bits are noise in their input / output when
using 24 bit precision!

To do that, simply subtract these numbers from 144 dB (the theoretical
maximum SNR for a 24-bit card, not counting dithering), then divide
the difference by 6.02 to get the amount of noise in bits. Here is
what you get:

Output:
a) 3.3 bits
b) 3.3 bits
c) 5.8 bits
d) 5.3 bits
e) 4.5 bits
f) 5.8 bits
g) 7.3 bits
h) 5.1 bits

Input:
a) 4.3 bits
b) 4.3 bits
d) 7.6 bits
e) 4.8 bits
g) 7.3 bits
h) 5.1 bits

So, according to the specification of these sound cards, the lowest
3-7 bits are expected to be noise.

In theory, if you merely quantize a signal to the nearest bit without
dithering and noise shaping, the peak-to-peak amplitude of that noise
will be 1 bit, since the error will be between -0.5..0.5. Trivially,
3-7 bits of noise is a *lot* higher than the theoretical quantization
noise of 1 bit.

However, dithering and noise shaping may change quantization noise
amplitude. More specifically, in spite of what Robert claims, when
applying dithering with noise shaping, then the amplitude of the noise
will actually *increase*, and not decrease.

The reason why it may be perceived as more silent, is that the noise
is typically pushed into bands where the human hearing is less
sensitive. This does *not* mean that the amplitude decreases, rather
on the contrary, it actually increases - the higher order the noise
shaping, the more the amplitude increases.

To demonstrate this, here are some samples of various noise shaping
algorithms applied to a 8-bit signal:

[WARNING: these samples may contain loud high frequencies, so set your
playback volume to low.]

Without dithering, the SNR would be -48 dB.

1-bit triangular dithering, no noise shaping:
http://morpheus.spectralhead.com/wav/shaping_off.wav
Noise floor: -42 dB

1-bit triangular dithering, noise shaping A:
http://morpheus.spectralhead.com/wav/shaping_a.wav
Noise floor: -42 dB

1-bit triangular dithering, noise shaping B:
http://morpheus.spectralhead.com/wav/shaping_b.wav
Noise floor: -36 dB

1-bit triangular dithering, noise shaping C:
http://morpheus.spectralhead.com/wav/shaping_c.wav
Noise floor: -30 dB

1-bit triangular dithering, noise shaping D:
http://morpheus.spectralhead.com/wav/shaping_d.wav
Noise floor: -30 dB

1-bit triangular dithering, noise shaping E:
[WARNING: loud high frequency noise]
http://morpheus.spectralhead.com/wav/shaping_e.wav
Noise floor: -12 dB

As you see, the very high order noise shaping introduced a -12 dB (25%
amplitude) noise floor, meaning that 6 out of 8 bits in the signal
(75% of the bits) are basically noise, more specifically, dithering
noise.

So much about noise shaping eliminating noise. In fact, dithering
and noise shaping is the best way to introduce noise and *increase*
the noise floor in the signal.

 the *major* component of audible noise is coming from the numerical processes 
 inside the codec

Seriously, where do you get that from?

Do you realize that 'dithering' basically means: adding noise?

Best regards,
Peter
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Tom Duffy

This is painful to follow.

Can we at least go back to basics and not keep changing the
meaning of well known concepts and vocabulary.

re, sound card performance:
What is SNR, how is it measured, and why does that matter?

e.g.
http://www.cse.psu.edu/~chip/course/analog/lecture/SFDR1.pdf

There are also good books on the design of Delta Sigma
converters (both AD and DA) that walk you through the
understanding of how DS converters differ to an ideal model.


On 7/23/2015 9:56 AM, Peter S wrote:

NOTICE: This electronic mail message and its contents, including any attachments hereto 
(collectively, this e-mail), is hereby designated as confidential and 
proprietary. This e-mail may be viewed and used only by the person to whom it has been sent 
and his/her employer solely for the express purpose for which it has been disclosed and only in 
accordance with any confidentiality or non-disclosure (or similar) agreement between TEAC 
Corporation or its affiliates and said employer, and may not be disclosed to any other person or 
entity.



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread robert bristow-johnson



i wrote:


the *major* component of audible noise is coming from the numerical processes 
inside the codec

On 7/23/15 12:43 PM, Peter S wrote:

Seriously, where do you get that from?



well, i take it that the answer to the question i asked is no.

so there are a few docs on the web like at 
http://www.analog.com/media/en/training-seminars/tutorials/MT-022.pdf , 
but they're not necessarily all that good.


i s'pose i should be more precise.  the *major* component of audible 
noise is coming from the severe quantization that occurs at the 1-bit 
converter in the sigma-delta modulator.  but the digital processing that 
follows to filter and decimate (which also increases the word width from 
1 bit to something much wider) are the numerical processes that follow 
the 1-bit converter.  it is in this process that you start to see a 
recognizable waveform with a noisy component added to it.



Do you realize that 'dithering' basically means: adding noise?



to what end?  why do you think they would they be adding that noise?  
how would that help?



--

r b-j  r...@audioimagination.com

Imagination is more important than knowledge.



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
On 23/07/2015, robert bristow-johnson r...@audioimagination.com wrote:

 exactly what audio codecs are you using?  if they're sigma-delta (which
 are, now-a-daze, nearly ubiquitous in audio), the major component of the
 noise floor is actually from the operation of the converter and has a
 numerical root.  that is louder than the noise from the analog front
 end, unless your analog front end is particularly noisy.

I'd argue that's not necessarily true. If it is a 24-bit converter
where the lowest 4 bits are noise (due to analog noise), and we assume
the peak-to-peak amplitude of the quantization noise to be 1-bit
(since the maximum error between the original and the quantized signal
is maximum 1 bit), then the former is certainly louder than the latter
(precisely, 4x as loud).

Hence, the major component of the noise floor is actually from the
operation of the converter and has a numerical root is not
necessarily true. The analog noise can be a lot louder than 1-bit
(typically, up to 3-4 bits or more in a 24-bit converter).

If you only worked with 8 or 16-bit converters in your life, then that
statement may be true. Yet it's typically not true in case of 24-bit
converters, which usually have several bits of noise floor.

-P
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-23 Thread Peter S
Okay, I'll quit this discussion. It's quite pointless anyways -
there's not very much you can do to improve the reconstruction of your
soundcard, at least nothing that would be as good as buying a better
sound card.

Also if you fail to notice that the current year is 2015, and the
rules you learned 20 years ago for 8-bit and 16-bit converters do not
necessarily apply for today's typical 24-bit converters (that usually
have several bits of noise in the lowest bits), then there's not much
point in the discussion, because you're speaking about imaginary
converters, and I'm speaking about real-world converters, so we will
never agree.

Good luck discussing this topic further.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Christian Luther
Hi Uli,

how well did you match the summing resistors and how much signal amplitude was 
left?

Note that with a 0.1dB (~1% tolerance resistors) level difference between the 
two signals, the difference would still have an amplitude about 40dB below the 
original signals. You can get to -60dB with resistors matched to 0.1%. (this is 
just a quickdirty ballpark estimation)

The difference test can be very useful in digital domain, where exact level 
matching comes for free. In the analog domain, however, it is very hard to 
achieve the necessary precision so you’re not chasing ghosts.

Greets
Christian

 Am 21.07.2015 um 18:53 schrieb Uli Brueggemann uli.brueggem...@gmail.com:
 
 Theo,
 
 this reminds me on a simple test where I have never got a desired result.
 Take a digital signal (a sine wave or your saw wave), send it thru a DAC.
 For the second channel take the inverse wave. Add the DAC outputs e.g. by a
 resistor network and try to get zero.
 The digital signals add perfectly to zero but the analog signals behind the
 DACs do not.
 Now there is enough playground to modify the digital signal to get closer
 to zero and this includes a research for all kind of the distortions you
 have described.
 
 Uli
 
 2015-07-21 17:50 GMT+02:00 Theo Verelst theo...@theover.org:
 
 Hi DSPers,
 
 For a long time it has bothered me that there's a bit hidden way to deal
 with all kinds of signal distortion, both in the analog domain as in the
 digital domain, that isn't necessarily clear. I think this is a real
 subject, and I'd prefer to have a good angle on it to essentially make
 clearer and more transparent recordings and DSP algorithms.
 
 Simply put, if you take a standard test signal or oscillator signal like a
 SAW wave (you know, linearly up to a fixed point, virtually zero time back
 to a given voltage, and then very linearly up again (obviously)), and you
 put that signal through a preamp or a digital processing device, you can
 get distortion because of transistors (or tubes) or errors in the AD/DA
 conversion, and you can get signal aberrations as a consequence of (linear)
 filtering, like coupling capacitors, DC offset control (similar function),
 limited frequency response, and general imperfections showing up as
 frequency dependent amplification errors stemming from linear filtering
 elements.
 
 To give an example, you could get exponential curves superimposed over
 your pure saw wave (forgetting for the moment the imperfections related
 to aliasing in case of digital signal processing) from non-linearities in
 the signal chain, such as small signal response curves in amplifier
 elements, or from filtering elements responding to the signal with normal
 (and linear) time responses based on the poles and zeros at stake. So the
 input of the amplifier amplifying a microphone could show some sort of
 transcendental non-linear distortion (standard for a lot of circuits). On
 the other hand, the high pass filter built in many amplifier stages (in
 terms of the coupling capacitor) and the limited frequency response of any
 analog circuit change the curves in the test saw wave a bit too, which
 translates to certain types of exponentials as well. (first year excercises
 for EEs).
 
 Now what's the point related to digital signal processing ? Well, there
 are a number of signal corrections, harmonic analysis and adaptation
 methods and even noise reduction methods that can work pretty ok in the
 digital domain that could benefit from analysis and tuning with standard
 test and synthesizer signals . So I'd prefer to work a bit on getting a
 very good quality saw wave, put that on a mixer and digitizer, and then use
 digital measurements to adjust whatever can be adjusted towards perfect
 mixing and pre-amplification (as far as there are errors than come to the
 attention in productions), but also, it would be interesting to then feed
 the perfect signal at the input of a AD convertor connected to the mixed
 signal through some form of digital correction audio streaming software
 such that we can compare the output of a also connected DAC to a mixer or
 electronic subtraction device to compare the Digital to Analog converters'
 output to the original signal (except for a phase shift) to as it were work
 on that sort of perfection!
 
 
 Theo V.
 --
 dupswapdrop -- the music-dsp mailing list and website:
 subscription info, FAQ, source code archive, list archive, book reviews,
 dsp links
 http://music.columbia.edu/cmc/music-dsp
 http://music.columbia.edu/mailman/listinfo/music-dsp
 
 --
 dupswapdrop -- the music-dsp mailing list and website:
 subscription info, FAQ, source code archive, list archive, book reviews, dsp 
 links
 http://music.columbia.edu/cmc/music-dsp
 http://music.columbia.edu/mailman/listinfo/music-dsp

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Uli Brueggemann
Of course I have tried to match the resistors. But then you will also
recognize that there are gain differences between the channels. So I also
ended up with further trials of matching including trimpots. At the end I
could fine-tune by a trimpot and minimize the sum signal.
Then I tried to improve the result by modifying on the digital side but
without success.

My simple assumption was: if the DAC is a 24 bit DAC it should be possible
to get down to e.g. -90 dB with the sum of the signals. But it seems to be
quite challenging. It seems to be challenging with a constant sinewave of a
given frequency but even more with a logsweep signal.

- Uli

2015-07-22 10:03 GMT+02:00 Christian Luther c...@kempermusic.com:

 Hi Uli,

 how well did you match the summing resistors and how much signal amplitude
 was left?

 Note that with a 0.1dB (~1% tolerance resistors) level difference between
 the two signals, the difference would still have an amplitude about 40dB
 below the original signals. You can get to -60dB with resistors matched to
 0.1%. (this is just a quickdirty ballpark estimation)

 The difference test can be very useful in digital domain, where exact
 level matching comes for free. In the analog domain, however, it is very
 hard to achieve the necessary precision so you’re not chasing ghosts.

 Greets
 Christian


--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Peter S
On 22/07/2015, Theo Verelst theo...@theover.org wrote:
 distortion figures indicate. Which should be a lot better than .1 dB
 which would imply an error of over 1 percent, which wouldn't be very
 good for a 50s HiFi system. But the specified harmonic distortion of a
 lot of well known DACs sure isn't such that 24 bits accuracy is achieved.

A typical high-end card is a lot better than that. Example:
http://www.ixbt.com/proaudio/lynxstudio/lynxaurora8%28+4dbu%29-2444.shtml

THD:  0.0005%
IMD + Noise: 0.0007%

The largest peak at the 1k THD graph is around -110 dB.
That's far below the threshold of human hearing.

115 dB dynamic range would imply about 19 bits precision.
Frequency response is total flat up to 20k (0.02 dB error).
That would mean 0.22% amplitude error at 20 kHz.

Yours for only $2595.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Peter S
You have your signal S. When you digitize that signal, you add the
noise floor of the ADC (among other noises), let's call it N1. When
you reconstruct the signal, you add the noise floor of the DAC (among
other noises), let's call that N2. So you have

S + N1 + N2

Then you subtract the original signal (let's disregard the delay) and
measure what you have:

S + N1 + N2 - S

Since S - S = 0, what you're measuring is:

N1 + N2

In other words, you're measuring the combined noise floor from your
ADC and DAC (among other noises). And you're trying to fix that
noise.

Here's why it won't work - the noise floor of the ADC and DAC are
pretty much close to uniform distribution noise, without any pattern.
The lowest bits are just random. In order to be able to fix that
noise, you'd need to be able to predict that noise.

But since you cannot predict noise, there's pretty much nothing you
can do to fix that noise... Once you reach the noise threshold of
your ADC/DAC, there's nothing you can do to improve your
reconstruction (other than, buying another soundcard that costs a few
thousand dollars more, and has a lower noise floor).

If your soundcard is not so high-end, and has a slight roll-off at
high frequencies, then the best you may do is correct that with a
filter, and improve your readings slightly. About that's all you can
do, you cannot fix noise.

If noise were fixable, then sound card manufactures would already be
doing it. How much you can fix noise, correlates with how many
thousand dollars you want to spend on your sound card, and even that
works only up to some limit, above which, there's nothing you can do -
you have noise, whatever you do.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Peter S
On 23/07/2015, robert bristow-johnson r...@audioimagination.com wrote:
 okay, since there is no processing, just passing the signal from A/D to
 D/A converter, there is only one quantization operation, at the A/D. if
 it's an old-fashioned conventional A/D, the quantization operation is,
 essentially, a non-linear staircase operation and the error is a
 measurable and then predictable function of the input. if it's properly
 dithered, the error will be well described as noise that's white with
 DC=0 and AC power decoupled from the input value. with noise-shaping,
 the noise wouldn't have to be white, but the AC power level would
 increase. sigma-delta (Σ-Δ or Δ-Σ) converters might have a similar
 signal+noise model. that's N1.

Let me point out to some very important detail that you've just missed
- I was not talking about quantization noise at *all*. I implied that
in the clause among other noises, without giving any detail about
quantization noise _whatsover_. I was talking about the noise _floor_,
which is a remarkably different type of noise.

If you have any converter and plug in some cable, without any actual
input/output, what you'll measure is *noise* (both on the ADC and the
DAC). I was talking about _that_ (noise floor), not the noise from the
quantization. Yes, there's *also* quantization noise, which I was not
even mentioning at all, so it's not in the formulas that I wrote,
which would be:

S + N1 + Q1 + N2 + Q2

where Q1 and Q2 are the _quantization_ noise from the ADC and DAC, and
N1/N2 are the noise from the noise _floor_ of the ADC and DAC.

 there *is* error at the D/A, due to non-linearity, but i wouldn't call
 that noise.

There is _definitely_ a noise floor. Which is, pretty much just noise.
If you record the input of your 24 bit sound card without plugging in
*anything*, you pretty much get just noise (whatever exact
distribution, possibly depending on the noise shaping of the converter
and other factors).

 and it's a function of the input.

The noise floor is definitely NOT a function of the input. Even if you
have no input at all (= you plug in _nothing_), you *will* get noise
in the lowest bits of a 24-bit converter. *Irregardless* of the input.
Even using the most high-end sound cards. The lowest 3-4 bits will
*always* be noise. Feel free to test this experimentally, if you doubt
my words If there's *no* noise floor, then why don't we have
32-bit converters with near 192 dB dynamic range? According to what
you say, just apply some noise shaping, and voila! ~192 dB dynamic
range! Yet that doesn't happen.

   In order to be able to fix that
 noise, you'd need to be able to predict that noise.

 or make use of the statistics of that noise (known in advance).

You cannot use the statistics of the noise floor to fix (=
eliminate) that noise. No matter how many statistics papers you read,
that won't work. If it was fixable, then please tell me, why do even
the best, most expensive, $3000 sound cards will have just noise in
the lowest bits? Tell me. If that were possible, then those zillions
of dollars spent on converter research, should have been enough to
figure it out, don't you think? Or you know something that _all_ sound
card manufacturers don't know?

 but if the noise
 is colored (and you know about the spectrum) and if the noise has a
 p.d.f. that is not uniform, you can make guesses about where the next
 sample is that are better than wild-assed guesses.

Yet you cannot fix it (=eliminate it). Yes you may improve it
_slightly_ with noise shaping (so you push it into bands where
psychoacoustically it may sound like less noise to the human ear), but
that won't eliminate it. Sorry that's impossible. No matter how many
degrees you have and how many thousand hours you spend in the library,
that just won't work. And even if that gives you psychoacoustically
better noise profile, that won't fool a measurement equipment (which
is unaffected by psychoacoustics, unless it's deliberately built in
via some weighting curve.)

And there's no magic alien technology that will eliminate the noise
_floor_ of a converter, and magically give you 32-bit 192 dB dynamic
range. No such converter exists. Why don't 24-bit converters have 144
dB dynamic range? Answer: noise floor.

 Peter, if you can take or sit-in some grad courses, i might recommend a
 course in Statistical Communications or at least a course in Random or
 Stochastic Processes. there is ostensibly some stuff you're missing here.

Robert, your constant consdecending is starting to get really boring.
Earlier you told me to not become patronizing, yet now you do this
condescending behaviour (even without understanding what I say, and
sorry to point out, but also having invalid assumptions - tell me,
have you ever tried to record something with no input using a 24-bit
converter? Have you ever looked what you have at the lowest bits? Do
you understand what the term noise floor means?).

And by the way, yes, I know about noise 

Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Peter S
So... if you sell your car and buy the most expensive sound card you
can get, your readings may improve by 10-20 decibels.

By doing some digital voodoo, you may increase your match between the
original and the resonstructed signal by a few decibels... But beyond
that, there's no other way than to shell out a few thousand dollars
for better converters.

Typically, 24 bit converters have a dynamic range of only about 18-20
bits. The lowest bits are generally just noise, even in the most
high-end cards - the maximum dynamic range is around 110-115 dB,
rarely above that. Beyond that, it's just noise territory. Since noise
is basically entropy (= unpredictability), you cannot predict it,
hence you cannot fix it...

That's as best as you can get.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-22 Thread Theo Verelst

Uli Brueggemann wrote:

...
My simple assumption was: if the DAC is a 24 bit DAC it should be possible
to get down to e.g. -90 dB with the sum of the signals. But it seems to be
quite challenging.


It may be wideband (i.e. including sub-sonic and super-sonic) noise that 
keeps the sum to about or a little more -70dB.


I don't have any problem matching channels from the *same* DAC to add to 
close to zero with a very high quality summing stage. Inverting the 
signals is easy to do if you have some streaming plugins and connections 
to play, and small volume changes are possible, too of course. If the 
reconstruction filter in the DAC is the same, the sum should be 
independent of the signal. I can verify that with a DC coupled quality 
DAC with precision SMD filter components at it's output feeding a high 
impedance buffer stage, but of course very small differences could exist.


Harder but more interesting is to take a signal like music or TV or 
anything that has wideband frequency components, and take two different 
DACs, with a as neat as possible re-sample filter feeding the one DAC to 
work at the same clock in the digital domain as the other, and subtract 
(or analog add with a digital inversion built in one of the two digital 
paths to the DACs) the two signals, lets say in stereo, for fun. The 
fact that the DACs will have slightly different clock frequencies, or 
slightly not integer relations (for instance 48kHz for the one DAC and 
384kHz for the other, but not based on the same master clock) makes the 
re-sampler necessary. Anyhow, make sure you delay the fastest DAC path 
to match the slowest, and the fun can start: when the clocks are a bit 
stable, very different kinds of DACs can add to zero, but you'll hear 
all kinds of interesting phasing going on when you accurately adjust the 
delay (and the volume of course), and when stability is achieved (unless 
you'd be able to use the same master clock for both DACs of which the 
outputs are being subtracted), you'll get an idea of what reconstruction 
filters really do (and can't)...


Of course resistors and capacitors will influence frequency 
characteristics around the low and high frequency cut-off frequencies, 
and idem for the signal phase.


Then there is the harmonic distortion as a consequence of the 
limitations of the DACs reconstruction filter, and the (transient-) 
inter modulation distortion that all DACs have, as consequence also of 
inherent non-linearities and the mere fact that transients coming out of 
the digital domain (through the standard very short reconstruction 
filters) are far from perfect for human listeners, so depending on the 
setup, the output signal will certainly be no more accurate than these 
distortion figures indicate. Which should be a lot better than .1 dB 
which would imply an error of over 1 percent, which wouldn't be very 
good for a 50s HiFi system. But the specified harmonic distortion of a 
lot of well known DACs sure isn't such that 24 bits accuracy is achieved.


T.


--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-21 Thread Uli Brueggemann
Theo,

this reminds me on a simple test where I have never got a desired result.
Take a digital signal (a sine wave or your saw wave), send it thru a DAC.
For the second channel take the inverse wave. Add the DAC outputs e.g. by a
resistor network and try to get zero.
The digital signals add perfectly to zero but the analog signals behind the
DACs do not.
Now there is enough playground to modify the digital signal to get closer
to zero and this includes a research for all kind of the distortions you
have described.

Uli

2015-07-21 17:50 GMT+02:00 Theo Verelst theo...@theover.org:

 Hi DSPers,

 For a long time it has bothered me that there's a bit hidden way to deal
 with all kinds of signal distortion, both in the analog domain as in the
 digital domain, that isn't necessarily clear. I think this is a real
 subject, and I'd prefer to have a good angle on it to essentially make
 clearer and more transparent recordings and DSP algorithms.

 Simply put, if you take a standard test signal or oscillator signal like a
 SAW wave (you know, linearly up to a fixed point, virtually zero time back
 to a given voltage, and then very linearly up again (obviously)), and you
 put that signal through a preamp or a digital processing device, you can
 get distortion because of transistors (or tubes) or errors in the AD/DA
 conversion, and you can get signal aberrations as a consequence of (linear)
 filtering, like coupling capacitors, DC offset control (similar function),
 limited frequency response, and general imperfections showing up as
 frequency dependent amplification errors stemming from linear filtering
 elements.

 To give an example, you could get exponential curves superimposed over
 your pure saw wave (forgetting for the moment the imperfections related
 to aliasing in case of digital signal processing) from non-linearities in
 the signal chain, such as small signal response curves in amplifier
 elements, or from filtering elements responding to the signal with normal
 (and linear) time responses based on the poles and zeros at stake. So the
 input of the amplifier amplifying a microphone could show some sort of
 transcendental non-linear distortion (standard for a lot of circuits). On
 the other hand, the high pass filter built in many amplifier stages (in
 terms of the coupling capacitor) and the limited frequency response of any
 analog circuit change the curves in the test saw wave a bit too, which
 translates to certain types of exponentials as well. (first year excercises
 for EEs).

 Now what's the point related to digital signal processing ? Well, there
 are a number of signal corrections, harmonic analysis and adaptation
 methods and even noise reduction methods that can work pretty ok in the
 digital domain that could benefit from analysis and tuning with standard
 test and synthesizer signals . So I'd prefer to work a bit on getting a
 very good quality saw wave, put that on a mixer and digitizer, and then use
 digital measurements to adjust whatever can be adjusted towards perfect
 mixing and pre-amplification (as far as there are errors than come to the
 attention in productions), but also, it would be interesting to then feed
 the perfect signal at the input of a AD convertor connected to the mixed
 signal through some form of digital correction audio streaming software
 such that we can compare the output of a also connected DAC to a mixer or
 electronic subtraction device to compare the Digital to Analog converters'
 output to the original signal (except for a phase shift) to as it were work
 on that sort of perfection!


 Theo V.
 --
 dupswapdrop -- the music-dsp mailing list and website:
 subscription info, FAQ, source code archive, list archive, book reviews,
 dsp links
 http://music.columbia.edu/cmc/music-dsp
 http://music.columbia.edu/mailman/listinfo/music-dsp

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Non-linearity or filtering

2015-07-21 Thread Peter S
So in short why this won't work well:

Trying to correct a highpass filter, you need an inverse filter that
has a gain of infinity at DC (since the highpass filter has gain of
-infinity at DC). Problem is, -infinity + infinity != zero, so you
likely end up with a signal that has increasingly growing DC offset,
until you get into clipping.

To fix that, you'd need to put another DC filter on the signal...
Eventually you may end up with something that's somewhat better than
the original, but certainly not as good as throwing away your
soundcard and buying a better DC-coupled sound card that has no
capacitor on the input at all, obviating the need for correcting it.
That's the best you can do.

Also, when you want to compare the output of the corrected signal,
then - unless you use a soundcard that has a DC-coupled output - the
DAC will also introduce distortions, changing its shape by eliminating
the frequencies below ~20 Hz. So your measurement will be off, and the
shape of the output will differ from the shape of your digital wave.
So unless you use a DC-coupled soundcard, this won't work well, and if
you use a DC-coupled soundcard, then this whole 'correction' is
unnecessary.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp