Audiophile nonsense

Get your science fix here: research, quackery, activism and all the rest
Post Reply
User avatar
bjn
Stummy Beige
Posts: 2915
Joined: Wed Sep 25, 2019 4:58 pm
Location: London

Audiophile nonsense

Post by bjn » Sun Mar 12, 2023 10:07 pm

Admittedly this is 10 years old, but this thread has audiophiles discussing which C++ memory allocation and copy functions in audio playback software lead to subjectively better sounding music. Egads the stupids are strong in this lot. Or it was an excellent bit of trolling.

https://www.audioasylum.com/messages/pcaudio/119979/

User avatar
dyqik
Princess POW
Posts: 7526
Joined: Wed Sep 25, 2019 4:19 pm
Location: Masshole
Contact:

Re: Audiophile nonsense

Post by dyqik » Sun Mar 12, 2023 10:37 pm

If the thread was 30 or 40 years old, then there might be a point.

Imrael
Snowbonk
Posts: 505
Joined: Tue Nov 12, 2019 5:59 am

Re: Audiophile nonsense

Post by Imrael » Mon Mar 13, 2023 9:07 am

I think my favourite audopphile nonsense was tap covers. If you have an open plan kitchen or had door between listening space and kitchen open, the taps might resonate and contribute to the sound. So put custom made rubber covers over the end of them when listening, obviously.

User avatar
TimW
Catbabel
Posts: 800
Joined: Mon Nov 11, 2019 4:27 pm

Re: Audiophile nonsense

Post by TimW » Tue Mar 14, 2023 7:47 am

From the original post (A revolution in audio rendering)
Does a while loop sound better than a for loop ? there's something to ponder.

User avatar
bjn
Stummy Beige
Posts: 2915
Joined: Wed Sep 25, 2019 4:58 pm
Location: London

Re: Audiophile nonsense

Post by bjn » Tue Mar 14, 2023 3:44 pm

I’m half certain it’s genius trolling.

User avatar
dyqik
Princess POW
Posts: 7526
Joined: Wed Sep 25, 2019 4:19 pm
Location: Masshole
Contact:

Re: Audiophile nonsense

Post by dyqik » Tue Mar 14, 2023 5:06 pm

Once upon a time there might have been issues with buffer underruns on DACs operated at high rates, and the type of loop could possibly make a difference there.

Even fifteen years ago, buffer underruns were irrelevant outside of pro-audio multitrack DAWs.

User avatar
bjn
Stummy Beige
Posts: 2915
Joined: Wed Sep 25, 2019 4:58 pm
Location: London

Re: Audiophile nonsense

Post by bjn » Tue Mar 14, 2023 6:25 pm

The difference between a C++ for and while loop is going to be nonexistent in any sensibly structured code. Having a poorly written loop in either will of course screw you. A for loop is just syntactic sugar around a while loop. If you are stuffing up something and not feeding your DACs fast enough, it will be really bl..dy obvious.

User avatar
dyqik
Princess POW
Posts: 7526
Joined: Wed Sep 25, 2019 4:19 pm
Location: Masshole
Contact:

Re: Audiophile nonsense

Post by dyqik » Tue Mar 14, 2023 7:03 pm

bjn wrote:
Tue Mar 14, 2023 6:25 pm
The difference between a C++ for and while loop is going to be nonexistent in any sensibly structured code. Having a poorly written loop in either will of course screw you. A for loop is just syntactic sugar around a while loop. If you are stuffing up something and not feeding your DACs fast enough, it will be really bl..dy obvious.
Yes, of course.

The other way it might make a difference is with a poorly written compiler optimization.

User avatar
basementer
Dorkwood
Posts: 1504
Joined: Mon Nov 11, 2019 1:03 pm
Location: 8024, Aotearoa
Contact:

Re: Audiophile nonsense

Post by basementer » Tue Mar 14, 2023 7:26 pm

bjn wrote:
Tue Mar 14, 2023 6:25 pm
The difference between a C++ for and while loop is going to be nonexistent in any sensibly structured code. Having a poorly written loop in either will of course screw you. A for loop is just syntactic sugar around a while loop. If you are stuffing up something and not feeding your DACs fast enough, it will be really bl..dy obvious.
Everything turns into machine code.

Down at that level, a for loop can be controlled by register to register instructions, but a do while or do until is likely to refer to a storage location. RR instructions execute in fewer clock cycles than RS or SS instructions. But this has no perceptible effect, because it is negligible when compared to the clock cycles taken up by all the instructions within the loop. It's the content of the loop that's everything, and as you say, if that's badly written, it will be noticeable to someone with cloth ears let alone golden ones.
Money is just a substitute for luck anyway. - Tom Siddell

User avatar
snoozeofreason
Snowbonk
Posts: 485
Joined: Fri Nov 15, 2019 1:22 pm

Re: Audiophile nonsense

Post by snoozeofreason » Wed Mar 15, 2023 3:34 pm

As bjn says. A C++ for loop is just syntactic sugar for a while loop. Anything that can be expressed with a while loop can be expressed with a for loop, and vice versa. Translating between while loops and the equivalent for loops (or the other way round) is trivial. It seems unlikely that a modern compiler would spot opportunities for optimising a for loop, but not spot them when they presented themselves in the equivalent while loop.
In six days the Lord made the heavens and the earth, the sea, and all that is in them. The human body was knocked up pretty late on the Friday afternoon, with a deadline looming. How well do you expect it to work?

