• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Dithering is a Mathematical Process - NOT a psychoacoustic process.

OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,792
Location
My kitchen or my listening room.
Such a cool story. I can add another equally frustrating one. :)

...

Anyway, I have dug one out of my storeroom just for fun. Will see what it can do- or not do. Anyone want to see it?

Cheers.

Yeah, I also had a Sony (when I replaced the Maggotbox) whose failure mode was "could not tell the drawer was closed". All else worked, but only my spouse had the calibrated (SMACK) to make the damn thing load. This was while we had two smalls who wanted to play their kids CD's.

Ironically, the SL2020 had one very good feature, you could use it in "exclude track" mode. For some CD's, this was a blessing. I've never seen that feature since.
 

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
It does work universally. My first exposure to dithering was in the 1970s in capturing photoacoustic interferograms, decidedly nonperiodic.

That sounds interesting indeed...?

Here is an example of what I had in mind--5 year Bitcoin price in Pounds:

1581025290579.png


A friend of mine had mined a couple in the early days, and failed to sell them around the peak. I don't think any "rounding error" quite figures in the level of regret now felt. ;-)

And over the past 24 hours:

1581025552091.png


It can be seen that short-term "scalping" is certainly possible (based on the above plot, i.e. ignoring transaction costs)--but even then, whether the quoted "market" price is £7564.930 or £7534.9301 or £7534.93011 is presumably not useful information, e.g. in finding "local" minimum and maximum areas for buying/selling.

It won't tell you the exact amount that you might be able to buy/sell Bitcoins for, either, in the same way that different currency exchange rates are offered.

IOW anything beyond a handful of "significant figures" is effectively "noise," and again a very basic modification to the chart in an attempt to "recover" the "signal" would be to calculate the moving average rather than using raw values.
 
Last edited:
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,792
Location
My kitchen or my listening room.
And, for the record, dither linearizes quantization. Signal level need not be considered, beyond "do not overload".
 

restorer-john

Grand Contributor
Joined
Mar 1, 2018
Messages
12,730
Likes
38,942
Location
Gold Coast, Queensland, Australia
Ironically, the SL2020 had one very good feature, you could use it in "exclude track" mode. For some CD's, this was a blessing. I've never seen that feature since.

The Akai CD-A7 has arguably the best programming functions on a CD player (or anything else) I have ever seen.

It has AND, TO and WITHOUT.

1581027268480.png


example: 1 TO 18 WITHOUT 7 AND 3. As a logical person, I think you'd absolutely love it. :)

PS. It's smart too. You can't confuse it- I tried. edit: If I recall it correctly, Akai used the term "Natural Logic" to describe the programming functions.
 
Last edited:

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
And, for the record, dither linearizes quantization. Signal level need not be considered, beyond "do not overload".

Just to illustrate... 1kHz sine at 0dBr truncated to 16-bits:

(Note, c.f. plots in my last post, floor has been changed to -140dBr from -100dBr.)

1581026800476.png


(Difference = ~-96dBr.)

And "overload"--1kHz sine at 1dBr, hard clip at 0dBr:

1581027287826.png
 

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
The Akai CD-A7 has arguably the best programming functions on a CD player (or anything else) I have ever seen.

As Phil Spector (possibly apocryphally?) said, "[albums are] two hits and ten pieces of junk," so I'm not sure that's particular convenience. ;-) "Curated" "hard disk" library/playlists, please. :)

Watched a couple of YouTube videos showing the Philips CD-100 last night. Really bad example, I know, but CD feels incredibly archaic...
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,792
Location
My kitchen or my listening room.
The Akai CD-A7 has arguably the best programming functions on a CD player (or anything else) I have ever seen.
...

example: 1 TO 18 WITHOUT 7 AND 3. As a logical person, I think you'd absolutely love it. :)

PS. It's smart too. You can't confuse it- I tried. edit: If I recall it correctly, Akai used the term "Natural Logic" to describe the programming functions.

Cool. These days it's simpler, of course.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,705
Location
Hampshire
Just to illustrate... 1kHz sine at 0dBr truncated to 16-bits:

(Note, c.f. plots in my last post, floor has been changed to -140dBr from -100dBr.)

View attachment 48903

(Difference = ~-96dBr.)

And "overload"--1kHz sine at 1dBr, hard clip at 0dBr:

View attachment 48905
You might want to use a different FFT window for such plots to avoid the side lobes. I like Dolph-Chebyshev in general. For things like this, rectangular is great with the FFT length an integer multiple of the period.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,705
Location
Hampshire
As Phil Spector (possibly apocryphally?) said, "[albums are] two hits and ten pieces of junk,"
That was true when albums had an A and a B side. Nowadays they have only one side.
 

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
You might want to use a different FFT window for such plots to avoid the side lobes. I like Dolph-Chebyshev in general. For things like this, rectangular is great with the FFT length an integer multiple of the period.