User avatar
nekomatic
Dorkwood
Posts: 1376
Joined: Mon Nov 11, 2019 3:04 pm

Re: Audiophile nonsense

Post by nekomatic » Thu Mar 16, 2023 12:18 pm

It's just lazyness on the part of the player developers that they rely on the old methods, I guess they think bits are bits.
No developer has been particularly friendly about my efforts, but then developers are quite arrogant, that's why I had to write my own player.
sorry, I am new to this so don't really understand what you said, but I think they would be working on the assumption that so long as the bits arrived on time and there were no underruns then all is good.

However, it does seem to make a difference to the sound, many would argue that the sound should be the same.

So, it seems to me to be a fundamental paradox of computer audio that you need C++ to write low level code to handle the passing of data to the device in a timely manner, but the C++ standard is to write exception free code and it is the code that handles these exceptions that affects the sound. I would imagine no professional programmer would allow the above to be released which is why us audiophiles are left to try and tweak/filter the generated noise. I have my solution to it and am ok to run with unsafe code because it sounds so good. lol
A tenner to anyone who can seed the idea that vintage compilers sound warmer and more natural (unless I missed it due to the way that website formats most of the thread with one word per line).
Move-a… side, and let the mango through… let the mango through

Imrael
Snowbonk
Posts: 505
Joined: Tue Nov 12, 2019 5:59 am

Re: Audiophile nonsense

Post by Imrael » Tue Mar 21, 2023 11:22 am

snoozeofreason wrote:
Wed Mar 15, 2023 3:34 pm
As bjn says. A C++ for loop is just syntactic sugar for a while loop. Anything that can be expressed with a while loop can be expressed with a for loop, and vice versa. Translating between while loops and the equivalent for loops (or the other way round) is trivial. It seems unlikely that a modern compiler would spot opportunities for optimising a for loop, but not spot them when they presented themselves in the equivalent while loop.
To slightly disagree at a nit--picking level without changing the overall outcome :D

The optimiser will work best when the decision point for exiting the loop can be taken outside it. I could have explained this properly at one point, but its to do with lookahead memory fetching and processing in modern CPU's. It is possible that programmers use "while" loops more often when the conditions are more complex, resulting at the lower level in a separate memory lookup and making the lookaheads less efficient. It certainly doesnt have to be that way - in principle anything a "for" or "while" loop can do can be achieved with conditions and goto-s. But my unsupported suspicion is that programmer behaviour leans towards "while" for complicated.

(I wish I could remember the CPU lookahead stuff better, but its been a long time and was never something I needed to know day-day)

User avatar
snoozeofreason
Snowbonk
Posts: 485
Joined: Fri Nov 15, 2019 1:22 pm

Re: Audiophile nonsense

Post by snoozeofreason » Tue Mar 21, 2023 7:06 pm

In my experience 'for' loops are almost always used to iterate over data structures. But that's only because the code looks a bit more readable than it would do if you'd written the equivalent 'while' loop. I'd imagine that the first thing a compiler does with a 'for' loop is to convert it into some form that makes it indistinguishable from a 'while' loop. I'd stake a bet that a 'for' loop and its equivalent 'while' loop produce exactly the same machine code/bytecode when compiled.
In six days the Lord made the heavens and the earth, the sea, and all that is in them. The human body was knocked up pretty late on the Friday afternoon, with a deadline looming. How well do you expect it to work?

yoss
Fleury White
Posts: 8
Joined: Sat Dec 14, 2019 9:54 pm

Re: Audiophile nonsense

Post by yoss » Wed Mar 22, 2023 1:34 pm

A for loop is generally more pleasant to use when you are going to iterate over something a given number of times, a while loop is better for when some arbitrary condition needs to be met. (while the item in the list isn't a Status Quo album for example).

Of course we all know that this code is probably only assembling a buffer of a given side prior to dumping it in some sort of digital to analogue converter, so who gives a damn.

yoss
Fleury White
Posts: 8
Joined: Sat Dec 14, 2019 9:54 pm

Re: Audiophile nonsense

Post by yoss » Wed Mar 22, 2023 1:36 pm

I wonder what the Audiophile view on functional programming is? Sounds a bit 'gritty' I guess.

User avatar
bjn
Stummy Beige
Posts: 2915
Joined: Wed Sep 25, 2019 4:58 pm
Location: London

Re: Audiophile nonsense

Post by bjn » Wed Mar 22, 2023 1:52 pm

snoozeofreason wrote:
Tue Mar 21, 2023 7:06 pm
In my experience 'for' loops are almost always used to iterate over data structures. But that's only because the code looks a bit more readable than it would do if you'd written the equivalent 'while' loop. I'd imagine that the first thing a compiler does with a 'for' loop is to convert it into some form that makes it indistinguishable from a 'while' loop. I'd stake a bet that a 'for' loop and its equivalent 'while' loop produce exactly the same machine code/bytecode when compiled.
An indeed it does.

https://godbolt.org/z/T96qq1qGz

User avatar
Boustrophedon
Stummy Beige
Posts: 2860
Joined: Mon Nov 11, 2019 3:58 pm
Location: Lincolnshire Wolds

Re: Audiophile nonsense

Post by Boustrophedon » Wed Mar 22, 2023 10:39 pm

Goto loops have a definite je ne sais quoi about them, a hint of discordant dijkstra.
Hjulet snurrar men hamstern är död.

Post Reply