Thanks. :) Unfortunately, the stock Reaper FFT analyser has options of Rectangular, Hamming, Blackman-Harris, or Blackman. I'll see what other plug-ins are available, or... come to think of it... the stock FFT analyser is written in Reaper's JSFX script language, so it should be possible to modify the code and add other windowing options...
 
Last edited:
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,792
Location
My kitchen or my listening room.
Thanks. :) Unfortunately, the stock Reaper FFT analyser has options of Rectangular, Hamming, Blackman-Harris, or Blackman. I'll see what other plug-ins are available, or... come to think of it... the stock FFT analyser is written in Reaper's JSFX script language, so it should be possible to modify the code and add other windowing options...

Blackman might be handy there, for deeper tails, but wider top. http://www.aes-media.org/sections/pnw/pnwrecaps/2018/jj_bsmith_window_jan2018/ talks about windowing, but the point is of course "it depends on what you need". Nutall might be interesting, too.
 

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
That was true when albums had an A and a B side. Nowadays they have only one side.

Current releases contain zero hits out of n tracks. ;-)

(And by "hit" I mean, er, actual "hit" records, ones that hit you in the teeth and won't let go... and maybe become "standards" in due course... i.e. not based on sales volume nor streaming stats.)
 

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
Here's the relevant part of the JSFX script. windowtype value of 1 is Hamming, 2 is Blackman-Harris, 3 is Blackman.

I've done a screen capture to keep syntax highlighting intact.

1581030004591.png


Hamming window:

1581030371934.png

Where:

1581030609491.png


[Source: Spectral Audio Signal Processing (Julius O. Smith III)]

So in the above code...

0.53836 = α 0.46164 = 2β windowpos = (2πn/M)

Hmm, why is -cos(windowpos)*0.46164 used and not +?


And the Dolph-Chebyshev window:

1581031156475.png


Inverse FFT is then used to calculate w(n). Yay!

Should probably just use MATLAB but I like the idea of getting it working in Reaper. :)
 
Last edited:

xr100

Addicted to Fun and Learning
Joined
Jan 6, 2020
Messages
518
Likes
237
Location
London, UK
How many sides does a Spotify stream have?

Depends on the number of platters in their data centres. ;-)

I listened to the "YouTube Top 20" playlist the other day, and skipped through all of the tracks after a few seconds. So that's zero "hits" out of 20 tracks. ;-)
 
Last edited:

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,910
Likes
16,737
Location
Monument, CO
FFT windowing: I usually follow the IEEE Standard and thus do not need to window. There are numerous other relatively prime techniques for choosing frequencies to avoid windowing.

As far as windows, bearing in mind not really my area, Blackman and Blackman-Harris are what I use for most general processing, and Kaiser for pulse systems.
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,792
Location
My kitchen or my listening room.
Thanks JJ. I spot a certain somebody on that page. ;-)

Not some old, grumpy, grey-haired curmudgeon????

Oh, and I much prefer Hann window to Hamming window. The optimization in a Hamming window is "mostly harmless" in terms of real usage, and having the discontinuity at the edges removed is better in many cases.

hann(N)= sin( 2*pi* (2n+1)/4/N))^2 (0<=n<N) You may see other expressions that go to zero at the ends. That is making the window unnecessarily short for analysis. It can also be written as .5 - .5 cos(...) Same thing.

To answer your question about Hamming window, the + centers the window around zero. if you use - it centers the window around N/2. The formula I give above for Hann window centers at N/2. (or halfway between N/2-1 and N/2 for even length windows).

The hann window, shifted by half a length and summed to itself, adds to '1' exactly. Some other windows do this, but not all.
 
Last edited:
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,282
Likes
4,792
Location
My kitchen or my listening room.
FFT windowing: I usually follow the IEEE Standard and thus do not need to window. There are numerous other relatively prime techniques for choosing frequencies to avoid windowing.

As far as windows, bearing in mind not really my area, Blackman and Blackman-Harris are what I use for most general processing, and Kaiser for pulse systems.


One often does not have that choice in the real world of audio, so yes, windows are then necessary. For test signals, there is often a good reason to have a prime wrt analysis length, too. Depends on what you're doing.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,705
Location
Hampshire
FFT windowing: I usually follow the IEEE Standard and thus do not need to window. There are numerous other relatively prime techniques for choosing frequencies to avoid windowing.
Rectangular/no window is great when you can perfectly match the FFT size to the signal period (aside from low-level noise). Sometimes that's possible, but often it's not, and then the best choice, as JJ said, depends on what you need.

I often use Dolph-Chebyshev since it easily allows pushing the side lobes below the noise level, even when there's very little noise. If you're only interested in features above the level of the side lobes, another window may do just as well or better.
 
Top Bottom